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

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

1. 超出文本区域的处理&滚动文本(JavaScript-LayaAir基础篇(JS)-文本) [ 100%]

...crollText(e) { prevX = txt.mouseX; prevY = txt.mouseY; Laya.stage.on(Event.MOUSE_MOVE, this, scrollText); Laya.stage.on(Event.MOUSE_UP, this, finishScrollText); } /* 停止滚动文本 */ function finishScrollText(e) { Laya.stage.off(Event.MOUSE_MOVE, this, scrollText); Laya.stage.off(Event.MOUSE_UP...

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

2. 超出文本区域的处理&滚动文本(ActionScript-LayaAir基础篇(AS3)-文本) [ 99%]

...:Event):void { prevX = txt.mouseX; prevY = txt.mouseY; Laya.stage.on(Event.MOUSE_MOVE, this, scrollText); Laya.stage.on(Event.MOUSE_UP, this, finishScrollText); } /* 停止滚动文本 */ private function finishScrollText(e:Event):void { Laya.stage.off(Event.MOUSE_MOVE, this, scrollText); Laya.stage...

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

3. 超出文本区域的处理&滚动文本(TypeScript-LayaAir基础篇(TS)-文本) [ 97%]

...prevX = this.txt.mouseX; this.prevY = this.txt.mouseY; Laya.stage.on(Event.MOUSE_MOVE, this, this.scrollText); Laya.stage.on(Event.MOUSE_UP, this, this.finishScrollText); } /* 停止滚动文本 */ private finishScrollText(e: Event): void { Laya.stage.off(Event.MOUSE_MOVE, this, this.scrollText); La...

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

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

...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

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

...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

6. 用LayaAir引擎解析Tiled Map地图(JavaScript-2D进阶篇(JS)-扩展模块) [ 66%]

...s.MapY - (Laya.stage.mouseY - this.mLastMouseY); Laya.stage.off(Laya.Event.MOUSE_MOVE, this, mouseMove); } function mouseDown(){ this.mLastMouseX = Laya.stage.mouseX; this.mLastMouseY = Laya.stage.mouseY; Laya.stage.on(Laya.Event.MOUSE_MOVE,this,mouseMove); } /** * 改变视口大小 * 重设地图...

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

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

...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

8. 用LayaAir引擎解析Tiled Map地图(TypeScript-2D进阶篇(TS)-扩展模块) [ 65%]

...s.MapY - (Laya.stage.mouseY - this.mLastMouseY); Laya.stage.off(Laya.Event.MOUSE_MOVE, this, this.mouseMove); } private mouseDown():void { this.mLastMouseX = Laya.stage.mouseX; this.mLastMouseY = Laya.stage.mouseY; Laya.stage.on(Laya.Event.MOUSE_MOVE, this, this.mouseMove); } /** * 改变视口大...

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

9. 用LayaAir引擎解析Tiled Map地图(ActionScript-2D进阶篇(AS3)-扩展模块) [ 64%]

...eX); MapY = MapY - (Laya.stage.mouseY - mLastMouseY); Laya.stage.off(Event.MOUSE_MOVE, this, this.mouseMove); } private function mouseDown():void { mLastMouseX = Laya.stage.mouseX; mLastMouseY = Laya.stage.mouseY; Laya.stage.on(Event.MOUSE_MOVE, this, this.mouseMove); } /** * 改变视口大小 * ...

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