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

View File

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

View File

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

View File

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