SceneView.AnimationTimeTransformer

  • SceneView.AnimationTimeTransformer is an interface in ARCore's Sceneform used to control the timing of animations within a SceneView.

  • It provides a method, getAnimationTime, which converts the Choreographer's frame time into the desired animation time, enabling custom animation playback speeds and behaviors.

  • By implementing this interface, developers can manipulate the animation timeline, allowing effects like slow motion, fast forward, or even pausing and resuming animations.

public static interface SceneView.AnimationTimeTransformer

Defines a transform from Choreographer time to animation time. Used to control the playback of animations in a SceneView.

Public Methods

abstract long
getAnimationTime(long choreographerTime)
Transforms nanosecond times generated from the Choreographer to generate the animation update time.

Public Methods

public abstract long getAnimationTime (long choreographerTime)

Transforms nanosecond times generated from the Choreographer to generate the animation update time. The input nano time can be used to ensure that returned times never decrease.

Parameters
choreographerTime the current frame time returned from the Choreographer.