From 76492bc90320c468fcc966287b36d6cdc2a0e3fe Mon Sep 17 00:00:00 2001 From: ochafik Date: Mon, 8 Jul 2024 02:21:33 +0100 Subject: [PATCH] add customizer --- .gitignore | 3 +- src/components/App.tsx | 11 +- src/components/CustomizerPanel.tsx | 219 +++++++++++++++++++++++++++++ src/components/HelpMenu.tsx | 7 + src/components/PanelSwitcher.tsx | 7 +- src/runner/actions.ts | 47 ++++++- src/state/app-state.ts | 5 + src/state/customizer-types.ts | 46 ++++++ src/state/fragment-state.ts | 2 + src/state/model.ts | 10 +- 10 files changed, 341 insertions(+), 16 deletions(-) create mode 100644 src/components/CustomizerPanel.tsx create mode 100644 src/state/customizer-types.ts diff --git a/.gitignore b/.gitignore index 086a9b3..8fe41a1 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ public/libraries public/openscad.js public/openscad.wasm src/wasm -package-lock.json \ No newline at end of file +package-lock.json +.DS_Store \ No newline at end of file diff --git a/src/components/App.tsx b/src/components/App.tsx index 4476ee6..64ee10b 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -9,6 +9,7 @@ import Footer from './Footer'; import { ModelContext, FSContext } from './contexts'; import PanelSwitcher from './PanelSwitcher'; import { ConfirmDialog } from 'primereact/confirmdialog'; +import CustomizerPanel from './CustomizerPanel'; // import "primereact/resources/themes/lara-light-indigo/theme.css"; @@ -30,11 +31,11 @@ export function App({initialState, statePersister, fs}: {initialState: State, st viewer: { editor: 2, viewer: 3, - customizer: 2, + customizer: 1, }, customizer: { editor: 0, - viewer: 0, + viewer: 1, customizer: 3, } } @@ -78,7 +79,11 @@ export function App({initialState, statePersister, fs}: {initialState: State, st ${layout.mode === 'single' ? 'absolute-fill' : ''} `} style={getPanelStyle('editor')} /> - {/* */} +