refactor: Simplify eventData structure in controls and remove console logs from simulation

This commit is contained in:
2025-04-05 16:15:11 +05:30
parent b89589d8ea
commit 58d82da349
6 changed files with 22 additions and 28 deletions

View File

@@ -209,7 +209,7 @@ function RotateControls({ rotatedObjects, setRotatedObjects, movedObjects, setMo
// { "x": obj.rotation.x, "y": obj.rotation.y, "z": obj.rotation.z },
// false,
// true,
// backendEventData
// { type: backendEventData.type, points: backendEventData.points, speed: backendEventData.speed }
// );
//SOCKET
@@ -223,11 +223,11 @@ function RotateControls({ rotatedObjects, setRotatedObjects, movedObjects, setMo
rotation: { x: obj.rotation.x, y: obj.rotation.y, z: obj.rotation.z },
isLocked: false,
isVisible: true,
eventData: backendEventData,
eventData: { type: backendEventData.type, points: backendEventData.points, speed: backendEventData.speed },
socketId: socket.id,
};
const newEventData: any = backendEventData;
const newEventData: any = { type: backendEventData.type, points: backendEventData.points, speed: backendEventData.speed };
newEventData.modeluuid = newFloorItem.modeluuid;
newEventData.modelName = newFloorItem.modelname;
newEventData.position = newFloorItem.position;
@@ -262,7 +262,7 @@ function RotateControls({ rotatedObjects, setRotatedObjects, movedObjects, setMo
// { "x": obj.rotation.x, "y": obj.rotation.y, "z": obj.rotation.z },
// false,
// true,
// backendEventData
// { type: backendEventData.type, points: backendEventData.points }
// );
//SOCKET
@@ -276,11 +276,11 @@ function RotateControls({ rotatedObjects, setRotatedObjects, movedObjects, setMo
rotation: { x: obj.rotation.x, y: obj.rotation.y, z: obj.rotation.z },
isLocked: false,
isVisible: true,
eventData: backendEventData,
eventData: { type: backendEventData.type, points: backendEventData.points },
socketId: socket.id,
};
const newEventData: any = backendEventData;
const newEventData: any = { type: backendEventData.type, points: backendEventData.points };
newEventData.modeluuid = newFloorItem.modeluuid;
newEventData.modelName = newFloorItem.modelname;
newEventData.position = newFloorItem.position;
@@ -298,7 +298,6 @@ function RotateControls({ rotatedObjects, setRotatedObjects, movedObjects, setMo
}
} else {
console.log('hii');
//REST