Skip to content

@aninest/extensions / Update / getUpdateLayer

getUpdateLayer()

ts
function getUpdateLayer<Animating>(queueNextUpdate): UpdateLayer<Animating>

Updates 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

Type Parameters

Animating extends RecursiveAnimatable<unknown>

Parameters

queueNextUpdate = requestAnimationFrame

Returns

UpdateLayer<Animating>

Defined in

../../extensions/src/update.ts:110