Merge remote-tracking branch 'origin/main-dev' into main-demo

This commit is contained in:
2025-07-22 16:48:23 +05:30
19 changed files with 1355 additions and 992 deletions

View File

@@ -404,6 +404,7 @@ const CopyPasteControls3D = ({
actionName: "Action 1",
actionType: "worker",
loadCapacity: 1,
assemblyCount: 1,
loadCount: 1,
processTime: 10,
triggers: []

View File

@@ -405,6 +405,7 @@ const DuplicationControls3D = ({
actionName: "Action 1",
actionType: "worker",
loadCapacity: 1,
assemblyCount: 1,
loadCount: 1,
processTime: 10,
triggers: []

View File

@@ -1,4 +1,4 @@
import { createContext, useContext, useMemo } from 'react';
import { createContext, useContext, useMemo, useRef } from 'react';
import { createAssetStore, AssetStoreType } from '../../store/builder/useAssetStore';
import { createWallAssetStore, WallAssetStoreType } from '../../store/builder/useWallAssetStore';
@@ -38,6 +38,8 @@ type SceneContextValue = {
storageUnitStore: StorageUnitStoreType;
humanStore: HumanStoreType;
humanEventManagerRef: React.RefObject<HumanEventManagerState>;
clearStores: () => void;
layout: 'Main Layout' | 'Comparison Layout';
@@ -71,6 +73,8 @@ export function SceneProvider({
const storageUnitStore = useMemo(() => createStorageUnitStore(), []);
const humanStore = useMemo(() => createHumanStore(), []);
const humanEventManagerRef = useRef<HumanEventManagerState>({ humanStates: [] });
const clearStores = useMemo(() => () => {
assetStore.getState().clearAssets();
wallAssetStore.getState().clearWallAssets();
@@ -87,6 +91,7 @@ export function SceneProvider({
vehicleStore.getState().clearVehicles();
storageUnitStore.getState().clearStorageUnits();
humanStore.getState().clearHumans();
humanEventManagerRef.current.humanStates = [];
}, [assetStore, wallAssetStore, wallStore, aisleStore, zoneStore, floorStore, eventStore, productStore, materialStore, armBotStore, machineStore, conveyorStore, vehicleStore, storageUnitStore, humanStore]);
const contextValue = useMemo(() => (
@@ -106,6 +111,7 @@ export function SceneProvider({
vehicleStore,
storageUnitStore,
humanStore,
humanEventManagerRef,
clearStores,
layout
}