Last active
February 9, 2020 02:03
-
-
Save BrooklinJazz/14bee9d8de6c10a5c48e0c9e1d3ec461 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const initialActions = { | |
| bad: "bad", | |
| fearful: "fearful", | |
| angry: "angry", | |
| disgusted: "disgusted", | |
| sad: "sad", | |
| happy: "happy", | |
| surprised: "surprised" | |
| }; | |
| const boredStateMachine = { | |
| initial: "init", | |
| states: { | |
| init: { on: { indifferent: "indifferent", apathetic: "apathetic" } }, | |
| indifferent: {}, | |
| apathetic: {} | |
| } | |
| } | |
| const busyStateMachine = { | |
| initial: "init", | |
| states: { | |
| init: { on: { pressured: "pressured", rushed: "rushed" } }, | |
| pressured: {}, | |
| rushed: {} | |
| } | |
| } | |
| const badStateMachine = { | |
| on: { cancel: "init" }, | |
| initial: "init", | |
| states: { | |
| init: { on: { bored: "bored" } }, | |
| bored: boredStateMachine, | |
| busy: busyStateMachine | |
| } | |
| }; | |
| const emotionStateMachine = Machine({ | |
| id: "Emotion Wheel", | |
| initial: "init", | |
| states: { | |
| init: { on: initialActions }, | |
| bad: badStateMachine, | |
| fearful: {}, | |
| angry: {}, | |
| disgusted: {}, | |
| sad: {}, | |
| happy: {}, | |
| surprised: {} | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment