大约有 40 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0066 秒)
...anslate(new Laya.Vector3(0,0,0),false); warehouseMeshSprite3D1= warehouse1.getChildAt(0).getChildByName("Mesh1"); var material = warehouseMeshSprite3D1.meshRender.material; material.albedo = new Laya.Vector4(1,0,0,1);换了一个模型就不行了,模型文件如下 会提示报错信息: Typ...
来源: Laya_社区 发布时间: 20171226
...ite = roleImg;//将自定义的layaSprite传入role 调用 role.layaSprite.getChildAt(0).alpha = 0;//Image实例1变透明 这样子可以实时改变作为基底的roleImg子节点上的图片的大小等参数,至于为什么不直接改变roleImg的参数,这个我试过,并不行。 2018-0...
来源: Laya_社区 发布时间: 20180827
...mask='; for(let i = 0; i < target.numChildren; ++i){ let child = target.getChildAt(i); if(child.name.indexOf(prefix) == 0){ layerNodeName = child.name.replace(prefix,''); child.destroy(); break; } } if(!layerNodeName){ return; } let arr = layerNodeName.split('|'); this.removeAllLayers(target); fo...
来源: Laya_社区 发布时间: 20200110
...5, 0.5, 0.5); var aniSprite3d: Sprite3D = (<Sprite3D>this.layaMonkey.getChildAt(0)); //获取动画组件 var animator: Animator = (<Animator>aniSprite3d.getComponent(Animator)); //创建动作状态 var state: AnimatorState = new AnimatorState(); //动作名称 state.name = "run"; //动...
来源: Laya3.0_文档 发布时间: 20230303
... = 0,n:int = htmlDiv._childs.length;i < n;i++) { tHTMLElement = htmlDiv.getChildAt(i) as HTMLElement; if(tHTMLElement) { tTxt= tHTMLElement.text; if(tTxt) { txt += tTxt; } } } trace("文本内容为"+txt); trace("文本的实际宽度为"+htmlDiv.contextWidth,"文本的实际高度为"+htmlDiv.co...
来源: Laya_社区 发布时间: 20161027
... Laya.Node) { for (let i = 0; i < ui.numChildren; i++) { let child = ui.getChildAt(i); if (child instanceof Laya.Button) { console.log("发现Button"); this.onButtonScaleEvent(child); } else { //查找子节点 this.searchButton(child); } } } //处理按钮缩放事件 onButtonScaleEvent(target: ...
来源: Laya3.0_文档 发布时间: 20251010
...p); } for (var i = 0; i < sprite.numChildren; i++) { let child = sprite.getChildAt(i) as Sprite; this.findCompents(lists, child, componentType); } } //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { let sprite = this.owner as L...
来源: Laya3.0_文档 发布时间: 20251010
...._particle.numChildren; i < len; i++) { var child:Node = this._particle.getChildAt(i); if (child instanceof Laya.ShuriKenParticle3D) { this._shuriKenParticle3D.push(child); this._shurikenParticleSystem.push(child.particleSystem); } } this.addChild(this._particle); this._isInited = true; } //粒...
来源: Laya3.0_文档 发布时间: 20251010
...._particle.numChildren; i < len; i++) { var child:Node = this._particle.getChildAt(i); if (child instanceof Laya.ShuriKenParticle3D) { this._shuriKenParticle3D.push(child); this._shurikenParticleSystem.push(child.particleSystem); } } this.addChild(this._particle); this._isInited = true; } //粒...
来源: Laya3.0_文档 发布时间: 20250104
...ew Laya.Vector3(-20, 13, 0)); //获取动画组件 var xxAni = layaMonkey2.getChildAt(0).getComponent(Laya.Animator); //获取动画资源对象 var xxClip = Laya.Loader.getRes("xx/xx.lani"); //创建动作状态 var state1 = new Laya.AnimatorState(); //动作名称 state1.name = "hello"; //动作...
来源: Laya2.0_文档 发布时间: 20210714