-
-
Notifications
You must be signed in to change notification settings - Fork 246
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
Compute bounds tree after adding mesh to group/scene? #662
Comments
This should work just fine and have no impact on the generation time of the BVH itself. Do you have a live example using something like jsfiddle showing the issue? |
I'll put a fiddle or similar together -- is there an existing template I can use that takes care of the boilerplate? |
This official three.js one is a reasonable one to start with: |
OK, so it works fine in a fiddle, so looks like the issue is somehow specific to our viewer / models. I'll post an update here if I identify a real bug 😉 |
We're using BVH to boost the performance of a small number of features in a larger app, computing the bounds tree before adding the associated mesh to either a group or a scene. This works well, but adds time at startup for something that may never get used.
What I'd like to do is compute the bounds tree, either using a Worker or on-demand, after a mesh has been added to a group and/or scene, but find that running
computeBoundsTree()
ornew MeshBVH(geom)
after the associated mesh has been added to something else, even if it hasn't been added to the scene, the script just hangs. Forever.So I just wanted to ask if this is actually possible?
Example
The text was updated successfully, but these errors were encountered: