NullAnimationSink

The no-op sink used whenever animation is disabled. isActive is always false, emit does nothing, and the lifecycle callbacks are inherited no-ops.

This is a singleton (object) so that the default model.animationSink allocates nothing and every disabled model shares the same instance.

Properties

Link copied to clipboard
open override val isActive: Boolean

Whether this sink is collecting events. Emission sites must check this before building and emitting an event. A false value must be a cheap, branch-predictable constant.

Functions

Link copied to clipboard
open override fun emit(event: AnimationEvent)

Records event. Called only when isActive is true. Must not throw on the simulation thread; implementations should fail soft (e.g. drop and log) rather than disrupt the run.