selectUi
Builds the kart select screen's widget tree for one style: `build(state, W, H)` returns the tree for a W x H canvas, and `focus(styleId, W, H)` answers where the 3D kart should sit on screen (sx, sy in -1..1 and a zoom) so the stage camera frames it in the gap the layout leaves.…
selectUi
Builds the kart select screen's widget tree for one style: build(state, W, H) returns the tree for a W x H canvas, and focus(styleId, W, H) answers where the 3D kart should sit on screen (sx, sy in -1..1 and a zoom) so the stage camera frames it in the gap the layout leaves. grandPrixKit.KartSelect calls both and registers the tree itself, so the clicks reach its onCallback.
state = { style, view, row, preview, touch, scale }: style is a grandPrixKit.selectStyles entry, view is the GrandPrix select view (GP.sample("select") shape), row the focused row (1 vehicle, 2 look, 3 paint, 4 ready).
Clickables carry callback ids ks:vehicle:<id>, ks:look:<id>, ks:paint:<id>, ks:ready, ks:prev, ks:next and ks:row:<n>, and element ids (ks_ready, ks_prev, ks_next, ks_card_<vehicle>, ks_look_<look>, ks_paint_<paint>, ks_row_<vehicle>) for driving it from tests.
Stat bars use barsKit's BK.render with the style's barLook (segmented, ghost, pixel, hologram) and the style's own thin bars otherwise. Below 640 points wide, or in portrait, each style switches to its phone layout. Portraits in the roster and list are the grandPrixKit.portraits.<vehicle> textures, rendered from the real vehiclesKit models.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2strict
lbl(text: string, style: any, id: string?) → any
| arg | type | description |
|---|---|---|
| text | string | |
| style | any | |
| id | string? |
box(kind: string, style: any, children: { any }, props: any?, id: string?) → any
| arg | type | description |
|---|---|---|
| kind | string | |
| style | any | |
| children | { any } | |
| props | any? | |
| id | string? |
v(style: any, children: { any }, props: any?, id: string?) → any return box
| arg | type | description |
|---|---|---|
| style | any | |
| children | { any } | |
| props | any? | |
| id | string? |
h(style: any, children: { any }, props: any?, id: string?) → any return box
| arg | type | description |
|---|---|---|
| style | any | |
| children | { any } | |
| props | any? | |
| id | string? |
merge(a: any, b: any?) → any
| arg | type | description |
|---|---|---|
| a | any | |
| b | any? |
up(T: any, s: string) → string
| arg | type | description |
|---|---|---|
| T | any | |
| s | string |
find(list: { any }, id: string) → void
| arg | type | description |
|---|---|---|
| list | { any } | |
| id | string |
clock(secs: number) → string
| arg | type | description |
|---|---|---|
| secs | number |
hexA(hex: string, a: number) → string
| arg | type | description |
|---|---|---|
| hex | string | |
| a | number |
panel(T: any, k: number, extra: any?) → any
| arg | type | description |
|---|---|---|
| T | any | |
| k | number | |
| extra | any? |
fadeIn(delay: number, dy: number?) → any
| arg | type | description |
|---|---|---|
| delay | number | |
| dy | number? |
slideIn(delay: number, dx: number) → any
| arg | type | description |
|---|---|---|
| delay | number | |
| dx | number |
pulse(color: string, size: number) → any
| arg | type | description |
|---|---|---|
| color | string | |
| size | number |
breathe( ) → any
stripes(c1: string, c2: string, w: number, hgt: number, deg: number?) → any
hazard / accent stripe band drawn with hard gradient stops
| arg | type | description |
|---|---|---|
| c1 | string | |
| c2 | string | |
| w | number | |
| hgt | number | |
| deg | number? |
brackets(color: string, size: number, thick: number) → void
corner brackets for the sci-fi frames
| arg | type | description |
|---|---|---|
| color | string | |
| size | number | |
| thick | number |
corner(pos: any, bt: boolean, bl: boolean) → any
| arg | type | description |
|---|---|---|
| pos | any | |
| bt | boolean | |
| bl | boolean |
mixHex(a: string, b: string, t: number) → string
| arg | type | description |
|---|---|---|
| a | string | |
| b | string | |
| t | number |
ch(hex: string, i: number) → number return tonumber
| arg | type | description |
|---|---|---|
| hex | string | |
| i | number |
statBars(T: any, k: number, stats: any, width: number, opts: any?) → any
| arg | type | description |
|---|---|---|
| T | any | |
| k | number | |
| stats | any | |
| width | number | |
| opts | any? |
focusRing(T: any, k: number, on: boolean, base: any) → any
| arg | type | description |
|---|---|---|
| T | any | |
| k | number | |
| on | boolean | |
| base | any |
rowTitle(T: any, k: number, text: string, focused: boolean, n: number) → any
| arg | type | description |
|---|---|---|
| T | any | |
| k | number | |
| text | string | |
| focused | boolean | |
| n | number |
lookPicker(T: any, k: number, looks: { any }, cur: string, focused: boolean, width: number?) → any
| arg | type | description |
|---|---|---|
| T | any | |
| k | number | |
| looks | { any } | |
| cur | string | |
| focused | boolean | |
| width | number? |
paintSwatches(T: any, k: number, paints: { any }, cur: string, focused: boolean, size: number, perRow: number) → any
| arg | type | description |
|---|---|---|
| T | any | |
| k | number | |
| paints | { any } | |
| cur | string | |
| focused | boolean | |
| size | number | |
| perRow | number |
readyButton(T: any, k: number, ready: boolean, focused: boolean, width: number?, hgt: number?, labelOn: string?, labelOff: string?) → any
| arg | type | description |
|---|---|---|
| T | any | |
| k | number | |
| ready | boolean | |
| focused | boolean | |
| width | number? | |
| hgt | number? | |
| labelOn | string? | |
| labelOff | string? |
arrowBtn(T: any, k: number, glyph: string, cb: string, size: number, id: string) → any
| arg | type | description |
|---|---|---|
| T | any | |
| k | number | |
| glyph | string | |
| cb | string | |
| size | number | |
| id | string |
entrantRow(T: any, k: number, e: any, catalog: any, compact: boolean) → any
| arg | type | description |
|---|---|---|
| T | any | |
| k | number | |
| e | any | |
| catalog | any | |
| compact | boolean |
entrantsPanel(T: any, k: number, view: any, compact: boolean, maxRows: number?) → any
| arg | type | description |
|---|---|---|
| T | any | |
| k | number | |
| view | any | |
| compact | boolean | |
| maxRows | number? |
entrantChips(T: any, k: number, view: any) → any
compact chips for phones: a coloured dot, the name and a tick
| arg | type | description |
|---|---|---|
| T | any | |
| k | number | |
| view | any |
cupBlock(T: any, k: number, cup: any, big: boolean?) → any
| arg | type | description |
|---|---|---|
| T | any | |
| k | number | |
| cup | any | |
| big | boolean? |
timer(T: any, k: number, secs: number, big: boolean?, prefix: string?) → any
| arg | type | description |
|---|---|---|
| T | any | |
| k | number | |
| secs | number | |
| big | boolean? | |
| prefix | string? |
hint(T: any, k: number, touch: boolean) → any
| arg | type | description |
|---|---|---|
| T | any | |
| k | number | |
| touch | boolean |
vehicleHeader(T: any, k: number, veh: any, idx: number, total: number, size: number?) → any
| arg | type | description |
|---|---|---|
| T | any | |
| k | number | |
| veh | any | |
| idx | number | |
| total | number | |
| size | number? |
portrait(id: string) → string
| arg | type | description |
|---|---|---|
| id | string |
ctx(state: any, W: number, H: number) → any
| arg | type | description |
|---|---|---|
| state | any | |
| W | number | |
| H | number |
phone(c: any, opts: any) → any
the shared phone layout: header, a window for the model (or a portrait), and a bottom sheet
| arg | type | description |
|---|---|---|
| c | any | |
| opts | any |
garage(c: any) → void
| arg | type | description |
|---|---|---|
| c | any |
grid(c: any) → void
| arg | type | description |
|---|---|---|
| c | any |
carousel(c: any) → void
| arg | type | description |
|---|---|---|
| c | any |
arcade(c: any) → void
| arg | type | description |
|---|---|---|
| c | any |
hangar(c: any) → void
| arg | type | description |
|---|---|---|
| c | any |
minimal(c: any) → void
| arg | type | description |
|---|---|---|
| c | any |
build(state: any, W: number, H: number) → any
Build the whole screen tree for `state` on a W x H canvas (UI points).
| arg | type | description |
|---|---|---|
| state | any | |
| W | number | |
| H | number |
focus(styleId: string, W: number, H: number) → void
Where the 3D kart should sit on screen for this layout: sx, sy in -1..1 (+y up) and a zoom factor.
| arg | type | description |
|---|---|---|
| styleId | string | |
| W | number | |
| H | number |
Sub-parts
Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.
Showing up to 3 levels deep. Open a part to see what it holds further down.
Problems
Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.
agent_score is exposed.+ quality × 0.35
+ performance × 0.25
± compat factor
Usability ratings
Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".
Scoped to this part · feeds back into the world's score.