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

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

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

...ask.graphics.drawCircle(0,0,50); mask.graphics.endFill(); sp.mask=mask; addEventListener(Event.ENTER_FRAME,function():void { mask.x++; mask.cacheAsBitmap=true; sp.cacheAsBitmap=true; }); ``` **LayaAir引擎中正确的用法示例:** ```java Laya.init(600,400) var sp:Sprite=new Sprite(); sp.graphi...

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

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

...ask.graphics.drawCircle(0,0,50); mask.graphics.endFill(); sp.mask=mask; addEventListener(Event.ENTER_FRAME,function():void { mask.x++; mask.cacheAsBitmap=true; sp.cacheAsBitmap=true; }); ``` **LayaAir引擎中正确的用法示例:** ```java Laya.init(600,400) var sp:Sprite=new Sprite(); sp.graphi...

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

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

...nifests/vM7nH0Kl.m3u8');//加载m3u8源 hls.attachMedia(video); hls.on(Hls.Events.MANIFEST_PARSED,function():void{ video.play(); }); } plyr.setup(video); } } } ``` 编译运行代码,发现网页已经可以播放视频了。开发者可能注意到这里我们初始化引擎的时候是这样的...

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

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

...4; ...... //切换图层按钮事件监听 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之精灵) [ 79%]

...4; ...... //切换图层按钮事件监听 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. 摄像机捕捉目标(JavaScript-3D基础(JS)-LayaAir3D之Camera) [ 77%]

...0, 1, 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

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

...0, 1, 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

8. 可视遮罩层Layer(JavaScript-3D基础(JS)-LayaAir3D之Camera) [ 76%]

...件 每一次点击切换一个显示层 this.changeActionButton.on(Laya.Event.CLICK, this, function(){ //清除所有图层 this.camera.removeAllLayers(); //计数自加一 this.layerIndex ++; //设置可视图层 this.camera.addLayer(this.layerIndex%4 + 1); //将地板图层加入,地板不参...

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

9. 可视遮罩层Layer(TypeScript-3D基础(TS)-LayaAir3D之Camera) [ 76%]

...件 每一次点击切换一个显示层 this.changeActionButton.on(Laya.Event.CLICK, this, function():void { //清除所有图层 this.camera.removeAllLayers(); //计数自加一 this.layerIndex ++; //设置可视图层 this.camera.addLayer(this.layerIndex%4 + 1); //将地板图层加入,地板...

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

10. 微信小游戏分包实战(JavaScript-小游戏适配文档-微信小游戏) [ 75%]

...UI,UI) //监听按钮btnA的点击事件,触发后处理 UI.btnA.on(Laya.Event.CLICK, this, showB); } ``` 代码分出后,我们不要忘了在主包内调用微信小游戏官方提供的分包加载与回调通知方法。在示例项目中,我们直接在图集加载的回调里,加载分...

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