Created
December 15, 2013 03:48
-
-
Save beakr/7968628 to your computer and use it in GitHub Desktop.
Pixi.js boilerplate.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function main() | |
{ | |
// We render our game with WebGL or canvas depending on the browser automatically | |
// with Pixi.js in our game renderer variable. | |
// | |
// Our game is 400x400 pixels because it will be made of 25x25 tiles measuring 16x16 | |
// pixels. | |
var gameRenderer = PIXI.autoDetectRenderer(400, 400); | |
document.body.appendChild(gameRenderer.view); | |
var level1 = new PIXI.Stage(0xFF0059); | |
var update = function() | |
{ | |
requestAnimFrame(update); | |
gameRenderer.render(level1); | |
} | |
requestAnimFrame(update); | |
} | |
main(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment