From 5d04c8e0922bb2bf63de1596968de718ff9522de Mon Sep 17 00:00:00 2001 From: Garrett Johnson Date: Tue, 24 Oct 2023 21:09:35 +0900 Subject: [PATCH] BatchedMesh: Change a flat zero matrix to a zero scale matrix (#27043) --- examples/jsm/objects/BatchedMesh.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 ); }