Skip to content

Add adaptive TableSurface artwork for consumer-owned layouts - #5

Merged
saeedet merged 4 commits into
mainfrom
feat/adaptive-table-surfaces
Oct 19, 2026
Merged

saeedet merged 4 commits into
mainfrom
feat/adaptive-table-surfaces

Conversation

@saeedet

@saeedet saeedet commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

Poker consumers with their own responsive scenes could use FeltForge's desktop canvas, but had to duplicate its mobile rails, felt, lighting and materials. This adds TableSurface so they can render the library artwork at arbitrary outer-rail proportions while retaining their own player/card/chip positioning.

<TableSurface width={334} height={486} detailScale={0.57} theme="classic" decorative /> renders a tall stadium. Width and height are numerical design units for the outer rail. The optional material scale defaults to the shorter edge / 460. The root, table, poker and focused table-surface entries expose the component and its props type.

All six themes share the captured paint recipes and the same renderer as PokerTable. Insets and curvature reflow, textures tile, studs distribute around the perimeter, and outlined ornaments scale uniformly. Wordmarks fit inside the curved betting field, including circular surfaces and thick material settings. Material definitions are compiled once per theme; artwork and geometry are memoized. The existing PokerTable/TableAnchor/core contracts and desktop artwork pixels remain unchanged. PokerTable now explicitly orders its overlays as artwork < community cards < bets/pot/markers < seats, preventing chip stacks from covering players. Custom TableAnchor children can select the documented layer.

The playground includes arbitrary dimension/material controls, proportion examples and independent HTML content. Dealer, small-blind and big-blind markers now shrink with the table using container-relative sizing and a readable 32px minimum. The existing resize check verifies all three shrink while remaining round. The README/API guide and docs/table-surfaces.md explain customization, limits and the exact mobile replacement for AI-engineering-system/poker. The consumer repository is unchanged. Targets FeltForge 0.4.0 through the existing tagged-release pipeline.

Validation includes 124 unit/SSR/rendering tests, full pixel regressions against all six unmodified 0.3.0 desktop renders, independent Penpot image checks, strict prop/ref contracts, deterministic generation, package/bundle inspection, and actual tarball React 18 and Next.js builds. All 32 browser checks passed and cover all themes in portrait, landscape, circular and intermediate proportions, instance references, responsive CSS resizing, material controls and independent interaction in Chromium and WebKit. An intentional overlap test checks hit order through seats, chips and cards in both browsers. CI retains screenshots for visual review.

Validation passed for commit 2fa5ef7: https://github.com/saeedet/feltforge/actions/runs/39276265428. Representative screenshots from all six themes and the deliberate mobile overlap were visually inspected.

@saeedet
saeedet marked this pull request as ready for review October 19, 2026 15:07
@saeedet
saeedet merged commit 1d98264 into main Oct 19, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant