feat: Enhance asset and human event handling with animation and loop capabilities
This commit is contained in:
@@ -162,6 +162,7 @@ async function handleModelLoad(
|
||||
// SOCKET
|
||||
|
||||
if (selectedItem.type) {
|
||||
console.log('selectedItem: ', selectedItem);
|
||||
const data = PointsCalculator(
|
||||
selectedItem.type,
|
||||
gltf.scene.clone(),
|
||||
@@ -170,7 +171,7 @@ async function handleModelLoad(
|
||||
|
||||
if (!data || !data.points) return;
|
||||
|
||||
const eventData: any = { type: selectedItem.type, };
|
||||
const eventData: any = { type: selectedItem.type };
|
||||
|
||||
if (selectedItem.type === "Conveyor") {
|
||||
const ConveyorEvent: ConveyorEventSchema = {
|
||||
@@ -378,6 +379,7 @@ async function handleModelLoad(
|
||||
actionName: "Action 1",
|
||||
actionType: "animation",
|
||||
animation: null,
|
||||
loopAnimation: true,
|
||||
loadCapacity: 1,
|
||||
travelPoints: {
|
||||
startPoint: null,
|
||||
@@ -416,6 +418,7 @@ async function handleModelLoad(
|
||||
userId: userId,
|
||||
};
|
||||
|
||||
console.log('completeData: ', completeData);
|
||||
socket.emit("v1:model-asset:add", completeData);
|
||||
|
||||
const asset: Asset = {
|
||||
|
||||
Reference in New Issue
Block a user