integerated product context to scene context

This commit is contained in:
2025-09-05 15:54:38 +05:30
parent 9904a5079d
commit 23570d7007
67 changed files with 2573 additions and 4197 deletions

View File

@@ -1,16 +1,13 @@
import { useEffect } from 'react';
import { useActionHandler } from '../actions/useActionHandler';
import { usePlayButtonStore, useResetButtonStore } from '../../../store/ui/usePlayButtonStore';
import { determineExecutionOrder } from './functions/determineExecutionOrder';
import { useProductContext } from '../products/productContext';
import { useSceneContext } from '../../scene/sceneContext';
import { useEffect } from "react";
import { useActionHandler } from "../actions/useActionHandler";
import { usePlayButtonStore, useResetButtonStore } from "../../../store/ui/usePlayButtonStore";
import { determineExecutionOrder } from "./functions/determineExecutionOrder";
import { useSceneContext } from "../../scene/sceneContext";
function Simulator() {
const { selectedProductStore } = useProductContext();
const { productStore } = useSceneContext();
const { products, getProductById } = productStore();
const { products, getProductById, selectedProduct } = productStore();
const { handleAction } = useActionHandler();
const { selectedProduct } = selectedProductStore();
const { isPlaying } = usePlayButtonStore();
const { isReset } = useResetButtonStore();
@@ -22,19 +19,12 @@ function Simulator() {
const executionOrder = determineExecutionOrder([product]);
executionOrder.forEach(action => {
executionOrder.forEach((action) => {
handleAction(action);
});
}, [products, isPlaying, isReset, selectedProduct]);
return (
<>
</>
);
return <></>;
}
export default Simulator;
export default Simulator;