Class: ReactStateHandler

states.ReactStateHandler(context)

Handler for the React state

Constructor

new ReactStateHandler(context)

Create a react state handler

Parameters:
Name Type Description
context OwenAnimationContext

The animation context

Source:

Extends

  • StateHandler

Members

emotion :string

Current emotional state

Type:
  • string
Source:

Methods

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

Enter the react state

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

The previous state (unused)

emotion string <optional>
Emotions.NEUTRAL

The emotion to enter with

Source:
Returns:
Type
Promise.<void>

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

Exit the react 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 react state

Source:
Returns:

Array of available state transitions

Type
Array.<string>

(async) handleMessage(message) → {Promise.<void>}

Handle a user message in react state

Parameters:
Name Type Description
message string

The user message

Source:
Returns:
Type
Promise.<void>