feat(tabletop): add tilt and zStart/zEnd stacking options
Replace the per-part lift with a local Y-axis tilt that fans the stack, and add zStart/zEnd to ramp the stack's height across the curve so it arches in 3D. Update the poker deck and docs accordingly.
This commit is contained in:
@@ -118,10 +118,12 @@ interface GameState {
|
||||
|
||||
### 7. Stacking (`stacking.ts`) ✅
|
||||
|
||||
- `useStacking(route.stacking, index, stackSize)` → `{ offset, rotation }`.
|
||||
- `useStacking(route.stacking, index, stackSize)` → `{ x, y, rotation, z, tilt }`.
|
||||
- Implements the format's positioning process (`bgm-format.md` §4): step
|
||||
length from curve length / `max(steps, count-1)`, alignment (`start`/`end`/
|
||||
`center`), and `limit` (`0` all, `n` first n, `-n` last n).
|
||||
- `z` ramps linearly from `zStart` to `zEnd` across the curve's span; `tilt`
|
||||
fans each shown part about its local Y (long) axis.
|
||||
- Curve length from an SVG path string (small helper; no new dep).
|
||||
|
||||
### 8. Public API (`index.ts`) ✅
|
||||
@@ -148,7 +150,8 @@ consumers share them (see Open decisions).
|
||||
|
||||
- `state.ts` — derived render state: enabled surfaces, route matching,
|
||||
candidate selection, stacking index/stackSize.
|
||||
- `stacking.ts` — positioning process: step length, alignment, limit.
|
||||
- `stacking.ts` — positioning process: step length, alignment, limit, z ramp,
|
||||
tilt.
|
||||
- `setup.ts` — seeding + bare-type expansion.
|
||||
- `mount.ts` — mount tree resolution (table/hud/child, children refs).
|
||||
- `partView.tsx` — geometry from a part def (size/fillet/crop), sprite UVs.
|
||||
|
||||
Reference in New Issue
Block a user