# Roll Docs import { MiniEditor } from '../components/MiniEditor.tsx' ## Live Demo Crazy Eights running entirely in your browser: the WebAssembly player renders on the left while the game script executes in a web-worker driver — no server involved. Toggle seats to see each player's view of the same game state; opponents' hands stay concealed. Edit the source on the right and the game re-steps live against the new script. ## Design specimen This unlisted page exercises the shared documentation components and their spacing, typography, and interaction states. ### Typography and links Body copy uses the primary text color. Visit the [Introduction](/guides/introduction), read `inline code`, or use **semibold emphasis** to inspect common inline styles. #### Smaller heading 1. Ordered list item with enough copy to wrap at narrow widths. 2. A second item containing `display: grid`. * Unordered list item * Another list item > A blockquote provides a muted supporting voice without competing with the page. ### Code ```tsx title="Counter.tsx" import { useState } from 'react' export function Counter() { const [count, setCount] = useState(0) return } ``` ### Table | Token | Value | Purpose | | ------- | --------- | ---------------------------- | | Canvas | `#FFFFFF` | Page and code background | | Heading | `#343433` | Titles and active navigation | | Link | `#1A88F8` | Article links | ### Cards

Quickstart

Build and run your first game.

API Reference

Inspect the public Cardboard API.

### Notices and disclosure :::info This notice verifies the shared callout surface, icon spacing, and inline `code`. :::
Expandable details The disclosure should remain keyboard accessible and use the same warm-neutral palette.

Promotional callout

This larger surface checks the distinct 20px treatment used for featured content.

