When setting "enableClipping" true on geospatial layers you can notice stuttering or "jumping" in the UI and camera movement when zooming or double-clicking on an object.
The stuttering appears to match the 250s throttled tick in the new obb-clipping component. traversing all the tiles to apply the clipping planes is a super expensive operation. perhaps we could store the previous values and only apply traverse to apply clipping planes if the previous values actually changed?
Yes we should only update planes & apply on matrix movements, same as bounding box calc
However, the 3dtiles are constantly updating from perspective and LOD changes, if we don't apply planes every tick, there will be new tiles that pop in without the clipping planes applied
An alternative to checking every tick, we can hook into contentPostProcess event [1] that is emitted from the 3dtiles
When setting "enableClipping" true on geospatial layers you can notice stuttering or "jumping" in the UI and camera movement when zooming or double-clicking on an object.
The stuttering appears to match the 250s throttled tick in the new obb-clipping component. traversing all the tiles to apply the clipping planes is a super expensive operation. perhaps we could store the previous values and only apply traverse to apply clipping planes if the previous values actually changed?
Also, in addition to monitoring for pose changes on target object, we can monitor for tiles loaded events from 3dtiles runtime object via threejs-loader-tiles library, see: https://github.com/nytimes/three-loader-3dtiles/issues/165#issuecomment-2134763490