Platform
Resources
Pricing
Sign in
Contact us
Andrew Wooldridge
📜JavaScript developer. 🐲RPG fan. 📚Storyteller and 🕹game developer. 👨Father and Husband.
Workspace
Fork
Published
By
Andrew Wooldridge
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.
Try it for free
Learn more
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
kaboom
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML