Skip to main content

Interface: SerializedMobject

Defined in: src/serialization/types.ts:40

One serialized mobject.

props is Record<string, unknown> on purpose: each registered type owns the shape of its own props and narrows them on restore, so the schema stays open for new types without a central union to edit.

Properties​

children​

children: SerializedMobject[]

Defined in: src/serialization/types.ts:50

Submobject tree.


props​

props: Record<string, unknown>

Defined in: src/serialization/types.ts:44

Constructor-relevant, unscaled properties for this type.


style​

style: SerializedStyle

Defined in: src/serialization/types.ts:48

Stroke/fill, applied after construction.


transform​

transform: SerializedTransform

Defined in: src/serialization/types.ts:46

Position/rotation/scale, applied after construction.


type​

type: string

Defined in: src/serialization/types.ts:42

Registered type name (its class name), e.g. Circle.


unknown?​

optional unknown: boolean

Defined in: src/serialization/types.ts:55

Present and true when the type had no registered serializer at capture time. Such a node is skipped (not reconstructed) on restore.