Published
Edited
Apr 8, 2021
1 fork
Insert cell
Insert cell
Insert cell
html`
<canvas id="kb"></canvas>
`
Insert cell
kaboom = require('kaboomjs@0.1.0/src/kaboom.js').catch(() => window["kaboom"])
Insert cell
{
kaboom.init({
width: 480, // width of canvas
height: 480, // height of canvas
canvas: document.getElementById("kb"),
});
// define a scene
kaboom.scene("main", () => {

// add a text at position (100, 100)
kaboom.add([
kaboom.text("oh hi Kaboom!", 32),
kaboom.pos(50, 100),
]);

});
// start the game
kaboom.start("main");
}
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more