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

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

1. 安卓和iPhone的触控差异 [ 100%]

...Array = e.touches; if (touches) { moveX = touches[0].stageX stage.on(Event.MOUSE_MOVE, this, onMouseMove) } } private function onMouseMove(e:Event= null):void { var touches:Array = e.touches; if (touches) { xx = moveX - touches[0].stageX; hero.x -=xx moveX = touches[0].stageX; } } 上面写法安卓...

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

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

...ircle(0,0,20,"#990000"); Laya.stage.addChild(sp); Laya.stage.on(Laya.Event.MOUSE_MOVE,this,function() { sp.pos(Laya.stage.mouseX,Laya.stage.mouseY); }); ``` ![图片1.png](https://official.layabox.com/laya_data/Chinese/LayaAir_AS3/2D/advanced/PerformanceOptimization/CPU/img/1.png) (图1) 此时F...

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

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

...0, 0, 20, "#990000"); Laya.stage.addChild(sp);    Laya.stage.on(Event.MOUSE_MOVE, this, function() {     sp.pos(Laya.stage.mouseX, Laya.stage.mouseY); }); ``` ​ ![图片1.png](img/1.png) ​ (图1) ​ 此时FPS显示30,并且在鼠标移动时,可以感觉到圆球位置的更...

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

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

...drawCircle(0,0,20,"#990000"); Laya.stage.addChild(sp); Laya.stage.on(Event.MOUSE_MOVE,this,function() { sp.pos(Laya.stage.mouseX,Laya.stage.mouseY); }); ``` ![图片1.png](https://official.layabox.com/laya_data/Chinese/LayaAir_AS3/2D/advanced/PerformanceOptimization/CPU/img/1.png) (图1) 此时F...

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

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

...ircle(0,0,20,"#990000"); Laya.stage.addChild(sp); Laya.stage.on(Laya.Event.MOUSE_MOVE,this,function() { sp.pos(Laya.stage.mouseX,Laya.stage.mouseY); }); (图3-1) 此时FPS显示30,并且在鼠标移动时,可以感觉到圆球位置的更新不连贯。设置Stage.frameRate为Stage.FRAME_MOU...

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