From 566910bdcc6f5346ebf71f9f5b1c0cf2797de00c Mon Sep 17 00:00:00 2001 From: Tyler Hallada Date: Sun, 19 Feb 2017 01:52:53 -0500 Subject: [PATCH] Initial tutorial setup --- index.html | 10 ++++++++++ style.css | 4 ++++ tutorial.js | 16 ++++++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 index.html create mode 100644 style.css create mode 100644 tutorial.js diff --git a/index.html b/index.html new file mode 100644 index 0000000..e8ff138 --- /dev/null +++ b/index.html @@ -0,0 +1,10 @@ + + + Pixi.js stuff + + + + + + + diff --git a/style.css b/style.css new file mode 100644 index 0000000..dc02150 --- /dev/null +++ b/style.css @@ -0,0 +1,4 @@ +* { + padding: 0; + margin: 0; +} diff --git a/tutorial.js b/tutorial.js new file mode 100644 index 0000000..cd43715 --- /dev/null +++ b/tutorial.js @@ -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);