npm i
npm run playground
This will bring up a server running the playground on port 3000. Have a look at the Example if you're looking for ideas. The sprite is already included in the playground.
Note: No need to call window.onload
, just create a new DemoGame()
after the definition.
See here