Import
Water is an addon, and must be imported explicitly, see Installation#Addons.
import { Water } from 'three/addons/objects/Water.js';
Constructor
new Water( geometry : BufferGeometry, options : Water~Options )
Constructs a new water instance.
| geometry |
The water's geometry. |
| options |
The configuration options. |
Properties
.isWater : boolean (readonly)
This flag can be used for type testing.
Default is true.
Type Definitions
.Options
Constructor options of Water.
|
textureWidth
number |
The texture width. A higher value results in more clear reflections but is also more expensive. Default is |
|
textureHeight
number |
The texture height. A higher value results in more clear reflections but is also more expensive. Default is |
|
clipBias
number |
The clip bias. Default is |
|
alpha
number |
The alpha value. Default is |
|
time
number |
The time value. Default is |
|
waterNormals
Texture |
The water's normal map. Default is |
|
sunDirection
Vector3 |
The sun direction. Default is |
|
sunColor
number | Color | string |
The sun color. Default is |
|
waterColor
number | Color | string |
The water color. Default is |
|
eye
Vector3 |
The eye vector. |
|
distortionScale
number |
The distortion scale. Default is |
|
side
FrontSide | BackSide | DoubleSide |
The water material's Default is |
|
fog
boolean |
Whether the water should be affected by fog or not. Default is |