Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V8: reduce number of polymorphic/megamorphic states #600

Merged
merged 2 commits into from
Jul 6, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/base/TilesRendererBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,9 @@ export class TilesRendererBase {

tile.__basePath = tileSetDir;

tile._loadIndex = 0;
tile.__lastFrameVisited = undefined;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! This is a good change. Can we initialize this value to - 1 instead of undefined, instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gkjohnson Done


}

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 @@ -527,6 +527,7 @@ export class TilesRenderer extends TilesRendererBase {

boundingVolume,

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

parseTile( buffer, tile, extension ) {

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

const uri = tile.content.uri;
Expand Down
Loading