a1fd66d039b9fd5d8edeaf518c6251c2af39529f
Box3.setFromObject measures skinned geometry in skeleton space (and may use a stale cached bounding box), which does not match the GPU's actual rendered extent (mesh.matrixWorld * skinning * position). Add a per-species baseScale correction factor (rendered / box3) to FishSpec and fold it into buildFish's scale calc so each GLB normalizes to its true size. Measured per GLB with three.js's exact skinning formula: most models are 1.0. The skinned blendswap oscar (1.35) and knifefish (2.58) deviate and are corrected. The clownfish GLB is a full scene (water 'Surface' 45.3, 'TopLight' 15, 'Bubbles' 3.4) plus a small skinned body (~8.3); box3 is dominated by the water plane, so a baseScale can't fix it without blowing up the scene geometry - left at 1.0 pending a clean re-export.
Description
Three.js aquarium game with GLB fish models, breeding/selling economy, and tank expansion
4.3 MiB
Languages
TypeScript
60.3%
JavaScript
29.2%
HTML
9.7%
CSS
0.5%
Dockerfile
0.3%