## arcade-role Sets the arcade role of an element. ### Syntax ```css arcade-role: ; ``` ### Values Accepts one of the following values: | Value | Description | | ----------- | ----------- | | `cards` | | | `chess` | | | `board` | | | `hand-0` | | | `hand-1` | | | `hand-2` | | | `hand-3` | | | `seat-0` | | | `seat-1` | | | `seat-2` | | | `seat-3` | | | `stock` | | | `waste` | | | `suit-rack` | | | `declared` | | | `turn` | | | `piece` | | | `slot` | | | `check` | | | `promotion` | | | `hearts` | | | `diamonds` | | | `clubs` | | | `spades` | | | `eight` | | ## backdrop Sets the backdrop of an element. ### Syntax ```css backdrop: ; ``` ### Values Accepts one of the following values: | Value | Description | | -------- | ----------- | | `cobalt` | | | `teal` | | | `plum` | | ## card-atlas Sets the card atlas of an element. ### Syntax ```css card-atlas: ; ``` ### Values Accepts an object with the following fields: | Value | Description | | ----------- | ------------------------------------------------- | | `bundleRef` | A bundled asset reference, e.g. `bundle("name")`. | | `columns` | A non-negative integer. | | `rows` | A non-negative integer. | ## card-back Sets the card back of an element. ### Syntax ```css card-back: ; ``` ### Values Accepts one of the following forms: | Value | Description | | ------ | ----------------------------------------------------------- | | `rect` | A UV rectangle — `x`, `y`, `width`, `height`, each `0`–`1`. | | `cell` | A sprite-atlas cell, e.g. `cell(column, row)`. | ## card-corner-radius Sets the card corner radius of an element. ### Syntax ```css card-corner-radius: ; ``` ### Values Accepts one of the following values: | Value | Description | | --------- | ------------------------------------------------------------------------------------- | | `` | A length: a fractional number (`0`–`1` of the parent), an absolute length, or `auto`. | ## card-front Sets the card front of an element. ### Syntax ```css card-front: ; ``` ### Values Accepts one of the following forms: | Value | Description | | ------ | ----------------------------------------------------------- | | `rect` | A UV rectangle — `x`, `y`, `width`, `height`, each `0`–`1`. | | `cell` | A sprite-atlas cell, e.g. `cell(column, row)`. | ## color Sets the color of an element. ### Syntax ```css color: ; ``` ### Values Accepts one of the following values: | Value | Description | | --------- | --------------------------------------------------------------- | | `` | A color — hex (e.g. `#ff0088`) or a named color (e.g. `ivory`). | ## display Sets the display of an element. ### Syntax ```css display: ; ``` ### Values Accepts one of the following values: | Value | Description | | ------------ | ----------- | | `block` | | | `flex` | | | `flow` | | | `positioned` | | | `grid` | | | `cluster` | | | `pile` | | | `faceted` | | | `deck` | | ## gap-column Sets the gap column of an element. ### Syntax ```css gap-column: ; ``` ### Values Accepts one of the following values: | Value | Description | | --------- | ------------------------------------------------------------------------------------- | | `` | A length: a fractional number (`0`–`1` of the parent), an absolute length, or `auto`. | ## gap-row Sets the gap row of an element. ### Syntax ```css gap-row: ; ``` ### Values Accepts one of the following values: | Value | Description | | --------- | ------------------------------------------------------------------------------------- | | `` | A length: a fractional number (`0`–`1` of the parent), an absolute length, or `auto`. | ## grid Sets the grid of an element. ### Syntax ```css grid: ; ``` ### Values Accepts an object with the following fields: | Value | Description | | ------------- | ----------------------------------------------- | | `columns` | A non-negative integer. | | `rows` | A non-negative integer. | | `cellPadding` | A fraction (`0`–`1`) of the containing element. | ## image Sets the image of an element. ### Syntax ```css image: ; ``` ### Values Accepts one of the following values: | Value | Description | | --------- | ------------------------------------------------- | | `` | A bundled asset reference, e.g. `bundle("name")`. | ## material-finish Sets the material finish of an element. ### Syntax ```css material-finish: ; ``` ### Values Accepts one of the following values: | Value | Description | | ------- | ----------- | | `satin` | | | `matte` | | | `paper` | | ## model Sets the model of an element. ### Syntax ```css model: ; ``` ### Values Accepts one of the following forms: | Value | Description | | ----------- | ------------------------------------------------- | | `bundleRef` | A bundled asset reference, e.g. `bundle("name")`. | | `card` | | | `coin` | | | `block` | | | `d4` | | | `d6` | | | `d8` | | | `d10` | | | `d12` | | | `d20` | | | `figurine` | | | `board` | | | `pawn` | | | `knight` | | | `rook` | | | `bishop` | | | `queen` | | | `king` | | | `tile` | | | `none` | | ## presentation Sets the presentation of an element. ### Syntax ```css presentation: ; ``` ### Values Accepts one of the following values: | Value | Description | | ----------- | ----------- | | `studio-v1` | | ## depth Sets the depth of an element. ### Syntax ```css depth: ; ``` ### Values Accepts one of the following values: | Value | Description | | --------- | ------------------------------------------------------------------------------------- | | `` | A length: a fractional number (`0`–`1` of the parent), an absolute length, or `auto`. | ## height Sets the height of an element. ### Syntax ```css height: ; ``` ### Values Accepts one of the following values: | Value | Description | | --------- | ------------------------------------------------------------------------------------- | | `` | A length: a fractional number (`0`–`1` of the parent), an absolute length, or `auto`. | ## width Sets the width of an element. ### Syntax ```css width: ; ``` ### Values Accepts one of the following values: | Value | Description | | --------- | ------------------------------------------------------------------------------------- | | `` | A length: a fractional number (`0`–`1` of the parent), an absolute length, or `auto`. | ## position-x Sets the position x of an element. ### Syntax ```css position-x: ; ``` ### Values Accepts one of the following values: | Value | Description | | --------- | ----------------------------------- | | `` | An absolute length, in world units. | ## position-y Sets the position y of an element. ### Syntax ```css position-y: ; ``` ### Values Accepts one of the following values: | Value | Description | | --------- | ----------------------------------- | | `` | An absolute length, in world units. | ## position-z Sets the position z of an element. ### Syntax ```css position-z: ; ``` ### Values Accepts one of the following values: | Value | Description | | --------- | ----------------------------------- | | `` | An absolute length, in world units. | ## padding-back Sets the padding back of an element. ### Syntax ```css padding-back: ; ``` ### Values Accepts one of the following values: | Value | Description | | --------- | ------------------------------------------------------------------------------------- | | `` | A length: a fractional number (`0`–`1` of the parent), an absolute length, or `auto`. | ## padding-bottom Sets the padding bottom of an element. ### Syntax ```css padding-bottom: ; ``` ### Values Accepts one of the following values: | Value | Description | | --------- | ------------------------------------------------------------------------------------- | | `` | A length: a fractional number (`0`–`1` of the parent), an absolute length, or `auto`. | ## padding-front Sets the padding front of an element. ### Syntax ```css padding-front: ; ``` ### Values Accepts one of the following values: | Value | Description | | --------- | ------------------------------------------------------------------------------------- | | `` | A length: a fractional number (`0`–`1` of the parent), an absolute length, or `auto`. | ## padding-left Sets the padding left of an element. ### Syntax ```css padding-left: ; ``` ### Values Accepts one of the following values: | Value | Description | | --------- | ------------------------------------------------------------------------------------- | | `` | A length: a fractional number (`0`–`1` of the parent), an absolute length, or `auto`. | ## padding-right Sets the padding right of an element. ### Syntax ```css padding-right: ; ``` ### Values Accepts one of the following values: | Value | Description | | --------- | ------------------------------------------------------------------------------------- | | `` | A length: a fractional number (`0`–`1` of the parent), an absolute length, or `auto`. | ## padding-top Sets the padding top of an element. ### Syntax ```css padding-top: ; ``` ### Values Accepts one of the following values: | Value | Description | | --------- | ------------------------------------------------------------------------------------- | | `` | A length: a fractional number (`0`–`1` of the parent), an absolute length, or `auto`. | ## margin-back Sets the margin back of an element. ### Syntax ```css margin-back: ; ``` ### Values Accepts one of the following values: | Value | Description | | --------- | ------------------------------------------------------------------------------------- | | `` | A length: a fractional number (`0`–`1` of the parent), an absolute length, or `auto`. | ## margin-bottom Sets the margin bottom of an element. ### Syntax ```css margin-bottom: ; ``` ### Values Accepts one of the following values: | Value | Description | | --------- | ------------------------------------------------------------------------------------- | | `` | A length: a fractional number (`0`–`1` of the parent), an absolute length, or `auto`. | ## margin-front Sets the margin front of an element. ### Syntax ```css margin-front: ; ``` ### Values Accepts one of the following values: | Value | Description | | --------- | ------------------------------------------------------------------------------------- | | `` | A length: a fractional number (`0`–`1` of the parent), an absolute length, or `auto`. | ## margin-left Sets the margin left of an element. ### Syntax ```css margin-left: ; ``` ### Values Accepts one of the following values: | Value | Description | | --------- | ------------------------------------------------------------------------------------- | | `` | A length: a fractional number (`0`–`1` of the parent), an absolute length, or `auto`. | ## margin-right Sets the margin right of an element. ### Syntax ```css margin-right: ; ``` ### Values Accepts one of the following values: | Value | Description | | --------- | ------------------------------------------------------------------------------------- | | `` | A length: a fractional number (`0`–`1` of the parent), an absolute length, or `auto`. | ## margin-top Sets the margin top of an element. ### Syntax ```css margin-top: ; ``` ### Values Accepts one of the following values: | Value | Description | | --------- | ------------------------------------------------------------------------------------- | | `` | A length: a fractional number (`0`–`1` of the parent), an absolute length, or `auto`. | ## image-size-height Sets the image size height of an element. ### Syntax ```css image-size-height: ; ``` ### Values Accepts one of the following values: | Value | Description | | --------- | ----------------------------------------------- | | `` | A fraction (`0`–`1`) of the containing element. | ## image-size-width Sets the image size width of an element. ### Syntax ```css image-size-width: ; ``` ### Values Accepts one of the following values: | Value | Description | | --------- | ----------------------------------------------- | | `` | A fraction (`0`–`1`) of the containing element. | ## image-position-x Sets the image position x of an element. ### Syntax ```css image-position-x: ; ``` ### Values Accepts one of the following values: | Value | Description | | --------- | ----------------------------------------------- | | `` | A fraction (`0`–`1`) of the containing element. | ## image-position-y Sets the image position y of an element. ### Syntax ```css image-position-y: ; ``` ### Values Accepts one of the following values: | Value | Description | | --------- | ----------------------------------------------- | | `` | A fraction (`0`–`1`) of the containing element. | ## feel-dust Sets the feel dust of an element. ### Syntax ```css feel-dust: ; ``` ### Values Accepts one of the following values: | Value | Description | | --------- | --------------------------------------------------------------- | | `` | A color — hex (e.g. `#ff0088`) or a named color (e.g. `ivory`). | ## feel-flourish Sets the feel flourish of an element. ### Syntax ```css feel-flourish: ; ``` ### Values Accepts one of the following values: | Value | Description | | --------- | ----------------------------------- | | `` | An absolute length, in world units. | ## feel-glow Sets the feel glow of an element. ### Syntax ```css feel-glow: ; ``` ### Values Accepts one of the following values: | Value | Description | | --------- | --------------------------------------------------------------- | | `` | A color — hex (e.g. `#ff0088`) or a named color (e.g. `ivory`). | ## feel-weight Sets the feel weight of an element. ### Syntax ```css feel-weight: ; ``` ### Values Accepts one of the following values: | Value | Description | | ------------ | ----------- | | `feather` | | | `card` | | | `token` | | | `heavy` | | | `monumental` | | ## distal-align Sets the distal align of an element. ### Syntax ```css distal-align: ; ``` ### Values Accepts one of the following values: | Value | Description | | -------- | ----------- | | `front` | | | `center` | | | `back` | | ## horizontal-align Sets the horizontal align of an element. ### Syntax ```css horizontal-align: ; ``` ### Values Accepts one of the following values: | Value | Description | | ---------- | ----------- | | `leading` | | | `center` | | | `trailing` | | ## vertical-align Sets the vertical align of an element. ### Syntax ```css vertical-align: ; ``` ### Values Accepts one of the following values: | Value | Description | | -------- | ----------- | | `top` | | | `center` | | | `bottom` | | ## Element The Element interface represents a game element with additional functionality beyond basic nodes. Elements can have facets, class lists, and other game-specific features. ### Properties

