24 Commits
Author SHA1 Message Date
hyper ddf6785f9e test(tabletop): cover store actions, interactions, and path sampling
Add tests for the tabletop and interaction stores (seed, surface toggles,
setPart, movePart reindexing/clamping), the interaction store's hold/drop
and dialog stack, and the SVG path sampler (Q/T/S/A commands, unsupported
commands, pointAt edge cases, and zero-length curves). stacking.ts goes
from 61% to 99.5% line coverage.
2026-08-18 10:30:37 +08:00
hyper 999b7a0771 feat(bgm): add dialog role and interaction affordances
Add the dialog role and the interaction affordances the free-interaction
layer depends on: Setup.interactions, Package.dialogs, and the Interaction,
DialogAction, and Dialog types. Wire the dialog role through the zod
schemas, package collection (with duplicate checking), and vite
serialization, and update the tabletop serializedToPackage and test
fixtures to carry dialogs.
2026-08-18 10:24:21 +08:00
hyper 8eff44712f feat(tabletop): add free-interaction layer (layer 3)
Add the interaction half of the sandbox: a held part and dialog stack as
UI state outside the game store, with pure helpers (interactionsFor,
dropPaths, pickPath, partFacings, nextFacing). PartPlacement is now
interactive (pick up, drag to move, click to cycle facing), and a drop on
a path with a stack-dialog interaction opens the deck dialog instead of
moving directly. DialogLayer renders the stack-inspector dialog whose
insert button issues a move. Add the dialog role, Setup.interactions, and
Package.dialogs to @tts/bgm, and declare the deck insert dialog in
games/poker.
2026-08-18 10:20:22 +08:00
hypercross 345832e389 docs: reorganize docs into bgm and status folders
Group the bgm spec cluster under docs/bgm and move dev logs and plans under docs/status, add an overview index, and update cross-references in the docs, README, and source comments.
2026-08-16 11:57:19 +08:00
hypercross cf8ca07850 fix: allow recovering from part viewer error
Add a Try again button to the ErrorBoundary fallback and key the ModPage boundary by selection so picking another object clears a stuck error.
2026-08-15 14:17:41 +08:00
hypercross 3dd3db5643 fix(web): decode textures as sRGB in 3D viewers
TextureLoader leaves colorSpace as NoColorSpace, so card, tile, token, model, and part art is uploaded as linear and then double-decoded in the shader, washing out contrast. Mark each texture sRGB so the GPU decodes it once, correctly.
2026-08-15 12:25:21 +08:00
hypercross 3aa48058f7 fix(tabletop): render surface outline without depth test 2026-08-10 12:24:46 +08:00
hypercross d663f4afea feat: add facing orientation to parts
Replace the face/back boolean with a three-state facing (face, back,
standing) seeded from setup placements. Parts now orient about the
anchor at the resting face/edge, so back-down parts sit on the table
instead of below it and standing parts rest on their bottom edge.
2026-08-10 11:47:58 +08:00
hypercross 96c299e498 feat(tabletop): seed state from ordered setup placements
Apply each setup placement in order, moving its parts to its path, then index each path's parts contiguously so stacking stays valid.
2026-08-10 11:27:50 +08:00
hypercross bc418b2c73 Model part face in tabletop state
Replace the path->part-list store with a per-part map keyed by part id, so each placed part carries its path, stack index, and face. Derive each path's ordered children for stacking, and flip face-down parts in PartPlacement.
2026-08-10 11:10:16 +08:00
hypercross dfe49bad0c refactor(bgm): use doc-relative include in games and fixtures
The default include is now resolved relative to the package
declaration's directory, so the explicit root-relative patterns are
redundant. Drop them in favor of the default.
2026-08-10 08:52:54 +08:00
hypercross 5a3a9c1fcc feat(web): lighten tabletop scene and tune contact shadows
Replace the dark surface plane with a grey background and a spotlight,
size the contact shadow to the table, and scale its blur and fade with
the shadow plane. Disable depth test on the stacking curve overlay.
2026-08-10 00:57:32 +08:00
hypercross 50c6df48b5 fix(tabletop): align cards to the stacking curve
Fix the tangent angle at the curve's start and rotate cards to follow
the curve direction. Add a stacking curve visualization shown with
surface debug.
2026-08-10 00:40:56 +08:00
hypercross f12b40e82b fix(tabletop): default tilt to 1 degree for all parts
Apply the default 1 degree tilt even when a route has no stacking
strategy, so every placed part is tilted consistently.
2026-08-10 00:29:23 +08:00
hypercross 8d0e393100 feat(tabletop): let candidates inherit and override route stacking
Candidates now carry their own stacking strategy, inheriting the route's
when absent, so the default tilt applies consistently. Drop the now
redundant explicit tilt from the poker deck.
2026-08-10 00:27:01 +08:00
hypercross 43c6334413 fix(tabletop): tilt cards uniformly about the y axis
Apply the same tilt to every stacked part and rotate it about its local
Y axis instead of Z. Default tilt to 1 degree when a stacking strategy
is present, and arc the poker deck along the surface's bottom edge.
2026-08-10 00:23:08 +08:00
hypercross b312bf4f1f feat(tabletop): author rotation and tilt angles in degrees
Convert bgm rotation and tilt values to radians only at the three.js
boundary, so the format's angles are authored in degrees.
2026-08-10 00:11:13 +08:00
hypercross c5d6dff12d 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.
2026-08-09 23:36:42 +08:00
hypercross 5808e15c45 feat(tabletop): show surface bounds and lay parts flat
Add a toggleable surface plane, bounds outline, and constant-size HTML
label. Scale placement and mount anchors to world units so parts land on
the surface, and rotate parts to face up.
2026-08-09 23:04:51 +08:00
hypercross d9d38c2bee fix(tabletop): key placements by surface, path, and piece
A piece can appear on more than one path of the same surface (e.g. the
poker deck expands to every card while the flop also places the ace), so
the render key must include the path to stay unique.
2026-08-09 22:46:06 +08:00
hypercross f494a6f9be feat(web): render bgm setups as a 3D table
Wire the tabletop library into the setup detail route: seed the store
from the setup, resolve the surface mount tree, and render world and HUD
surfaces. Add serializedToPackage to convert the vite-emitted package.
2026-08-09 22:46:03 +08:00
hypercross cd08e6af04 feat(tabletop): add state, setup, mounting, and stacking
Implement the tabletop library's game state store, setup seeding with
bare-type expansion, surface mount tree resolution, part placement, and
the stacking positioning process with a dependency-free SVG path helper.
Wire the public API and add unit plus vite integration tests.
2026-08-09 22:34:18 +08:00
hypercross 15c45e7106 refactor: share trace, error boundary, and proxy http helpers
Lift the trace-to-shape geometry into @tts/mesh (traceToShape/
traceToUvBounds), parameterized by scale so the web token viewer and
@tts/tabletop share one implementation. Move the CORS proxy HTTP helpers
(assetUrl, resolveAssetUrl, traceImage) into a new @tts/http package, and
make @tts/tabletop's ErrorBoundary the single source used by the web app.

This removes the duplicated ErrorBoundary, assetUrl, tabletopHttp, and
trace-to-shape code from apps/web and packages/tabletop.
2026-08-09 22:17:24 +08:00
hypercross 521519ce3d feat(tabletop): inject proxy handlers from web app 2026-08-09 21:46:36 +08:00