styles
The ten gauge cluster looks as plain functions: `S.get(id).build(view, scale, state)` returns one widget node (a positioned plate holding a `canvas`) for the cluster at that scale. Each style also states its `label`, default `anchor` and design `size`. `S.ids()` lists them in gal…
gaugeClusters.styles
The ten gauge cluster looks as plain functions: S.get(id).build(view, scale, state) returns one widget node (a positioned plate holding a canvas) for
the cluster at that scale. Each style also states its label, default
anchor and design size. S.ids() lists them in gallery order: analog,
digital, rally, retro80s, scifi, minimal, arcade, pixel, hud, truck. Called by
gaugeClusters.gauges and the gallery; call it yourself to put a cluster
inside a screen of your own (feed it Gauges.view(...)).
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2gaugeClusters.styles — the ten cluster looks. Each style is `{ id, label, anchor, size = { w, h }, build(v, k, st) }`. `build` returns one widget node (the cluster itself, no screen placement), drawn at scale `k` (1 = design size `size`). `v` is a view of the reading (see `gauges.view`): speed in the chosen units and its dial range, rpm and its dial range, the redline, gear label, throttle/brake/boost, and the time `t`. `st` is per-cluster state a style may keep (odometer, fuel...). local S = require("gaugeClusters.styles") S.ids() --> { "analog", "digital", ... } S.get("rally").build(view, 1, {})
cv(w: number, h: number, cmds: { any }, style: any?) → void
| arg | type | description |
|---|---|---|
| w | number | |
| h | number | |
| cmds | { any } | |
| style | any? |
abs(x: number, y: number, node: any) → void
| arg | type | description |
|---|---|---|
| x | number | |
| y | number | |
| node | any |
plate(w: number, h: number, style: any, children: { any }) → void
A positioned container (the cluster's plate) holding absolutely placed layers.
| arg | type | description |
|---|---|---|
| w | number | |
| h | number | |
| style | any | |
| children | { any } |
spdText(v: ?) → string
| arg | type | description |
|---|---|---|
| v | ? |
padLeft(s: string, n: number) → string
| arg | type | description |
|---|---|---|
| s | string | |
| n | number |
outlined(c: ?, x: ?, y: ?, s: ?, col: ?, size: ?, font: ?, align: ?, outline: ?, o: ?) → void
outlined text for legibility over the world (no panel behind)
| arg | type | description |
|---|---|---|
| c | ? | |
| x | ? | |
| y | ? | |
| s | ? | |
| col | ? | |
| size | ? | |
| font | ? | |
| align | ? | |
| outline | ? | |
| o | ? |
speedStep(maxV: number) → number
Number labels for a dial: returns step for majors so labels never crowd.
| arg | type | description |
|---|---|---|
| maxV | number |
analogDial(c: ?, k: ?, cx: ?, cy: ?, R: ?, frac: ?, redFrom: ?, majors: ?, minorsPer: ?, labelFn: ?, needleCol: ?) → void
═══════════════════════════════════════════════════════════════════════ 1. analog — classic twin dials, chrome bezels, orange needles ═══════════════════════════════════════════════════════════════════════
| arg | type | description |
|---|---|---|
| c | ? | |
| k | ? | |
| cx | ? | |
| cy | ? | |
| R | ? | |
| frac | ? | |
| redFrom | ? | |
| majors | ? | |
| minorsPer | ? | |
| labelFn | ? | |
| needleCol | ? |
ang(f: ?) → void
| arg | type | description |
|---|---|---|
| f | ? |
build(v: ?, k: ?, st: ?) → void
| arg | type | description |
|---|---|---|
| v | ? | |
| k | ? | |
| st | ? |
build(v: ?, k: ?, st: ?) → void
| arg | type | description |
|---|---|---|
| v | ? | |
| k | ? | |
| st | ? |
build(v: ?, k: ?, st: ?) → void
| arg | type | description |
|---|---|---|
| v | ? | |
| k | ? | |
| st | ? |
build(v: ?, k: ?, st: ?) → void
| arg | type | description |
|---|---|---|
| v | ? | |
| k | ? | |
| st | ? |
build(v: ?, k: ?, st: ?) → void
| arg | type | description |
|---|---|---|
| v | ? | |
| k | ? | |
| st | ? |
ang(f: ?) → void
| arg | type | description |
|---|---|---|
| f | ? |
build(v: ?, k: ?, st: ?) → void
| arg | type | description |
|---|---|---|
| v | ? | |
| k | ? | |
| st | ? |
build(v: ?, k: ?, st: ?) → void
| arg | type | description |
|---|---|---|
| v | ? | |
| k | ? | |
| st | ? |
build(v: ?, k: ?, st: ?) → void
| arg | type | description |
|---|---|---|
| v | ? | |
| k | ? | |
| st | ? |
frame(x: ?, y: ?, w: ?, h: ?, fill: ?, edge: ?) → void
stepped-corner frame with a hard drop shadow
| arg | type | description |
|---|---|---|
| x | ? | |
| y | ? | |
| w | ? | |
| h | ? | |
| fill | ? | |
| edge | ? |
build(v: ?, k: ?, st: ?) → void
| arg | type | description |
|---|---|---|
| v | ? | |
| k | ? | |
| st | ? |
creamDial(c: ?, k: ?, cx: ?, cy: ?, R: ?, frac: ?, a0: ?, a1: ?, majors: ?, minorsPer: ?, labelFn: ?, redFrom: ?, labelSize: ?) → void
═══════════════════════════════════════════════════════════════════════ 10. truck — big chunky cluster with boost, fuel and temp dials ═══════════════════════════════════════════════════════════════════════
| arg | type | description |
|---|---|---|
| c | ? | |
| k | ? | |
| cx | ? | |
| cy | ? | |
| R | ? | |
| frac | ? | |
| a0 | ? | |
| a1 | ? | |
| majors | ? | |
| minorsPer | ? | |
| labelFn | ? | |
| redFrom | ? | |
| labelSize | ? |
ang(f: ?) → void
| arg | type | description |
|---|---|---|
| f | ? |
truckNeedle(c: ?, k: ?, cx: ?, cy: ?, a: ?, len: ?) → void
| arg | type | description |
|---|---|---|
| c | ? | |
| k | ? | |
| cx | ? | |
| cy | ? | |
| a | ? | |
| len | ? |
build(v: ?, k: ?, st: ?) → void
| arg | type | description |
|---|---|---|
| v | ? | |
| k | ? | |
| st | ? |
ids( ) → void
Every style id, in gallery order.
has(id: string) → boolean
| arg | type | description |
|---|---|---|
| id | string |
get(id: string) → void
| arg | type | description |
|---|---|---|
| id | string |
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.