大约有 99 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0044 秒)
...gt; { let sp3: Laya.Sprite3D = res.create() as Laya.Sprite3D; this.scene3d.addChild(sp3); }); }) Laya.loader.loadPackage("sub2", this.printProgress).then(() => { Laya.loader.load("sub2/Sphere.lh").then((res: any) => { let sp3 = res.create(); this.scene3d.addChild(sp3); }); }) } printProgress(r...
来源: Laya3.0_文档 发布时间: 20251010
...,item4,item5"); ComboBox.labelSize = 30; ComboBox.itemSize = 25 this.owner.addChild(ComboBox); ComboBox.autoSize = true; ComboBox.pos(200, 200); }); } } Copyright ©Layabox 2025 all right reserved,powered by LayaAir Engine更新时间: 2025-10-10 16:27:59 img{cursor:pointer}
来源: Laya3.0_文档 发布时间: 20251010
...h.Quaternion; /* 用法: //初始化照相机 var camera = this.newScene.addChild(new Laya.Camera(0, 0.1, 100)) as Laya.Camera; camera.transform.rotationEuler = new Laya.Vector3(-32, -75, 0); camera.transform.position =new Laya.Vector3(-8.2, 5.3, 2.2); var modelViewer = camera.addComponent(ModelVi...
来源: Laya_社区 发布时间: 20190224
...nsform.position = new Laya.Vector3(1,0,0); //添加到场景中 this.scene.addChild(sp); 其次,这里详细讲解下Sprite3D中特有的克隆接口instantiate /** * 创建精灵的克隆实例。 * @param original 原始精灵。 * @param parent 父节点。 * @param worldPositionStays 是否保...
来源: Laya3.0_文档 发布时间: 20251010
...g): Laya.Button { var btn: Laya.Button = new Laya.Button(skin); this.owner.addChild(btn); return btn; } } 上述代码运行效果如动图2-1所示: (动图2-1) Copyright ©Layabox 2025 all right reserved,powered by LayaAir Engine更新时间: 2025-10-10 16:27:59 img{cursor:pointer}
来源: Laya3.0_文档 发布时间: 20251010
...rg.selectHandler = new Laya.Handler(this, this.onSelectChange); this.owner.addChild(rg); return rg; } private onSelectChange(index: number): void { console.log("你选择了第 " + (index + 1) + " 项"); } } 效果如图所示: (图3-1) Copyright ©Layabox 2025 all right reserved,powered by ...
来源: Laya3.0_文档 发布时间: 20251016
...t3D,给它添加一个cameraMoveScript脚本组件,然后cameraroot.addchild创建一个摄像机,设置好摄像机的默认位置角度使其朝向物体就行了 2017-07-14 1 1 分享 微博 QZONE 微信 183*****755 赞同来自: 需要开发者参考cameraMoveScript脚本组件自己实...
来源: Laya_社区 发布时间: 20170714
...e; //sprite.cache = true; this._temp = new Laya.Sprite(); this.owner.scene.addChild(this._temp); this.findCompents(this._allAgent, sprite.scene, Nav2DAgent); } onMouseClick(evt: Laya.Event): void { let pos = new Laya.Vector2(evt.stageX, evt.stageY); console.log("click", pos); this._temp.graphics.cle...
来源: Laya3.0_文档 发布时间: 20251010
...Label = res.create(); //添加预制体Label字体到box节点下 this.box.addChild( label ); } ); } } 运行效果如图3-6所示 (图3-6) 3.2 3D预制体 3D预制体的使用过程同2D预制体一样,在这里我们就不介绍如何制作预制体了,通过下面的示例来看看3D预...
来源: Laya3.0_文档 发布时间: 20241014
...Label = res.create(); //添加预制体Label字体到box节点下 this.box.addChild( label ); } ); } } 运行效果如图3-6所示 (图3-6) 3.2 3D预制体 3D预制体的使用过程同2D预制体一样,在这里我们就不介绍如何制作预制体了,通过下面的示例来看看3D预...
来源: Laya3.0_文档 发布时间: 20251105