LayerMixin
Mixin providing common layer properties and methods.
LayerMixin interface
Mixin providing common layer properties and methods.
Signature:
interface LayerMixin extends BaseNodeMixin, TransformMixinExtends: 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 |
|---|---|---|---|
The blend mode of this layer | |||
number | The frame number at which the layer stops being visible | ||
boolean | Whether the layer is focused | ||
boolean | Whether this layer acts as a matte for another layer | ||
boolean | Whether the layer is locked (prevents the user from editing it) | ||
| ReadonlyArray<Mask> | An array of masks applied to this layer | |
Matte | undefined | (Optional) The matte applied onto this layer, if any | ||
| Animatable<number> | Opacity of this layer (0 to 100) | |
| (Optional) The parent of this layer | ||
number | The frame number at which the layer starts being visible | ||
number | The offset for the layer's timeline in frames | ||
boolean | Whether the layer is visible |
Methods
Method | Description |
|---|---|
Aligns this layer within its parent | |
Adds a mask to this layer | |
Flips this layer horizontally or vertically | |
Moves this layer immediately before (visually above) the given sibling in render order. Both layers must be in the same scene. | |
Moves this layer immediately after (visually below) the given sibling in render order. Both layers must be in the same scene. | |
Moves this layer to the top of the render stack (foreground). | |
Moves this layer to the bottom of the render stack (background). | |
Shifts the layer's timeline so it starts at the given frame, adjusting |