three水面
1、有时需要水面起涟漪的效果,three就自带这种模型
引入水面模型
import { Water } from "three/examples/jsm/objects/Water2";
设置并加入场景
const water = new Water(planeGeo, { textureWidth: 1024, textureHeight: 1024, // color: 0xeeeeff, flowDirection: new THREE.Vector2(1, 1), scale: 1, }); water.rotation.x = -0.5 * Math.PI; scene.add(water);