try(what: string, fn: (...any) → void
| arg | type | description |
|---|
| what | string | |
| fn | (...any | |
check(style: string) → void
| arg | type | description |
|---|
| style | string | |
coverTime(opts: Opts?) → number
Seconds from W.play until the screen is fully covered (move the camera then).
| arg | type | description |
|---|
| opts | Opts? | |
duration(opts: Opts?) → number
Total seconds the overlay runs: cover + hold + uncover.
| arg | type | description |
|---|
| opts | Opts? | |
smooth(t: number) → number
| arg | type | description |
|---|
| t | number | |
pctDown(t: number, cycle: number) → number
| arg | type | description |
|---|
| t | number | |
| cycle | number | |
pctUp(t: number, cycle: number) → number
| arg | type | description |
|---|
| t | number | |
| cycle | number | |
animate(p: Piece, tm: Timing, frozen: boolean) → any
| arg | type | description |
|---|
| p | Piece | |
| tm | Timing | |
| frozen | boolean | |
at(pc: number, v: any) → void
| arg | type | description |
|---|
| pc | number | |
| v | any | |
abs(x: number, y: number, w: number, h: number, extra: { [string]: any }?) → void
| arg | type | description |
|---|
| x | number | |
| y | number | |
| w | number | |
| h | number | |
| extra | { [string]: any }? | |
pieces(kind: string, dir: string, w: number, h: number, color: string, seed: number) → void
the pieces of one style at a size, with the easing they animate under
| arg | type | description |
|---|
| kind | string | |
| dir | string | |
| w | number | |
| h | number | |
| color | string | |
| seed | number | |
half(c: number) → number
| arg | type | description |
|---|
| c | number | |
curve(c: number) → void
| arg | type | description |
|---|
| c | number | |
curve(c: number) → void
| arg | type | description |
|---|
| c | number | |
build(kind: string, o: any, w: number, h: number, tm: Timing?, frozen: boolean, seed: number) → void
| arg | type | description |
|---|
| kind | string | |
| o | any | |
| w | number | |
| h | number | |
| tm | Timing? | |
| frozen | boolean | |
| seed | number | |
tree(style: string, opts: Opts?) → any
The full-screen overlay tree for `style`, sized from ui.screenSize() now and animated once (what W.play registers).
| arg | type | description |
|---|
| style | string | |
| opts | Opts? | |
play(style: string, opts: Opts?) → number
Play `style` once on this peer: cover, hold, uncover. Returns the seconds until the screen is fully covered. A second play restarts cleanly; the screen removes itself when done.
| arg | type | description |
|---|
| style | string | |
| opts | Opts? | |
stop( ) → void
Remove a playing overlay at once.
current( ) → string
The UI screen name of the overlay playing now, or nil.
boxRoot(o: any, kids: { any }, w: number, h: number) → any
| arg | type | description |
|---|
| o | any | |
| kids | { any } | |
| w | number | |
| h | number | |
preview(style: string, opts: SwatchOpts?) → any
A box node ({ width, height }, default 160x90) showing `style` frozen at full cover, for a still gallery.
| arg | type | description |
|---|
| style | string | |
| opts | SwatchOpts? | |
swatch(style: string, opts: SwatchOpts?) → any
A box node ({ width, height }, default 160x90) looping `style` inside itself forever over a backdrop so the motion reads (backdrop = false for none, or a CSS gradient string). cover/hold default 0.5/0.3 here, with `pause` (0.7) clear seconds between loops.
| arg | type | description |
|---|
| style | string | |
| opts | SwatchOpts? | |