|
@@ -10,11 +10,11 @@ import {
|
|
} from 'three';
|
|
} from 'three';
|
|
|
|
|
|
const _identityMatrix = new Matrix4();
|
|
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, 0,
|
|
0, 0, 0, 0,
|
|
- 0, 0, 0, 0
|
|
|
|
|
|
+ 0, 0, 0, 1,
|
|
);
|
|
);
|
|
|
|
|
|
// Custom shaders
|
|
// Custom shaders
|
|
@@ -323,7 +323,7 @@ class BatchedMesh extends Mesh {
|
|
}
|
|
}
|
|
|
|
|
|
this._alives[ geometryId ] = false;
|
|
this._alives[ geometryId ] = false;
|
|
- _zeroMatrix.toArray( this._matricesArray, geometryId * 16 );
|
|
|
|
|
|
+ _zeroScaleMatrix.toArray( this._matricesArray, geometryId * 16 );
|
|
this._matricesTexture.needsUpdate = true;
|
|
this._matricesTexture.needsUpdate = true;
|
|
|
|
|
|
// User needs to call optimize() to pack the data.
|
|
// User needs to call optimize() to pack the data.
|
|
@@ -396,7 +396,7 @@ class BatchedMesh extends Mesh {
|
|
|
|
|
|
} else {
|
|
} else {
|
|
|
|
|
|
- _zeroMatrix.toArray( this._matricesArray, geometryId * 16 );
|
|
|
|
|
|
+ _zeroScaleMatrix.toArray( this._matricesArray, geometryId * 16 );
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|