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

Provide API for progressive tree building #4

Closed
gkjohnson opened this issue Jan 22, 2018 · 1 comment
Closed

Provide API for progressive tree building #4

gkjohnson opened this issue Jan 22, 2018 · 1 comment
Labels
build performance enhancement New feature or request

Comments

@gkjohnson
Copy link
Owner

Provide an API for progressive tree building, which can be slow for large meshes at the moment. Some ideas:

// uses requestIdleTick or requestAnimationFrame to build the tree and
// provides a promise and variable for whether or not the tree is done
const perFrameTime = 1;
geometry.computeBoundsTree(Strategy.SAH, perFrameTime).then(...);
console.log(geometry.boundsTree.ready); // false
// provides function for running the next tick of the building
geometry.computeBoundsTreeProgressively();

// every frame until finished
if (!geometry.boundsTree.ready) geometry.boundsTree.build(perFrameTime);

this would be easy to do with a generator

@gkjohnson gkjohnson added enhancement New feature or request build performance labels Sep 19, 2018
@gkjohnson
Copy link
Owner Author

Fixed by #131

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build performance enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant