GCubeSDK
©2026 FenixFox®Studios

AnimationMixer

Player for animations on a particular object in the scene.
This class manages animation playback for a specific object, providing methods to control animation timing, playback speed, and action management. When multiple objects are animated independently, one AnimationMixer may be used for each object.

  • Time scaling for playback speed
  • AnimationAction management
  • Memory resource management
  • Get actions for animation clips
  • Update mixer in render loop

Methods

AnimationMixer(Object3D* rootObject)

Constructor with root object

rootObject Object whose animations shall be played by this mixer

AnimationAction* clipAction(AnimationClip* clip, Object3D* optionalRoot)

Returns an existing or new AnimationAction for the passed clip

clip AnimationClip object
optionalRoot Optional other root nullptr

AnimationAction* existingAction(AnimationClip* clip, Object3D* optionalRoot)

Returns an existing AnimationAction or nullptr for the passed clip

clip AnimationClip object
optionalRoot Optional other root nullptr

Object3D* getRoot() const

Returns this mixer's root object

AnimationMixer& stopAllAction()

Deactivates all previously scheduled actions on this mixer

AnimationMixer& update(f32 deltaTimeInSeconds)

Advances the global mixer time and updates the animation

deltaTimeInSeconds Delta time in seconds

AnimationMixer& setTime(f32 timeInSeconds)

Sets the global mixer to a specific time and updates animation

timeInSeconds Time in seconds to set

Properties

uuid string Unique identifier
time f32 Global mixer time in seconds
timeScale f32 Scaling factor for global mixer time