diff --git a/src/utils/plane_ocean2.js b/src/utils/plane_ocean2.js index 3093a39..53df407 100644 --- a/src/utils/plane_ocean2.js +++ b/src/utils/plane_ocean2.js @@ -1,6 +1,6 @@ import * as THREE from 'three'; import { Water } from 'three/examples/jsm/objects/Water.js'; - +import normal from './waternormals.jpg?url'; const waterGeometry = new THREE.PlaneGeometry(50, 50); const ocean = new Water( @@ -8,7 +8,7 @@ const ocean = new Water( { textureWidth: 512, textureHeight: 512, - waterNormals: new THREE.TextureLoader().load(`https://z2586300277.github.io/3d-file-server/images/texture/waternormals.jpg`, function (texture) { + waterNormals: new THREE.TextureLoader().load(normal, function (texture) { texture.wrapS = texture.wrapT = THREE.RepeatWrapping; }), sunDirection: new THREE.Vector3(0, 1, 0), // 设置太阳方向为垂直向下 diff --git a/src/utils/waternormals.jpg b/src/utils/waternormals.jpg new file mode 100644 index 0000000..9dfe03c Binary files /dev/null and b/src/utils/waternormals.jpg differ