Skip to content

@aninest/extensions / Update

Update ​

Updates the animation every screen refresh, providing a subscribe function which allows listening to:

  • start - when the animation starts to be updated,
  • done - when the animation finishes animating everything
  • update - each update frame It will only update the animation when necessary, i.e. when the animation has been started and there are still things to animate.

Type Aliases ​

Type AliasDescription
UpdateLayerAn update layer that can be mounted to an animation. Allows listening to: - start - when any child animation starts to be updated, - update - when any child animation is updated - updateWithDeltaTime - each update frame with the time since the last update - afterUpdate - after each update frame - childStart - when a child UpdateLayer starts to be updated - childEnd - when a child UpdateLayer finishes animating everything, including its children - done - when the animation finishes animating everything and pauses the updates

Functions ​

FunctionDescription
getUpdateLayerUpdates the animation every frame, providing a subscribe function which allows listening to: - start - when the animation starts to be updated, - done - when the animation finishes animating everything - update - each update frame