Quick Start
#
Creating InstanceFirst, you should put a canvas element inside your page.
<canvas id="signboard"></canvas>
Then initialize Sign instance with JavaScript after.
import SignBoard from "signboard";
const signboard = new SignBoard("#signboard", "URL_TO_YOUR_IMAGE/VIDEO", { contentType: "image", frameRate: 60, autoResize: true, tileSize: 8, emission: 1, bulbSize: 0.7});
#
Setting Background ColorsAt first, SignBoard's background is transparent like below:
You can add a wrapper to it, and change its color with CSS like background-color: #000
.
<div class="signboard-wrapper" style="background-color: #000;"> <canvas id="signboard"></canvas></div>
And of course, you can add more properties like paddings to customize it.
<div class="signboard-wrapper" style="background-color: #000; padding: 1em; border-radius: 10px;"> <canvas id="signboard"></canvas></div>