registry / systems / renderer
@@ -1,7 +1,39 @@
|
||||
"use client";
|
||||
|
||||
import { useScene } from "@pascal-app/core";
|
||||
import { Viewer } from "@pascal-app/viewer";
|
||||
|
||||
export default function Editor() {
|
||||
return <Viewer />;
|
||||
return (
|
||||
<div className="w-full h-full bg-pink-50">
|
||||
<LevelModeSwitcher />
|
||||
<Viewer />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
const LevelModeSwitcher = () => {
|
||||
const setLevelMode = useScene((state) => state.setLevelMode);
|
||||
const levelMode = useScene((state) => state.levelMode);
|
||||
|
||||
return (
|
||||
<div className="absolute top-4 left-4 z-10 flex gap-2">
|
||||
<button
|
||||
className={`px-4 py-2 rounded ${
|
||||
levelMode === "exploded" ? "bg-blue-500 text-white" : "bg-white"
|
||||
}`}
|
||||
onClick={() => setLevelMode("exploded")}
|
||||
>
|
||||
Exploded
|
||||
</button>
|
||||
<button
|
||||
className={`px-4 py-2 rounded ${
|
||||
levelMode === "stacked" ? "bg-blue-500 text-white" : "bg-white"
|
||||
}`}
|
||||
onClick={() => setLevelMode("stacked")}
|
||||
>
|
||||
Stacked
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
|
After Width: | Height: | Size: 7.2 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 8.1 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 9.1 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 9.5 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 9.4 KiB |
|
After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 5.2 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 8.3 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 27 KiB |