refactor: remove console logs and enhance model userData structure

This commit is contained in:
2025-04-03 19:46:52 +05:30
parent 7b9695f006
commit d29ee03c44
20 changed files with 1060 additions and 490 deletions

View File

@@ -69,7 +69,6 @@ const MAX_SPAWNED_OBJECTS = 20;
const ProcessAnimator: React.FC<{ processes: ProcessData[] }> = ({
processes,
}) => {
console.log("processes: ", processes);
const gltf = useLoader(GLTFLoader, boxGltb) as GLTF;
const { isPlaying, setIsPlaying } = usePlayButtonStore();
@@ -321,10 +320,10 @@ const ProcessAnimator: React.FC<{ processes: ProcessData[] }> = ({
spawnedObjectsRef.current.push(newObject);
// Clean up old objects if needed
console.log(
"spawnedObjectsRef.current.length: ",
spawnedObjectsRef.current.length
);
// console.log(
// "spawnedObjectsRef.current.length: ",
// spawnedObjectsRef.current.length
// );
if (spawnedObjectsRef.current.length > MAX_SPAWNED_OBJECTS) {
const oldest = spawnedObjectsRef.current.shift();
if (oldest && groupRef.current.children.includes(oldest)) {