Open leops opened 5 years ago
If I remember correctly at the time I was trying to implement an adaptive point budget by timing the duration of the three.js render function over a few frames and dynamically increasing and decreasing the point budget to keep framerate around 60 fps. So to answer your question the exact way I'm changing the point budget is by setting the pointBudget
property of the instance of Potree
in a useEffect
hook of the React app that contains my three.js instance, not sure if that's really helpful though ...
I don't have reliable repro steps but it seems to happen frequently with large point clouds (~20 million points) when lowering the
pointBudget
after the point cloud has been loaded. By stepping through the algorithm with a debugger it looks like the LRU cache can choose to evict the root node of the tree (node.name === "r"
), which will destroy the entire rendering structure prompting a complete reload over the next few frames.