APPENDIX

image

Pixie Perilousness!—Complete Code

For your reference, here’s the complete code listing for the book’s final sample game: Pixie Perilousness!

The HTML Code

Following is the HTML container code that loads the main pixiePerilousness.js game file, along with the supporting helper libraries:

<!doctype html><meta charset="utf-8"><title>Pixie Perilousness!</title><body><script src="../library/plugins/pixi.js/bin/pixi.js"></script><script src="../library/tink/bin/tink.js"></script><script src="../library/PixiDust/bin/dust.js"></script><script src="../library/scaleToWindow/scaleToWindow.js"></script><script src="../library/spriteUtilities/bin/spriteUtilities.js"></script> ...

Get Learn Pixi.js: Create Great Interactive Graphics for Games and the Web now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.