Initial tutorial setup

This commit is contained in:
Tyler Hallada 2017-02-19 01:52:53 -05:00
commit 566910bdcc
3 changed files with 30 additions and 0 deletions

10
index.html Normal file
View File

@ -0,0 +1,10 @@
<html lang="en">
<head>
<title>Pixi.js stuff</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pixi.js/4.2.2/pixi.min.js"></script>
<script src="tutorial.js"></script>
</body>
</html>

4
style.css Normal file
View File

@ -0,0 +1,4 @@
* {
padding: 0;
margin: 0;
}

16
tutorial.js Normal file
View File

@ -0,0 +1,16 @@
//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);