refactor: remove console logs and enhance model userData structure
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user