Skip to main content

SignBoard

class SignBoard

WebGL-based LED SignBoard effect for image / video / text

Constructor#

new SignBoard(canvas, src, options)
PARAMETERTYPEOPTIONALDEFAULTDESCRIPTION
canvasstring | HTMLElementCSS query selector or canvas element
srcstringSource URL to the image / video
optionsSignBoardOptionsโœ”๏ธ{}An options object

Properties#

src#

readonly

Current src of the image/video, or text string when the contentType is "text"

Type: string

initialized#

readonly

Whether the SignBoard#init is called

Type: boolean

contentType#

Current value of the contentType option

See:

contentAttribs#

Current value of the contentAttribs option

See:

autoResize#

Current value of the autoResize option

See:

autoInit#

readonly

Current value of the autoInit option

See:

frameRate#

Current value of the frameRate option

See:

tileSize#

Current value of the tileSize option

See:

emission#

Current value of the emission option

See:

dissipation#

Current value of the dissipation option

See:

bulbSize#

Current value of the bulbSize option

See:

objectFit#

Current value of the objectFit option

See:

textOptions#

Current value of the textOptions option

See:

textPadding#

Current value of the textPadding option

See:

scrollSpeed#

Current value of the scrollSpeed option

See:

initOnFontLoad#

readonly

Current value of the initOnFontLoad option

See:

Methods#

destroy#

Destroy the current instance, and release all resources

Returns: void

init#

async

Initialize SignBoard

Returns: Promise<SignBoard>

  • The current instance

resize#

Resize SignBoard with the latest size of the canvas

Returns: SignBoard

  • The current instance

start#

Start rendering

Returns: SignBoard

  • The current instance

stop#

Stop rendering

Returns: SignBoard

  • The current instance

update#

Update the texture

Returns: SignBoard

  • The current instance
PARAMETERTYPEOPTIONALDEFAULTDESCRIPTION
srcstringโœ”๏ธNew src to the image/video or text string if contentType is "text"