大约有 6 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0031 秒)
...annon.js** - 1.创建盒型MeshSprite3D ```typescript var box = this.scene.addChild(new MeshSprite3D(PrimitiveMesh.createBox(sX, sY, sZ))); ``` - 2.为精灵添加CannonRigidbody3D组件 ```typescript var rigidBody = box.addComponent(CannonRigidbody3D); ``` - 3.设置碰撞器形状 ```typescript //...
来源: Laya2.0_文档 发布时间: 20210715
....创建盒型MeshSprite3D ```typescript var box: MeshSprite3D = this.scene.addChild(new MeshSprite3D(PrimitiveMesh.createBox(sX, sY, sZ))) as MeshSprite3D; ``` - 2.为精灵添加CannonRigidbody3D组件 ```typescript var rigidBody: CannonRigidbody3D = box.addComponent(CannonRigidbody3D); ``` - 3.设...
来源: Laya2.0_文档 发布时间: 20210714
...key.lm", Laya.Handler.create(this, function(mesh) { var layaMonkey = scene.addChild(new Laya.MeshSprite3D(mesh)); layaMonkey.transform.localScale = new Laya.Vector3(0.3, 0.3, 0.3); layaMonkey.transform.rotation = new Laya.Quaternion(0.7071068, 0, 0, -0.7071067); //创建材质 var customMaterial = n...
来源: Laya2.0_文档 发布时间: 20210715
...key.lm", Laya.Handler.create(this, function(mesh) { var layaMonkey = scene.addChild(new Laya.MeshSprite3D(mesh)); layaMonkey.transform.localScale = new Laya.Vector3(0.3, 0.3, 0.3); layaMonkey.transform.rotation = new Laya.Quaternion(0.7071068, 0, 0, -0.7071067); //创建材质 var customMaterial = n...
来源: Laya2.0_文档 发布时间: 20210715
...key.lm", Laya.Handler.create(this, function(mesh) { var layaMonkey = scene.addChild(new Laya.MeshSprite3D(mesh)); layaMonkey.transform.localScale = new Laya.Vector3(0.3, 0.3, 0.3); layaMonkey.transform.rotation = new Laya.Quaternion(0.7071068, 0, 0, -0.7071067); //创建材质 var customMaterial = n...
来源: Laya2.0_文档 发布时间: 20210714
...,把加载回调中返回的完整场景scene添加到舞台 Laya.stage.addChild(scene); //获取摄像机 var camera = scene.getChildByName("Main Camera"); /** ** 省略其它代码若干,可前往Layabox官网示例或相关文档中查看 */ })); ``` ##### 5.2.2 预设的加载与使用(.lh) ...
来源: Laya2.0_文档 发布时间: 20210714