File: WaterMesh.md | Updated: 11/15/2025
A basic flat, reflective water effect.
Note that this class can only be used with WebGPURenderer. When using WebGLRenderer, use Water.
References:
WaterMesh is an addon, and must be imported explicitly, see Installation#Addons.
import { WaterMesh } from 'three/addons/objects/WaterMesh.js';
Constructs a new water mesh.
geometry | The water mesh's geometry.
---|---
options | The configuration options.
The alpha value.
Default is 1.
The distortion scale.
Default is 20.
This flag can be used for type testing.
Default is true.
The effect's resolution scale.
Default is 0.5.
The size value.
Default is 1.
The sun color.
Default is 0xffffff.
The sun direction.
Default is (0.70707,0.70707,0.0).
The water color.
Default is 0x7f7f7f.
The water's normal map.
Constructor options of WaterMesh.
resolutionScale
number | The resolution scale. Default is 0.5.
---|---
waterNormals
Texture | The water's normal map. Default is null.
alpha
number | The alpha value. Default is 1.
size
number | The size value. Default is 1.
sunColor
number | Color | string | The sun color. Default is 0xffffff.
sunDirection
Vector3 | The sun direction. Default is (0.70707,0.70707,0.0).
waterColor
number | Color | string | The water color. Default is 0x7F7F7F.
distortionScale
number | The distortion scale. Default is 20.