This example builds on top of the ThreejsAddSimpleObject.
Additionaly this example shows how to animate a THREE.js object that
was added to the scene.
Therefore the object is loaded with one of the THREE.js loaders (we chose
FBX here).
Once the object is loaded, we add it to the MapView.scene :
Similar to the ThreejsAddSimpleObject example we add an event listener to the map view
that is called whenever the map is rendered to update the position of the object.
In the same callback we additionaly update the animation of our object:
Normaly the map is only rendered when needed, i.e. when the user is interacting with the map.
Since we want to have a constant animation we have to tell MapView to always render.
We can do this via MapView.beginAnimation. We can stop the animation again with
MapView.endAnimation.
This example builds on top of the ThreejsAddSimpleObject. Additionaly this example shows how to animate a THREE.js object that was added to the scene.
Therefore the object is loaded with one of the THREE.js loaders (we chose FBX here).
Once the object is loaded, we add it to the MapView.scene :
Similar to the ThreejsAddSimpleObject example we add an event listener to the map view that is called whenever the map is rendered to update the position of the object.
In the same callback we additionaly update the animation of our object:
Normaly the map is only rendered when needed, i.e. when the user is interacting with the map. Since we want to have a constant animation we have to tell MapView to always render. We can do this via MapView.beginAnimation. We can stop the animation again with MapView.endAnimation.