armbot position updated

This commit is contained in:
Gomathi 2025-05-02 18:33:27 +05:30
parent 53055a0b82
commit 80e7bf4bf9
7 changed files with 16 additions and 16 deletions

View File

@ -282,8 +282,8 @@ function processLoadedModel(
actionName: "Action 1",
actionType: "pickAndPlace",
process: {
startPoint: [0, 0, 0],
endPoint: [0, 0, 0]
startPoint: null,
endPoint: null
},
triggers: []
}

View File

@ -121,7 +121,8 @@ export default async function assetManager(
const model = gltf;
model.uuid = item.modelUuid;
model.userData = { name: item.modelName, modelId: item.modelfileID, modelUuid: item.modelUuid };
console.log('item: ', item);
model.userData = { name: item.modelName, modelId: item.modelfileID, modelUuid: item.modelUuid, eventData: item.eventData };
model.scale.set(...CONSTANTS.assetConfig.defaultScaleBeforeGsap);
model.position.set(...item.position);
model.rotation.set(item.rotation.x, item.rotation.y, item.rotation.z);

View File

@ -222,6 +222,8 @@ function MoveControls({ movedObjects, setMovedObjects, itemsGroupRef, copiedObje
event
);
}
newFloorItem.eventData = eventData;
}
}

View File

@ -222,6 +222,8 @@ function RotateControls({ rotatedObjects, setRotatedObjects, movedObjects, setMo
event
);
}
newFloorItem.eventData = eventData;
}
}

View File

@ -146,8 +146,8 @@ function RoboticArmInstance({ armBot }: { armBot: ArmBotStatus }) {
logStatus(armBot.modelUuid, "Waiting to trigger CurrentAction")
const timeoutId = setTimeout(() => {
let actionId=armBot.point.actions[0].actionUuid
// addCurrentAction(armBot.modelUuid,actionId);
addCurrentAction(armBot.modelUuid, selectedAction?.actionId);
addCurrentAction(armBot.modelUuid,actionId);
// addCurrentAction(armBot.modelUuid, selectedAction?.actionId);
}, 3000);
return () => clearTimeout(timeoutId);
}

View File

@ -8,8 +8,8 @@ import { usePlayButtonStore } from "../../../store/usePlayButtonStore";
import ArmBotUI from "../ui/arm/armBotUI";
function RoboticArm() {
const { armBots, addArmBot, removeArmBot } = useArmBotStore();
const { getProductById } = useProductStore();
const { armBots, addArmBot, clearArmBots } = useArmBotStore();
const { products, getProductById } = useProductStore();
const { selectedProduct } = useSelectedProduct();
const { selectedEventSphere } = useSelectedEventSphere();
const { selectedEventData } = useSelectedEventData();
@ -161,20 +161,15 @@ function RoboticArm() {
if (selectedProduct.productId) {
const product = getProductById(selectedProduct.productId);
if (product) {
clearArmBots();
product.eventDatas.forEach(events => {
if (events.type === 'roboticArm') {
removeArmBot(events.modelUuid);
addArmBot(selectedProduct.productId, events);
}
});
}
}
}, [selectedProduct]);
// useEffect(()=>{
// // removeArmBot("123", armBotStatusSample[0]);
// addArmBot("123", armBotStatusSample[0]);
// },[])
}, [selectedProduct, products]);
useEffect(() => {

View File

@ -29,14 +29,14 @@ function Simulation() {
return (
<>
<Products />
{activeModule === 'simulation' &&
<>
<Points />
<Products />
<Materials />
<Trigger />