You can rotate/translate the whole 3D model via the JS API.
For rotating/translating model parts or light source create animations with your 3D modeling tool of choice and export them to fbx. You can then trigger them via the JS API.
M
Mark Labenski
said
over 7 years ago
Thank you!
So, the answer is NO. One can not rotate parts of the models like lights seperately. One needs to build keyframe animations in the fbx compatible format.
M
Mark Labenski
said
over 7 years ago
Hello everyone,
I wonder if it is possible to move lights or other parts of a 3D-Model via transformations?
Or can anyone think of an other way to solve this on the latest JavaScript AR-Lib?
Thank you
R
Roland Hufnagel
said
over 7 years ago
Exactly. The JS API allows to translate/rotate models only as a whole (relative to the target's position).
What is your use case? Maybe there's another solution to it. What about splitting up your 3D model into separate fbx files, which can be loaded, transformed/rotated indivually.
If there is no workaround, we can consider this extensions for future versions.
M
Mark Labenski
said
over 7 years ago
Thank you again.
"What about splitting up your 3D model into separate fbx files, which can be loaded, transformed/rotated indivually." Do you mean, every model that will be added to a "cam" or "view" is joined together to one scene? Lights etc. will be set for every model in that scene?
R
Roland Hufnagel
said
over 7 years ago
No. 3D models from different fbx files won't be merged to one scene. They are all rendered in the same OpenGL context, i.e., occulsion will work. But lights won't be shared.
For moving the light source (which represents a node in the scene) splitting up the 3D model won't work. In this case you can only prepare keyframe animations on the light source.
Mark Labenski