Assets

Asset

Composition Diagram for Asset Asset Visual Object Precomposition Image
Attribute Type Title Description
nm string

Name

Human readable name, as seen from editors and the like

id string

ID

Unique identifier used by layers when referencing this asset

Precomposition

Asset containing a composition that can be referenced by layers.

Composition Diagram for Precomposition Precomposition Asset Composition Visual Object
Attribute Type Title Description
nm string

Name

Human readable name, as seen from editors and the like

id string

ID

Unique identifier used by layers when referencing this asset

layers array of Layer

Layers

Layers

Image

Asset containing an image that can be referenced by layers.

Image formats supported vary depending on the player. Some commonly supported formats are JPEG, GIF, PNG and SVG.

Composition Diagram for Image Image Asset Slottable Object Visual Object
Attribute Type Title Description
nm string

Name

Human readable name, as seen from editors and the like

id string

ID

Unique identifier used by layers when referencing this asset

sid string

Slot Id

Identifier to look up the slot

w number

Width

Width of the image

h number

Height

Height of the image

p string

File Name

Name of the image file or a data url

u string

File Path

Path to the image file

e 0-1 integer

Embedded

If '1', 'p' is a Data URL

If the dimensions of the image asset does not match the size given by w and h, renderers MUST ensure image layers referencing that asset do not have any visuals exceeding the w-h size. It's RECOMMENDED they scale the image maintaining its aspect ratio and they center it within the (0,0), (w,h) box.

Even if an image asset does not have any intrinsic size, its contents MUST still stay within the w-h bounds when rendered.

Authoring tools SHOULD export files where w and h match the physical size of the assets.