Published
Edited
Jun 26, 2021
Importers
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
{
yield html`<canvas id="kb"></canvas>`
let K= KABOOM({
width: 480, // width of canvas
height: 480, // height of canvas
canvas: document.getElementById("kb"),

});

K.scene("main", () => {
const logo = K.add([
K.sprite("kaboom-logo"),
K.pos(K.width() / 2, K.height() / 2),
K.scale(10),
K.rotate(0),
K.origin("center"),
]);
logo.action(() => {
logo.scale = Math.sin(K.time()) * 10;
logo.angle += K.dt();
});
});

K.loadSprite("kaboom-logo", await FileAttachment("image.png").url());
K.start("main");
}
Insert cell
Insert cell
import {copiable, style} from "@tmcw/copiable"
Insert cell
KABOOM = require('kaboom@0.5.1/dist/kaboom.js').catch(() => window["kaboom"])
Insert cell
style
Insert cell


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