Skip to content

Commit 8266a35

Browse files
authored
Fix quantized mesh plugin expanding to non existent levels (#1274)
* Fix quantized mesh plugin expanding to non existent levels * Add comment
1 parent a4e9621 commit 8266a35

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/three/plugins/QuantizedMeshPlugin.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,13 @@ export class QuantizedMeshPlugin {
382382
const y = tile[ TILE_Y ];
383383
const available = tile[ TILE_AVAILABLE ];
384384

385+
// only expand down to the highest level
386+
if ( level >= this.tiling.maxLevel ) {
387+
388+
return;
389+
390+
}
391+
385392
let hasChildren = false;
386393
for ( let cx = 0; cx < 2; cx ++ ) {
387394

0 commit comments

Comments
 (0)