Samsung / GearVRf

The GearVR framework(GearVRf) is an Open Source VR rendering library for application development on VR-supported Android devices.
http://www.gearvrf.org
Apache License 2.0
407 stars 217 forks source link

Feature request: X3D should collect animations into GVRAnimator #1167

Open NolaDonato opened 7 years ago

NolaDonato commented 7 years ago

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.

mwitchwilliams commented 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.

NolaDonato commented 7 years ago

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.

mwitchwilliams commented 7 years ago

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.