LayerMixin

Mixin providing common layer properties and methods.

LayerMixin interface

Mixin providing common layer properties and methods.

Signature:

interface LayerMixin extends BaseNodeMixin, TransformMixin

Extends: BaseNodeMixin, TransformMixin

Remarks

Layers are timeline-based objects that exist within a specific frame range defined by startFrame and endFrame. They can contain shapes and have animatable transform properties. Unlike shapes, layers have their own timeline that can be offset independently from their parent scene.

Properties

Property

Modifiers

Type

Description

blendMode

BlendMode

The blend mode of this layer

endFrame

number

The frame number at which the layer stops being visible

focused

boolean

Whether the layer is focused

isMatte

boolean

Whether this layer acts as a matte for another layer

locked

boolean

Whether the layer is locked (prevents the user from editing it)

masks

readonly

ReadonlyArray<Mask>

An array of masks applied to this layer

matte?

Matte | undefined

(Optional) The matte applied onto this layer, if any

opacity

readonly

Animatable<number>

Opacity of this layer (0 to 100)

parent?

readonly

Parent<Layer> | undefined

(Optional) The parent of this layer

startFrame

number

The frame number at which the layer starts being visible

timelineOffset

number

The offset for the layer's timeline in frames

visible

boolean

Whether the layer is visible

Methods

Method

Description

align(type)

Aligns this layer within its parent

createMask(opts)

Adds a mask to this layer

flip(type)

Flips this layer horizontally or vertically

moveBefore(sibling)

Moves this layer immediately before (visually above) the given sibling in render order. Both layers must be in the same scene.

moveAfter(sibling)

Moves this layer immediately after (visually below) the given sibling in render order. Both layers must be in the same scene.

bringToFront()

Moves this layer to the top of the render stack (foreground).

sendToBack()

Moves this layer to the bottom of the render stack (background).

shiftTo(frame)

Shifts the layer's timeline so it starts at the given frame, adjusting startFrame, endFrame, timelineOffset, and all keyframes together.

Last updated: August 5, 2026 at 11:47 AMEdit this page