undef-dice
2026-03-15
Pre-simulate and custom-geometry split into focused modules, throw physics parameters tuned for stronger impulse
25 files · 1,343+ · 986-
Simulation module split
6 files changed
pre-simulate.tsReduced after extracting world, colliders, and rotation correctionsimulation-world.tsPhysics world setup extracted from pre-simulate.ts (new)simulation-colliders.tsCollision shape generation extracted from pre-simulate.ts (new)rotation-correction.tsLocal-space rotation correction extracted from pre-simulate.ts (new)DiceScene.tsxUpdated to use new simulation module structureChamber.tsxUpdated import paths
- pre-simulate.ts split into three focused modules: simulation-world.ts (physics world setup), simulation-colliders.ts (collision shape generation), and rotation-correction.ts (local-space rotation). Combined ~1300 lines extracted.
decouple
architectural
3 files
simulation-world.tssimulation-colliders.tsrotation-correction.ts
Custom geometry module split
5 files changed
custom-geometry.tsReduced to thin coordinator after extractioncustom-geometry-deltoidal.tsDeltoidal geometry math extracted (new)custom-geometry-dipyramid.tsDipyramid geometry math extracted (new)custom-geometry-rhombic.tsRhombic geometry math extracted (new)custom-geometry-math.tsShared geometry math helpers extracted (new)
Throw physics tuning
3 files changed
defaults.tsthrowStrength 3→12, spinStrength 0.9→3.0, spawnRadius 3→4, spawnHeight 1.5→2.5spawn-configs.tsgravityScale passed to generateSpawnConfigs in live physics pathconfig.test.tsConfig snapshot test updated to match new defaults
- throwStrength increased from 3 to 12 and spinStrength from 0.9 to 3.0 for stronger, more satisfying throws. spawnRadius increased from 3 to 4 and spawnHeight from 1.5 to 2.5.
instantiate
behavioral
1 file
defaults.ts
- gravityScale now passed to generateSpawnConfigs in the live physics path so spawn geometry scales correctly with gravity.
remediate
behavioral
1 file
spawn-configs.ts
E2E verification spec
2 files changed
fix-verification.spec.tsE2E spec confirming refactor correctness (150 lines)EffectComposer.tsxEffectComposer updated for new module structure