simulateLayout(w: number?, h: number?) → void
Lay every screen out for a canvas of w x h logical points instead of the live one
(nil = the live size). For checking a phone shape on a desktop window: a capture at
412x892 is a 1280x2771 canvas, so simulateLayout(1280, 2771) then capture at 412x892.
| arg | type | description |
|---|
| w | number? | |
| h | number? | |
px(n: number) → number
| arg | type | description |
|---|
| n | number | |
gilded(text: string, size: number, extra: { [string]: any }?) → any
Gilded display type: gold fill, dark carved outline, warm drop shadow.
| arg | type | description |
|---|
| text | string | |
| size | number | |
| extra | { [string]: any }? | |
inked(text: string, size: number, extra: { [string]: any }?) → any
Inked type for parchment.
| arg | type | description |
|---|
| text | string | |
| size | number | |
| extra | { [string]: any }? | |
parchment(style: { [string]: any }, children: { any }, id: string?) → any
A parchment surface: the generated parchment under a warm gradient, burnt edge, oak frame.
| arg | type | description |
|---|
| style | { [string]: any } | |
| children | { any } | |
| id | string? | |
portrait(src: string, size: number, _flip: boolean?, id: string?) → any
A portrait in a gilded frame; `src` a texture ref, `size` in points.
The picture is the circle's own backgroundImage (a child image under clipping ancestors
does not paint reliably), so its borderRadius cuts the portrait.
| arg | type | description |
|---|
| src | string | |
| size | number | |
| _flip | boolean? | |
| id | string? | |
bar(frac: number, width: number, height: number, kind: string, mirror: boolean?, id: string?) → any
An iron-capped bar. `frac` 0..1. `kind` "health" | "stamina" | "hype" | "kickout".
| arg | type | description |
|---|
| frac | number | |
| width | number | |
| height | number | |
| kind | string | |
| mirror | boolean? | |
| id | string? | |
ribbon(children: { any }, style: { [string]: any }?, id: string?) → any
A burgundy ribbon banner with gold edging and swallow-tail ends.
| arg | type | description |
|---|
| children | { any } | |
| style | { [string]: any }? | |
| id | string? | |
cross(size: number, color: string?) → any
A small cross glyph (the ring emblem) as inline SVG.
| arg | type | description |
|---|
| size | number | |
| color | string? | |
medallion(size: number, lit: boolean) → any
A round iron medallion with a cross, the end caps of the HYPE meter.
| arg | type | description |
|---|
| size | number | |
| lit | boolean | |
entrance(from: string, delay: number?, dur: number?) → any
| arg | type | description |
|---|
| from | string | |
| delay | number? | |
| dur | number? | |
pulse(scaleTo: number, dur: number) → any
| arg | type | description |
|---|
| scaleTo | number | |
| dur | number | |
clockText(seconds: number) → string
| arg | type | description |
|---|
| seconds | number | |
⌬ Types
Metrics = { w: number, h: number, s: number, portrait: boolean }