classList

Array\<string>
An array of CSS class names applied to this element.
### Methods

getFacet(name: string)

Retrieves a facet with the specified name (matched against the child's tag) from this element. Only meaningful when `this.isFaceted === true` (declared at construction time).
NameTypeDescription
namestringThe facet's tag name (e.g. 'front', 'back', 'hand').
**Returns** Facet | null - The facet if found, null otherwise. ## Facet A Facet represents a visibility-gated child of a faceted parent (e.g. Card → \{front, back}, Player → \{hand, seat}). Facets are immobile (their parent's `isFaceted=true` pins them in place). Their identity is the `tag` passed at construction; there is no separate `name` field. ## Node The base class for all node types in the game ### Properties

childNodes

NodeList Read Only
Returns a live NodeList containing all the children of this node. A live NodeList automatically updates when the children of the node change, so you don't need to re-query for changes.

firstChild

Node | null Read Only
Returns the first direct child node of this node, or null if the node has no children.

lastChild

Node | null Read Only
Returns the last direct child node of this node, or null if the node has no children.

previousSibling

Node | null Read Only
Returns the previous sibling node in the tree, or null if there is no previous sibling.

nextSibling

Node | null Read Only
Returns the next sibling node in the tree, or null if there is no next sibling.

nodeName

string Read Only
Returns the name of the node (typically the tag name for elements).

parentNode

Node | null Read Only
Returns the parent node of this node, or null if this node has no parent (e.g., it's the root node or not part of a tree).

isEmpty

Returns true when this node has no child nodes (alias for `!hasChildNodes()`). Per Gap 4: reference games use `node.isEmpty` interchangeably with `node.childNodes.isEmpty`.
### Methods

hasClass(className: string)

Checks if this node has the specified CSS class.
NameTypeDescription
classNamestringThe class name to check for
**Returns** boolean - True if the node has the class, false otherwise

appendChild(node: Node | string | Selector)

Adds a node as the last child of this node. If the node is already part of the game tree, it will be moved from its current position to become the last child of this node.
NameTypeDescription
nodeNode | string | SelectorThe node to add as a child

contains(node: Node)

Checks if the specified node is a descendant of this node (i.e., a child, grandchild, etc.).
NameTypeDescription
nodeNodeThe node to check
**Returns** boolean - True if the node is a descendant, false otherwise

hasChildNodes()

Checks if this node has any child nodes. **Returns** boolean - True if the node has children, false otherwise

insertBefore(node: Node | string | Selector, referenceNode: Node | string | Selector)

Inserts a node as a child of this node, positioned before the specified reference node. If no reference node is provided, the new node becomes the first child.
NameTypeDescription
nodeNode | string | SelectorThe node to insert
referenceNodeNode | string | SelectorThe reference node to insert before, or null to insert at the beginning
## NodeList NodeList objects are collections of nodes, usually returned by properties such as Node.childNodes and methods such as document.querySelectorAll(). ### Properties

isEmpty

Returns true if the NodeList contains no nodes, false otherwise.
### Methods

item(index: number)

Returns the node at the specified index in the NodeList.
NameTypeDescription
indexnumberThe zero-based index of the node to retrieve
**Returns** Node | null - The node at the specified index, or null if the index is out of bounds

forEach(looper: function)

Executes a function for each node in the NodeList.
NameTypeDescription
looperfunctionThe function to execute for each node. Receives the node as its argument.

plus(nodes: NodeList)

Returns a new NodeList containing all nodes from this list plus the nodes from another NodeList. The original NodeLists are not modified.
NameTypeDescription
nodesNodeListThe NodeList to combine with this one
**Returns** NodeList - A new NodeList containing all nodes from both lists

appending(nodes: NodeList)

Returns a new NodeList with the specified nodes appended to the end of this list. The original NodeList is not modified.
NameTypeDescription
nodesNodeListThe NodeList to append to this one
**Returns** NodeList - A new NodeList with the nodes appended

prepending(nodes: NodeList)

Returns a new NodeList with the specified nodes prepended to the beginning of this list. The original NodeList is not modified.
NameTypeDescription
nodesNodeListThe NodeList to prepend to this one
**Returns** NodeList - A new NodeList with the nodes prepended

filter(predicate: function | string)

Returns a new NodeList containing only the nodes that pass the test implemented by the predicate function. The original NodeList is not modified.
NameTypeDescription
predicatefunction | stringA function that tests each node, or a CSS selector string
**Returns** NodeList - A new NodeList containing only the nodes that pass the test

toArray()

Returns a new Array containing the nodes in the NodeList. **Returns** Array - A plain array of the nodes in this list

map(mapper: function)

Returns a new Array containing the results of applying the mapper function to each node in the NodeList.
NameTypeDescription
mapperfunctionA function that transforms each node into a new value
**Returns** Array - A new array containing the transformed values

apply(mapper: function)

Applies the mapper function to each node in the NodeList, with each node as the 'this' context. The original NodeList is returned for chaining.
NameTypeDescription
mapperfunctionA function to apply to each node
**Returns** NodeList - The current NodeList for method chaining

reduce(accumulator: function, initialValue: \*)

Reduces the NodeList to a single value by applying an accumulator function to each node. The accumulator function receives the previous result and the current node.
NameTypeDescription
accumulatorfunctionA function that combines the previous result with the current node
initialValue\*The initial value to start the reduction with
**Returns** \* - The final reduced value

last()

Returns the last node in the NodeList, or null if the list is empty. **Returns** Node | null - The last node in the list, or null if empty

first(count?: number)

Returns the first node (no arg) or the first `count` nodes as a NodeList (ADR-215 W1-G).
NameTypeDescription
count Optionalnumber
**Returns** Node | NodeList | null

topMost(count: number)

Returns a new StaticNodeList with the last `count` nodes (the top of a pile). ADR-215 W1-G canonical name for this.
NameTypeDescription
countnumber
**Returns** NodeList

take(count: number)

NameTypeDescription
countnumber
**Returns** NodeList import { PuffyButton } from '../../components/PuffyButton.tsx' ## Example Guide Guides lead a user through a specific task they want to accomplish, often with a sequence of steps. Writing a good guide requires thinking about what your users are trying to do. ### Further reading * Read [about how-to guides](https://diataxis.fr/how-to-guides/) in the Diátaxis framework Get Started ## Introduction ### What is Cardboard? ### The physical metaphor ### How a game is structured ### See also * [Quickstart](/guides/quickstart) * [The Scene Tree](/guides/concepts/scene-tree) * [Game Lifecycle](/guides/concepts/lifecycle) ## Quickstart ### Prerequisites ### Your first scene ### Adding rules with play() ### Running in the browser ### See also * [Game Lifecycle](/guides/concepts/lifecycle) * [The play() Loop](/guides/logic/play-loop) * [Web](/guides/platforms/web) ## Tactile Studio All game surfaces use the rounded blue world floor, patterned sky and shared studio lighting by default, including games in chat. Microscene previews retain their transparent backdrop. The house recipe provides camera fitting and coordinated interaction effects using the existing model catalog. ```css /* JSX maps to the serialized `game` tag. */ game { presentation: studio-v1; backdrop: teal; feel-flourish: 1; } Piece { material-finish: satin; } Slot { material-finish: matte; } Card { material-finish: paper; } ``` Load this stylesheet through the game's `stylesheets` manifest list. Chess, solitaire, and tic-tac-toe are runnable examples. * `presentation: studio-v1` remains supported. Game stages use the house recipe by default; the authored root selects the palette and material treatment. * `backdrop: cobalt | teal | plum` chooses the root palette; cobalt is the default within Studio. * `material-finish: satin | matte | paper` inherits from the nearest declaration. Explicit object colors remain authoritative. Card geometry uses the paper shader. * `feel-flourish: 0` on the root disables decorative motion, freezes the backdrop, and retains static legal-move cues. Gameplay framing and the backdrop stay still while thinking and interacting. Explicit ambient previews may drift slowly; hidden and lightweight stages do not. Available objects use stationary ivory contours, selection uses a thicker amber contour and a small lift, and destinations use saturated cyan landing footprints with a white drop arrow, a contrasting edge and a four-logical-pixel border (six on hover). Card footprints match the landing card; other footprints follow authored target bounds or the selected mesh dimensions. A translucent preview appears only at the hovered destination. Ordinary arrivals have one quiet contact sound and no dust or neighbor displacement. Special trails last 80 ms. Victory uses one bounded confetti burst, leaves the board still and remains tap-through. Keep card indices and board markings unobscured. Avoid overriding every role with one glow color: the preset deliberately preserves distinct selection and destination treatments. ### Supply presentation and board bases Use `model: none` to suppress a node’s visual model without removing its logical identity. Place the supply override after per-type model rules: ```css box > Piece { model: none; feel-flourish: 0; } Board { model: TILE; width: 5.55; depth: 0.16; material-finish: satin; } Slot { model: TILE; width: 0.65; height: 0.65; depth: 0.055; material-finish: matte; } ``` Existing model rules restore pieces when they leave the supply. `none` applies to the node, not its children. On TILE prefabs, depth controls thickness independently of footprint; a drawable grid base seats beneath its children. Studio backdrops add quiet three-level tinting; confetti uses curved, tumbling strips, while meaningful impacts use brief local flecks. ### Host preferences Web hosts can set independent preferences after connecting the player: ```js await player.setPresentationPreferences({ reducedMotion: true, sound: true, haptics: false, showDragTether: false, }); ``` Native hosts call `PlayerBridge_configurePresentation(instance, reducedMotion, disableSound, disableHaptics, displayScale, showDragTether)`. Scale is framebuffer pixels per logical pixel. iOS `EngineMetalView` and Android `EngineGLView` expose matching properties and inherit system reduced-motion settings. Static selection and destination cues remain visible with reduced motion. `ReadFeelClip` supplies mono float32 little-endian samples at 44100 Hz. Native callers provide a 128 KiB output buffer; an invalid clip ID returns zero bytes. Feel events carry clip ID, pitch and independent sound/haptic mute flags. Cache the bank before play, then drain events once after each engine render tick. The embedded bank combines recorded CC0 Kenney Casino Audio foley with original special and victory accents. Clip IDs 0–7 cover card contact, token contact, special accent, riffle, silent camera channel, victory, paper pickup and dice. Sources, license and export recipe live in `player/resources/audio/SOURCE.md`. Routine transfers take 220–380 ms, deals 200–260 ms, flips 280 ms and drag settling 140 ms. Shuffle remains a compact 700 ms riffle. A neutral pending marker appears when a submitted action waits longer than 300 ms; it does not imply acceptance. Round results remain readable after the bounded celebration finishes. Local turn reminders, timer readouts, pending replies and score counters belong to their stage. Reduced motion retains those static cues and useful audio; it clears the optional 1.5% result camera push. Active drag swooshes use a solid amber-to-cyan ribbon, contrasting edge and rounded caps with moving texture flowing toward the destination. The shaft scales with the piece footprint and narrows for smaller targets; the texture flows into the hovered target. The ribbon is enabled by default (`showDragTether`) and clears on release. Decorative trails retain their separate additive treatment. Drag connectors meet the rounded card outline or transformed mesh/target bounds and resolve parent layout frames. Their thickness follows the footprint across travel. Overlapping footprints hide the connector; active drag cues take priority over decorative trails. Texture flow stays in the object’s drag plane, including vertical and tilted surfaces. To support a one-tap play and an explicit drag destination together, offer both branches with the existing action API: ```js const action = await player.act({ play: { tap: playableCards }, place: { pick: playableCards, targets: [discardPile] }, }); action.node.returnTo(discardPile, 0); ``` The action retires the losing queries. Crazy Eights uses this pattern; the same legal cards and destination apply to both inputs. Deck shuffle order comes from the driver’s seeded Fisher-Yates Move sequence. The Shuffle operation supplies riffle presentation only; it cannot reorder the deck. The riffle ends with a quiet card contact. Coalesced material sounds preserve the strongest contact’s clip, and routine feedback ducks beneath capture and victory accents. A `display: flow` tray with explicit width greater than height spreads cards horizontally and compresses spacing to fit its width. Taller trays retain the vertical tableau cascade. Set card dimensions and corner radius separately from the tray. Cards entering through a deal become actionable on landing; selection and destination cues remain available for settled cards. ## Card Atlases ### card-atlas ### card-front and card-back ### Cells and UV rects ### See also * [card-atlas](/reference/styling/properties/card-atlas) * [Models & Prefabs](/guides/styling/models-prefabs) ## Game Feel ### The feel-\* properties ### Move hints and emphasize() ### Weight, glow, dust, and flourish ### See also * [feel-weight](/reference/styling/properties/feel/feel-weight) * [Moves & Mutations](/guides/logic/moves) ## Layout ### Display modes (grid, pile, flow, block) ### Sizing and spacing ### Alignment ### See also * [Styling Overview](/guides/styling/overview) * [display](/reference/styling/properties/display) * [grid](/reference/styling/properties/grid) ## Models & Prefabs ### The model property ### Built-in prefabs ### GLB bundles ### See also * [model](/reference/styling/properties/model) * [Card Atlases](/guides/styling/card-atlases) * [Elements & Factories](/guides/concepts/elements) ## Styling Overview ### Stylesheets vs. game logic ### Selectors and specificity ### The property reference ### See also * [Layout](/guides/styling/layout) * [Models & Prefabs](/guides/styling/models-prefabs) * [display](/reference/styling/properties/display) ## iOS & Android ### Native players ### Bridging game logic ### See also * [Web](/guides/platforms/web) * [Multiplayer & the Driver](/guides/advanced/multiplayer-driver) ## Web ### Embedding the player ### Local (in-browser) play ### Deploying ### See also * [iOS & Android](/guides/platforms/mobile) * [Multiplayer & the Driver](/guides/advanced/multiplayer-driver) ## Moves & Mutations ### moveTo, dealTo, returnTo, appendChild ### Flipping and rolling ### Move hints ### See also * [Selectors & Queries](/guides/logic/selectors) * [Game Feel](/guides/styling/game-feel) * [Determinism & Replay](/guides/advanced/determinism) ## The play() Loop ### Awaiting player input ### Mutating the world ### Ending the game ### See also * [Player Input](/guides/logic/player-input) * [Moves & Mutations](/guides/logic/moves) * [Scoring & Results](/guides/logic/scoring-results) ## Player Input ### player.choose() ### player.pickAndPlace() ### Racing affordances with Promise.race ### See also * [The play() Loop](/guides/logic/play-loop) * [Moves & Mutations](/guides/logic/moves) * [Turn Order](/guides/logic/turn-order) ## Scoring & Results ### player.score ### declareWinner, declareDraw, declareResult ### See also * [The play() Loop](/guides/logic/play-loop) * [Turn Order](/guides/logic/turn-order) ## Selectors & Queries ### find and findAll ### Structural selectors (:has, :empty, :neighbour) ### Traversal (follow, followUntil) ### See also * [The Scene Tree](/guides/concepts/scene-tree) * [NodeList](/reference/api/nodelist) * [Node](/reference/api/node) ## Turn Order ### TurnOrder strategies ### Iterating turns ### Undo and reverse (redo, reverse) ### See also * [The play() Loop](/guides/logic/play-loop) * [Scoring & Results](/guides/logic/scoring-results) * [Determinism & Replay](/guides/advanced/determinism) ## Elements & Factories ### Built-in factories ### Attributes and classes ### Custom parts (definePart) ### See also * [The Scene Tree](/guides/concepts/scene-tree) * [Element](/reference/api/element) * [Node](/reference/api/node) ## Faceting ### What is a facet? ### Faceted parents (Card, Die) ### Accessing facets (getFacet) ### See also * [Facet](/reference/api/facet) * [Observers & Visibility](/guides/advanced/observers-visibility) ## Game Lifecycle ### configure() ### markReady() ### play() ### The pre-allocation invariant ### See also * [The Scene Tree](/guides/concepts/scene-tree) * [The play() Loop](/guides/logic/play-loop) * [Elements & Factories](/guides/concepts/elements) ## The Scene Tree ### Box, community, hand, and seat ### Elements and hierarchy ### Promoting elements to globals (name / id) ### See also * [Elements & Factories](/guides/concepts/elements) * [Faceting](/guides/concepts/faceting) * [Selectors & Queries](/guides/logic/selectors) ## Determinism & Replay ### Seeded randomness ### Replay and reversal ### Testing determinism ### See also * [Turn Order](/guides/logic/turn-order) * [Multiplayer & the Driver](/guides/advanced/multiplayer-driver) ## Multiplayer & the Driver ### The driver lifecycle ### Frames and operations ### Server-authoritative play ### See also * [Observers & Visibility](/guides/advanced/observers-visibility) * [Determinism & Replay](/guides/advanced/determinism) * [Web](/guides/platforms/web) ## Observers & Visibility ### Observer IDs ### Per-player visibility ### Faceting and hidden information ### See also * [Faceting](/guides/concepts/faceting) * [Multiplayer & the Driver](/guides/advanced/multiplayer-driver)