api updated for getassetConveyorPoints

This commit is contained in:
2025-08-04 18:08:03 +05:30
parent 298399b3e5
commit 33d960cedd
2 changed files with 6 additions and 28 deletions

View File

@@ -93,38 +93,16 @@ function Model({ asset, isRendered, loader }: { readonly asset: Asset, isRendere
if (!ribbonData && boundingBox && asset.eventData && asset.eventData.type === 'Conveyor') {
// console.log('asset: ', asset);
getAssetConveyorPoints(asset.assetId).then((data) => {
console.log('asset.assetI: ', asset.assetId);
console.log('data: ', data);
if (data && data.conveyorPoints && data.conveyorPoints.type !== '') {
setRibbonData(data.conveyorPoints)
}
})
}
}, [asset.modelUuid, asset.eventData, ribbonData, boundingBox])
// useEffect(() => {
// if (!ribbonData && boundingBox && asset.eventData && asset.eventData.type === 'Conveyor') {
// console.log('asset: ', asset);
// if (asset.assetId === '7dc04e36882e4debbc1a8e3d') {
// setRibbonData({
// type: 'normal',
// points: [
// [-2.4697049405553173e-9, 0.8729155659675598, -2.6850852955950217],
// [-2.4697049405553173e-9, 0.8729155659675598, 2.6950024154767225]
// ]
// })
// }
// if (asset.assetId === '7a4de28658830e2e42abc06d') {
// setRibbonData({
// type: 'curved',
// points: [
// [-0.08963948491646367, 1.2324171172287208, 0.0013611617557632294],
// [2.745753362991343, 1.2324171172287208, -0.20188181291400256],
// [3.0696383388490056, 1.2324171172287208, -3.044220906761294],
// ],
// })
// }
// }
// }, [asset.modelUuid, asset.eventData, ribbonData, boundingBox])
useEffect(() => {
if (gltfScene) {
gltfScene.traverse((child: any) => {

View File

@@ -6,7 +6,7 @@ function PhysicsSimulator() {
return (
<>
<MaterialSpawner
{/* <MaterialSpawner
position={[0, 3, 0]}
spawnInterval={1000}
spawnCount={15}
@@ -15,7 +15,7 @@ function PhysicsSimulator() {
position={[6, 3, 6]}
spawnInterval={1000}
spawnCount={5}
/>
/> */}
{/* <MaterialSpawner
position={[6, 3, -6]}
spawnInterval={1000}