Skip to content

Commit 221dc79

Browse files
chore: clenaup
1 parent 3d9dc36 commit 221dc79

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/objects/BatchedMesh.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class BatchedMesh extends Mesh<BufferGeometry, Material> {
104104
_geometryInitialized: boolean
105105
_geometryCount: number
106106
_matrices: Matrix4[]
107-
_matricesTexture: DataTexture
107+
_matricesTexture: DataTexture | null
108108
_customUniforms: Record<string, IUniform>
109109

110110
constructor(
@@ -488,7 +488,7 @@ class BatchedMesh extends Mesh<BufferGeometry, Material> {
488488
// Note: User needs to call optimize() afterward to pack the data.
489489

490490
const active = this._active
491-
const matricesTexture = this._matricesTexture
491+
const matricesTexture = this._matricesTexture!
492492
const matricesArray = matricesTexture.image.data
493493
if (geometryId >= active.length || active[geometryId] === false) {
494494
return this
@@ -511,7 +511,7 @@ class BatchedMesh extends Mesh<BufferGeometry, Material> {
511511

512512
const visible = this._visible
513513
const active = this._active
514-
const matricesTexture = this._matricesTexture
514+
const matricesTexture = this._matricesTexture!
515515
const matrices = this._matrices
516516
const matricesArray = matricesTexture.image.data
517517
if (geometryId >= matrices.length || active[geometryId] === false) {
@@ -541,7 +541,7 @@ class BatchedMesh extends Mesh<BufferGeometry, Material> {
541541
setVisibleAt(geometryId: number, value: boolean): this {
542542
const visible = this._visible
543543
const active = this._active
544-
const matricesTexture = this._matricesTexture
544+
const matricesTexture = this._matricesTexture!
545545
const matrices = this._matrices
546546
const matricesArray = matricesTexture.image.data
547547

0 commit comments

Comments
 (0)