feat: Update VehicleAnimator and VehicleInstances components to enhance path handling and integrate vehicle data
This commit is contained in:
parent
f8a6021b4e
commit
faed625c2a
|
@ -21,6 +21,7 @@ function VehicleAnimator({ path, handleCallBack, currentPhase, agvUuid }: Vehicl
|
|||
}
|
||||
|
||||
}, [currentPhase, path])
|
||||
|
||||
useFrame((_, delta) => {
|
||||
if (!path || path.length < 2) return;
|
||||
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
import React from 'react'
|
||||
import VehicleInstance from './instance/vehicleInstance'
|
||||
import { useVehicleStore } from '../../../../store/simulation/useVehicleStore';
|
||||
|
||||
function VehicleInstances() {
|
||||
const { vehicles } = useVehicleStore();
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
<VehicleInstance />
|
||||
{vehicles.map((val: any, i: any) =>
|
||||
<VehicleInstance agvDetails={val} key={i} />
|
||||
)}
|
||||
|
||||
</>
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue