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

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

1. 材质-PBRStandard材质 [ 100%]

...rel (2)"); var barrel3 = scene.getChildByName("Wooden_Barrel (3)"); barrel.meshRender.sharedMaterial = mat; barrel1.meshRender.sharedMaterial = mat; barrel2.meshRender.sharedMaterial = mat; barrel3.meshRender.sharedMaterial = mat; });class PBRStandardMaterialDemo { constructor() { Laya3D.init(0, 0, ...

来源: Laya_示例 发布时间: 20241119

2. 射线检测-选取物体 [ 95%]

...layabox.png"); planeMat.albedo = new Laya.Vector4(0.9, 0.9, 0.9, 1); plane.meshRender.material = planeMat; var boxCollider = plane.addComponent(Laya.BoxCollider); boxCollider.setFromBoundBox(plane.meshFilter.sharedMesh.boundingBox); plane.name = "平面"; //正方体 var box = scene.addChild(new Lay...

来源: Laya_示例 发布时间: 20241119

3. 高级应用-实时阴影 [ 94%]

...imen/staticModel/grid/plane.lh")); //地面接收阴影 grid.getChildAt(0).meshRender.receiveShadow = true; var staticLayaMonkey = scene.addChild(new Laya.MeshSprite3D(Laya.Mesh.load("../../res/threeDimen/skinModel/LayaMonkey/Assets/LayaMonkey/LayaMonkey-LayaMonkey.lm"))); staticLayaMonkey.meshRende...

来源: Laya_示例 发布时间: 20241119

4. 材质-BlinnPhong-漫反射贴图 [ 84%]

...re = Laya.Texture2D.load("../../res/threeDimen/texture/earth.png"); earth2.meshRender.material = material; Laya.timer.frameLoop(1, this, function () { earth1.transform.rotate(this.rotation, false); earth2.transform.rotate(this.rotation, false); });class BlinnPhong_DiffuseMap { private rotation: Laya...

来源: Laya_示例 发布时间: 20241119

5. 材质-BlinnPhong材质加载 [ 83%]

.../Assets/LayaMonkey/LayaMonkey-LayaMonkey.lm"))); //加载材质 layaMonkey.meshRender.material = Laya.StandardMaterial.load("../../res/threeDimen/skinModel/LayaMonkey/Assets/LayaMonkey/Materials/T_Diffuse.lmat"); layaMonkey.transform.localScale = new Laya.Vector3(0.3, 0.3, 0.3); layaMonkey.transform...

来源: Laya_示例 发布时间: 20241119

6. 高级应用-渲染纹理 [ 83%]

...ionButton.on(Laya.Event.CLICK, this, function () { layaPlane.getChildAt(0).meshRender.material.diffuseTexture = renderTargetCamera.renderTarget; }); })); } function setMaterials(spirit3D) { if (spirit3D instanceof Laya.MeshSprite3D) { var meshSprite = spirit3D; for (var i = 0; i < meshSprite.meshRen...

来源: Laya_示例 发布时间: 20241119

7. 射线检测-放置物体 [ 82%]

...layabox.png"); planeMat.albedo = new Laya.Vector4(0.9, 0.9, 0.9, 1); plane.meshRender.material = planeMat; var meshCollider = plane.addComponent(Laya.MeshCollider); meshCollider.mesh = plane.meshFilter.sharedMesh; Laya.timer.frameLoop(1, this, checkHit); var ray = new Laya.Ray(new Laya.Vector3(0, 0,...

来源: Laya_示例 发布时间: 20241119

8. 材质-BlinnPhong-反射贴图 [ 82%]

...redMesh.once(Laya.Event.LOADED, this, function () { var material = teapot2.meshRender.material; //反射贴图 material.reflectTexture = textureCube; }); Laya.timer.frameLoop(1, this, function () { teapot1.transform.rotate(this.rotation, false); teapot2.transform.rotate(this.rotation, false); });cla...

来源: Laya_示例 发布时间: 20241119

9. 材质-BlinnPhong-法线贴图 [ 80%]

...i++) { var meshSprite3D = monster2._childs[i]; var material = meshSprite3D.meshRender.material; //法线贴图 material.normalTexture = Laya.Texture2D.load(this.normalMapUrl[i]); } Laya.timer.frameLoop(1, this, function () { monster1.transform.rotate(this.rotation); monster2.transform.rotate(this.ro...

来源: Laya_示例 发布时间: 20241119

10. 射线检测-点击行走 [ 80%]

...layabox.png"); planeMat.albedo = new Laya.Vector4(0.9, 0.9, 0.9, 1); plane.meshRender.material = planeMat; var meshCollider = plane.addComponent(Laya.MeshCollider); meshCollider.mesh = plane.meshFilter.sharedMesh; var box = scene.addChild(new Laya.MeshSprite3D(new Laya.BoxMesh(0.5, 0.5, 0.5))); var ...

来源: Laya_示例 发布时间: 20241119