• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 4,000 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0085 秒)

531. 内存优化方式(TypeScript-2D进阶篇(TS)-性能优化) [ 92%]

...颜色 Laya.stage.bgColor = "#232628"; //帧循环 Laya.timer.frameLoop(1, this, this.onFrame); } onFrame(): void { //如果创建对象时间为100帧间隔后 if (this.createTime >= 100) { //每200帧间隔创建30个雪花 for (var i: number = 0; i 640+20||img1.scaleX 在一些特殊情况我们...

来源: Laya2.0_文档 发布时间: 20210715

532. image的uv动画不能平铺 [ 92%]

...了repeat=true,改变uv时图片没有平铺 private onFrame():void{ if(this.testScrollImg){ if(this.testScrollImg._bitmap && this.testScrollImg._bitmap.source){ this.testScrollImg._bitmap.source.repeat = true; var ss:any = this.testScrollImg._bitmap.source.uv; var uv:any[] = []; uv[0] = s...

来源: Laya_社区 发布时间: 20180321

533. UI-Label [ 92%]

...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.setup(); } setup() { this.createLabel("#FFFFFF", null).pos(30, 50); this.createLabel("#00FFFF", null).pos(290, 50); this.createLabel("#FFFF00", "#FFFFFF").pos(30, 100); this.createLabel("#000000", "#FFFFFF").pos(290, 100...

来源: Laya2.0_示例 发布时间: 20241002

534. 引擎遮罩报错 [ 92%]

...存 用了cacheAs 不起作用 zhengjiajia • 2017-09-13 20:05 @Monica: this.itemSpr.cacheAs = 'normal'; this.itemSpr.cacheAsBitmap = false; 为何这样设置 在报错的时候 发现这两个属性完全不正确呢 zhengjiajia • 2017-09-13 20:09 @Monica:this.itemSpr = new Laya.Sprite; this.it...

来源: Laya_社区 发布时间: 20170913

535. emoji表情文字乱码 [ 92%]

...r CharSegment=(function(){     function CharSegment(){         this._sourceStr=null;     }      __class(CharSegment,'laya.webgl.text.CharSegment');     var __proto=CharSegment.prototype;     Laya.imps(__proto,{"laya.webgl.text.ICharSegment":true})     __proto.textToS...

来源: Laya_社区 发布时间: 20180517

536. 用Loader加载完atlas,然后使用animation播放问题 [ 92%]

用Loader加载完atlas,然后使用animation播放问题 this._load = new Laya.Loader() this._load.on(Laya.Event.ERROR, this, this.onError); this._load.on(Laya.Event.COMPLETE, this, this.loadComplete); this._load.load(this._data.url, Laya.Loader.ATLAS, true); 加载完成后 this._ani = new Animat...

来源: Laya_社区 发布时间: 20171212

537. 微信小游戏中加载unity导出的场景报错the .lh file root type must be Scene [ 92%]

...ne: the .lh file root type must be Scene,please use other function to load this file."); } }            var innerResouMap=data[1];     Utils3D._createNodeByJson(this,json,this,innerResouMap);     this.event("hierarchyloaded",[this]);     this.__loaded=true;   }   打了一...

来源: Laya_社区 发布时间: 20180101

538. 自定义渲染后,customRender里设置uniform值在ui节点下不生效 [ 92%]

...ext:Laya.RenderContext,x:number,y:number):void{             if(this.shader._program)             {                 let u_lightTime = gl.getUniformLocation(this.shader._program, "u_lightTime")                 gl.uniform1f(u_lightTime, this.timer...

来源: Laya_社区 发布时间: 20181121

539. 判断玩家在地面还在空中 [ 92%]

...物体代码   onGround():any{         let bc:Laya.BoxColliderShape = this.rigidbody.colliderShape as Laya.BoxColliderShape         let y:number = this.transform.position.y-bc.sizeY/2 - 0.05         let vec3:Laya.Vector3 = new Laya.Vector3(this.transform.position.x,y,this.transform.posi...

来源: Laya_社区 发布时间: 20190905

540. 动画-旧版骨骼动画 [ 92%]

...kinModel/Zombie/old/Zombie.lh")); zombie.once(Laya.Event.HIERARCHY_LOADED, this, function () { zombie.transform.rotation = new Laya.Quaternion(-0.7071068, 0, 0, -0.7071068); zombie.transform.position = new Laya.Vector3(0.3, 0, 0); addSkinComponent(zombie); loadUI(); }); var skinAniUrl = [ "../../res...

来源: Laya_示例 发布时间: 20241002