feat: Enhance human event handling and animation management, including state updates and monitoring
This commit is contained in:
@@ -4,8 +4,8 @@ import { useWorkerHandler } from './actionHandler/useWorkerHandler';
|
||||
export function useHumanActions() {
|
||||
const { handleWorker } = useWorkerHandler();
|
||||
|
||||
const handleWorkerAction = useCallback((action: HumanAction) => {
|
||||
handleWorker(action);
|
||||
const handleWorkerAction = useCallback((action: HumanAction, materialId: string) => {
|
||||
handleWorker(action, materialId);
|
||||
}, [handleWorker]);
|
||||
|
||||
const handleHumanAction = useCallback((action: HumanAction, materialId: string) => {
|
||||
@@ -13,7 +13,7 @@ export function useHumanActions() {
|
||||
|
||||
switch (action.actionType) {
|
||||
case 'worker':
|
||||
handleWorkerAction(action);
|
||||
handleWorkerAction(action, materialId);
|
||||
break;
|
||||
default:
|
||||
console.warn(`Unknown Human action type: ${action.actionType}`);
|
||||
|
||||
Reference in New Issue
Block a user