Skip to content

1681-engine / index / PartSkin

Interface: PartSkin ​

Defined in: src/rig/RigView.ts:15

How one part looks. A textured part is an image drawn with its top-centre on the bone's root joint and turned to follow the bone (cut-out animation, any art style); a vector part is a capsule (limbs), a rounded box (torso) or a circle (head) in color.

Properties ​

anchorX? ​

ts
optional anchorX?: number;

Defined in: src/rig/RigView.ts:22

Where on the image the root joint sits, as a share of its size (default 0.5, 0).


anchorY? ​

ts
optional anchorY?: number;

Defined in: src/rig/RigView.ts:23


color? ​

ts
optional color?: number;

Defined in: src/rig/RigView.ts:25

Vector fill (default by part).


frame? ​

ts
optional frame?: string | number;

Defined in: src/rig/RigView.ts:18


outline? ​

ts
optional outline?: number | null;

Defined in: src/rig/RigView.ts:29

Vector outline colour, or null for none (default a dark outline).


stretch? ​

ts
optional stretch?: boolean;

Defined in: src/rig/RigView.ts:20

Stretch the image along the bone to the next joint instead of drawing it at its own size.


texture? ​

ts
optional texture?: string;

Defined in: src/rig/RigView.ts:17

Texture key (and frame) in the stage's registry; leave out for a vector part.


width? ​

ts
optional width?: number;

Defined in: src/rig/RigView.ts:27

Vector thickness in grid px (default the rig's limbWidth; the torso's width; the head's diameter).

Released under the MIT License.