MotionScript

@motion-script/core


@motion-script/core / VideoProps

Interface: VideoProps

Defined in: nodes/media/video-node.ts:22

Extends

Properties

align

align: Anchor

Defined in: nodes/geometry/rect-node.ts:37

Alignment of children within the content box: a named position ('center', 'topLeft', …) or an explicit per-axis pivot Vector2 (x: -1 left … +1 right, y: -1 bottom … +1 top).

Inherited from

RectProps.align


anchor?

optional anchor?: Anchor

Defined in: nodes/media/video-node.ts:31

The point held fixed as zoom scales; also the alignment when it doesn't cover.


audioFilters?

optional audioFilters?: AudioFilter

Defined in: nodes/media/video-node.ts:57

Audio filters applied to the video's sound track (gain, eq, echo, …).


blend

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: nodes/base/node.ts:168

Layer blend mode. 'pass-through' (default) does not isolate the node — its opacity scales each child/fill while they blend against the backdrop. Any other mode isolates the node and blends its flattened result against the backdrop.

Inherited from

RectProps.blend


bottomCenter

bottomCenter: Vector2 | (() => Vector2)

Defined in: nodes/base/node.ts:214

Inherited from

RectProps.bottomCenter


bottomLeft

bottomLeft: Vector2 | (() => Vector2)

Defined in: nodes/base/node.ts:211

Inherited from

RectProps.bottomLeft


bottomRight

bottomRight: Vector2 | (() => Vector2)

Defined in: nodes/base/node.ts:212

Inherited from

RectProps.bottomRight


center

center: Vector2 | (() => Vector2)

Defined in: nodes/base/node.ts:208

Inherited from

RectProps.center


centerLeft

centerLeft: Vector2 | (() => Vector2)

Defined in: nodes/base/node.ts:215

Inherited from

RectProps.centerLeft


centerRight

centerRight: Vector2 | (() => Vector2)

Defined in: nodes/base/node.ts:216

Inherited from

RectProps.centerRight


childPositioning

childPositioning: ChildPositioning

Defined in: nodes/base/node.ts:181

Frame of reference this node lays its children out in. 'relative' (default) positions them inside this node's own content box; 'absolute' pins them to the stage instead, so their x/y are scene-root coordinates and this node's flow/gap/padding no longer place them. Overridden per child by relativeToParent.

Inherited from

RectProps.childPositioning


children

children: NodeChildren

Defined in: nodes/base/node.ts:193

Child nodes. A single Node, or an arbitrarily-nested array of them — the constructor flattens nesting (.flat(Infinity)), so .map() results can be dropped in directly as a child without spreading, like React.

Inherited from

RectProps.children


clip

clip: boolean

Defined in: nodes/base/node.ts:173

When true, content drawn outside this node's outline is clipped away (see Node.clipSelf).

Inherited from

RectProps.clip


colSpan

colSpan: number

Defined in: nodes/base/node.ts:234

How many grid columns this child spans. Default 1.

Inherited from

RectProps.colSpan


column

column: number

Defined in: nodes/base/node.ts:230

1-based column index for explicit grid placement. Undefined = auto-placed.

Inherited from

RectProps.column


cornerRadius

cornerRadius: RectCornerRadius

Defined in: nodes/geometry/rect-node.ts:39

Corner radius in pixels — uniform, per-corner, or per-axis.

Inherited from

RectProps.cornerRadius


cornerStyle

cornerStyle: RectCornerStyle

Defined in: nodes/geometry/rect-node.ts:41

How each corner is shaped once it has a radius: 'rounded' or 'angled'.

Inherited from

RectProps.cornerStyle


crop?

optional crop?: Insets

Defined in: nodes/media/video-node.ts:27

Window onto the source frame, in fractions of its own size, applied before fit.


duration?

optional duration?: number

Defined in: nodes/media/video-node.ts:51

Length of one loop cycle, in seconds. Defaults to the trimmed clip length.


effects

effects: Effect

Defined in: nodes/base/node.ts:169

Inherited from

RectProps.effects


end?

optional end?: number

Defined in: nodes/geometry/shape-node.ts:52

Inherited from

RectProps.end


fill?

optional fill?: Fill

Defined in: nodes/geometry/shape-node.ts:31

Fill layer(s). Each item can be:

  • A plain CSS color string → treated as a solid fill
  • A fill prop object (SolidFillProp, LinearGradientFillProp, …)
  • An already-resolved fill object
  • A FillChain from the Fills builder (e.g. Fills.color('red'))

Inherited from

RectProps.fill


filters?

optional filters?: VideoFilter

Defined in: nodes/media/video-node.ts:35

Visual filters applied to the rendered frame (blur, color, posterizeTime, echo, …).


fit?

optional fit?: ImageFit

Defined in: nodes/media/video-node.ts:25

How the (cropped) frame is scaled into the node's bounds. Default 'fill'.


flex

flex: number

Defined in: nodes/base/node.ts:226

Proportional share of the free space along the parent's main axis, relative to sibling fill children (like Flutter's Expanded(flex:)). Only meaningful when this node fills the main axis — in a row that's width:'fill', in a column height:'fill'. Two siblings with flex 2 and 1 split the free space 2:1. Defaults to 1. Specifying flex without an explicit width/height defaults both to 'fill'.

Inherited from

RectProps.flex


flow

flow: FlowMode

Defined in: nodes/geometry/rect-node.ts:29

Layout mode for children: flex horizontal / vertical, or overlapping freeform.

Inherited from

RectProps.flow


gap

gap: GapSize

Defined in: nodes/geometry/rect-node.ts:31

Spacing between children along the layout's main axis.

Inherited from

RectProps.gap


height

height: SizeInput

Defined in: nodes/base/node.ts:152

Inherited from

RectProps.height


