Merge branch 'main' of https://nicowebgl.cn/macmini/gitea/nicolas/kdemo
This commit is contained in:
@@ -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), // 设置太阳方向为垂直向下
|
||||
|
||||
BIN
src/utils/waternormals.jpg
Normal file
BIN
src/utils/waternormals.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 243 KiB |
Reference in New Issue
Block a user