DropIn Viewer lag fix and Cursor raycast fix #458
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
First of all, Thanks for all your work.
These are some simple fixes for two performance issues I faced:
I was using the DropIn Viewer with R3F but it felt much laggy as compared to general Viewer. I tried to debug and found that the
initfunction was called on every update loop fordropInViewerwhich was unnecessary and heavy. SoisUpdatedForDropInModecheck is added to ensureinit()runs only once inDropInmode.I was using the provided default cursor but it moved very abruptly for certain models. This is because
requestAnimationFramewould exceed timelimit becauseintersectSplatMeshwould run for more than 250 ms every time. I could narrow it down that it only happened for 3dgs files which had distant blurred spherical splat background.Couldn't find the exact reason but for such background consisting models, the
data.indexesarray length in splat Tree went upto 50000 to 100000. I am still unsure about the function of data indexes in splat tree and what is its functionality. But this issue was resolved by increasing themaximumDepthof splat tree.I think increasing this value as the new default is a safe and effective solution, right ?
issue-2025-05-29_20.47.08.mp4
issue-2025-05-29_20.49.40.mp4