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

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

11. 材质的功能介绍(JavaScript-3D基础(JS)-LayaAir3D之Material材质) [ 96%]

...质 ```typescript //初始化3D场景 var scene = Laya.stage.addChild(Laya.Loader.getRes("res/threeDimen/scene/ChangeMaterialDemo/Conventional/scene.ls")); //从场景获取球型精灵 this.sphere = scene.getChildByName("Sphere"); //获取球型精灵自带的BlinnPhong材质 billinMaterial = this....

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

12. 微信小游戏运行导出项目的时候报错:Scene: the .lh file root type must be Scene [ 95%]

...esInfo.__proto.event (http://127.0.0.1:59022/game/code.js:483:28)     at LoaderManager.__proto._endLoad (http://127.0.0.1:59022/game/code.js:13152:11)     at Loader.onLoaded (http://127.0.0.1:59022/game/code.js:13128:10)     at EventHandler.__proto.runWith (http://127.0.0.1:59022/game/code.js:...

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

13. 微信小游戏默认项目代码添加unity导出.lh文件,微信开发工具提示错误 [ 95%]

...s/layabox.png"); box.meshRender.material = material; //加载3D资源 Laya.loader.create(["res/LayaScene_girl/girl.lh"],Laya.Handler.create(this,this.on3DComplete)); } /*加载3D资源完成回调*/ private on3DComplete():void{ //创建3D角色 //实例化角色 this.role = Laya.loader.getRes("res/L...

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

14. 背景音乐文件太大 播放延迟 [ 95%]

...音乐文件太大 播放延迟 Laya   背景音乐太大 预加载 Laya.loader.load 音乐   Laya.SoundManager.playMusic 播放 会出现延迟效果    Laya.loader.load(['remote/music/' + this.soundUrl + '.mp3'], new Laya.Handler(this, () => {                 thi...

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

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

...;, "res/maze/img/demo/toolClock/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.Vec...

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

16. 预制体模块 · LayaAir3文档 · LAYABOX [ 94%]

... constructor() { super(); } onStart(): void { //加载预制体文件 Laya.loader.load("resources/Title.lh").then( (res)=>{ //创建预制体 let label: Laya.Label = res.create(); //添加预制体Label字体到box节点下 this.box.addChild( label ); } ); } } 运行效果如图3-6所示 (图3-...

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

17. 预制体 · LayaAir3.3 · 引擎文档 · LAYABOX [ 94%]

... constructor() { super(); } onStart(): void { //加载预制体文件 Laya.loader.load("resources/Title.lh").then( (res)=>{ //创建预制体 let label: Laya.Label = res.create(); //添加预制体Label字体到box节点下 this.box.addChild( label ); } ); } } 运行效果如图3-6所示 (图3-...

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

18. Laya.loader.load 加载场景报错 [ 94%]

Laya.loader.load 加载场景报错 Laya.loader.load( 模型url, Laya.Handler.create(this, function(){ this.scene = Laya.loader.getRes(模型url); Laya.stage.addChild(this.scene); }),null, null, 1, true, "scene1"); 执行后,浏览器报 : laya.core.js:13290 Uncaught TypeError: node._setParent ...

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

19. 照相机-3D空间转2D空间 [ 94%]

...lse); var directionLight = scene.addChild(new Laya.DirectionLight()); Laya.loader.create("../../res/threeDimen/skinModel/LayaMonkey/LayaMonkey.lh", Laya.Handler.create(this, onComplete)); function onComplete() { layaMonkey3D = scene.addChild(Laya.Sprite3D.load("../../res/threeDimen/skinModel/LayaMon...

来源: Laya_示例 发布时间: 20251130

20. 批量销毁释放内存(ActionScript-3D基础(AS3)-LayaAir3D的内存管理) [ 94%]

...的销毁而一起销毁。这些残留下的资源需要分别使用`Laya.loader.getRes(url:String)`接口获取到资源(Resource)对象之后,再调用资源对象的`destroy()`方法进行销毁。但是这种方法是非常麻烦的。LayaAir2.0为了方便开发者,提供了`Resource.d...

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