Hi - I have been trying for a long time to get this to work somehow - however all my attempts are unsuccessful - did someone figure it out? This works for one model - BUT as soon as I want to run this in a loop - sandbox error
I assume that the goal is to re-use the same model, and render it many times, with different orientations.
(And this should be done without loading the model many times. Technically, it would be possible to re-instantiate the model each time, with Cesium.Model.fromGltf
, but this will probably become prohibitively expensive for more complex models or a high number of models, and I assume that your attempt to pass on the gltf
to the next model aimed exactly at avoiding this…).
The recommendation for cases like this seems to be to use a ModelInstanceCollection
(searching for that reveals some related threads).
Applying this to your example:
Someone from the core Cesium team should confirm that this is the right approach.
Great! Thanks @Marco13! This is what me need