Open NolaDonato opened 7 years ago
Made the change, and several regression tests - works fine. For verification, I'm calling GVRAnimator.start(), not GVRAnimator.autoStart(). If that seems correct, then expect this as part of a Pull Request this week.
The X3D exporter does not need to call GVRAnimator.start(). The asset loader will call this for you if you set the "autostart' option on GVRAnimator. You can do this by passing true as the second parameter to the GVRAnimator constructor.
In the future I will add support for auto-starting animations through the asset loader import settings. Then you will be able to control whether animations start automatically or not when the asset loads.
OK, now constructing GVRAnimator(gvrContext, true); with the true parameter and gvrAnimator.autoStart(); instead of gvrAnimator.start(), and everything works fine with a variety of tests including Level-of-detail demo's.
When loading models with Jassimp, the animations are collected in a GVRAnimator component attached to the root of the model. This allows the user to start or stop all the animations in that model with a single call. It allows the unit tests to stop animations so the screenshots will produce the same results every time.
X3D should also create a GVRAnimator component which contains the animations that should start on load (as opposed to those triggered by user action). This will make the X3D unit tests which contain animated objects pass.