diff --git a/index.html b/index.html index f17522d..758eff7 100644 --- a/index.html +++ b/index.html @@ -39,9 +39,9 @@ -
This will permanently delete ALL your fish, money, and progress.
diff --git a/src/scene/GLTFish.ts b/src/scene/GLTFish.ts index 8484cba..5aff6e6 100644 --- a/src/scene/GLTFish.ts +++ b/src/scene/GLTFish.ts @@ -161,10 +161,15 @@ function buildFish(gltf: GLTF, spec: FishSpec): Fish { const scale = (spec.targetLength / spec.modelLength) * rand(0.92, 1.08); orient.scale.setScalar(scale); + console.log("[Fish]", spec.url, "target:", spec.targetLength.toFixed(3), "modelLen:", spec.modelLength, "scale:", scale.toFixed(4), "expected rendered:", (scale * spec.modelLength).toFixed(3)); orient.add(model); const group = new THREE.Group(); group.add(orient); + group.updateMatrixWorld(true); + const dbgBox = new THREE.Box3().setFromObject(group); + const dbgSize = dbgBox.getSize(new THREE.Vector3()); + console.log("[Fish Box3]", spec.url, "x:", dbgSize.x.toFixed(3), "y:", dbgSize.y.toFixed(3), "z:", dbgSize.z.toFixed(3), "max:", Math.max(dbgSize.x, dbgSize.y, dbgSize.z).toFixed(3)); // Apply genetics (color shift, rarity glow) if (spec.genetics) {