Skip to content

Commit

Permalink
Water2: Fix the error when flowSpeed and other parameters are 0. (mrd…
Browse files Browse the repository at this point in the history
  • Loading branch information
gitplus authored and AdaRoseCannon committed Jan 15, 2024
1 parent cb8fe00 commit 00c174f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions examples/jsm/objects/Water2.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ class Water extends Mesh {
const scope = this;

const color = ( options.color !== undefined ) ? new Color( options.color ) : new Color( 0xFFFFFF );
const textureWidth = options.textureWidth || 512;
const textureHeight = options.textureHeight || 512;
const clipBias = options.clipBias || 0;
const flowDirection = options.flowDirection || new Vector2( 1, 0 );
const flowSpeed = options.flowSpeed || 0.03;
const reflectivity = options.reflectivity || 0.02;
const scale = options.scale || 1;
const shader = options.shader || Water.WaterShader;
const textureWidth = options.textureWidth !== undefined ? options.textureWidth : 512;
const textureHeight = options.textureHeight !== undefined ? options.textureHeight : 512;
const clipBias = options.clipBias !== undefined ? options.clipBias : 0;
const flowDirection = options.flowDirection !== undefined ? options.flowDirection : new Vector2( 1, 0 );
const flowSpeed = options.flowSpeed !== undefined ? options.flowSpeed : 0.03;
const reflectivity = options.reflectivity !== undefined ? options.reflectivity : 0.02;
const scale = options.scale !== undefined ? options.scale : 1;
const shader = options.shader !== undefined ? options.shader : Water.WaterShader;

const textureLoader = new TextureLoader();

Expand Down

0 comments on commit 00c174f

Please sign in to comment.