Skip to content

Documentation / scene / AnimationTimelineEventTarget

Type Alias: AnimationTimelineEventTarget

AnimationTimelineEventTarget = { steps: AnimationTimelineStep[]; targetState?: undefined; returnTo?: undefined; returnTransition?: undefined; consume?: undefined; ignore?: undefined; } | { targetState: string; returnTo?: AnimationTimelineStateReturnTarget; returnTransition?: number; steps?: undefined; consume?: undefined; ignore?: undefined; } | { consume: true; steps?: undefined; targetState?: undefined; returnTo?: undefined; returnTransition?: undefined; ignore?: undefined; } | { ignore: true; steps?: undefined; targetState?: undefined; returnTo?: undefined; returnTransition?: undefined; consume?: undefined; }

Defined in: libs/scene/src/animation/animationtimeline.ts:36

What a response does when its event fires. Exactly one variant applies.

Union Members

Type Literal

{ steps: AnimationTimelineStep[]; targetState?: undefined; returnTo?: undefined; returnTransition?: undefined; consume?: undefined; ignore?: undefined; }

steps

steps: AnimationTimelineStep[]

Steps to run when the event is handled.

targetState?

optional targetState?: undefined

Not used for step targets; keeps this union variant mutually exclusive.

returnTo?

optional returnTo?: undefined

Not used for step targets; keeps this union variant mutually exclusive.

returnTransition?

optional returnTransition?: undefined

Not used for step targets; keeps this union variant mutually exclusive.

consume?

optional consume?: undefined

Not used for step targets; keeps this union variant mutually exclusive.

ignore?

optional ignore?: undefined

Not used for step targets; keeps this union variant mutually exclusive.


Type Literal

{ targetState: string; returnTo?: AnimationTimelineStateReturnTarget; returnTransition?: number; steps?: undefined; consume?: undefined; ignore?: undefined; }

targetState

targetState: string

Controller state name to transition to.

returnTo?

optional returnTo?: AnimationTimelineStateReturnTarget

Optional state to enter when targetState completes.

Use true to return to the state active before the transition, or a string to return to a specific named state. This is only applied by AnimationController.

returnTransition?

optional returnTransition?: number

Optional transition duration used when returning from targetState.

If omitted, the return state's own transition setting is used.

steps?

optional steps?: undefined

Not used for state-transition targets; keeps this union variant mutually exclusive.

consume?

optional consume?: undefined

Not used for state-transition targets; keeps this union variant mutually exclusive.

ignore?

optional ignore?: undefined

Not used for state-transition targets; keeps this union variant mutually exclusive.


Type Literal

{ consume: true; steps?: undefined; targetState?: undefined; returnTo?: undefined; returnTransition?: undefined; ignore?: undefined; }

consume

consume: true

Consume the event without starting steps or changing state.

steps?

optional steps?: undefined

Not used for consume targets; keeps this union variant mutually exclusive.

targetState?

optional targetState?: undefined

Not used for consume targets; keeps this union variant mutually exclusive.

returnTo?

optional returnTo?: undefined

Not used for consume targets; keeps this union variant mutually exclusive.

returnTransition?

optional returnTransition?: undefined

Not used for consume targets; keeps this union variant mutually exclusive.

ignore?

optional ignore?: undefined

Not used for consume targets; keeps this union variant mutually exclusive.


Type Literal

{ ignore: true; steps?: undefined; targetState?: undefined; returnTo?: undefined; returnTransition?: undefined; consume?: undefined; }

ignore

ignore: true

Explicitly ignore the event.

steps?

optional steps?: undefined

Not used for ignore targets; keeps this union variant mutually exclusive.

targetState?

optional targetState?: undefined

Not used for ignore targets; keeps this union variant mutually exclusive.

returnTo?

optional returnTo?: undefined

Not used for ignore targets; keeps this union variant mutually exclusive.

returnTransition?

optional returnTransition?: undefined

Not used for ignore targets; keeps this union variant mutually exclusive.

consume?

optional consume?: undefined

Not used for ignore targets; keeps this union variant mutually exclusive.

Released under the MIT License.