diff --git a/examples/jsm/objects/BatchedMesh.js b/examples/jsm/objects/BatchedMesh.js index 4d1ced7da9d097..14678bf6c254c9 100644 --- a/examples/jsm/objects/BatchedMesh.js +++ b/examples/jsm/objects/BatchedMesh.js @@ -10,11 +10,11 @@ import { } from 'three'; const _identityMatrix = new Matrix4(); -const _zeroMatrix = new Matrix4().set( +const _zeroScaleMatrix = new Matrix4().set( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0 + 0, 0, 0, 1, ); // Custom shaders @@ -323,7 +323,7 @@ class BatchedMesh extends Mesh { } this._alives[ geometryId ] = false; - _zeroMatrix.toArray( this._matricesArray, geometryId * 16 ); + _zeroScaleMatrix.toArray( this._matricesArray, geometryId * 16 ); this._matricesTexture.needsUpdate = true; // User needs to call optimize() to pack the data. @@ -396,7 +396,7 @@ class BatchedMesh extends Mesh { } else { - _zeroMatrix.toArray( this._matricesArray, geometryId * 16 ); + _zeroScaleMatrix.toArray( this._matricesArray, geometryId * 16 ); }