updated
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import { useCallback, useEffect, useState } from "react";
|
||||
import * as THREE from 'three';
|
||||
import { useFrame } from "@react-three/fiber";
|
||||
import { useProductStore } from "../../../../../store/simulation/useProductStore";
|
||||
import { usePlayButtonStore, useAnimationPlaySpeed, usePauseButtonStore, useResetButtonStore } from "../../../../../store/usePlayButtonStore";
|
||||
import { useSceneContext } from "../../../../scene/sceneContext";
|
||||
import { useProductContext } from "../../../products/productContext";
|
||||
@@ -22,10 +21,10 @@ interface SpawnInstance {
|
||||
}
|
||||
|
||||
export function useSpawnHandler() {
|
||||
const { materialStore, conveyorStore } = useSceneContext();
|
||||
const { materialStore, conveyorStore, productStore } = useSceneContext();
|
||||
const { addMaterial } = materialStore();
|
||||
const { getConveyorById } = conveyorStore();
|
||||
const { getModelUuidByActionUuid, getPointUuidByActionUuid } = useProductStore();
|
||||
const { getModelUuidByActionUuid, getPointUuidByActionUuid } = productStore();
|
||||
const { isPlaying } = usePlayButtonStore();
|
||||
const { isPaused } = usePauseButtonStore();
|
||||
const { speed } = useAnimationPlaySpeed();
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
import { useCallback } from "react";
|
||||
import { useProductStore } from "../../../../../store/simulation/useProductStore";
|
||||
import { useSceneContext } from "../../../../scene/sceneContext";
|
||||
import { useProductContext } from "../../../products/productContext";
|
||||
|
||||
export function useProcessHandler() {
|
||||
const { materialStore, machineStore } = useSceneContext();
|
||||
const { materialStore, machineStore, productStore } = useSceneContext();
|
||||
const { selectedProductStore } = useProductContext();
|
||||
const { getMaterialById, setMaterial } = materialStore();
|
||||
const { addCurrentAction } = machineStore();
|
||||
const { getModelUuidByActionUuid } = useProductStore();
|
||||
const { getModelUuidByActionUuid } = productStore();
|
||||
const { selectedProduct } = selectedProductStore();
|
||||
|
||||
const processLogStatus = (materialUuid: string, status: string) => {
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
import { useCallback } from "react";
|
||||
import { useProductStore } from "../../../../../store/simulation/useProductStore";
|
||||
import { useSceneContext } from "../../../../scene/sceneContext";
|
||||
import { useProductContext } from "../../../products/productContext";
|
||||
|
||||
export function usePickAndPlaceHandler() {
|
||||
const { materialStore, armBotStore } = useSceneContext();
|
||||
const { materialStore, armBotStore, productStore } = useSceneContext();
|
||||
const { selectedProductStore } = useProductContext();
|
||||
const { getMaterialById } = materialStore();
|
||||
const { addCurrentAction } = armBotStore();
|
||||
const { getModelUuidByActionUuid } = useProductStore();
|
||||
const { getModelUuidByActionUuid } = productStore();
|
||||
const { selectedProduct } = selectedProductStore();
|
||||
|
||||
const pickAndPlaceLogStatus = (materialUuid: string, status: string) => {
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
import { useCallback, useState, useEffect, useRef } from "react";
|
||||
import { useFrame } from "@react-three/fiber";
|
||||
import { useProductStore } from "../../../../../store/simulation/useProductStore";
|
||||
import { usePlayButtonStore, usePauseButtonStore, useResetButtonStore, useAnimationPlaySpeed } from "../../../../../store/usePlayButtonStore";
|
||||
import { useSceneContext } from "../../../../scene/sceneContext";
|
||||
import { useProductContext } from "../../../products/productContext";
|
||||
|
||||
export function useRetrieveHandler() {
|
||||
const { materialStore, armBotStore, vehicleStore, storageUnitStore } = useSceneContext();
|
||||
const { materialStore, armBotStore, vehicleStore, storageUnitStore, productStore } = useSceneContext();
|
||||
const { selectedProductStore } = useProductContext();
|
||||
const { addMaterial } = materialStore();
|
||||
const { getModelUuidByActionUuid, getPointUuidByActionUuid, getEventByModelUuid, getActionByUuid } = useProductStore();
|
||||
const { getModelUuidByActionUuid, getPointUuidByActionUuid, getEventByModelUuid, getActionByUuid } = productStore();
|
||||
const { getStorageUnitById, getLastMaterial, updateCurrentLoad, removeLastMaterial } = storageUnitStore();
|
||||
const { getVehicleById, incrementVehicleLoad, addCurrentMaterial } = vehicleStore();
|
||||
const { selectedProduct } = selectedProductStore();
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
import { useCallback } from "react";
|
||||
import { useProductStore } from "../../../../../store/simulation/useProductStore";
|
||||
import { useSceneContext } from "../../../../scene/sceneContext";
|
||||
import { useProductContext } from "../../../products/productContext";
|
||||
|
||||
export function useStoreHandler() {
|
||||
const { materialStore, storageUnitStore } = useSceneContext();
|
||||
const { materialStore, storageUnitStore, productStore } = useSceneContext();
|
||||
const { getMaterialById, removeMaterial, setEndTime } = materialStore();
|
||||
const { addCurrentMaterial, updateCurrentLoad } = storageUnitStore();
|
||||
const { getModelUuidByActionUuid } = useProductStore();
|
||||
const { getModelUuidByActionUuid } = productStore();
|
||||
const { selectedProductStore } = useProductContext();
|
||||
const { selectedProduct } = selectedProductStore();
|
||||
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
import { useCallback } from "react";
|
||||
import { useProductStore } from "../../../../../store/simulation/useProductStore";
|
||||
import { useSceneContext } from "../../../../scene/sceneContext";
|
||||
import { useProductContext } from "../../../products/productContext";
|
||||
|
||||
export function useTravelHandler() {
|
||||
const { materialStore, vehicleStore } = useSceneContext();
|
||||
const { materialStore, vehicleStore, productStore } = useSceneContext();
|
||||
const { selectedProductStore } = useProductContext();
|
||||
const { getMaterialById } = materialStore();
|
||||
const { getModelUuidByActionUuid } = useProductStore();
|
||||
const { getModelUuidByActionUuid } = productStore();
|
||||
const { selectedProduct } = selectedProductStore();
|
||||
const { incrementVehicleLoad, addCurrentMaterial } = vehicleStore();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user