feat: Implement duplicate event and product stores using Zustand with immer middleware
- Created `duplicateEventStore` to manage events with actions for adding, removing, updating events, points, actions, and triggers. - Implemented helper functions to retrieve events, points, actions, and triggers by their unique identifiers. - Created `duplicateProductStore` to manage products and their associated events, including actions for adding, removing, updating products, events, points, actions, and triggers. - Added renaming functions for products, actions, and triggers. - Included comprehensive helper functions to retrieve products and their related data by various identifiers.
This commit is contained in:
@@ -9,36 +9,45 @@ import background from "../../assets/textures/hdr/mudroadpuresky2k.hdr";
|
||||
import ControlsDuplicate from "./duplicateSetup/controlsDuplicate";
|
||||
import PostProcessingDuplicate from "./duplicateSetup/postProcessingDuplicate";
|
||||
import { Color } from "three";
|
||||
import { SceneProvider } from "../scene/sceneContext";
|
||||
import SimulationDuplicate from "./duplicateSimulation/duplicateSimulation";
|
||||
|
||||
export default function DuplicateScene() {
|
||||
const projectId = "684bcd620a64bc2a815a88d6";
|
||||
|
||||
return (
|
||||
<Canvas
|
||||
id="sceneCanvas"
|
||||
shadows
|
||||
color="#aaaa"
|
||||
eventPrefix="client"
|
||||
onContextMenu={(e) => {
|
||||
e.preventDefault();
|
||||
}}
|
||||
onCreated={(e) => {
|
||||
e.scene.background = new Color(0x19191d);
|
||||
}}
|
||||
gl={{ powerPreference: "high-performance", antialias: true, preserveDrawingBuffer: true }}
|
||||
>
|
||||
<SceneProvider layout='Comparison Layout'>
|
||||
<Canvas
|
||||
id="sceneCanvas"
|
||||
shadows
|
||||
color="#aaaa"
|
||||
eventPrefix="client"
|
||||
style={{
|
||||
pointerEvents: 'none'
|
||||
}}
|
||||
onContextMenu={(e) => {
|
||||
e.preventDefault();
|
||||
}}
|
||||
onCreated={(e) => {
|
||||
e.scene.background = new Color(0x19191d);
|
||||
}}
|
||||
gl={{ powerPreference: "high-performance", antialias: true, preserveDrawingBuffer: true }}
|
||||
>
|
||||
|
||||
<Sun />
|
||||
<Sun />
|
||||
|
||||
<Shadows />
|
||||
<Shadows />
|
||||
|
||||
<ControlsDuplicate projectId={projectId} />
|
||||
<ControlsDuplicate />
|
||||
|
||||
<PostProcessingDuplicate />
|
||||
<PostProcessingDuplicate />
|
||||
|
||||
<Environment files={background} environmentIntensity={1.5} />
|
||||
<Environment files={background} environmentIntensity={1.5} />
|
||||
|
||||
<BuilderDuplicate projectId={projectId} />
|
||||
</Canvas>
|
||||
<BuilderDuplicate projectId={projectId} />
|
||||
|
||||
<SimulationDuplicate projectId={projectId} />
|
||||
</Canvas>
|
||||
</SceneProvider>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user