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

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

1. LayaAir引擎AS3与Flash原生AS3的开发差异(ActionScript-简介篇(AS3)-LayaAir引擎简介) [ 100%]

...e.graphics.endFill(); addChild(sprite); sprite.addEventListener(MouseEvent.CLICK,onClick); function onClick(evt:MouseEvent):void { trace("------aaa---------"); } ``` **LayaAir引擎中正确的用法示例:** 实现方法一: ```java var sprite:Sprite = new Sprite(); sprite.graphics.drawRect(100...

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

2. LayaAir引擎AS3与Flash原生AS3的开发差异(ActionScript-简介篇(AS3)-LayaAir引擎简介) [ 100%]

...e.graphics.endFill(); addChild(sprite); sprite.addEventListener(MouseEvent.CLICK,onClick); function onClick(evt:MouseEvent):void { trace("------aaa---------"); } ``` **LayaAir引擎中正确的用法示例:** 实现方法一: ```java var sprite:Sprite = new Sprite(); sprite.graphics.drawRect(100...

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

3. 显示与切换图片(ActionScript-LayaAir基础篇(AS3)-位图) [ 86%]

...图片区域的点击事件,触发后执行switchImg切换图片 img.on("click",this,switchImg); //将图片添加到舞台 Laya.stage.addChild(img); } private function switchImg(e:*=null):void { //清空图片 img.graphics.clear(); //获得要切换的图片资源路径 var imgUrl:String = (flag ...

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

4. Sprite3D的Layer(JavaScript-3D基础(JS)-LayaAir3D之精灵) [ 85%]

...... //切换图层按钮事件监听 this.changeActionButton.on(Laya.Event.CLICK, this, function():void { this.camera.removeAllLayers(); this.layerIndex ++; this.camera.addLayer(this.layerIndex%4 +1); this.camera.addLayer(5); }); ``` ![](img/1.gif)(图1)

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

5. Sprite3D的Layer(TypeScript-3D基础(TS)-LayaAir3D之精灵) [ 85%]

...... //切换图层按钮事件监听 this.changeActionButton.on(Laya.Event.CLICK, this, function():void { this.camera.removeAllLayers(); this.layerIndex ++; this.camera.addLayer(this.layerIndex%4 +1); this.camera.addLayer(5); }); ``` ![](img/1.gif)(图1)

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

6. Sprite3D的Layer(ActionScript-3D基础(AS3)-LayaAir3D之精灵) [ 85%]

...r = 4; ...... //切换图层按钮事件监听 changeActionButton.on(Event.CLICK, this, function():void { camera.removeAllLayers(); layerIndex ++; camera.addLayer(layerIndex%4 +1); camera.addLayer(5); }); ``` ![](img/1.gif)(图1)

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

7. 显示与切换图片(JavaScript-LayaAir基础篇(JS)-位图) [ 84%]

...55, 72); ape.pos(200, 200); // 显示默认纹理 switchTexture(); ape.on("click", this, switchTexture); } function switchTexture() { var textureUrl = (flag = !flag) ? texture1 : texture2; // 更换纹理 ape.graphics.clear(); ape.loadImage(textureUrl); var texture = Laya.loader.getRes(textureUrl); ...

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

8. 摄像机捕捉目标(ActionScript-3D基础(AS3)-LayaAir3D之Camera) [ 83%]

...or3(0, 1, 0); ``` ```typescript //点击事件 changeActionButton.on(Event.CLICK, this, function():void{ index++; if (index % 3 === 1 ){ //摄像机捕捉模型目标 camera.transform.lookAt(box.transform.position, _up); } else if (index % 3 === 2){ //摄像机捕捉模型目标 camera.transform.loo...

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

9. 摄像机捕捉目标(JavaScript-3D基础(JS)-LayaAir3D之Camera) [ 83%]

...0); ``` ```typescript //点击事件 this.changeActionButton.on(Laya.Event.CLICK, this, function(){ this.index++; if (this.index % 3 === 1 ){ //摄像机捕捉模型目标 this.camera.transform.lookAt(this.box.transform.position, this._up); } else if (this.index % 3 === 2){ //摄像机捕捉模型...

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

10. 摄像机捕捉目标(TypeScript-3D基础(TS)-LayaAir3D之Camera) [ 83%]

...0); ``` ```typescript //点击事件 this.changeActionButton.on(Laya.Event.CLICK, this, function(){ this.index++; if (this.index % 3 === 1 ){ //摄像机捕捉模型目标 this.camera.transform.lookAt(this.box.transform.position, this._up); } else if (this.index % 3 === 2){ //摄像机捕捉模型...

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