the game
1import kaplay from "kaplay";
2// import "kaplay/global"; // uncomment if you want to use without the k. prefix
3
4const k = kaplay();
5
6k.loadRoot("./"); // A good idea for Itch.io publishing later
7k.loadSprite("bean", "sprites/bean.png");
8
9k.add([k.pos(120, 80), k.sprite("bean")]);
10
11k.onClick(() => k.addKaboom(k.mousePos()));