feat: Refactor human action handling to replace animatedTravel with worker actions and enhance animation management
This commit is contained in:
@@ -256,18 +256,23 @@ function AssetsGroup({ plane }: { readonly plane: RefMesh }) {
|
||||
uuid: item.eventData.point?.uuid || THREE.MathUtils.generateUUID(),
|
||||
position: [item.eventData.point?.position[0] || 0, item.eventData.point?.position[1] || 0, item.eventData.point?.position[2] || 0],
|
||||
rotation: [item.eventData.point?.rotation[0] || 0, item.eventData.point?.rotation[1] || 0, item.eventData.point?.rotation[2] || 0],
|
||||
action: {
|
||||
actionUuid: THREE.MathUtils.generateUUID(),
|
||||
actionName: "Action 1",
|
||||
actionType: "animatedTravel",
|
||||
loadCapacity: 1,
|
||||
travelPoints: {
|
||||
startPoint: null,
|
||||
endPoint: null,
|
||||
},
|
||||
triggers: []
|
||||
}
|
||||
|
||||
actions: [
|
||||
{
|
||||
actionUuid: THREE.MathUtils.generateUUID(),
|
||||
actionName: "Action 1",
|
||||
actionType: "worker",
|
||||
animationSequences: [
|
||||
{
|
||||
animationUuid: THREE.MathUtils.generateUUID(),
|
||||
animationName: 'Animation 1',
|
||||
animationType: 'behaviour',
|
||||
animation: null
|
||||
}
|
||||
],
|
||||
loadCapacity: 1,
|
||||
triggers: []
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
addEvent(humanEvent);
|
||||
|
||||
@@ -374,17 +374,23 @@ async function handleModelLoad(
|
||||
uuid: THREE.MathUtils.generateUUID(),
|
||||
position: [data.points[0].x, data.points[0].y, data.points[0].z],
|
||||
rotation: [0, 0, 0],
|
||||
action: {
|
||||
actionUuid: THREE.MathUtils.generateUUID(),
|
||||
actionName: "Action 1",
|
||||
actionType: "animatedTravel",
|
||||
loadCapacity: 1,
|
||||
travelPoints: {
|
||||
startPoint: null,
|
||||
endPoint: null,
|
||||
},
|
||||
triggers: []
|
||||
}
|
||||
actions: [
|
||||
{
|
||||
actionUuid: THREE.MathUtils.generateUUID(),
|
||||
actionName: "Action 1",
|
||||
actionType: "worker",
|
||||
animationSequences: [
|
||||
{
|
||||
animationUuid: THREE.MathUtils.generateUUID(),
|
||||
animationName: 'Animation 1',
|
||||
animationType: 'behaviour',
|
||||
animation: null
|
||||
}
|
||||
],
|
||||
loadCapacity: 1,
|
||||
triggers: []
|
||||
}
|
||||
]
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user