Skip to content

1681-engine / pixel / NineSliceSpec

Interface: NineSliceSpec ​

Defined in: src/pixel/nineSlice.ts:39

Properties ​

corner ​

ts
corner: readonly string[];

Defined in: src/pixel/nineSlice.ts:41

The top-left corner, square, one letter a role; '.' is nothing.


offset? ​

ts
optional offset?: readonly [number, number];

Defined in: src/pixel/nineSlice.ts:51

Moves the frame inside its canvas (a pressed button sits one pixel lower where its shadow was).


overlay? ​

ts
optional overlay?: readonly string[];

Defined in: src/pixel/nineSlice.ts:55

Rows painted over the frame, the frame's full size ('.' leaves it): a tick in a checkbox.


pad? ​

ts
optional pad?: readonly [number, number];

Defined in: src/pixel/nineSlice.ts:53

Room right and below for the shadow or the offset (default: the shadow).


palette ​

ts
palette: Readonly<Record<string, Color | string>>;

Defined in: src/pixel/nineSlice.ts:43

A colour per letter: a packed Color or a CSS hex (#rgb, #rrggbb, #rrggbbaa for see-through fills).


shadow? ​

ts
optional shadow?: readonly [number, number];

Defined in: src/pixel/nineSlice.ts:47

The hard shadow's offset in art pixels (default none).


shadowColor? ​

ts
optional shadowColor?: string | number;

Defined in: src/pixel/nineSlice.ts:49

The shadow's colour (default palette Z, else black at 55%).


twins? ​

ts
optional twins?: Readonly<Record<string, string>>;

Defined in: src/pixel/nineSlice.ts:45

Near-side letter → far-side letter (default FRAME_TWINS).

Released under the MIT License.