Skip to content

Commit 3a0a8d9

Browse files
authored
Examples: fix incorrect field assignment (#32056)
* Fix field assignment * Additionally rename class field and option * undo unintentional change
1 parent 2746aae commit 3a0a8d9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/jsm/objects/WaterMesh.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class WaterMesh extends Mesh {
5151
* @type {number}
5252
* @default 0.5
5353
*/
54-
this.resolution = options.resolution !== undefined ? options.resolution : 0.5;
54+
this.resolutionScale = options.resolutionScale !== undefined ? options.resolutionScale : 0.5;
5555

5656
// Uniforms
5757

@@ -161,7 +161,7 @@ class WaterMesh extends Mesh {
161161

162162
const mirrorSampler = reflector();
163163
mirrorSampler.uvNode = mirrorSampler.uvNode.add( distortion );
164-
mirrorSampler.resolution = this.resolution;
164+
mirrorSampler.reflector.resolutionScale = this.resolutionScale;
165165

166166
this.add( mirrorSampler.target );
167167

@@ -183,7 +183,7 @@ class WaterMesh extends Mesh {
183183
* Constructor options of `WaterMesh`.
184184
*
185185
* @typedef {Object} WaterMesh~Options
186-
* @property {number} [resolution=0.5] - The resolution scale.
186+
* @property {number} [resolutionScale=0.5] - The resolution scale.
187187
* @property {?Texture} [waterNormals=null] - The water's normal map.
188188
* @property {number} [alpha=1] - The alpha value.
189189
* @property {number} [size=1] - The size value.

0 commit comments

Comments
 (0)