Skip to main content

SignBoardOptions

interface SignBoardOptions

SignBoardOptions#

PARAMETERTYPEOPTIONALDEFAULTDESCRIPTION
contentType"image" | "video" | "text"✔️"image"A type of content
contentAttribsobject✔️{}Additional attributes for image / video element (if you need it)
frameRatenumber✔️60A number of rendering frames per second for video / text
autoResizeboolean✔️trueEnabling this option will make SignBoard to call resize whenever window's resize event is triggered
autoInitboolean✔️trueIf false is given, SignBoard will not automatically initialize immediately after creating instance
tileSizenumber✔️8A size of each tile blocks, in px
emissionnumber✔️1.5LED light emission modifier, bigger the brighter. emission: 1 will render the original color of the contents
dissipationnumber✔️0.5A value indicating how fast light fades out from the center of each tiles
bulbSizenumber✔️0.7A lightbulb's size inside each tiles
objectFitstring✔️"fill"The object-fit CSS property sets how the content of a replaced element, such as an <img> or <video>, should be resized to fit its container.
See https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit for details
textOptionsobject✔️{}Canvas's 2D context attributes for customizing texts
textPaddingnumber | Array<number>✔️0A padding values that will be used for rendering text
scrollSpeednumber✔️0A horizontal scroll speed (right to left)
initOnFontLoadboolean✔️falseA option that can be used when you're using a custom font that should be loaded before initializing.
Enabling this option will make SignBoard to call init after when the font described in textOptions.font is loaded.