Skip to content

[css-animationworklet] Stateful animator section should focus on developer visible details #930

@flackr

Description

@flackr

The Stateful animator section could be much more succinct by explaining the developer-visible guarantees. i.e.

A stateful animator is guaranteed to run on a unique animator instance. For the lifetime of the WorkletAnimation, if the Animator Instance is destructed before the WorkletAnimation, the user agent will invoke the animator definition's state function and associate the result with the WorkletAnimation. When an Animator Instance is recreated for a WorkletAnimation, this associated state is passed in to the constructor. This is described in detail in .

Then, we could have the note and explain how this means your animation's state will persist throughout the animation as long as you provide it in the state function and restore it in the constructor.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions