Skip to content

Commit

Permalink
V8: reduce number of polymorphic/megamorphic states (#600)
Browse files Browse the repository at this point in the history
* V8: reduce number of polymorphic/megamorphic functions

* Set lastFrameVisited to -1
  • Loading branch information
Nmzik committed Jul 6, 2024
1 parent aa399a4 commit 202c221
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/base/TilesRendererBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,9 @@ export class TilesRendererBase {

tile.__basePath = tileSetDir;

tile._loadIndex = 0;
tile.__lastFrameVisited = - 1;

}

setTileActive( tile, state ) {
Expand Down
2 changes: 1 addition & 1 deletion src/three/TilesRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,7 @@ export class TilesRenderer extends TilesRendererBase {

boundingVolume,

metadata: null,
scene: null,
geometry: null,
materials: null,
Expand All @@ -543,7 +544,6 @@ export class TilesRenderer extends TilesRendererBase {

async parseTile( buffer, tile, extension ) {

tile._loadIndex = tile._loadIndex || 0;
tile._loadIndex ++;

const uri = tile.content.uri;
Expand Down

0 comments on commit 202c221

Please sign in to comment.