animationSink

The destination for animation events produced during a run. The model owns a single sink, reached by any model element as model.animationSink. The default is NullAnimationSink, whose isActive is false, so when animation is not configured the cost is effectively zero: every emission site is guarded by if (animationSink.isActive) animationSink.emit(...), and with the null sink the guarded event is never even constructed. ksl.animation.AnimationCapture installs a real sink before a run and restores the null sink afterward; capturing a trace needs only KSLCore (the app-tier AnimationTraceAttachment is a thin adapter over it).