feat: Enhance conveyor and material handling with pause functionality and state management
This commit is contained in:
@@ -39,12 +39,12 @@ function MaterialInstance({ material }: { material: MaterialSchema }) {
|
||||
|
||||
const point = getPointByUuid(selectedProduct.productId, modelUuid, material.current.pointUuid);
|
||||
if (!point) {
|
||||
return { position: new THREE.Vector3(0, 0, 0), rotation: new THREE.Vector3(0, 0, 0), currentSpeed: 1 };
|
||||
return { position: new THREE.Vector3(0, 0, 0), rotation: new THREE.Vector3(0, 0, 0), currentSpeed: currentSpeed || 1 };
|
||||
}
|
||||
|
||||
const position = getWorldPositionFromScene(point.uuid);
|
||||
if (position) {
|
||||
return { position: position, rotation: new THREE.Vector3(0, 0, 0), currentSpeed: 1 };
|
||||
return { position: position, rotation: new THREE.Vector3(0, 0, 0), currentSpeed: currentSpeed || 1 };
|
||||
}
|
||||
|
||||
return {
|
||||
@@ -54,6 +54,7 @@ function MaterialInstance({ material }: { material: MaterialSchema }) {
|
||||
};
|
||||
}, [material, getPointByUuid]);
|
||||
|
||||
|
||||
function getCurrentSpeed(productId: string, modelUuid: string) {
|
||||
const event = getEventByModelUuid(productId, modelUuid)
|
||||
if (event) {
|
||||
|
||||
Reference in New Issue
Block a user