大约有 107 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0042 秒)
...图 customMaterial.albedoTexture = texture; })); //设置材质 layaMonkey.meshRenderer.sharedMaterial = customMaterial; //开启旋转 Laya.timer.frameLoop(1, this, function() { layaMonkey.transform.rotate(this.rotation, false); }); })); ``` ####
来源: Laya2.0_文档 发布时间: 20210715
...sh.createCone(raidius, height)); scene.addChild(cone); //设置材质 cone.meshRenderer.material = mat4; //设置位置 cone.transform.position = new Laya.Vector3(Math.random() * 4 - 2, 10, Math.random() * 4 - 2); var rigidBody = cone.addComponent(Laya.Rigidbody3D); //创建球型碰撞器 var coneS...
来源: Laya2.0_文档 发布时间: 20210715
...oid { //碰撞开始后,物体改变颜色 (this.owner.getComponent(Laya.MeshRenderer).material as Laya.BlinnPhongMaterial).albedoColor = new Laya.Color(0.0, 1.0, 0.0, 1.0);//绿色 } /** * 发生持续物理碰撞时的3D物理碰撞器事件(不适用2D),也就是碰撞生命周期内的...
来源: Laya3.0_文档 发布时间: 20251010
...sh.createCone(raidius, height)); scene.addChild(cone); //设置材质 cone.meshRenderer.material = mat4; //设置位置 cone.transform.position = new Laya.Vector3(Math.random() * 4 - 2, 10, Math.random() * 4 - 2); var rigidBody:Laya.Rigidbody3D = cone.addComponent(Laya.Rigidbody3D); //创建球型...
来源: Laya2.0_文档 发布时间: 20210714
...) { customMaterial.albedoTexture = texture; })); //设置材质 layaMonkey.meshRenderer.sharedMaterial = customMaterial; //开启旋转 Laya.timer.frameLoop(1, this, function() { layaMonkey.transform.rotate(this.rotation, false); }); })); ```  ### 2. stateMap 在 `subShader` 添加通...
来源: Laya2.0_文档 发布时间: 20210715
...sh.createCone(raidius, height)); scene.addChild(cone); //设置材质 cone.meshRenderer.material = mat4; //设置位置 cone.transform.position = new Vector3(Math.random() * 4 - 2, 10, Math.random() * 4 - 2); var rigidBody:Rigidbody3D = cone.addComponent(Rigidbody3D); //创建球型碰撞器 var con...
来源: Laya2.0_文档 发布时间: 20210714
..., function (tex: Laya.Texture2D) { material.albedoTexture = tex; }) ); box.meshRenderer.material = material; //设置文本显示框位置 this.text.x = Laya.stage.width / 2 - 50; //显示文本显示框 this.text = new Laya.Text(); this.text.overflow = Laya.Text.HIDDEN; this.text.color = "#FFFFFF";...
来源: Laya_社区 发布时间: 20200917
...) { customMaterial.albedoTexture = texture; })); //设置材质 layaMonkey.meshRenderer.sharedMaterial = customMaterial; //开启旋转 Laya.timer.frameLoop(1, this, function() { layaMonkey.transform.rotate(this.rotation, false); }); })); ```  ### 2. stateMap 在 `subShader` 添加通...
来源: Laya2.0_文档 发布时间: 20210715
...形面数越多,对于性能的影响也越大。 在3D渲染中,每个MeshRenderer都由多个三角形面组成。因此,在开发中应尽量减少需要渲染的三角形面数,以提高游戏的性能表现。如图6-1所示。 (图6-1) 要减少需要渲染的三角形面数Triangl...
来源: Laya3.0_文档 发布时间: 20251010
...) { customMaterial.albedoTexture = texture; })); //设置材质 layaMonkey.meshRenderer.sharedMaterial = customMaterial; //开启旋转 Laya.timer.frameLoop(1, this, function() { layaMonkey.transform.rotate(this.rotation, false); }); })); ```  ### 2. stateMap 在 `subShader` 添加通...
来源: Laya2.0_文档 发布时间: 20210714