export / load json

This commit is contained in:
wass08
2026-01-30 07:48:52 +09:00
parent edb2b181c2
commit 498da300db
6 changed files with 180 additions and 4 deletions
+7
View File
@@ -45,6 +45,10 @@ type ViewerState = {
resetSelection: () => void;
outliner: Outliner; // No setter as we will manipulate directly the arrays
// Export functionality
exportScene: (() => Promise<void>) | null;
setExportScene: (fn: (() => Promise<void>) | null) => void;
};
const useViewer = create<ViewerState>()((set, get) => ({
@@ -94,6 +98,9 @@ const useViewer = create<ViewerState>()((set, get) => ({
}),
outliner: { selectedObjects: [], hoveredObjects: [] },
exportScene: null,
setExportScene: (fn) => set({ exportScene: fn }),
}));
export default useViewer;