@aninest/extensions / Update / UpdateLayer
UpdateLayer<Animating>
ts
type UpdateLayer<Animating>: Layer<Animating> & object;
An update layer that can be mounted to an animation. Allows listening to:
- start - when the animation starts to be updated,
- stop - when the animation finishes animating everything
- update - each update frame
Type declaration
setParent()
ts
setParent: (parentLayer) => unsubscribe;
Parameters
• parentLayer: UpdateLayer
<UnknownRecursiveAnimatable
>
Returns
unsubscribe
subscribe()
Type Parameters
• Event extends UpdateLayerEvents
Parameters
• type: Event
• sub: Event
extends "updateWithDeltaTime"
? Listener
<number
> : Event
extends ChildEvents
? Listener
<InternalUpdateLayer
<RecursiveAnimatable
<unknown
>>> : Listener
<Animation
<Animating
>>
Returns
unsubscribe
Type Parameters
• Animating extends UnknownRecursiveAnimatable