We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b6565f4 commit 34e6c93Copy full SHA for 34e6c93
packages/troika-three-text/src/GlyphsGeometry.js
@@ -67,6 +67,10 @@ class GlyphsGeometry extends InstancedBufferGeometry {
67
// Preallocate empty bounding objects
68
this.boundingSphere = new Sphere()
69
this.boundingBox = new Box3()
70
+
71
+ // Prevent rendering while we don't have any glyphs
72
+ this.instanceCount = 0
73
+ this.setDrawRange(0, 0)
74
}
75
76
computeBoundingSphere () {
@@ -124,6 +128,7 @@ class GlyphsGeometry extends InstancedBufferGeometry {
124
128
this._blockBounds = blockBounds
125
129
this._chunkedBounds = chunkedBounds
126
130
this.instanceCount = glyphAtlasIndices.length
131
+ this.setDrawRange(0, Infinity)
127
132
this._updateBounds()
133
134
0 commit comments