Skip to content

Commit

Permalink
Add scene state importer
Browse files Browse the repository at this point in the history
  • Loading branch information
jcreedcmu committed Nov 24, 2023
1 parent 4fc6899 commit cab1e29
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ export function App(props: {}): JSX.Element {
if (DEBUG.stateExporter) {
(window as any).state = () => { return state; }
}
if (DEBUG.stateImporter) {
(window as any).importState = (state: SceneState) => { dispatch({ t: 'setSceneState', state }); }
}

switch (state.t) {
case 'menu': {
Expand Down
1 change: 1 addition & 0 deletions src/util/debug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export const DEBUG = {
letterSample: false,
words: false,
stateExporter: true,
stateImporter: true,
instructions: false,
skipAheadPanic: false,
acceleratePanic: false,
Expand Down

0 comments on commit cab1e29

Please sign in to comment.