大约有 31 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0044 秒)
HIERARCHY_LOADED 和 LOADED有什么区别?为什么对scene不起作用 var scene = Laya.stage.addChild(new Laya.Scene()); scene.once(Laya.Event.HIERARCHY_LOADED, null, function (sprite) { console.log("scene HIERARCHY_LOADED"); }); scene.once(Laya.Event.LOADED, null, function (sprite) { console....
来源: Laya_社区 发布时间: 20170619
HIERARCHY_LOADED函数不回调 this.sceneP = Laya.stage.addChild(Laya.Scene.load(name)) as Laya.Sprite3D; //this.sceneP.transform.setTranslate(500,500); this.sceneP.once(Event.HIERARCHY_LOADED, this,function():void{ console.error("改变大小"); this.sceneP.transform.localScale = new Vector3(3, 3...
来源: Laya_社区 发布时间: 20180327
有没有更好的获取子节点的方式(有没有一个可以代替 HIERARCHY_LOADED 的事件)? 如果使用了 预加载 方式,节点第一次显示的时候是不会触发 HIERARCHY_LOADED 的。 但是在 sprite.destroy() 销毁自身后,第二次 load 的时候又会触发 H...
来源: Laya_社区 发布时间: 20170619
...3D = scene.addChild(Sprite3D.load("part.lh")) as Sprite3D; part.once(Event.HIERARCHY_LOADED, this, function():void{ part.transform.localScale = new Vector3(3, 3, 3); }); 我按照这个调整粒子大小,不起作用啊 2018-07-09 0 6 分享 微博 QZONE 微信 Laya_Aaron 赞同来...
来源: Laya_社区 发布时间: 20180705
...aScene.lh") as Laya.Sprite3D; scene.addChild(temp); temp.on(Laya.Event.HIERARCHY_LOADED,this,()=> { this.model = Laya.MeshSprite3D.instantiate(temp,scene) as Laya.MeshSprite3D; if(index == 0) { this.model.transform.position = new Laya.Vector3(0.8,0,0); } }); //=============...
来源: Laya_社区 发布时间: 20180827
...ya.Sprite3D.load('res/01/mfs_01.lh'); scene.addChild(sp); sp.on(Laya.Event.HIERARCHY_LOADED, this, function(){ sp.transform.localPosition = new Laya.Vector3(1, 1, 1); var scale = 1; var v3 = sp.transform.localScale; v3.x = scale; v3.y = scale; v3.z = scale; sp.transform.localScale = v3; }) //这个...
来源: Laya_社区 发布时间: 20170504
...质,而lh文件则不行,然而这样写的话,又出现了Laya.Event.HIERARCHY_LOADED事件并没有被触发,导致无法在Laya.Event.HIERARCHY_LOADED事件运行的方法里获得材质,只能使用延时来获得材质 150*****372 • 2017-04-23 11:28 对于第二个问题的解决是...
来源: Laya_社区 发布时间: 20170422
...aticMesh = scene.addChild(new Laya.Sprite3D()); staticMesh.once(Laya.Event.HIERARCHY_LOADED, null, function (sprite) { var meshSprite = sprite.getChildAt(0);//此对象不一定是MeshSprite3D类型,会导致出错 var mesh = meshSprite.meshFilter.sharedMesh; mesh.once(Laya.Event.LOADED, null, fun...
来源: Laya_社区 发布时间: 20161021
...: 2 人 sfsmmc • 2017-06-01 09:30 是不是必须通过这个 Laya.Event.HIERARCHY_LOADED 回调才能获取到子节点? 还有Laya.MeshTerrainSprite3D.createFromMesh(terrain, 129, 129)放大了地形面积,如何保证和原场景吻合呢? sfsmmc • 2017-06-02 09:43 可以帮忙回答下...
来源: Laya_社区 发布时间: 20170531
...3D = scene.addChild(Sprite3D.load("part.lh")) as Sprite3D; part.once(Event.HIERARCHY_LOADED, this, function():void{ part.transform.localScale = new Vector3(3, 3, 3); }); 2017-03-16 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起...
来源: Laya_社区 发布时间: 20170316