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?
optionaltargetState?:undefined
Not used for step targets; keeps this union variant mutually exclusive.
returnTo?
optionalreturnTo?:undefined
Not used for step targets; keeps this union variant mutually exclusive.
returnTransition?
optionalreturnTransition?:undefined
Not used for step targets; keeps this union variant mutually exclusive.
consume?
optionalconsume?:undefined
Not used for step targets; keeps this union variant mutually exclusive.
ignore?
optionalignore?: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?
optionalreturnTo?: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?
optionalreturnTransition?:number
Optional transition duration used when returning from targetState.
If omitted, the return state's own transition setting is used.
steps?
optionalsteps?:undefined
Not used for state-transition targets; keeps this union variant mutually exclusive.
consume?
optionalconsume?:undefined
Not used for state-transition targets; keeps this union variant mutually exclusive.
ignore?
optionalignore?: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?
optionalsteps?:undefined
Not used for consume targets; keeps this union variant mutually exclusive.
targetState?
optionaltargetState?:undefined
Not used for consume targets; keeps this union variant mutually exclusive.
returnTo?
optionalreturnTo?:undefined
Not used for consume targets; keeps this union variant mutually exclusive.
returnTransition?
optionalreturnTransition?:undefined
Not used for consume targets; keeps this union variant mutually exclusive.
ignore?
optionalignore?: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?
optionalsteps?:undefined
Not used for ignore targets; keeps this union variant mutually exclusive.
targetState?
optionaltargetState?:undefined
Not used for ignore targets; keeps this union variant mutually exclusive.
returnTo?
optionalreturnTo?:undefined
Not used for ignore targets; keeps this union variant mutually exclusive.
returnTransition?
optionalreturnTransition?:undefined
Not used for ignore targets; keeps this union variant mutually exclusive.
consume?
optionalconsume?:undefined
Not used for ignore targets; keeps this union variant mutually exclusive.