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.ts Reduced after extracting world, colliders, and rotation correction
  • simulation-world.ts Physics world setup extracted from pre-simulate.ts (new)
  • simulation-colliders.ts Collision shape generation extracted from pre-simulate.ts (new)
  • rotation-correction.ts Local-space rotation correction extracted from pre-simulate.ts (new)
  • DiceScene.tsx Updated to use new simulation module structure
  • Chamber.tsx Updated 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.ts
    • simulation-colliders.ts
    • rotation-correction.ts

Custom geometry module split

5 files changed
  • custom-geometry.ts Reduced to thin coordinator after extraction
  • custom-geometry-deltoidal.ts Deltoidal geometry math extracted (new)
  • custom-geometry-dipyramid.ts Dipyramid geometry math extracted (new)
  • custom-geometry-rhombic.ts Rhombic geometry math extracted (new)
  • custom-geometry-math.ts Shared geometry math helpers extracted (new)
  • custom-geometry.ts split into four type-specific modules: deltoidal, dipyramid, rhombic, and shared math helpers. decouple internal
    3 files
    • custom-geometry-deltoidal.ts
    • custom-geometry-dipyramid.ts
    • custom-geometry-math.ts

Throw physics tuning

3 files changed
  • defaults.ts throwStrength 3→12, spinStrength 0.9→3.0, spawnRadius 3→4, spawnHeight 1.5→2.5
  • spawn-configs.ts gravityScale passed to generateSpawnConfigs in live physics path
  • config.test.ts Config 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.ts E2E spec confirming refactor correctness (150 lines)
  • EffectComposer.tsx EffectComposer updated for new module structure
  • E2E fix-verification spec added to confirm the module split refactor does not regress existing dice rolling behavior. qualify internal
    1 file
    • fix-verification.spec.ts