AnimationMixer
A weighted, auto-advancing blend of several glTF clips — a blend tree. Each AnimationTrack contributes its pose by AnimationTrack.weight; weights are normalized so they need not sum to 1.
This is plain state with no @Composable entry point, so it suits an imperative game loop: hold a mixer (e.g. via rememberAnimationMixer), mutate track weights from your own animation state machine, and call apply every frame with the instance's Animator and the frame delta:
val mixer = rememberAnimationMixer()
val walk = remember { mixer.addTrack(walkIndex) }
val run = remember { mixer.addTrack(runIndex, weight = 0f) }
GltfInstance(asset = character, onCreate = { animator = instance.getAnimator() })
OnFrame { frame ->
walk.weight = 1f - moveSpeed; run.weight = moveSpeed
animator?.let { mixer.apply(it, frame.deltaSeconds) }
}In Compose, AnimationState already wraps one of these as AnimationState.mixer and drives apply for you; rememberAnimationTrack is declarative sugar over addTrack.
Filament blends the whole skeleton per call, so per-bone masks and additive layers are not expressible — drive the Animator yourself for that.
Properties
Pauses advancement of every track while true; poses hold in place. Observable, like AnimationState.isPaused.
The active tracks, in blend order.