~1 min read

Basic sprite

The smallest possible Phaser 4 example — load a texture and draw it once.

Basic sprite Phaser 4 · sandboxed

Notes

  • Phaser.AUTO picks WebGL where supported, else Canvas.
  • parent: 'game' mounts onto the <div id="game"> provided by the playground iframe.
  • The image is loaded over the network — the playground will show a brief blank canvas while it resolves.