"updated Animation"
This commit is contained in:
@@ -305,9 +305,7 @@ export const useActiveUsers = create<any>((set: any) => ({
|
||||
setActiveUsers: (callback: (prev: any[]) => any[] | any[]) =>
|
||||
set((state: { activeUsers: any[] }) => ({
|
||||
activeUsers:
|
||||
typeof callback === "function"
|
||||
? callback(state.activeUsers)
|
||||
: callback,
|
||||
typeof callback === "function" ? callback(state.activeUsers) : callback,
|
||||
})),
|
||||
}));
|
||||
|
||||
@@ -347,12 +345,29 @@ export const useSelectedPath = create<any>((set: any) => ({
|
||||
}));
|
||||
|
||||
interface SimulationPathsStore {
|
||||
simulationStates: (Types.ConveyorEventsSchema | Types.VehicleEventsSchema | Types.StaticMachineEventsSchema)[];
|
||||
simulationStates: (
|
||||
| Types.ConveyorEventsSchema
|
||||
| Types.VehicleEventsSchema
|
||||
| Types.StaticMachineEventsSchema
|
||||
)[];
|
||||
setSimulationStates: (
|
||||
paths:
|
||||
| (Types.ConveyorEventsSchema | Types.VehicleEventsSchema | Types.StaticMachineEventsSchema)[]
|
||||
| ((prev: (Types.ConveyorEventsSchema | Types.VehicleEventsSchema | Types.StaticMachineEventsSchema)[]
|
||||
) => (Types.ConveyorEventsSchema | Types.VehicleEventsSchema | Types.StaticMachineEventsSchema)[])
|
||||
| (
|
||||
| Types.ConveyorEventsSchema
|
||||
| Types.VehicleEventsSchema
|
||||
| Types.StaticMachineEventsSchema
|
||||
)[]
|
||||
| ((
|
||||
prev: (
|
||||
| Types.ConveyorEventsSchema
|
||||
| Types.VehicleEventsSchema
|
||||
| Types.StaticMachineEventsSchema
|
||||
)[]
|
||||
) => (
|
||||
| Types.ConveyorEventsSchema
|
||||
| Types.VehicleEventsSchema
|
||||
| Types.StaticMachineEventsSchema
|
||||
)[])
|
||||
) => void;
|
||||
}
|
||||
|
||||
@@ -363,7 +378,7 @@ export const useSimulationStates = create<SimulationPathsStore>((set) => ({
|
||||
simulationStates:
|
||||
typeof paths === "function" ? paths(state.simulationStates) : paths,
|
||||
})),
|
||||
}))
|
||||
}));
|
||||
|
||||
export const useNavMesh = create<any>((set: any) => ({
|
||||
navMesh: null,
|
||||
@@ -446,3 +461,9 @@ export const useTileDistance = create<any>((set: any) => ({
|
||||
planeValue: { ...state.planeValue, ...value },
|
||||
})),
|
||||
}));
|
||||
|
||||
export const usePlayAgv = create<any>((set, get) => ({
|
||||
PlayAgv: [],
|
||||
setPlayAgv: (updateFn: (prev: any[]) => any[]) =>
|
||||
set({ PlayAgv: updateFn(get().PlayAgv) }),
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user