Hi,
I have some trouble solving the following problem using the API:
There are two Geometries - a simple volume/box and an external mesh being loaded from a remote server - which both are connected to an Input-Parameter (range slider) that affect the length of the box and/or position the mesh. I need to achieve the translation of the mesh simultaneously when changing the box-length through an parameter.updateAsync({name: “length-of-box”, value: rangeslider.value }). This works well, when I push another entry to the updateParameterObject - however, in order to save computation time, I want to make use of changing the SceneAsset of the mesh itself and move it locally.
I have tried two ways to change the SceneAsset of the mesh, which both cause different problems:
-
api.scene.updateAsync({ id: mesh.id, content: …(translation included)… }, ‘CommPlugin_1’);
The mesh jumps weirdly through the model while updating the parameter (visually bad solution). -
api.scene.updatePersistentAsync({ id: mesh.id, content: …(translation included)… }, ‘CommPlugin_1’);
the parameter.updateAsync() is aborted, while the mesh has instantly moved.
Perhaps I didn’t fully understand the concept of both functions at all - or I simply mixed up something. Thanks for your help in advance.
Best,
anhelm