Skip to content

Component ​

A container of storyboard objects.

Example:

ts
const component = new Component({
  children: [
    new Sprite({
      path: 'anim.png',
      layer: 'Background',
      origin: 'Centre',
      position: [320, 240],
    }),
  ],
})

Constructor details ​

Overloads:

ts
new Component()
ts
new Component({ children })
  • Parameters:
    • children (Component | Graphic | Sample)[] | undefined (Component, Graphic, Sample) : List of child storyboard objects. Defaults to undefined.

Properties ​

children ​

List of child storyboard objects.

Methods ​

toFlatten() ​

Returns the flattened container tree.

toString() ​

Returns the string representation of this component.

  • Returns: string