Brickheart

Session summary scene collision checks

: Written by a human with AI assistance.

What we did

Packs and storage

  • New pack.ts: one reader for the new indexed packs (DAT and BIN).
  • DAT install rewritten to use it.
  • New collide-store.ts: collision packs live in IndexedDB, keyed by stem, with the same tap-to-install, persistence and cleanup as DAT.
  • Collision pack is optional. Parts place without it.
  • build.mjs copies only the files each manifest lists. Fixtures and loose .bin files never ship.
  • sw.js and the precache skip data/collide/.

Collision check

  • collide.worker.ts plus collide-client.ts run the check off the main thread.
  • Scene is rebuilt from the part list, reusing cached hulls.
  • Time budget: 1.5 s per check. Over budget reports "incomplete", never a guessed hit.
  • Modes: off, on rest (400 ms after the last op), manual (Check button). Saved in localStorage.
  • Warning only. Nothing is blocked.
  • Status line under #msg.

Attach picker

  • Candidates are ranked: clear first, then unknown, then colliding. Colliding ones get a "(collides)" marker.
  • Wording for pin, pin hole, clip, bar, hollow stud, tyre and "axle through".
  • Pin roll angles collapsed, so 4 duplicates instead of 16.
  • Axle and bush offer near/far end seats. The move buttons do the nudging.
  • Axle and tyre joints skip the relation filter, since they overlap by design.
  • No collision flag for pin in hole, hollow stud, or tyre on rim.

Fixes

  • erasableSyntaxOnly errors. Constructor parameter properties are banned.

What is NOT done

  • Parity is weak. 84 mismatches outside the band, and 7 of the 10 shown were false "clear". The status line is advisory only.
  • Axles, bushes, clips and bars are not exempt from colliding with their own mate. They may show "(collides)".
  • Moving a seated part drops its exemption. A nudged pin gets checked against its beam again.
  • Near/far labels don't update when you orbit. They only refresh when the list rebuilds.
  • Round hollow studs still show 4 identical turns. We have no symmetry data.
  • Tyre may show 2 near-identical candidates, one per rim side. Not checked.
  • No wording for hinge or ball joints. They fall back to the stud label.
  • No tests for the new joint types, the ranking, the exemptions, or the worker. Only the cube, scene, pack-reader and parity tests exist.
  • Slow-part budget is untested on the heaviest parts (14225, 75924, 4186).
  • No Web Worker test for sync and check ordering, or stale results.
  • Persistence and quota failures on the collide install were never exercised.