- 实现水波纹的效果:

- 加入几何形状,可以将平台的几何形状
const waterGeometry = new THREE.PlaneGeometry( 10000, 10000 ); - 引入水的插件,并修改水的材质。
import { Water } from 'three/addons/objects/Water.js'; const water = new Water( waterGeometry, { textureWidth: 512, textureHeight: 512, waterNormals: new THREE.TextureLoader().load( 'textures/waternormals.jpg', function ( texture ) { texture.wrapS = texture.wrapT = THREE.RepeatWrapping; } ), sunDirection: new THREE.Vector3(), sunColor: 0xffffff, waterColor: 0x001e0f, distortionScale: 3.7, fog: scene.fog !== undefined } ); // 加入场景中 scene.add( water ); - 水面使用的纹理图







![linux学习(等待+进程替换初识)[9]](https://img-blog.csdnimg.cn/f8c548196b2e4d2882fb37512a327330.png)












