Home
API: forms

Type Alias: Shape

lifecycle-kit

lifecycle-kit


lifecycle-kit / forms / Shape

Type Alias: Shape

Shape = SubPath | Ellipse & object

Defined in: forms/path.ts:215

One drawable outline.

Not styled. A shape says where it is and which part it belongs to, never what colour it is — pigment and lighting come from their respective stages, both of which derive colour from biology rather than from a form rule picking one. Baking a fill into a rule's output would make taper an art director.

The tag is OPTIONAL, and that is what keeps the flatness honest. A rule that has nothing meaningful to say about anatomy omits it and the shape compares exactly as before; a consumer that does not care about parts ignores it entirely. It adds a channel without adding a required ceremony.

Crucially it is plain data — a string and a number, no transform, no parent pointer, no nesting. Grouping and transforms are separable concerns, and conflating them is what made an earlier draft reject grouping outright: a scene-graph node would have needed a matrix to be worth having, and a matrix would have broken exact comparability. A label breaks nothing. Two shapes with equal geometry and equal tags are still toEqual, and a tagged path still JSON round-trips.

Type Declaration

tag?

readonly optional tag?: PartTag