Scene
Represents a scene in the animation.
Scene interface
Represents a scene in the animation.
Signature:
interface Scene extends BaseAssetMixinExtends: BaseAssetMixin
Remarks
A scene represents a container for animation content. It defines dimensions, framerate, duration, and contain layers.
Example
const scene = creator.createScene({
name: "New Scene",
size: { width: 1920, height: 1080 },
framerate: 60,
duration: 5,
});Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
Background color of the scene | |||
number | Duration of the scene in seconds | ||
number | Frames per second | ||
| boolean | Whether this scene can be nested within other scenes. | |
| ReadonlyArray<Layer> | Array of layers in this scene | |
Dimensions of the scene in pixels | |||
| "SCENE" | Asset type |
Methods
Method | Description |
|---|---|
Creates a new image layer | |
Creates a scene layer from a source scene | |
Creates a new shape layer | |
Creates a new text layer | |
Import animations and images into the scene. |