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

大约有 18 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0025 秒)

1. 通过PrimitiveMesh创建简单Mesh(ActionScript-3D基础(AS3)-LayaAir3D之模型和网格) [ 100%]

...sprite3D = scene.addChild(new Sprite3D()) as Sprite3D; //正方体 var box:MeshSprite3D = sprite3D.addChild(new MeshSprite3D(PrimitiveMesh.createBox(0.5, 0.5, 0.5))) as MeshSprite3D; box.transform.position = new Vector3(2.0, 0.25, 0.6); box.transform.rotate(new Vector3(0, 45, 0), false, false); //...

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

2. 物理碰撞器(ActionScript-3D基础(AS3)-LayaAir3D之物理系统) [ 99%]

...创建了一个平面。如图1所示。 ```typescript //平面 var plane:MeshSprite3D = scene.addChild(new MeshSprite3D(PrimitiveMesh.createPlane(10, 10, 10, 10))) as MeshSprite3D; //新建材质 var planeMat:BlinnPhongMaterial = new BlinnPhongMaterial(); Texture2D.load("res/threeDimen/Physics/gras...

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

3. 通过PrimitiveMesh创建简单Mesh(JavaScript-3D基础(JS)-LayaAir3D之模型和网格) [ 92%]

...ild(new Laya.Sprite3D()); //正方体 var box = sprite3D.addChild(new Laya.MeshSprite3D(Laya.PrimitiveMesh.createBox(0.5, 0.5, 0.5))); box.transform.position = new Laya.Vector3(2.0, 0.25, 0.6); box.transform.rotate(new Laya.Vector3(0, 45, 0), false, false); //球体 var sphere = sprite3D.addChild(ne...

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

4. 通过PrimitiveMesh创建简单Mesh(TypeScript-3D基础(TS)-LayaAir3D之模型和网格) [ 92%]

...ild(new Laya.Sprite3D()); //正方体 var box = sprite3D.addChild(new Laya.MeshSprite3D(Laya.PrimitiveMesh.createBox(0.5, 0.5, 0.5))); box.transform.position = new Laya.Vector3(2.0, 0.25, 0.6); box.transform.rotate(new Laya.Vector3(0, 45, 0), false, false); //球体 var sphere = sprite3D.addChild(ne...

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

5. 物理碰撞器(TypeScript-3D基础(TS)-LayaAir3D之物理系统) [ 92%]

...图1所示。 ```typescript //平面 var plane = scene.addChild(new Laya.MeshSprite3D(Laya.PrimitiveMesh.createPlane(10, 10, 10, 10))) as Laya.MeshSprite3D; //新建材质 var planeMat:Laya.BlinnPhongMaterial = new Laya.BlinnPhongMaterial(); Laya.Texture2D.load("res/threeDimen/Physics/grass.png", La...

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

6. 多种碰撞器形状(ActionScript-3D基础(AS3)-LayaAir3D之物理系统) [ 91%]

...m() * 0.75 + 0.25; var sZ:int = Math.random() * 0.75 + 0.25; //创建盒型MeshSprite3D var box:MeshSprite3D = scene.addChild(new MeshSprite3D(PrimitiveMesh.createBox(sX, sY, sZ))) as MeshSprite3D; //创建刚体碰撞器 var rigidBody:Rigidbody3D = box.addComponent(Rigidbody3D); //创建盒子形...

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

7. 物理碰撞脚本和触发器脚本(TypeScript-3D基础(TS)-LayaAir3D之物理系统) [ 89%]

...ic onTriggerEnter(other:Laya.PhysicsComponent):void { ((this.owner as Laya.MeshSprite3D).meshRenderer.sharedMaterial as BlinnPhongMaterial).albedoColor = new Laya.Vector4(0.0, 1.0, 0.0, 1.0); } /** * 当其他碰撞器进入绑定物体碰撞器后逐帧触发(子弹在物品内时) * 注:如...

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

8. 物理碰撞脚本和触发器脚本(ActionScript-3D基础(AS3)-LayaAir3D之物理系统) [ 89%]

...e public function onTriggerEnter(other:PhysicsComponent):void { ((owner as MeshSprite3D).meshRenderer.sharedMaterial as BlinnPhongMaterial).albedoColor = new Vector4(0.0, 1.0, 0.0, 1.0); } /** * 当其他碰撞器进入绑定物体碰撞器后逐帧触发(子弹在物品内时) * 注:如相对...

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

9. 多种碰撞器形状(TypeScript-3D基础(TS)-LayaAir3D之物理系统) [ 89%]

... * 0.75 + 0.25; var sZ:number = Math.random() * 0.75 + 0.25; //创建盒型MeshSprite3D var box = scene.addChild(new Laya.MeshSprite3D(Laya.PrimitiveMesh.createBox(sX, sY, sZ))) as Laya.MeshSprite3D; //创建刚体碰撞器 var rigidBody:Laya.Rigidbody3D = box.addComponent(Laya.Rigidbody3D); //创...

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

10. 多种碰撞器形状(JavaScript-3D基础(JS)-LayaAir3D之物理系统) [ 86%]

...andom() * 0.75 + 0.25; var sZ = Math.random() * 0.75 + 0.25; //创建盒型MeshSprite3D var box = scene.addChild(new Laya.MeshSprite3D(Laya.PrimitiveMesh.createBox(sX, sY, sZ))); //创建刚体碰撞器 var rigidBody = box.addComponent(Laya.Rigidbody3D); //创建盒子形状碰撞器 var boxShape = ...

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