Skip to main content

Interface: MobjectState

Defined in: core/StateManager.ts:25

JSON-serializable snapshot of a single mobject's visual state. Captures position, rotation, scale, style, and VMobject-specific data.

Properties

children

children: MobjectState[]

Defined in: core/StateManager.ts:65

Recursively captured child states


color

color: string

Defined in: core/StateManager.ts:39

CSS color string


custom?

optional custom: Record<string, unknown>

Defined in: core/StateManager.ts:68

Optional user-supplied custom data


fillOpacity

fillOpacity: number

Defined in: core/StateManager.ts:48

Fill opacity 0-1


id

id: string

Defined in: core/StateManager.ts:27

Mobject id at time of capture (used for lookup during restore)


opacity

opacity: number

Defined in: core/StateManager.ts:42

Overall stroke opacity 0-1


points2D?

optional points2D: Point[]

Defined in: core/StateManager.ts:56

2D points [{x,y}, ...]


points3D?

optional points3D: number[][]

Defined in: core/StateManager.ts:59

3D Bezier control points [[x,y,z], ...]


position

position: [number, number, number]

Defined in: core/StateManager.ts:30

Position [x, y, z]


rotation

rotation: [number, number, number, string]

Defined in: core/StateManager.ts:33

Euler rotation [x, y, z, order]


scale

scale: [number, number, number]

Defined in: core/StateManager.ts:36

Scale [x, y, z]


strokeWidth

strokeWidth: number

Defined in: core/StateManager.ts:45

Stroke width


style

style: MobjectStyle

Defined in: core/StateManager.ts:51

Full style object


visiblePointCount?

optional visiblePointCount: number

Defined in: core/StateManager.ts:62

Visible point count (null means all)