Options
All
  • Public
  • Public/Protected
  • All
Menu

AbstractPlacedArt is an abstract class which all arts with position and size extend.

collboard-modules-sdk

Hierarchy

Implements

  • IBoundingBoxData

Index

Constructors

Properties

artId: uuid

Unique identifier of each art

locked: boolean

Marks, whether art is locked

TODO: [✨] Maybe add is prefix

opacity?: number

Opacity of an art

Value is automatically used by ArtShell when rendering

Note: only works on 2D arts

rotation: any

Rotation of an art

Value is automatically used by ArtShell when rendering

Note: type needs to be overridden when extending

deprecated

use transform property instead

shift: IVectorData

Translation vector of art

deprecated

use transform property instead

Accessors

  • get acceptedAttributes(): string[]
  • Getter with list of attributes particular art supports

    Value is used to display a floating menu above selection

    deprecated

    Make it using IMaterial

    example

    public get acceptedAttributes() { return ["color", "size"]; }

    Returns string[]

  • get bottomLeft(): IVectorData
  • Position of bottom left corner of art (absolute including shift)

    Value is used mostly when making selection

    deprecated

    Make it using BoundingBox

    Returns IVectorData

  • get bottomRight(): IVectorData
  • Position of bottom right corner of art (absolute including shift)

    Value is used mostly when making selection

    deprecated

    Make it using BoundingBox

    abstract

    Returns IVectorData

  • get topLeft(): IVectorData
  • Position of top left corner of art (absolute including shift)

    Value is used mostly when making selection

    deprecated

    Make it using BoundingBox

    abstract

    Returns IVectorData

  • get topRight(): IVectorData
  • Position of top right corner of art (absolute including shift)

    Value is used mostly when making selection

    deprecated

    Make it using BoundingBox

    Returns IVectorData

  • get transform(): Transform
  • set transform(transformData: ITransformData): void
  • Get the transform which is created from a deprecated shift

    Returns Transform

  • Set the transform which is converted and saved as a deprecated shift

    Parameters

    • transformData: ITransformData

    Returns void

Methods

  • isNear(pointToTest: IVectorData): boolean
  • Function determining, whether a point is near the art

    Default implementation uses square bounding box

    deprecated

    Make it using BoundingBox - just only provide BoundingBoxand the calling will look like art.boundingBox.isNear(...)

    Parameters

    • pointToTest: IVectorData

    Returns boolean

  • Move art to by vector (= relative)

    deprecated

    use transform property instead

    Parameters

    • shift: IVectorData

    Returns AbstractPlacedArt

  • Move art to certain vector (= absolute)

    deprecated

    use transform property instead

    Parameters

    • shift: IVectorData

    Returns AbstractPlacedArt