17 lines
473 B
JavaScript
17 lines
473 B
JavaScript
//Create the renderer
|
|
var renderer = PIXI.autoDetectRenderer(256, 256);
|
|
|
|
//Add the canvas to the HTML document
|
|
document.body.appendChild(renderer.view);
|
|
|
|
//Create a container object called the `stage`
|
|
var stage = new PIXI.Container();
|
|
|
|
//Tell the `renderer` to `render` the `stage`
|
|
renderer.render(stage);
|
|
|
|
renderer.view.style.position = "absolute";
|
|
renderer.view.style.display = "block";
|
|
renderer.autoResize = true;
|
|
renderer.resize(window.innerWidth, window.innerHeight);
|