MotionScript

@motion-script/core


@motion-script/core / PolygramState

Interface: PolygramState

Defined in: render/descriptors/polygram.ts:4

Per-shape descriptor state. Shapes carry geometry and a local transform (rotation/scale baked into the path before it joins the union) but not layer effects: effects are applied to the whole drawn union via Graphics.effects, not per shape. So ShapeState omits TransformState.effects (which remains for node-level transforms).

Extends

Properties

blend?

optional blend?: "color" | "multiply" | "screen" | "overlay" | "darken" | "lighten" | "color-dodge" | "color-burn" | "hard-light" | "soft-light" | "difference" | "exclusion" | "hue" | "saturation" | "luminosity" | "normal" | "pass-through"

Defined in: render/descriptors/transform.ts:12

Layer blend mode. 'pass-through' (the default) does not isolate the node; any other mode isolates it and blends its flattened result against the backdrop. Optional so per-shape descriptors that extend this state needn't carry it.

Inherited from

TransformState.blend


cornerRadius

cornerRadius: number

Defined in: render/descriptors/polygram.ts:10

Vertex rounding radius in pixels (applied uniformly to every vertex).


cornerStyle

cornerStyle: CornerStyle

Defined in: render/descriptors/polygram.ts:12

Vertex shape: 'rounded' (circular arc) or 'angled' (chamfer).


end

end: number

Defined in: render/descriptors/shape.ts:14

Inherited from

ShapeState.end


height

height: number

Defined in: render/descriptors/polygram.ts:6

Overrides

TransformState.height


opacity

opacity: number

Defined in: render/descriptors/transform.ts:10

Inherited from

TransformState.opacity


pivot

pivot: Anchor

Defined in: render/descriptors/shape.ts:22

Pivot for the shape's local rotation/scale. Widened from a Vector2 to a Anchor so a shape can pivot about a named anchor (.rect({ pivot: 'topRight' })) as well as an explicit Vector2. with*Descriptor normalises it to a Vector2 (via resolveShapePivot), so the resolved state the renderer reads always carries a concrete pivot.

Inherited from

ShapeState.pivot


ratio

ratio: number

Defined in: render/descriptors/polygram.ts:8


rotation

rotation: number

Defined in: render/descriptors/transform.ts:13

Inherited from

TransformState.rotation


scale

scale: number

Defined in: render/descriptors/transform.ts:14

Inherited from

TransformState.scale


sides

sides: number

Defined in: render/descriptors/polygram.ts:7


start

start: number

Defined in: render/descriptors/shape.ts:13

Inherited from

ShapeState.start


width

width: number

Defined in: render/descriptors/polygram.ts:5

Overrides

TransformState.width


x

x: number

Defined in: render/descriptors/transform.ts:6

Inherited from

TransformState.x


y

y: number

Defined in: render/descriptors/transform.ts:7

Inherited from

TransformState.y