Published
Edited
Jun 6, 2021
Fork of Kaboom 0.5.1
Insert cell
Insert cell
Insert cell
<canvas id="kb"></canvas>

Insert cell
{
let K= KABOOM({
width: 480, // width of canvas
height: 480, // height of canvas
canvas: document.getElementById("kb"),
});

K.loadFont("CP437", await FileAttachment("CP437_9x16.png").url(), 9, 16, asciistring);
K.loadFont("aquarius" , await FileAttachment("aquarius_8x8.png").url(), 8,8, asciistring)
K.scene("main", () => {
// ...
K.add([
K.text("hello world ♥ with CP437 font will this show up?",32,{
font: "CP437"
}),
K.pos(0,100)
]);
K.add([
K.text("hello world with default font"),
K.pos(0,10)
]);

K.add([
K.text("aquarius font with ♥", 16, {
font: "aquarius"
}),
K.pos(0,40)
])
});

K.start("main");
}
Insert cell
asciistring = " ☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■"
Insert cell
<div style="background-color: red;"> ${await FileAttachment("CP437_9x16.png").image()}</div>
Insert cell
<div style="background-color:green;">${await FileAttachment("aquarius_8x8.png").image()}</div>
Insert cell
FileAttachment("kaboom.png").image()
Insert cell
FileAttachment("kaboom.png").url()
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