logo
By Lawrence

5 minutes

Deal the Player a Hand

The deck names cards. The seating knows where they go. But run the scene right now and deck.dealt is sending card ids into a table that never moves. Two cards should slide toward you across the felt and turn over.

Two playing cards in mid-flight, arcing from the center of an emerald-green felt table down toward the player's edge, fanned slightly apart and face-down showing ornate card backs, motion trails of warm golden light behind them, dramatic overhead spotlight, deep black surround, cinematic and crisp.

Add the Hand entity to the scene

One entity, Hand, carrying a single CardFan:

"Hand": { "components": { "CardFan": { "count": 2, "originZ": -2, "targetZ": -4.5, "spread": 1.8, "selectedBack": 1, "basePath": "/poker" } } }

This sets up two slots. They fly from the center (originZ: -2) down to the player's edge (targetZ: -4.5). They sit 1.8 apart on that row. basePath: "/poker" points at the textures. bjs download already put those in public/poker/ back in Lesson 1.

Continue reading

Unlock the Full Course

Every lesson, the runnable examples, and the finished build — yours to keep.

$9one-time

Was this page helpful?

We read every note — tell us what's working and what isn't.

↑↓ NavigateEnter SelectEsc CloseCtrl+K Open Search