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

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

1. Laya.timer.frameLoop(1, this, this.aaa);对象移动会出现颤抖现象 [ 100%]

Laya.timer.frameLoop(1, this, this.aaa);对象移动会出现颤抖现象 this.loadHp(); Laya.timer.frameLoop(1, this, this.aaa); private bb:number = 6; private playerHB:logic.UI.role.PlayerHealthBar; private loadHp():void { this.playerHB = new logic.UI.role.PlayerHealthBar(); this.playerHB.pivotX ...

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

2. 重发问题: 点击页面会导致setTimeout setInterval 延迟执行 [ 80%]

...该用requestAnimationFrame。 Laya本身带Laya.timer.loop和Laya.timer.frameLoop,前一个基于时间,后一个基于帧。按照楼主的需求,应该基于时间,但正因为loop是基于时间的,所以类似setInterval,虽然不会卡顿,但是会不流畅。所以当时我研...

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

3. CPU优化方式(ActionScript-2D进阶篇(AS3)-性能优化) [ 76%]

...​ LayaAir提供两种计时器循环来执行代码块。 1. `Laya.timer.frameLoop`执行频率依赖于帧频率,可通过Stat.FPS查看当前帧频。 2. `Laya.timer.loop`执行频率依赖于参数指定时间。 ```javascript Laya.timer.frameLoop(1, this, animateFrameRateBased); Laya.stage...

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

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

...器 LayaAir提供两种计时器循环来执行代码块。 1. `Laya.timer.frameLoop`执行频率依赖于帧频率,可通过Stat.FPS查看当前帧频。 1. `Laya.timer.loop`执行频率依赖于参数指定时间。 ```javascript Laya.timer.frameLoop(1, this, animateFrameRateBased); Laya.stage.o...

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

5. CPU优化方式(TypeScript-2D进阶篇(TS)-性能优化) [ 74%]

...器 LayaAir提供两种计时器循环来执行代码块。 1. `Laya.timer.frameLoop`执行频率依赖于帧频率,可通过Stat.FPS查看当前帧频。 1. `Laya.timer.loop`执行频率依赖于参数指定时间。 ```typescript Laya.timer.frameLoop(1, this, this.animateFrameRateBased); Laya.st...

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

6. 微信小游戏渲染开放域卡顿处理 [ 73%]

...舒服,自己封装的定时器,不想用可直接替换成Laya.timer.frameLoop来替代,请自行修改跟Timer相关代码。 module lie {     /**      * 定时器,可启动、停止及统计已运行时间(单位毫秒),默认启动      */     export class Timer {     ...

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

7. 使用方向键 控制精灵在格子中移动 [ 63%]

...keyup); Laya.stage.on(Laya.Event.KEY_DOWN,this,this.onkeydown); Laya.timer.frameLoop(1,this,this.loop);事件响应 onkeyup(e){ for(let i:number = 0;i<this.keyList.length;i++){ if(this.keyList[i]==e.keyCode){ this.keyList.splice(i,1); break; } } } onkeydown(e){ if(this.keyList.indexOf(e.keyCode)&...

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

8. 2D性能优化 · LayaAir3.0文档 · LAYABOX [ 58%]

...环。 LayaAir提供两种计时器循环来执行代码块。 Laya.timer.frameLoop执行频率依赖于帧频率,可通过Stat.FPS查看当前帧频。 Laya.timer.loop执行频率依赖于参数指定时间。 Laya.timer.frameLoop(1, this, this.animateFrameRateBased); Laya.stage.on("click", this,...

来源: Laya3.0_文档 发布时间: 20231008