Files
Dwinzo_dev/app/src/modules/simulation/simulation.tsx

46 lines
1.2 KiB
TypeScript
Raw Normal View History

import { useState, useRef } from "react";
2025-04-02 19:12:14 +05:30
import * as THREE from "three";
import PathCreation from "./path/pathCreation";
import PathConnector from "./path/pathConnector";
import useModuleStore from "../../store/useModuleStore";
import ProcessContainer from "./process/processContainer";
import Agv from "../builder/agv/agv";
import ArmBot from "./armbot/ArmBot";
2025-03-25 17:34:20 +05:30
function Simulation() {
2025-04-02 19:12:14 +05:30
const { activeModule } = useModuleStore();
const pathsGroupRef = useRef() as React.MutableRefObject<THREE.Group>;
2025-04-10 10:21:24 +05:30
const [processes, setProcesses] = useState<any[]>([]);
const agvRef = useRef([]);
2025-04-10 17:46:11 +05:30
const MaterialRef = useRef([]);
2025-03-25 17:34:20 +05:30
2025-04-02 19:12:14 +05:30
return (
<>
{activeModule === "simulation" && (
2025-03-25 17:34:20 +05:30
<>
2025-04-02 19:12:14 +05:30
<PathCreation pathsGroupRef={pathsGroupRef} />
2025-04-02 19:12:14 +05:30
<PathConnector pathsGroupRef={pathsGroupRef} />
2025-04-10 17:46:11 +05:30
<ProcessContainer
processes={processes}
setProcesses={setProcesses}
agvRef={agvRef}
MaterialRef={MaterialRef}
/>
2025-04-10 17:46:11 +05:30
<Agv
processes={processes}
agvRef={agvRef}
MaterialRef={MaterialRef}
/>
2025-03-25 17:34:20 +05:30
</>
2025-04-02 19:12:14 +05:30
)}
<ArmBot />
2025-04-02 19:12:14 +05:30
</>
);
2025-03-25 17:34:20 +05:30
}
2025-04-02 19:12:14 +05:30
export default Simulation;