loop?

optional loop?: "reverse" | "none" | "forward"

Defined in: nodes/media/video-node.ts:49


matrix?

optional matrix?: ImageMatrix

Defined in: nodes/media/video-node.ts:33

Raw frame→shape matrix; bypasses crop/fit/zoom/anchor and the bounds.


muted?

optional muted?: boolean

Defined in: nodes/media/video-node.ts:55

Silence the video's audio track without affecting the picture. Default false.


opacity

opacity: number

Defined in: nodes/base/node.ts:166

Inherited from

RectProps.opacity


overlay?

optional overlay?: Fill

Defined in: nodes/geometry/shape-node.ts:38

Overlay layer(s) — the same loose values as fill, but painted over this node's fill and its children (clipped to the node's silhouette) while still sitting under the stroke. Use for textures laid across the whole subtree, e.g. a VHS-grain image or video.

Inherited from

RectProps.overlay


padding

padding: Insets

Defined in: nodes/base/node.ts:171

Inner spacing between this node's edges and its content/children.

Inherited from

RectProps.padding


pivot

pivot: Anchor

Defined in: nodes/base/node.ts:201

Pivot point for rotation and scale. Either a named anchor ('center', 'topRight', 'bottomLeft', … — the node align vocabulary) or an explicit Vector2: (0,0)=center, (-1,1)=top-left, (1,-1)=bottom-right. Set automatically when an anchor positioning prop is used.

Inherited from

RectProps.pivot


playing?

optional playing?: boolean

Defined in: nodes/media/video-node.ts:37

Whether playback advances with the node's clock (drives both picture and sound). Default true.


relativeToParent

relativeToParent: RelativeToParent

Defined in: nodes/base/node.ts:187

This node's own override of its parent's childPositioning. 'inherit' (default) takes whatever the parent declared; 'relative' and 'absolute' opt this one node in or out regardless.

Inherited from

RectProps.relativeToParent


rotation

rotation: number

Defined in: nodes/base/node.ts:165

Inherited from

RectProps.rotation


row

row: number

Defined in: nodes/base/node.ts:232

1-based row index for explicit grid placement. Undefined = auto-placed.

Inherited from

RectProps.row


rowSpan

rowSpan: number

Defined in: nodes/base/node.ts:236

How many grid rows this child spans. Default 1.

Inherited from

RectProps.rowSpan


scale

scale: number

Defined in: nodes/base/node.ts:164

Inherited from

RectProps.scale


seed

seed: string | number

Defined in: nodes/base/node.ts:245

Origin seed for this node's Node.random source. Defaults to 0. Set it to give the node a reproducible-but-distinct random stream without re-seeding by hand. The constructor adopts it as random's origin, and the runtime rebuilds the node each playback pass, so draws stay reproducible across scrub/precomp/HMR.

Inherited from

RectProps.seed


shadow?

optional shadow?: Shadow

Defined in: nodes/geometry/shape-node.ts:50

Shadow layer(s): a single ShadowProp, an array of them, or an already-resolved shadow. fill inside each shadow accepts the same loose values as the top-level fill prop.

Inherited from

RectProps.shadow


size

size: SizeInput

Defined in: nodes/base/node.ts:163

Sets width and height to the same value in one go. Pure sugar: at construction time, an author-facing size is expanded into width/ height before either is applied. Explicit width or height takes precedence over size (mirroring padding's side-vs-shorthand rule), so { size: 200, width: 100 } yields width: 100, height: 200. Reactive bindings and to()/set() targets both work the same as width/heightsize: 'fill', size: () => ..., or node.to({ size: 300 }, 0.5) are all valid.

Inherited from

RectProps.size


speed?

optional speed?: number

Defined in: nodes/media/video-node.ts:48

Playback-rate multiplier for both picture and audio. Default 1.


src?

optional src?: string

Defined in: nodes/media/video-node.ts:23


start?

optional start?: number

Defined in: nodes/geometry/shape-node.ts:51

Inherited from

RectProps.start


stroke?

optional stroke?: Stroke

Defined in: nodes/geometry/shape-node.ts:44

Stroke layer(s): a single StrokeProp, an array of them, or an already-resolved stroke. fill inside each stroke accepts the same loose values as the top-level fill prop.

Inherited from

RectProps.stroke


timestamp?

optional timestamp?: number | null

Defined in: nodes/media/video-node.ts:44

Explicit source time to show, in seconds. Omit it (the default) and the picture is timed from the moment this node appeared; set it to drive the playhead yourself, and set it to null to hand the playhead back to the clock (set() merges a partial, so undefined won't clear it).


topCenter

topCenter: Vector2 | (() => Vector2)

Defined in: nodes/base/node.ts:213

Inherited from

RectProps.topCenter


topLeft

topLeft: Vector2 | (() => Vector2)

Defined in: nodes/base/node.ts:209

Inherited from

RectProps.topLeft


topRight

topRight: Vector2 | (() => Vector2)

Defined in: nodes/base/node.ts:210

Inherited from

RectProps.topRight


trimEnd?

optional trimEnd?: number

Defined in: nodes/media/video-node.ts:46


trimStart?

optional trimStart?: number

Defined in: nodes/media/video-node.ts:45


volume?

optional volume?: number

Defined in: nodes/media/video-node.ts:53

Audio volume in [0, 1]. Default 1.


width

width: SizeInput

Defined in: nodes/base/node.ts:151

Inherited from

RectProps.width


x

x: number

Defined in: nodes/base/node.ts:149

Inherited from

RectProps.x


y

y: number

Defined in: nodes/base/node.ts:150

Inherited from

RectProps.y


zoom?

optional zoom?: number

Defined in: nodes/media/video-node.ts:29

Magnification on top of the fitted scale. 1 (default) is the fitted size.