update assetID

This commit is contained in:
2025-06-12 09:31:51 +05:30
parent 9b0842ed14
commit c7cc5cf2ca
59 changed files with 1039 additions and 1029 deletions

View File

@@ -1,6 +1,6 @@
let url_Backend_dwinzo = `http://${process.env.REACT_APP_SERVER_REST_API_BASE_URL}`;
export const getFloorAssets = async (organization: string,projectId?:string) => {
export const getFloorAssets = async (organization: string, projectId?: string) => {
try {
const response = await fetch(
`${url_Backend_dwinzo}/api/V1/floorAssets/${projectId}`,

View File

@@ -3,7 +3,8 @@ export const setFloorItemApi = async (
organization: string,
modelUuid?: string,
modelName?: string,
modelfileID?: string,
assetId?: string,
projectId?: string,
position?: Object,
rotation?: Object,
isLocked?: boolean,
@@ -14,9 +15,10 @@ export const setFloorItemApi = async (
organization,
modelUuid,
modelName,
projectId,
position,
rotation,
modelfileID,
assetId,
isLocked,
isVisible,
};

View File

@@ -21,7 +21,6 @@ export const getWallItems = async (organization: string,projectId?:string) => {
}
const result = await response.json();
// console.log('result: ', result);
return result;
} catch (error) {
echo.error("Failed to get wall items");

View File

@@ -13,14 +13,14 @@ onmessage = async (event) => {
const { floorItems } = event.data;
const uniqueItems = floorItems.filter((item, index, self) =>
index === self.findIndex((t) => t.modelfileID === item.modelfileID)
index === self.findIndex((t) => t.assetId === item.assetId)
);
for (const item of uniqueItems) {
if(item.modelfileID === null || item.modelfileID === undefined) {
continue; // Skip items without a valid modelfileID
if(item.assetId === null || item.assetId === undefined) {
continue; // Skip items without a valid assetId
}
const modelID = item.modelfileID;
const modelID = item.assetId;
const indexedDBModel = await retrieveGLTF(modelID);
let modelBlob;