Scoop API

scoop:scoop.surface:0.1.0

src/shared/animation/observation.scoop

Selected production source · src/shared/animation/observation.scoop

1package scoop.surface
3/** The revision of one existing timeline value, without exposing its generic payload. */
4public interface AnimationSource {
5 public val revision: Long
6}
8/** Optional synchronous read tracking; the timeline remains the only animation scheduler. */
9public interface AnimationReadObserver {
10 public fun read(source: AnimationSource)
13internal fun observeAnimation(source: AnimationSource) {
14 val observer = contextOrNone<AnimationReadObserver>() ?: return
15 observer.read(source)