Add ctrl|meta + s for generating new preview

This commit is contained in:
Kurt Hutten
2021-03-14 09:38:22 +11:00
parent d7ebb00c3b
commit 44c8192d81
4 changed files with 41 additions and 11 deletions

View File

@@ -21,6 +21,7 @@ export const useIdeState = () => {
ideType: 'openScad',
consoleMessages: [{ type: 'message', message: 'Initialising OpenSCAD' }],
code: donutInitCode,
settings: {},
objectData: {
type: 'stl',
data: 'some binary',
@@ -76,6 +77,11 @@ export const useIdeState = () => {
...state,
isLoading: true,
}
case 'setSettings':
return {
...state,
settings: payload,
}
default:
return state
}
@@ -103,6 +109,7 @@ export const useIdeState = () => {
})
}
})
dispatch({ type: 'setSettings', payload: { camera: payload.camera } })
dispatch({ type: 'setLoading' })
break