소스 검색

f: 贴图

xiongxt 1 년 전
부모
커밋
d61951447f
1개의 변경된 파일8개의 추가작업 그리고 1개의 파일을 삭제
  1. 8 1
      src/views/three/index-material.vue

+ 8 - 1
src/views/three/index-material.vue

@@ -84,7 +84,14 @@ onMounted(() => {
     }
   );
 
-  // aoMap 环境遮挡贴图
+  // aoMap 环境遮挡贴图 增强环境阴影
+  textureLoader.load(
+    require("./assets/Tiles130_1K-PNG/Tiles130_1K-PNG_Displacement.png"),
+    (texture) => {
+      plane.material.aoMap = texture;
+      sphere.material.aoMap = texture;
+    }
+  );
 
   box.position.set(0, 5, 0);
   sphere.position.set(20, 10, 10);