Problem or use case
I've seen that a lot of code is just there to sync the camera changes with the internal SparkRenderer, including complex and brittle code (accessing internals of either the 3DTilesRenderJs and Spark) just to handle instances of the SparkRenderer relative to the camera, while the recommendation of spark is to have it parented at the camera.
This also includes cloning of the camera which has unwanted side-effects (like cloning children parented to it) (I've actually started a branch to avoid this here: https://github.com/GEOBILITY-SYSTEMS/3D-Tiles-RendererJS-3DGS-Plugin/tree/avoid-camera-cloning).
But I think usually it's better to just handle this externally entirely so that the user has more control over spark and that it's really just one instance of the SparkRenderer in the whole scene.
We're currently driving a fork of this (https://github.com/GEOBILITY-SYSTEMS/3D-Tiles-RendererJS-3DGS-Plugin/tree/fork), that allows initialization of the plugin with an external SparkRenderer that is parented to the main camera instead.
Proposed solution
So I would propose to add an option to avoid the whole internal management of the SparkRenderer and instead be able to just pass the renderer to the plugin (as in the fork, which is well... a little bit more radical)
Alternatives considered
No response
Integration context
No response
Additional context
No response
Problem or use case
I've seen that a lot of code is just there to sync the camera changes with the internal SparkRenderer, including complex and brittle code (accessing internals of either the 3DTilesRenderJs and Spark) just to handle instances of the SparkRenderer relative to the camera, while the recommendation of spark is to have it parented at the camera.
This also includes cloning of the camera which has unwanted side-effects (like cloning children parented to it) (I've actually started a branch to avoid this here: https://github.com/GEOBILITY-SYSTEMS/3D-Tiles-RendererJS-3DGS-Plugin/tree/avoid-camera-cloning).
But I think usually it's better to just handle this externally entirely so that the user has more control over spark and that it's really just one instance of the
SparkRendererin the whole scene.We're currently driving a fork of this (https://github.com/GEOBILITY-SYSTEMS/3D-Tiles-RendererJS-3DGS-Plugin/tree/fork), that allows initialization of the plugin with an external SparkRenderer that is parented to the main camera instead.
Proposed solution
So I would propose to add an option to avoid the whole internal management of the
SparkRendererand instead be able to just pass the renderer to the plugin (as in the fork, which is well... a little bit more radical)Alternatives considered
No response
Integration context
No response
Additional context
No response