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

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

1. 使用3D精灵 · LayaAir3.0文档 · LAYABOX [ 100%]

...内容的基类。 通过代码也可以添加组件,需要物体使用addComponent方法 //添加Rigidbody3D组件 let rigidBody = this.layaMonkeyParent.addComponent(Laya.Rigidbody3D) as Laya.Rigidbody3D; //创建盒子形状碰撞器 var boxShape = new Laya.BoxColliderShape(1, 1, 1); //设置盒...

来源: Laya3.0_文档 发布时间: 20240624

2. 3D灯光与阴影 · LayaAir3.0文档 · LAYABOX [ 88%]

...点光源 let pointLight = new Laya.Sprite3D(); let pointCom = pointLight.addComponent(Laya.PointLightCom); this.scene.addChild(pointLight); //点光源的颜色 pointCom.color = new Laya.Color(1.0, 0.5, 0.0, 1); //设置点光源的范围 pointCom.range = 3.0; pointLight.transform.position = new La...

来源: Laya3.0_文档 发布时间: 20240624

3. 3D物理编辑 · LayaAir3.0文档 · LAYABOX [ 66%]

...形3D模型节点对象 let cone = new Laya.Sprite3D; let coneMesh = cone.addComponent(Laya.MeshFilter); let coneRender = cone.addComponent(Laya.MeshRenderer); // 创建网格 coneMesh.sharedMesh = Laya.PrimitiveMesh.createCone(0.25, 0.75); // 创建材质 let coneMaterial: Laya.BlinnPhongMaterial =...

来源: Laya3.0_文档 发布时间: 20240624

4. 3D寻路 · LayaAir3.0文档 · LAYABOX [ 47%]

...tion; moveCamera.transform.rotate(this._rotation, true, false); moveCamera.addComponent(CameraMoveScript); //设置鼠标弹起事件响应 Laya.stage.on(Event.MOUSE_UP, this, function (): void { this.index = 0; //获取每次生成路径 this.getGridIndex(this.path[this.curPathIndex % this.pointCou...

来源: Laya3.0_文档 发布时间: 20230303