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

大约有 549 项符合查询结果, 库内数据总量为 31,671 项。 (搜索耗时: 0.0057 秒)

511. 3D模型旋转定位问题 [ 45%]

...是使Laya.loader.create("model/build/warehouse1/warehouse1.lh", Laya.Handler.create(this, onComplete)); function onComplete() { //仓库原型 warehouse1 = Laya.Sprite3D.load("model/build/warehouse1/warehouse1.lh"); scene.addChild(warehouse1); warehouse1.transform.rotate(new Laya.Vector3(0, 90, ...

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

512. 和原生Dom交互 · LayaAir3.3 · 引擎文档 · LAYABOX [ 45%]

...x.com/"; this.qrcode.makeCode(url); Laya.stage.once("click",this,this.clickHandler); this.qrcodeSp = new Laya.Sprite(); Laya.stage.addChild(this.qrcodeSp); 编译运行上面的代码,然后点击舞台可以看到,二维码已经显示到了舞台上,可以手机扫下,发现手机已经...

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

513. laya3D导入动画材质在安卓手机和电脑上显示正常,在苹果手机显示异常 [ 44%]

...ck/Conventional/puzzleB.lh" ]; Laya.loader.create(this.resource, Laya.Handler.create(this, this.onLoadFinish)); } private onLoadFinish() { //初始化场景 this.scene = new Laya.Scene3D(); Laya.stage.addChild(this.scene); this.scene.ambientColor = new Laya.Vector3(0.5, 0.5, 0.5); //初始化...

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

514. 动效模板(JavaScript-LayaAir基础篇(JS)-动画基础) [ 44%]

...UI界面添加到舞台上 Laya.loader.load("./res/atlas/comp.atlas",Laya.Handler.create(this,onLoaded)); function onLoaded(){ //实例化导出的UI类 var efc = new ui.TestPUI(); //添加到舞台 Laya.stage.addChild(efc); } ``` 运行后,按钮被按下时,动画效果如动图11所示: ![1...

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

515. 二进制图片(JavaScript-2D进阶篇(JS)-游戏加载策略) [ 43%]

...ar xhr = new Laya.HttpRequest(); xhr.once(Laya.Event.COMPLETE,this,completeHandler); xhr.once(Laya.Event.ERROR,this,errorHandler); xhr.send("res/monkey2.png","","get","arraybuffer"); function completeHandler(data){ //加载完成返回的data是arraybuffer; //.......这里处理我们加密的图...

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

516. 小游戏子域程序加载到图集后,取图集内资源报错。 [ 43%]

...ivate function beginLoad():void { Laya.loader.load("res/images/rank.json", Handler.create(this, onLoaded)); } private function onLoaded():void { trace("加载成功"); var c:Image = new Image("rank/country.png"); Laya.stage.addChild(c); }  以上是子域项目中加载图集和取资源的代码...

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

517. 动效模板(TypeScript-LayaAir基础篇(TS)-动画基础) [ 43%]

...将UI界面添加到舞台上 Laya.loader.load("./res/atlas/ui.atlas",Laya.Handler.create(this,this.onLoaded)); } private onLoaded():void{ //实例化导出的UI类 var efc:ui.EffectAnimationDemoUI = new ui.EffectAnimationDemoUI(); //添加到舞台 Laya.stage.addChild(efc); } }new Main(); ``` 运...

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

518. 二进制图片(TypeScript-2D进阶篇(TS)-游戏加载策略) [ 43%]

...r = new Laya.HttpRequest(); xhr.once(Laya.Event.COMPLETE,this,this.completeHandler); xhr.once(Laya.Event.ERROR,this,this.errorHandler); xhr.send("res/a.png","","get","arraybuffer"); } private completeHandler(data:Object):void{ //加载完成返回的data是arraybuffer; //......这里处理我们...

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

519. 加载prefab的代码编译失败,提示“Property 'transform' does not exist on type 'Node'” [ 43%]

...     Laya.Sprite3D.load("res/prefabs/Conventional/SampleScene.lh", Laya.Handler.create(null, function(sp)             {                 var layaMonkey2  = scene.addChild(sp);                 layaMonkey2.transform.localScale = new Laya.Vector3(4, 4, 4);               ...

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

520. Animation创建和销毁的问题 [ 43%]

...画 Laya.loader.load(["res/fish_1/stand.atlas","res/fish_1/attack.atlas"], Handler.create(this, this.onAnimAtlasLoaded)); } } private function onAnimAtlasLoaded():void { testAnim1 = new Animation(); testAnim1.loadAnimation("res/fish_1/fish_1.ani"); Laya.stage.addChild(testAnim1); testAnim1.play(0,tr...

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