Logo FS-Skia-UI

Animation Module

Public contract module exposed by this FS.Skia.UI package. Additive Elmish tick helper (feature 073). The only interpreter-edge component of the animation slice: it advances time by emitting frame-delta messages, and it gates redraws by emitting **only while at least one animation is active**. Wire it through `Program.withSubscription`.

Functions and values

Function or value Description

tickSubscription isAnimating toMsg interval model

Full Usage: tickSubscription isAnimating toMsg interval model

Parameters:
    isAnimating : 'model -> bool
    toMsg : TimeSpan -> 'msg
    interval : TimeSpan
    model : 'model

Returns: Sub<'msg>
Type parameters: 'model, 'msg

Build the animation tick subscription for the current model. While `isAnimating model` holds, the returned `Sub` carries a single ticking entry that dispatches `toMsg interval` (an immediate first frame, then one per `interval`); once the model settles it returns `Sub.none`, so the host stops requesting frames (redraw gating at the framework-request level — FR-006). The `'model -> Sub<'msg>` shape plugs directly into `Program.withSubscription`.

isAnimating : 'model -> bool
toMsg : TimeSpan -> 'msg
interval : TimeSpan
model : 'model
Returns: Sub<'msg>

Type something to start searching.