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

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

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

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

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

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

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

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

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

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

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

4. 播放动画(JavaScript-3D基础(JS)-LayaAir3D之Animator动画) [ 91%]

...; //播放攻击状态 ani.play("attack"); //等待动画播放完成 Laya.timer.frameLoop(1,this,function(){ //如果当前播放state已经播放完了一次 if(ani.getCurrentAnimatorPlayState().normalizedTime >= 1){ //回到站立状态 ani.play("stand"); } }); } ``` ![](img/6.gif)(图6)

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

5. 播放动画(TypeScript-3D基础(TS)-LayaAir3D之Animator动画) [ 90%]

...; //播放攻击状态 ani.play("attack"); //等待动画播放完成 Laya.timer.frameLoop(1,this,function(){ //如果当前播放state已经播放完了一次 if(ani.getCurrentAnimatorPlayState().normalizedTime >= 1){ //回到站立状态 ani.play("stand"); } }); } ``` ![](img/6.gif)(图6)

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

6. 播放动画(ActionScript-3D基础(AS3)-LayaAir3D之Animator动画) [ 90%]

...; //播放攻击状态 ani.play("attack"); //等待动画播放完成 Laya.timer.frameLoop(1,this,function():void{ //如果当前播放state已经播放完了一次 if(ani.getCurrentAnimatorPlayState().normalizedTime >= 1){ //回到站立状态 ani.play("stand"); } }); } ``` ![](img/6.gif)(图6)

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

7. ProgressBar属性详解(JavaScript-IDE篇(JS)-IDE组件属性详解) [ 87%]

...dler = new Handler(this, onChange); Laya.stage.addChild(progressBar); Laya.timer.loop(100, this, changeValue); } function changeValue() { if (progressBar.value >= 1) progressBar.value = 0; progressBar.value += 0.05; } function onChange(value) { console.log("进度:" + Math.floor(value * 100) + "%"...

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

8. ProgressBar属性详解(TypeScript-IDE篇(TS)-IDE组件属性详解) [ 85%]

... Handler(this, this.onChange); Laya.stage.addChild(this.progressBar); Laya.timer.loop(100, this, this.changeValue); } private changeValue(): void { if (this.progressBar.value >= 1) this.progressBar.value = 0; this.progressBar.value += 0.05; } private onChange(value: number): void { console.log("进...

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

9. ProgressBar属性详解(ActionScript-IDE篇(AS3)-IDE组件属性详解) [ 83%]

...d(progressBar); //时间间隔循环,每100毫秒改变一次数据 Laya.timer.loop(100, this, changeValue); } /***时间间隔循环回调,更新进度条***/ private function changeValue():void { //最大为1,每次间隔更新5% if (progressBar.value >= 1) progressBar.value = 0; progressBar...

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

10. LayaAir和原生DOM交互(ActionScript-2D进阶篇(AS3)-扩展模块) [ 28%]

...udioBufferSourceNode.buffer = buffer; audioBufferSourceNode.start(0); Laya.timer.loop(1,this,this.drawHandler); } private function drawHandler():void { Laya.stage.graphics.clear(); var dataArray:Uint8Array = new Uint8Array(analyser.frequencyBinCount); analyser.getByteFrequencyData(dataArray); var st...

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