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

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

1. 材质-BlinnPhong-漫反射贴图 [ 100%]

...hereMesh())); earth2.transform.position = new Laya.Vector3(0.6, 0, 0); var material = new Laya.BlinnPhongMaterial(); //漫反射贴图 material.albedoTexture = Laya.Texture2D.load("../../res/threeDimen/texture/earth.png"); earth2.meshRender.material = material; Laya.timer.frameLoop(1, this, function...

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

2. 自定义shader-地形shader [ 99%]

...ipt); scene.once(Laya.Event.HIERARCHY_LOADED, this, function () { setCustomMaterial(scene.getChildAt(2)); }); function setCustomMaterial(spirit3D) { if (spirit3D instanceof Laya.MeshSprite3D) { var meshSprite3D = spirit3D; var customMaterial = new CustomTerrainMaterial(); customMaterial.setSplatAlph...

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

3. 材质-PBRStandard材质 [ 97%]

...scene = Laya.stage.addChild(Laya.Scene.load("../../res/threeDimen/scene/PBRMaterialScene/Showcase.ls")); scene.once(Laya.Event.HIERARCHY_LOADED, this, function () { var camera = scene.getChildByName("Main Camera"); camera.addComponent(CameraMoveScript); camera.clearFlag = Laya.BaseCamera.CLEARFLAG_S...

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

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

...pot2.meshFilter.sharedMesh.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.rotat...

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

5. 材质-BlinnPhong-法线贴图 [ 94%]

...onster2._childs.length; 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....

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

6. 射线检测-选取物体 [ 92%]

...rite3D(new Laya.PlaneMesh(6, 6, 10, 10))); var planeMat = new Laya.StandardMaterial(); planeMat.diffuseTexture = Laya.Texture2D.load("../../res/threeDimen/texture/layabox.png"); planeMat.albedo = new Laya.Vector4(0.9, 0.9, 0.9, 1); plane.meshRender.material = planeMat; var boxCollider = plane.addCom...

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

7. 高级应用-实时阴影 [ 91%]

...ssets/LayaMonkey/LayaMonkey-LayaMonkey.lm"))); staticLayaMonkey.meshRender.material = Laya.StandardMaterial.load("../../res/threeDimen/skinModel/LayaMonkey/Assets/LayaMonkey/Materials/T_Diffuse.lmat"); staticLayaMonkey.transform.position = new Laya.Vector3(0, 0, -0.5); staticLayaMonkey.transform.loc...

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

8. 材质-BlinnPhong材质加载 [ 91%]

...aMonkey/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.rotation =...

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

9. 材质-BlinnPhong-高光贴图 [ 87%]

...).getChildAt(0); for (var i = 0; i < skinnedMeshSprite3d.skinnedMeshRender.materials.length; i++) { var mat = skinnedMeshSprite3d.skinnedMeshRender.materials[i]; //高光贴图 mat.specularTexture = Laya.Texture2D.load(this.specularMapUrl[i]); } Laya.timer.frameLoop(1, this, function () { dude1.tran...

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

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

...rite3D(new Laya.PlaneMesh(6, 6, 10, 10))); var planeMat = new Laya.StandardMaterial(); planeMat.diffuseTexture = Laya.Texture2D.load("../../res/threeDimen/texture/layabox.png"); planeMat.albedo = new Laya.Vector4(0.9, 0.9, 0.9, 1); plane.meshRender.material = planeMat; var meshCollider = plane.addCo...

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