diff --git a/README.md b/README.md index 1993a75..c62ef86 100644 --- a/README.md +++ b/README.md @@ -88,16 +88,16 @@ $> grunt This will create a minified version at bin/pixi.js and a non-minified version at bin/pixi.dev.js. -It also copies the non-minified version to the examples. +It also copies the non-minified version to the examples. ### Current features ### -- WebGL renderer (with automatic smart batching allowing for REALLY fast performance) +- WebGL renderer (with automatic smart batching allowing for REALLY fast performance) - Canvas renderer (Fastest in town!) -- Full scene graph -- Super easy to use API (similar to the flash display list API) -- Support for texture atlases -- Asset loader / sprite sheet loader +- Full scene graph +- Super easy to use API (similar to the flash display list API) +- Support for texture atlases +- Asset loader / sprite sheet loader - Auto-detect which renderer should be used - Full Mouse and Multi-touch Interaction - Text @@ -120,32 +120,32 @@ It also copies the non-minified version to the examples. ### Usage ### ```javascript - + // You can use either PIXI.WebGLRenderer or PIXI.CanvasRenderer - var renderer = new PIXI.WebGLRenderer(800, 600); + var renderer = new PIXI.WebGLRenderer(800, 600); document.body.appendChild(renderer.view); - + var stage = new PIXI.Stage; var bunnyTexture = PIXI.Texture.fromImage("bunny.png"); var bunny = new PIXI.Sprite(bunnyTexture); - + bunny.position.x = 400; bunny.position.y = 300; - + bunny.scale.x = 2; bunny.scale.y = 2; - + stage.addChild(bunny); - + requestAnimationFrame(animate); - + function animate() { bunny.rotation += 0.01; - + renderer.render(stage); - + requestAnimationFrame(animate); } ``` diff --git a/examples/example 1 - Basics/index.html b/examples/example 1 - Basics/index.html index 543a6db..1e85ddc 100644 --- a/examples/example 1 - Basics/index.html +++ b/examples/example 1 - Basics/index.html @@ -14,41 +14,41 @@
@@ -38,7 +38,7 @@ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(wf, s); })(); - + function runList(item) { console.log(">>>>>>>>>") @@ -52,15 +52,15 @@ tmp = tmp._iNext; console.log(tmp);//.childIndex); // console.log(tmp); - + if(safe > 100) { console.log("BREAK") break } - } + } } - + function init() { var assetsToLoader = ["desyrel.xml"]; @@ -72,24 +72,24 @@ loader.onComplete = onAssetsLoaded; //begin load - + // create an new instance of a pixi stage var stage = new PIXI.Stage(0x66FF99); - + loader.load(); function onAssetsLoaded() { var bitmapFontText = new PIXI.BitmapText("bitmap fonts are\n now supported!", {font: "35px Desyrel", align: "right"}); bitmapFontText.position.x = 620 - bitmapFontText.width - 20; bitmapFontText.position.y = 20; - + runList(bitmapFontText) stage.addChild(bitmapFontText); } - + // add a shiney background.. var background = PIXI.Sprite.fromImage("textDemoBG.jpg"); @@ -101,7 +101,7 @@ document.body.appendChild(renderer.view); requestAnimFrame(animate); - + // create some white text using the Snippet webfont var textSample = new PIXI.Text("Pixi.js can has\nmultiline text!", {font: "35px Snippet", fill: "white", align: "left"}); textSample.position.x = 20; @@ -119,11 +119,11 @@ countingText.position.x = 620 / 2; countingText.position.y = 320; countingText.anchor.x = 0.5; - + stage.addChild(textSample); stage.addChild(spinningText); stage.addChild(countingText); - + var count = 0; var score = 0; @@ -137,16 +137,16 @@ score++; // update the text... countingText.setText("COUNT 4EVAR: " + score); - + } // just for fun, lets rotate the text spinningText.rotation += 0.03; - - // render the stage + + // render the stage renderer.render(stage); } } - + diff --git a/examples/example 11 - RenderTexture/index.html b/examples/example 11 - RenderTexture/index.html index 4020156..367a309 100644 --- a/examples/example 11 - RenderTexture/index.html +++ b/examples/example 11 - RenderTexture/index.html @@ -9,71 +9,71 @@ background-color: #000000; } - - + + - + - + @@ -39,7 +39,7 @@ renderer = PIXI.autoDetectRenderer(w, h); stage = new PIXI.Stage; - + document.body.appendChild(renderer.view); for (var i = 0; i < starCount; i++) @@ -77,10 +77,10 @@ { w = $(window).width() - 16; h = $(window).height() - 16; - + slideX = w / 2; slideY = h / 2; - + renderer.resize(w, h); } diff --git a/examples/example 5 - Morph/index.html b/examples/example 5 - Morph/index.html index 0c8c5c3..85cdf2b 100755 --- a/examples/example 5 - Morph/index.html +++ b/examples/example 5 - Morph/index.html @@ -4,7 +4,7 @@