Options
All
  • Public
  • Public/Protected
  • All
Menu

Art is a an object on the shared board This interface defines basic requirements of the art

Note: Arts that implements this are compliant with new art and attribute system

collboard-modules-sdk

Type parameters

Hierarchy

Implemented by

Index

Properties

appearance: TAppearance

What colors and textures are applied to the art

artId: uuid

Unique identifier of the art

  • If there is one art which is changed by user, the id is kept unchanged
  • When you make a copy or export+import the art, new id will be generated
moduleName: string
@x
shape: TShape

How the art looks inside without the colors and textures This will be different for each art Class

transform: Transform

Transform of the art relative to origin of the board It means position, rotation and scale of the art

Methods

  • render(isSelected: boolean, systems: ISystems): Promisable<Element>
  • Renders the art

    Note: This can be called many times a second when user is scrolling or not at all when art is out of screen so do not do a heavy stuff here

    Parameters

    • isSelected: boolean

      indicates, whether given art is currently within user selection

    • systems: ISystems

      contains all systems, which can be used

    Returns Promisable<Element>

    JSX.Element which can be in Promise This render should contain: - Root element must be which has prop of transform - material and shape should be included - When you are rendering the material you can use utils like textureToSvg