Last active
April 22, 2020 02:49
-
-
Save awchjimmy/a1db58a4177ebd97854641d61f33ce43 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
This file contains 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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions | |
// - XState (all XState exports) | |
const phaserCEDocs = { | |
id: 'unofficial', | |
initial: 'docs', | |
states: { | |
docs: { | |
on: { | |
"game": 'game', | |
"Sprite": "spriteName" | |
} | |
}, | |
"game": { | |
on: { | |
load: 'game@load' | |
} | |
}, | |
"game@load": { | |
on: { | |
image: 'game@load@image(key, path)' | |
} | |
}, | |
"game@load@image(key, path)": { | |
type: 'final' | |
}, | |
'spriteName': { | |
on: { | |
visible: "spriteName@visible = true" | |
} | |
}, | |
"spriteName@visible = true": { | |
type: 'final' | |
} | |
} | |
} | |
const fetchMachine = Machine({ | |
id: 'fetch', | |
initial: 'idle', | |
type: 'parallel', | |
context: { | |
retries: 0 | |
}, | |
states: { | |
idle: { | |
on: { | |
} | |
}, | |
loading: { | |
on: { | |
RESOLVE: '', | |
} | |
}, | |
"phaser-ce": { | |
...phaserCEDocs | |
}, | |
"browserify": { | |
type: 'final' | |
}, | |
"xstates": { | |
type: 'final' | |
}, | |
} | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment