SolidLayer

As you might expect, a solid layer is a layer in the size and color of your choice. You create a solid layer when you need an opaque background for a nested composition. You can also use solids with masks to create graphic elements .

You can add text or other effects to a solid; you can mask a solid to create graphical elements (shown here); or you can use a solid as a solid-color background.

Represents a solid color fill layer.

Mapped field: ty

Mapped Field Value: 1

Hierarchy

Constructors

constructor

Properties

anchor

anchor: Property = new Property(this, PropertyType.ANCHOR)

autoOrient

autoOrient: boolean = false

blendMode

blendMode: BlendMode = BlendMode.NORMAL

classNames

classNames: string[] = []

effects

effects: any

height

height: number = 0

id

id: string = ""

inPoint

inPoint: number = 0

Optional index

index: undefined | number

is3D

is3D: boolean = false

name

name: string = ""

opacity

opacity: Property = new Property(this, PropertyType.OPACITY)

Optional orientation

outPoint

outPoint: number = 0

Protected parent

parent: any

position

position: Property = new Property(this, PropertyType.POSITION)

Optional rotation

Optional rotationX

Optional rotationY

Optional rotationZ

scale

scale: Property = new Property(this, PropertyType.SCALE)

solidColor

solidColor: string = "#000000"

solidHeight

solidHeight: number = 1

solidWidth

solidWidth: number = 1

startTime

startTime: number = 0

timeStretch

timeStretch: number = 1

Readonly type

type: SOLID = LayerType.SOLID

width

width: number = 0

Accessors

colors

  • get colors(): string[]

  • Returns string[]

    Array of colors.

totalFrames

  • get totalFrames(): number

  • Returns number

    Number of frames.

Methods

fromJSON

  • fromJSON(json: Record<string, any>): SolidLayer

  • Parameters

    • json: Record<string, any>

    Returns SolidLayer

    SolidLayer instance

toJSON

  • toJSON(): Record<string, any>

  • Returns Record<string, any>

    JSON object

Last updated