Hosanna UI API v2.3.0-next
    Preparing search index...

    Class HosannaViewAnimator

    Owns logical state animations and their renderer presentation until cleanup.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    attached: boolean = false
    bindings: ResolvedViewAnimationBinding[] = []
    commitOnCompletion: boolean = true
    frameTimer: ISGROTimespan

    Measures progress since start/resume. Updates target 60Hz on the app loop.

    id: string = ...

    Unique identifier for this animator instance.

    onCompletedCallback?: () => void
    options: Required<AnimationOptions>

    Animation options (duration, repeat, reverse, etc).

    ownedViews: BaseView.BaseView<ViewState, ISGNGroup>[] = []
    state: AnimState = AnimState.Stopped

    Methods

    • Called on each animation tick to update the animation state.

      Parameters

      • _delta: number

        Timer-service delta; the frame timer measures elapsed animation time.

      Returns void

    • Pauses the animation (unregisters tickable, keeps state).

      Returns void

    • An explicit semantic change cancels; unrelated renders keep presentation.

      Parameters

      Returns boolean

    • Settle committed presentation on surviving nodes before a view loses its renderer.

      Parameters

      Returns void

    • Resumes the animation from the current state. If not started, starts with resume=true.

      Returns void

    • Starts the animation.

      Parameters

      • resume: boolean = false

        If true, resumes from the current state; otherwise, restarts.

      • useCurrentState: boolean = false

        If true, uses the current view state as the start values.

      Returns void

    • Internal

      Start from the samples captured before the destination's render.

      Returns void

    • Stops the animation and cleans up resources.

      Returns void

    • Parameters

      • value: unknown
      • field: string

      Returns boolean

    • Internal

      Prepare presentation before the caller applies destination state. The caller commits that state and then calls startPrepared(), so styles cannot replace the captured start sample. Imperative calls use the same preparation path.

      Parameters

      Returns undefined | HosannaViewAnimator

    • Parameters

      Returns ResolvedViewAnimationBinding[]

    • Parameters

      • left: unknown
      • right: unknown
      • field: string

      Returns boolean