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

大约有 1,155 项符合查询结果, 库内数据总量为 30,903 项。 (搜索耗时: 0.0052 秒)

501. 分享:List相关(Item增删功能) [ 70%]

...er.load([{url: "res/atlas/comp.json", type: Loader.ATLAS}], Handler.create(this, onLoaded)); } private function onLoaded():void { //实例UI界面 listP = new ListPageUI(); Laya.stage.addChild(listP); Laya.timer.once(1000,this,onAdd);//1000毫秒后初始化list数据 listP.add.on(Event.CLICK,this,o...

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

502. CPU优化方式(JavaScript-2D进阶篇(JS)-性能优化) [ 70%]

...频率依赖于参数指定时间。 ```javascript Laya.timer.frameLoop(1, this, animateFrameRateBased); Laya.stage.on("click", this, dispose); function dispose() { Laya.timer.clear(this, animateFrameRateBased); } ``` 当一个对象的生命周期结束时,记得清除其内部的Timer: ### **...

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

503. Animation类如何调用complete事件 [ 70%]

...交 1 个回复 Monica - 知识达人 赞同来自: ani.on(Event.COMPLETE,this,onComplete); 2017-09-27 0 7 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 该问题目前已经被锁定, 无法添加新回复 发起人 chenhuanqi23 相关问题 两个对象new了一个相同的...

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

504. Laya中Button等组件lose skin的问题 [ 70%]

...hangeClips。 __getset(0,__proto,'skin',function(){         return this._skin;         },function(value){         if (this._skin !=value){             this._skin=value;             this.callLater(this.changeClips);             this._setStat...

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

505. 加上size设置后,精灵不能点击. [ 70%]

...lower2.png" : "img/flower3.jpg" img.loadImage(s); img.on(Laya.Event.CLICK, this, () => { img.y -= 10; }) img.pos(100, 300) Laya.stage.addChild(img) } function createFlower() { var f = new Laya.Sprite(); var r = Math.random(); var s = r > 0.66 ? "img/flower1.jpg" : r > 0.33 ? "img/flower2.pn...

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

506. 1.5版本:3D Camera无法使用? [ 70%]

...请: 与内容相关的链接 提交 1 个回复 183*****755 赞同来自: this.scene = Laya.stage.addChild(new Laya.Scene()) as Laya.Scene; this.camera = (this.scene.addChild(new Laya.Camera(0, 1, 1000))) as Laya.BaseCamera; this.camera.transform.translate(new Vector3(0, 0, 500)); 这样用即可...

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

507. Laya.loader.create 进度回调函数执行两次!!! [ 70%]

...数执行两次!!! Laya.loader.create("Main/SMain.ls",Laya.Handler.create(this,this.on3DComplete),Laya.Handler.create(this,this.onProgress,null,false)); Manager.prototype.onProgress = function(value) { console.log("value=="+Math.floor(value*100)+"%"); }   输出结果: 0.19186599730944645 0.52519...

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

508. 如何给Tab里的button设置点击事件? [ 69%]

...28 关注: 2 人 Y_Yao • 2017-05-16 10:26 function daoju() { daoju.super(this); this.Tab_ZM.selectHandler = new Laya.Handler(this, onSelect); } function onSelect(index) { console.log("当前选择的标签页索引为:" + index);); this.Tab_ZM.on(Event.CLICK,this,onDaoju(index)); } 想...

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

509. List滚动到底部事件 [ 69%]

...end',list,scrollBarHandler)   function scrollBarHandler(){         if(this.scrollBar.value == this.scrollBar.max){                 var that = this;                 setTimeout(function(){                      that.addItem("../../res/ui/listskins/5.jpg");          ...

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

510. 1.7.19beta版播放音乐异常 [ 69%]

1.7.19beta版播放音乐异常 if (this.gain.gain.setTargetAtTime){ this.gain.gain.setTargetAtTime(this._volume,this.context.currentTime,0);一跑起来就在这里异常 "Failed to execute 'setTargetAtTime' on 'AudioParam': Time constant must be a finite positive number: 0"   在chrome里调试...

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