Class: WaitStateHandler

states.WaitStateHandler(context)

Handler for the Wait/Idle state

Constructor

new WaitStateHandler(context)

Create a wait state handler

Parameters:
Name Type Description
context OwenAnimationContext

The animation context

Source:

Extends

  • StateHandler

Members

idleClip :AnimationClip|null

The main idle animation clip

Type:
  • AnimationClip | null
Source:

quirkInterval :number

Interval between quirk attempts (ms)

Type:
  • number
Source:

quirkTimer :number

Timer for quirk animations

Type:
  • number
Source:

quirks :Array.<AnimationClip>

Available quirk animations

Type:
  • Array.<AnimationClip>
Source:

Methods

(async) enter(fromStateopt, emotionopt) → {Promise.<void>}

Enter the wait state

Parameters:
Name Type Attributes Default Description
fromState string | null <optional>
null

The previous state

emotion string <optional>
Emotions.NEUTRAL

The emotion to enter with

Source:
Returns:
Type
Promise.<void>

(async) exit(toStateopt, emotionopt) → {Promise.<void>}

Exit the wait state

Parameters:
Name Type Attributes Default Description
toState string | null <optional>
null

The next state

emotion string <optional>
Emotions.NEUTRAL

The emotion to exit with

Source:
Returns:
Type
Promise.<void>

getAvailableTransitions() → {Array.<string>}

Get available transitions from wait state

Source:
Returns:

Array of available state transitions

Type
Array.<string>

update(deltaTime) → {void}

Update the wait state

Parameters:
Name Type Description
deltaTime number

Time elapsed since last update (ms)

Source:
Returns:
Type
void