scoop:scoop.surface:0.1.0
src/shared/animation/observation.scoop
Selected production source · src/shared/animation/observation.scoop
1
package scoop.surface3
/** The revision of one existing timeline value, without exposing its generic payload. */4
public interface AnimationSource {5
public val revision: Long6
}8
/** Optional synchronous read tracking; the timeline remains the only animation scheduler. */9
public interface AnimationReadObserver {10
public fun read(source: AnimationSource)11
}13
internal fun observeAnimation(source: AnimationSource) {14
val observer = contextOrNone<AnimationReadObserver>() ?: return15
observer.read(source)16
}