Created
April 27, 2021 13:16
-
-
Save yoyoys/e430747555d42e583b1037f89aeb572b 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 fetchMachine = Machine({ | |
id: 'cartroom-view', | |
initial: '3D_VIEW', | |
context: { | |
retries: 0 | |
}, | |
states: { | |
'3D_VIEW': { | |
on: { | |
'2d-button': { | |
target: '2D_VIEW', | |
actions: ['TOP_VIEW_RESET'] | |
}, | |
'reset-button': { | |
target: '3D_VIEW', | |
actions: ['WALKING_RESET'] | |
}, | |
// '45deg-button': { | |
// target: '3D_VIEW', | |
// actions: ['FRONT_VIEW'] | |
// } | |
} | |
}, | |
'2D_VIEW': { | |
on: { | |
'2d-button': { | |
target: '3D_VIEW', | |
actions: ['WALKING'] | |
}, | |
'reset-button': { | |
target: '2D_VIEW', | |
actions: ['TOP_VIEW_RESET'] | |
}, | |
// '45deg-button': { | |
// target: '3D_VIEW', | |
// actions: ['FRONT_VIEW'] | |
// } | |
} | |
}, | |
} | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment