consoles cleared

This commit is contained in:
Gomathi 2025-05-02 18:34:44 +05:30
parent 80e7bf4bf9
commit 39c86b6fc1
4 changed files with 11 additions and 12 deletions

View File

@ -72,7 +72,7 @@ async function loadInitialFloorItems(
// Check Three.js Cache
const cachedModel = THREE.Cache.get(item.modelfileID!);
if (cachedModel) {
// console.log(`[Cache] Fetching ${item.modelName}`);
//
processLoadedModel(cachedModel.scene.clone(), item, itemsGroup, setFloorItems, addEvent);
modelsLoaded++;
checkLoadingCompletion(modelsLoaded, modelsToLoad, dracoLoader, resolve);
@ -82,7 +82,7 @@ async function loadInitialFloorItems(
// Check IndexedDB
const indexedDBModel = await retrieveGLTF(item.modelfileID!);
if (indexedDBModel) {
// console.log(`[IndexedDB] Fetching ${item.modelName}`);
//
const blobUrl = URL.createObjectURL(indexedDBModel);
loader.load(blobUrl, (gltf) => {
URL.revokeObjectURL(blobUrl);
@ -103,7 +103,7 @@ async function loadInitialFloorItems(
}
// Fetch from Backend
// console.log(`[Backend] Fetching ${item.modelName}`);
//
const modelUrl = `${url_Backend_dwinzo}/api/v2/AssetFile/${item.modelfileID!}`;
loader.load(modelUrl, async (gltf) => {
const modelBlob = await fetch(modelUrl).then((res) => res.blob());
@ -121,7 +121,7 @@ async function loadInitialFloorItems(
);
});
} else {
// console.log(`Item ${item.modelName} is not near`);
//
setFloorItems((prevItems) => [
...(prevItems || []),
{

View File

@ -18,7 +18,7 @@ export default async function assetManager(
const taskId = ++currentTaskId; // Increment taskId for each call
activePromises.set(taskId, true); // Mark task as active
// console.log("Received message from worker:", data);
//
if (data.toRemove.length > 0) {
data.toRemove.forEach((uuid: string) => {
@ -58,7 +58,7 @@ export default async function assetManager(
// Check Three.js Cache
const cachedModel = THREE.Cache.get(item.modelfileID!);
if (cachedModel) {
// console.log(`[Cache] Fetching ${item.modelName}`);
//
processLoadedModel(cachedModel.scene.clone(), item, itemsGroup, resolve);
return;
}
@ -66,7 +66,7 @@ export default async function assetManager(
// Check IndexedDB
const indexedDBModel = await retrieveGLTF(item.modelfileID!);
if (indexedDBModel) {
// console.log(`[IndexedDB] Fetching ${item.modelName}`);
//
const blobUrl = URL.createObjectURL(indexedDBModel);
loader.load(
blobUrl,
@ -86,7 +86,7 @@ export default async function assetManager(
}
// Fetch from Backend
// console.log(`[Backend] Fetching ${item.modelName}`);
//
loader.load(
modelUrl,
async (gltf) => {
@ -114,14 +114,13 @@ export default async function assetManager(
const existingModel = itemsGroup?.current?.getObjectByProperty("uuid", item.modelUuid);
if (existingModel) {
// console.log(`Model ${item.modelName} already exists in the scene.`);
//
resolve();
return;
}
const model = gltf;
model.uuid = 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);

View File

@ -34,7 +34,7 @@ export default function useDraggableGLTF(onUpdate: OnUpdateCallback) {
activeObjRef.current = obj;
initialPositionRef.current.copy(obj.position);
console.log("obj.position: ", obj.position);
// Get world position
setObjectWorldPos(obj.getWorldPosition(objectWorldPos));

View File

@ -29,7 +29,7 @@ function Vehicles() {
}, [selectedProduct, products]);
useEffect(() => {
// console.log('vehicles: ', vehicles);
//
}, [vehicles])
return (