diff --git a/examples/example 10 - Text/index.html b/examples/example 10 - Text/index.html index 04870e9..dbc2969 100644 --- a/examples/example 10 - Text/index.html +++ b/examples/example 10 - Text/index.html @@ -14,8 +14,7 @@ diff --git a/examples/example 10 - Text/index.html b/examples/example 10 - Text/index.html index 04870e9..dbc2969 100644 --- a/examples/example 10 - Text/index.html +++ b/examples/example 10 - Text/index.html @@ -14,8 +14,7 @@ diff --git a/examples/example 15 - Filters/index.html b/examples/example 15 - Filters/index.html index 8186947..bab78a7 100644 --- a/examples/example 15 - Filters/index.html +++ b/examples/example 15 - Filters/index.html @@ -111,8 +111,6 @@ help.position.x = 10; stage.addChild(help); - requestAnimFrame(animate); - function animate() { bg.rotation += 0.01; bgFront.rotation -= 0.01; @@ -136,6 +134,8 @@ renderer.render(stage); requestAnimFrame(animate); } + + requestAnimFrame(animate); diff --git a/examples/example 10 - Text/index.html b/examples/example 10 - Text/index.html index 04870e9..dbc2969 100644 --- a/examples/example 10 - Text/index.html +++ b/examples/example 10 - Text/index.html @@ -14,8 +14,7 @@ diff --git a/examples/example 15 - Filters/index.html b/examples/example 15 - Filters/index.html index 8186947..bab78a7 100644 --- a/examples/example 15 - Filters/index.html +++ b/examples/example 15 - Filters/index.html @@ -111,8 +111,6 @@ help.position.x = 10; stage.addChild(help); - requestAnimFrame(animate); - function animate() { bg.rotation += 0.01; bgFront.rotation -= 0.01; @@ -136,6 +134,8 @@ renderer.render(stage); requestAnimFrame(animate); } + + requestAnimFrame(animate); diff --git a/examples/example 15 - Filters/indexAll.html b/examples/example 15 - Filters/indexAll.html index 0ccd6b3..539f3e4 100644 --- a/examples/example 15 - Filters/indexAll.html +++ b/examples/example 15 - Filters/indexAll.html @@ -16,7 +16,6 @@ diff --git a/examples/example 15 - Filters/index.html b/examples/example 15 - Filters/index.html index 8186947..bab78a7 100644 --- a/examples/example 15 - Filters/index.html +++ b/examples/example 15 - Filters/index.html @@ -111,8 +111,6 @@ help.position.x = 10; stage.addChild(help); - requestAnimFrame(animate); - function animate() { bg.rotation += 0.01; bgFront.rotation -= 0.01; @@ -136,6 +134,8 @@ renderer.render(stage); requestAnimFrame(animate); } + + requestAnimFrame(animate); diff --git a/examples/example 15 - Filters/indexAll.html b/examples/example 15 - Filters/indexAll.html index 0ccd6b3..539f3e4 100644 --- a/examples/example 15 - Filters/indexAll.html +++ b/examples/example 15 - Filters/indexAll.html @@ -16,7 +16,6 @@ @@ -92,9 +90,6 @@ viewHeight + dudeBoundsPadding * 2); var tick = 0; - - requestAnimationFrame(animate); - function animate() { // iterate through the dudes and update the positions @@ -104,7 +99,7 @@ dude.direction += dude.turningSpeed * 0.01; dude.position.x += Math.sin(dude.direction) * dude.speed; dude.position.y += Math.cos(dude.direction) * dude.speed; - dude.rotation = -dude.direction - Math.PI/2; + dude.rotation = -dude.direction - Math.PI / 2; // wrap the dudes by testing there bounds.. if (dude.position.x < dudeBounds.x) @@ -127,6 +122,7 @@ // request another animation frame... requestAnimationFrame(animate); } + requestAnimationFrame(animate); diff --git a/examples/example 10 - Text/index.html b/examples/example 10 - Text/index.html index 04870e9..dbc2969 100644 --- a/examples/example 10 - Text/index.html +++ b/examples/example 10 - Text/index.html @@ -14,8 +14,7 @@ diff --git a/examples/example 15 - Filters/index.html b/examples/example 15 - Filters/index.html index 8186947..bab78a7 100644 --- a/examples/example 15 - Filters/index.html +++ b/examples/example 15 - Filters/index.html @@ -111,8 +111,6 @@ help.position.x = 10; stage.addChild(help); - requestAnimFrame(animate); - function animate() { bg.rotation += 0.01; bgFront.rotation -= 0.01; @@ -136,6 +134,8 @@ renderer.render(stage); requestAnimFrame(animate); } + + requestAnimFrame(animate); diff --git a/examples/example 15 - Filters/indexAll.html b/examples/example 15 - Filters/indexAll.html index 0ccd6b3..539f3e4 100644 --- a/examples/example 15 - Filters/indexAll.html +++ b/examples/example 15 - Filters/indexAll.html @@ -16,7 +16,6 @@ @@ -92,9 +90,6 @@ viewHeight + dudeBoundsPadding * 2); var tick = 0; - - requestAnimationFrame(animate); - function animate() { // iterate through the dudes and update the positions @@ -104,7 +99,7 @@ dude.direction += dude.turningSpeed * 0.01; dude.position.x += Math.sin(dude.direction) * dude.speed; dude.position.y += Math.cos(dude.direction) * dude.speed; - dude.rotation = -dude.direction - Math.PI/2; + dude.rotation = -dude.direction - Math.PI / 2; // wrap the dudes by testing there bounds.. if (dude.position.x < dudeBounds.x) @@ -127,6 +122,7 @@ // request another animation frame... requestAnimationFrame(animate); } + requestAnimationFrame(animate); diff --git a/examples/example 18 - Batch/index.html b/examples/example 18 - Batch/index.html index 00693fc..b362509 100644 --- a/examples/example 18 - Batch/index.html +++ b/examples/example 18 - Batch/index.html @@ -37,10 +37,10 @@ // create an new instance of a pixi stage var stage = new PIXI.Stage(0xFFFFFF); - var particles = new PIXI.SpriteBatch(PIXI.Texture.fromImage("eggHead.png")); - stage.addChild(particles); + var sprites = new PIXI.SpriteBatch(); + stage.addChild(sprites); - var tints = [0XFFFFFF, 0XFFFBEE, 0XFFEEEE, 0XFADEED, 0XE8D4CD]; + var tints = [0xFFFFFF, 0xFFFBEE, 0xFFEEEE, 0xFADEED, 0xE8D4CD]; // create an array to store a refference to the fish in the pond var dudeArray = []; @@ -51,7 +51,7 @@ // create a new Sprite that uses the image name that we just generated as its source var dude = PIXI.Sprite.fromImage("tinyMaggot.png"); - dude.tint = Math.random() * 0XE8D4CD; + dude.tint = Math.random() * 0xE8D4CD; // set the anchor point so the the dude texture is centerd on the sprite dude.anchor.x = dude.anchor.y = 0.5; @@ -80,7 +80,7 @@ // finally we push the dude into the dudeArray so it it can be easily accessed later dudeArray.push(dude); - particles.addChild(dude); + sprites.addChild(dude); } // create a bounding box box for the little dudes @@ -91,8 +91,6 @@ viewHeight + dudeBoundsPadding * 2); var tick = 0; - requestAnimationFrame(animate); - function animate() { // iterate through the dude and update the position @@ -126,6 +124,8 @@ // request another animation frame.. requestAnimationFrame(animate); } + + requestAnimationFrame(animate); diff --git a/examples/example 10 - Text/index.html b/examples/example 10 - Text/index.html index 04870e9..dbc2969 100644 --- a/examples/example 10 - Text/index.html +++ b/examples/example 10 - Text/index.html @@ -14,8 +14,7 @@ diff --git a/examples/example 15 - Filters/index.html b/examples/example 15 - Filters/index.html index 8186947..bab78a7 100644 --- a/examples/example 15 - Filters/index.html +++ b/examples/example 15 - Filters/index.html @@ -111,8 +111,6 @@ help.position.x = 10; stage.addChild(help); - requestAnimFrame(animate); - function animate() { bg.rotation += 0.01; bgFront.rotation -= 0.01; @@ -136,6 +134,8 @@ renderer.render(stage); requestAnimFrame(animate); } + + requestAnimFrame(animate); diff --git a/examples/example 15 - Filters/indexAll.html b/examples/example 15 - Filters/indexAll.html index 0ccd6b3..539f3e4 100644 --- a/examples/example 15 - Filters/indexAll.html +++ b/examples/example 15 - Filters/indexAll.html @@ -16,7 +16,6 @@ @@ -92,9 +90,6 @@ viewHeight + dudeBoundsPadding * 2); var tick = 0; - - requestAnimationFrame(animate); - function animate() { // iterate through the dudes and update the positions @@ -104,7 +99,7 @@ dude.direction += dude.turningSpeed * 0.01; dude.position.x += Math.sin(dude.direction) * dude.speed; dude.position.y += Math.cos(dude.direction) * dude.speed; - dude.rotation = -dude.direction - Math.PI/2; + dude.rotation = -dude.direction - Math.PI / 2; // wrap the dudes by testing there bounds.. if (dude.position.x < dudeBounds.x) @@ -127,6 +122,7 @@ // request another animation frame... requestAnimationFrame(animate); } + requestAnimationFrame(animate); diff --git a/examples/example 18 - Batch/index.html b/examples/example 18 - Batch/index.html index 00693fc..b362509 100644 --- a/examples/example 18 - Batch/index.html +++ b/examples/example 18 - Batch/index.html @@ -37,10 +37,10 @@ // create an new instance of a pixi stage var stage = new PIXI.Stage(0xFFFFFF); - var particles = new PIXI.SpriteBatch(PIXI.Texture.fromImage("eggHead.png")); - stage.addChild(particles); + var sprites = new PIXI.SpriteBatch(); + stage.addChild(sprites); - var tints = [0XFFFFFF, 0XFFFBEE, 0XFFEEEE, 0XFADEED, 0XE8D4CD]; + var tints = [0xFFFFFF, 0xFFFBEE, 0xFFEEEE, 0xFADEED, 0xE8D4CD]; // create an array to store a refference to the fish in the pond var dudeArray = []; @@ -51,7 +51,7 @@ // create a new Sprite that uses the image name that we just generated as its source var dude = PIXI.Sprite.fromImage("tinyMaggot.png"); - dude.tint = Math.random() * 0XE8D4CD; + dude.tint = Math.random() * 0xE8D4CD; // set the anchor point so the the dude texture is centerd on the sprite dude.anchor.x = dude.anchor.y = 0.5; @@ -80,7 +80,7 @@ // finally we push the dude into the dudeArray so it it can be easily accessed later dudeArray.push(dude); - particles.addChild(dude); + sprites.addChild(dude); } // create a bounding box box for the little dudes @@ -91,8 +91,6 @@ viewHeight + dudeBoundsPadding * 2); var tick = 0; - requestAnimationFrame(animate); - function animate() { // iterate through the dude and update the position @@ -126,6 +124,8 @@ // request another animation frame.. requestAnimationFrame(animate); } + + requestAnimationFrame(animate); diff --git a/examples/example 2 - SpriteSheet/index.html b/examples/example 2 - SpriteSheet/index.html index 579f4ca..529568f 100644 --- a/examples/example 2 - SpriteSheet/index.html +++ b/examples/example 2 - SpriteSheet/index.html @@ -95,7 +95,6 @@ requestAnimFrame(animate); } - diff --git a/examples/example 10 - Text/index.html b/examples/example 10 - Text/index.html index 04870e9..dbc2969 100644 --- a/examples/example 10 - Text/index.html +++ b/examples/example 10 - Text/index.html @@ -14,8 +14,7 @@ diff --git a/examples/example 15 - Filters/index.html b/examples/example 15 - Filters/index.html index 8186947..bab78a7 100644 --- a/examples/example 15 - Filters/index.html +++ b/examples/example 15 - Filters/index.html @@ -111,8 +111,6 @@ help.position.x = 10; stage.addChild(help); - requestAnimFrame(animate); - function animate() { bg.rotation += 0.01; bgFront.rotation -= 0.01; @@ -136,6 +134,8 @@ renderer.render(stage); requestAnimFrame(animate); } + + requestAnimFrame(animate); diff --git a/examples/example 15 - Filters/indexAll.html b/examples/example 15 - Filters/indexAll.html index 0ccd6b3..539f3e4 100644 --- a/examples/example 15 - Filters/indexAll.html +++ b/examples/example 15 - Filters/indexAll.html @@ -16,7 +16,6 @@ @@ -92,9 +90,6 @@ viewHeight + dudeBoundsPadding * 2); var tick = 0; - - requestAnimationFrame(animate); - function animate() { // iterate through the dudes and update the positions @@ -104,7 +99,7 @@ dude.direction += dude.turningSpeed * 0.01; dude.position.x += Math.sin(dude.direction) * dude.speed; dude.position.y += Math.cos(dude.direction) * dude.speed; - dude.rotation = -dude.direction - Math.PI/2; + dude.rotation = -dude.direction - Math.PI / 2; // wrap the dudes by testing there bounds.. if (dude.position.x < dudeBounds.x) @@ -127,6 +122,7 @@ // request another animation frame... requestAnimationFrame(animate); } + requestAnimationFrame(animate); diff --git a/examples/example 18 - Batch/index.html b/examples/example 18 - Batch/index.html index 00693fc..b362509 100644 --- a/examples/example 18 - Batch/index.html +++ b/examples/example 18 - Batch/index.html @@ -37,10 +37,10 @@ // create an new instance of a pixi stage var stage = new PIXI.Stage(0xFFFFFF); - var particles = new PIXI.SpriteBatch(PIXI.Texture.fromImage("eggHead.png")); - stage.addChild(particles); + var sprites = new PIXI.SpriteBatch(); + stage.addChild(sprites); - var tints = [0XFFFFFF, 0XFFFBEE, 0XFFEEEE, 0XFADEED, 0XE8D4CD]; + var tints = [0xFFFFFF, 0xFFFBEE, 0xFFEEEE, 0xFADEED, 0xE8D4CD]; // create an array to store a refference to the fish in the pond var dudeArray = []; @@ -51,7 +51,7 @@ // create a new Sprite that uses the image name that we just generated as its source var dude = PIXI.Sprite.fromImage("tinyMaggot.png"); - dude.tint = Math.random() * 0XE8D4CD; + dude.tint = Math.random() * 0xE8D4CD; // set the anchor point so the the dude texture is centerd on the sprite dude.anchor.x = dude.anchor.y = 0.5; @@ -80,7 +80,7 @@ // finally we push the dude into the dudeArray so it it can be easily accessed later dudeArray.push(dude); - particles.addChild(dude); + sprites.addChild(dude); } // create a bounding box box for the little dudes @@ -91,8 +91,6 @@ viewHeight + dudeBoundsPadding * 2); var tick = 0; - requestAnimationFrame(animate); - function animate() { // iterate through the dude and update the position @@ -126,6 +124,8 @@ // request another animation frame.. requestAnimationFrame(animate); } + + requestAnimationFrame(animate); diff --git a/examples/example 2 - SpriteSheet/index.html b/examples/example 2 - SpriteSheet/index.html index 579f4ca..529568f 100644 --- a/examples/example 2 - SpriteSheet/index.html +++ b/examples/example 2 - SpriteSheet/index.html @@ -95,7 +95,6 @@ requestAnimFrame(animate); } - diff --git a/examples/example 3 - MovieClip/index.html b/examples/example 3 - MovieClip/index.html index 9ae42ae..9705c4b 100755 --- a/examples/example 3 - MovieClip/index.html +++ b/examples/example 3 - MovieClip/index.html @@ -50,21 +50,18 @@ explosionTextures.push(texture); }; - // create a texture from an image path - // add a bunch of aliens for (var i = 0; i < 50; i++) { // create an explosion MovieClip var explosion = new PIXI.MovieClip(explosionTextures); - explosion.position.x = Math.random() * 800; explosion.position.y = Math.random() * 600; explosion.anchor.x = 0.5; explosion.anchor.y = 0.5; explosion.rotation = Math.random() * Math.PI; - explosion.scale.x = explosion.scale.y = 0.75 + Math.random() * 0.5 + explosion.scale.x = explosion.scale.y = 0.75 + Math.random() * 0.5; explosion.gotoAndPlay(Math.random() * 27); @@ -73,17 +70,13 @@ // start animating requestAnimFrame( animate ); - - } function animate() { - - requestAnimFrame( animate ); - renderer.render(stage); - } + requestAnimFrame(animate); + } diff --git a/examples/example 10 - Text/index.html b/examples/example 10 - Text/index.html index 04870e9..dbc2969 100644 --- a/examples/example 10 - Text/index.html +++ b/examples/example 10 - Text/index.html @@ -14,8 +14,7 @@ diff --git a/examples/example 15 - Filters/index.html b/examples/example 15 - Filters/index.html index 8186947..bab78a7 100644 --- a/examples/example 15 - Filters/index.html +++ b/examples/example 15 - Filters/index.html @@ -111,8 +111,6 @@ help.position.x = 10; stage.addChild(help); - requestAnimFrame(animate); - function animate() { bg.rotation += 0.01; bgFront.rotation -= 0.01; @@ -136,6 +134,8 @@ renderer.render(stage); requestAnimFrame(animate); } + + requestAnimFrame(animate); diff --git a/examples/example 15 - Filters/indexAll.html b/examples/example 15 - Filters/indexAll.html index 0ccd6b3..539f3e4 100644 --- a/examples/example 15 - Filters/indexAll.html +++ b/examples/example 15 - Filters/indexAll.html @@ -16,7 +16,6 @@ @@ -92,9 +90,6 @@ viewHeight + dudeBoundsPadding * 2); var tick = 0; - - requestAnimationFrame(animate); - function animate() { // iterate through the dudes and update the positions @@ -104,7 +99,7 @@ dude.direction += dude.turningSpeed * 0.01; dude.position.x += Math.sin(dude.direction) * dude.speed; dude.position.y += Math.cos(dude.direction) * dude.speed; - dude.rotation = -dude.direction - Math.PI/2; + dude.rotation = -dude.direction - Math.PI / 2; // wrap the dudes by testing there bounds.. if (dude.position.x < dudeBounds.x) @@ -127,6 +122,7 @@ // request another animation frame... requestAnimationFrame(animate); } + requestAnimationFrame(animate); diff --git a/examples/example 18 - Batch/index.html b/examples/example 18 - Batch/index.html index 00693fc..b362509 100644 --- a/examples/example 18 - Batch/index.html +++ b/examples/example 18 - Batch/index.html @@ -37,10 +37,10 @@ // create an new instance of a pixi stage var stage = new PIXI.Stage(0xFFFFFF); - var particles = new PIXI.SpriteBatch(PIXI.Texture.fromImage("eggHead.png")); - stage.addChild(particles); + var sprites = new PIXI.SpriteBatch(); + stage.addChild(sprites); - var tints = [0XFFFFFF, 0XFFFBEE, 0XFFEEEE, 0XFADEED, 0XE8D4CD]; + var tints = [0xFFFFFF, 0xFFFBEE, 0xFFEEEE, 0xFADEED, 0xE8D4CD]; // create an array to store a refference to the fish in the pond var dudeArray = []; @@ -51,7 +51,7 @@ // create a new Sprite that uses the image name that we just generated as its source var dude = PIXI.Sprite.fromImage("tinyMaggot.png"); - dude.tint = Math.random() * 0XE8D4CD; + dude.tint = Math.random() * 0xE8D4CD; // set the anchor point so the the dude texture is centerd on the sprite dude.anchor.x = dude.anchor.y = 0.5; @@ -80,7 +80,7 @@ // finally we push the dude into the dudeArray so it it can be easily accessed later dudeArray.push(dude); - particles.addChild(dude); + sprites.addChild(dude); } // create a bounding box box for the little dudes @@ -91,8 +91,6 @@ viewHeight + dudeBoundsPadding * 2); var tick = 0; - requestAnimationFrame(animate); - function animate() { // iterate through the dude and update the position @@ -126,6 +124,8 @@ // request another animation frame.. requestAnimationFrame(animate); } + + requestAnimationFrame(animate); diff --git a/examples/example 2 - SpriteSheet/index.html b/examples/example 2 - SpriteSheet/index.html index 579f4ca..529568f 100644 --- a/examples/example 2 - SpriteSheet/index.html +++ b/examples/example 2 - SpriteSheet/index.html @@ -95,7 +95,6 @@ requestAnimFrame(animate); } - diff --git a/examples/example 3 - MovieClip/index.html b/examples/example 3 - MovieClip/index.html index 9ae42ae..9705c4b 100755 --- a/examples/example 3 - MovieClip/index.html +++ b/examples/example 3 - MovieClip/index.html @@ -50,21 +50,18 @@ explosionTextures.push(texture); }; - // create a texture from an image path - // add a bunch of aliens for (var i = 0; i < 50; i++) { // create an explosion MovieClip var explosion = new PIXI.MovieClip(explosionTextures); - explosion.position.x = Math.random() * 800; explosion.position.y = Math.random() * 600; explosion.anchor.x = 0.5; explosion.anchor.y = 0.5; explosion.rotation = Math.random() * Math.PI; - explosion.scale.x = explosion.scale.y = 0.75 + Math.random() * 0.5 + explosion.scale.x = explosion.scale.y = 0.75 + Math.random() * 0.5; explosion.gotoAndPlay(Math.random() * 27); @@ -73,17 +70,13 @@ // start animating requestAnimFrame( animate ); - - } function animate() { - - requestAnimFrame( animate ); - renderer.render(stage); - } + requestAnimFrame(animate); + } diff --git a/examples/example 4 - Balls/index.html b/examples/example 4 - Balls/index.html index 53c52fe..92514f2 100755 --- a/examples/example 4 - Balls/index.html +++ b/examples/example 4 - Balls/index.html @@ -16,7 +16,6 @@
SX: 0
SY: 0
diff --git a/examples/example 10 - Text/index.html b/examples/example 10 - Text/index.html index 04870e9..dbc2969 100644 --- a/examples/example 10 - Text/index.html +++ b/examples/example 10 - Text/index.html @@ -14,8 +14,7 @@ diff --git a/examples/example 15 - Filters/index.html b/examples/example 15 - Filters/index.html index 8186947..bab78a7 100644 --- a/examples/example 15 - Filters/index.html +++ b/examples/example 15 - Filters/index.html @@ -111,8 +111,6 @@ help.position.x = 10; stage.addChild(help); - requestAnimFrame(animate); - function animate() { bg.rotation += 0.01; bgFront.rotation -= 0.01; @@ -136,6 +134,8 @@ renderer.render(stage); requestAnimFrame(animate); } + + requestAnimFrame(animate); diff --git a/examples/example 15 - Filters/indexAll.html b/examples/example 15 - Filters/indexAll.html index 0ccd6b3..539f3e4 100644 --- a/examples/example 15 - Filters/indexAll.html +++ b/examples/example 15 - Filters/indexAll.html @@ -16,7 +16,6 @@ @@ -92,9 +90,6 @@ viewHeight + dudeBoundsPadding * 2); var tick = 0; - - requestAnimationFrame(animate); - function animate() { // iterate through the dudes and update the positions @@ -104,7 +99,7 @@ dude.direction += dude.turningSpeed * 0.01; dude.position.x += Math.sin(dude.direction) * dude.speed; dude.position.y += Math.cos(dude.direction) * dude.speed; - dude.rotation = -dude.direction - Math.PI/2; + dude.rotation = -dude.direction - Math.PI / 2; // wrap the dudes by testing there bounds.. if (dude.position.x < dudeBounds.x) @@ -127,6 +122,7 @@ // request another animation frame... requestAnimationFrame(animate); } + requestAnimationFrame(animate); diff --git a/examples/example 18 - Batch/index.html b/examples/example 18 - Batch/index.html index 00693fc..b362509 100644 --- a/examples/example 18 - Batch/index.html +++ b/examples/example 18 - Batch/index.html @@ -37,10 +37,10 @@ // create an new instance of a pixi stage var stage = new PIXI.Stage(0xFFFFFF); - var particles = new PIXI.SpriteBatch(PIXI.Texture.fromImage("eggHead.png")); - stage.addChild(particles); + var sprites = new PIXI.SpriteBatch(); + stage.addChild(sprites); - var tints = [0XFFFFFF, 0XFFFBEE, 0XFFEEEE, 0XFADEED, 0XE8D4CD]; + var tints = [0xFFFFFF, 0xFFFBEE, 0xFFEEEE, 0xFADEED, 0xE8D4CD]; // create an array to store a refference to the fish in the pond var dudeArray = []; @@ -51,7 +51,7 @@ // create a new Sprite that uses the image name that we just generated as its source var dude = PIXI.Sprite.fromImage("tinyMaggot.png"); - dude.tint = Math.random() * 0XE8D4CD; + dude.tint = Math.random() * 0xE8D4CD; // set the anchor point so the the dude texture is centerd on the sprite dude.anchor.x = dude.anchor.y = 0.5; @@ -80,7 +80,7 @@ // finally we push the dude into the dudeArray so it it can be easily accessed later dudeArray.push(dude); - particles.addChild(dude); + sprites.addChild(dude); } // create a bounding box box for the little dudes @@ -91,8 +91,6 @@ viewHeight + dudeBoundsPadding * 2); var tick = 0; - requestAnimationFrame(animate); - function animate() { // iterate through the dude and update the position @@ -126,6 +124,8 @@ // request another animation frame.. requestAnimationFrame(animate); } + + requestAnimationFrame(animate); diff --git a/examples/example 2 - SpriteSheet/index.html b/examples/example 2 - SpriteSheet/index.html index 579f4ca..529568f 100644 --- a/examples/example 2 - SpriteSheet/index.html +++ b/examples/example 2 - SpriteSheet/index.html @@ -95,7 +95,6 @@ requestAnimFrame(animate); } - diff --git a/examples/example 3 - MovieClip/index.html b/examples/example 3 - MovieClip/index.html index 9ae42ae..9705c4b 100755 --- a/examples/example 3 - MovieClip/index.html +++ b/examples/example 3 - MovieClip/index.html @@ -50,21 +50,18 @@ explosionTextures.push(texture); }; - // create a texture from an image path - // add a bunch of aliens for (var i = 0; i < 50; i++) { // create an explosion MovieClip var explosion = new PIXI.MovieClip(explosionTextures); - explosion.position.x = Math.random() * 800; explosion.position.y = Math.random() * 600; explosion.anchor.x = 0.5; explosion.anchor.y = 0.5; explosion.rotation = Math.random() * Math.PI; - explosion.scale.x = explosion.scale.y = 0.75 + Math.random() * 0.5 + explosion.scale.x = explosion.scale.y = 0.75 + Math.random() * 0.5; explosion.gotoAndPlay(Math.random() * 27); @@ -73,17 +70,13 @@ // start animating requestAnimFrame( animate ); - - } function animate() { - - requestAnimFrame( animate ); - renderer.render(stage); - } + requestAnimFrame(animate); + } diff --git a/examples/example 4 - Balls/index.html b/examples/example 4 - Balls/index.html index 53c52fe..92514f2 100755 --- a/examples/example 4 - Balls/index.html +++ b/examples/example 4 - Balls/index.html @@ -16,7 +16,6 @@
SX: 0
SY: 0
diff --git a/examples/example 5 - Morph/index.html b/examples/example 5 - Morph/index.html index dd246f7..1716043 100755 --- a/examples/example 5 - Morph/index.html +++ b/examples/example 5 - Morph/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 10 - Text/index.html b/examples/example 10 - Text/index.html index 04870e9..dbc2969 100644 --- a/examples/example 10 - Text/index.html +++ b/examples/example 10 - Text/index.html @@ -14,8 +14,7 @@ diff --git a/examples/example 15 - Filters/index.html b/examples/example 15 - Filters/index.html index 8186947..bab78a7 100644 --- a/examples/example 15 - Filters/index.html +++ b/examples/example 15 - Filters/index.html @@ -111,8 +111,6 @@ help.position.x = 10; stage.addChild(help); - requestAnimFrame(animate); - function animate() { bg.rotation += 0.01; bgFront.rotation -= 0.01; @@ -136,6 +134,8 @@ renderer.render(stage); requestAnimFrame(animate); } + + requestAnimFrame(animate); diff --git a/examples/example 15 - Filters/indexAll.html b/examples/example 15 - Filters/indexAll.html index 0ccd6b3..539f3e4 100644 --- a/examples/example 15 - Filters/indexAll.html +++ b/examples/example 15 - Filters/indexAll.html @@ -16,7 +16,6 @@ @@ -92,9 +90,6 @@ viewHeight + dudeBoundsPadding * 2); var tick = 0; - - requestAnimationFrame(animate); - function animate() { // iterate through the dudes and update the positions @@ -104,7 +99,7 @@ dude.direction += dude.turningSpeed * 0.01; dude.position.x += Math.sin(dude.direction) * dude.speed; dude.position.y += Math.cos(dude.direction) * dude.speed; - dude.rotation = -dude.direction - Math.PI/2; + dude.rotation = -dude.direction - Math.PI / 2; // wrap the dudes by testing there bounds.. if (dude.position.x < dudeBounds.x) @@ -127,6 +122,7 @@ // request another animation frame... requestAnimationFrame(animate); } + requestAnimationFrame(animate); diff --git a/examples/example 18 - Batch/index.html b/examples/example 18 - Batch/index.html index 00693fc..b362509 100644 --- a/examples/example 18 - Batch/index.html +++ b/examples/example 18 - Batch/index.html @@ -37,10 +37,10 @@ // create an new instance of a pixi stage var stage = new PIXI.Stage(0xFFFFFF); - var particles = new PIXI.SpriteBatch(PIXI.Texture.fromImage("eggHead.png")); - stage.addChild(particles); + var sprites = new PIXI.SpriteBatch(); + stage.addChild(sprites); - var tints = [0XFFFFFF, 0XFFFBEE, 0XFFEEEE, 0XFADEED, 0XE8D4CD]; + var tints = [0xFFFFFF, 0xFFFBEE, 0xFFEEEE, 0xFADEED, 0xE8D4CD]; // create an array to store a refference to the fish in the pond var dudeArray = []; @@ -51,7 +51,7 @@ // create a new Sprite that uses the image name that we just generated as its source var dude = PIXI.Sprite.fromImage("tinyMaggot.png"); - dude.tint = Math.random() * 0XE8D4CD; + dude.tint = Math.random() * 0xE8D4CD; // set the anchor point so the the dude texture is centerd on the sprite dude.anchor.x = dude.anchor.y = 0.5; @@ -80,7 +80,7 @@ // finally we push the dude into the dudeArray so it it can be easily accessed later dudeArray.push(dude); - particles.addChild(dude); + sprites.addChild(dude); } // create a bounding box box for the little dudes @@ -91,8 +91,6 @@ viewHeight + dudeBoundsPadding * 2); var tick = 0; - requestAnimationFrame(animate); - function animate() { // iterate through the dude and update the position @@ -126,6 +124,8 @@ // request another animation frame.. requestAnimationFrame(animate); } + + requestAnimationFrame(animate); diff --git a/examples/example 2 - SpriteSheet/index.html b/examples/example 2 - SpriteSheet/index.html index 579f4ca..529568f 100644 --- a/examples/example 2 - SpriteSheet/index.html +++ b/examples/example 2 - SpriteSheet/index.html @@ -95,7 +95,6 @@ requestAnimFrame(animate); } - diff --git a/examples/example 3 - MovieClip/index.html b/examples/example 3 - MovieClip/index.html index 9ae42ae..9705c4b 100755 --- a/examples/example 3 - MovieClip/index.html +++ b/examples/example 3 - MovieClip/index.html @@ -50,21 +50,18 @@ explosionTextures.push(texture); }; - // create a texture from an image path - // add a bunch of aliens for (var i = 0; i < 50; i++) { // create an explosion MovieClip var explosion = new PIXI.MovieClip(explosionTextures); - explosion.position.x = Math.random() * 800; explosion.position.y = Math.random() * 600; explosion.anchor.x = 0.5; explosion.anchor.y = 0.5; explosion.rotation = Math.random() * Math.PI; - explosion.scale.x = explosion.scale.y = 0.75 + Math.random() * 0.5 + explosion.scale.x = explosion.scale.y = 0.75 + Math.random() * 0.5; explosion.gotoAndPlay(Math.random() * 27); @@ -73,17 +70,13 @@ // start animating requestAnimFrame( animate ); - - } function animate() { - - requestAnimFrame( animate ); - renderer.render(stage); - } + requestAnimFrame(animate); + } diff --git a/examples/example 4 - Balls/index.html b/examples/example 4 - Balls/index.html index 53c52fe..92514f2 100755 --- a/examples/example 4 - Balls/index.html +++ b/examples/example 4 - Balls/index.html @@ -16,7 +16,6 @@
SX: 0
SY: 0
diff --git a/examples/example 5 - Morph/index.html b/examples/example 5 - Morph/index.html index dd246f7..1716043 100755 --- a/examples/example 5 - Morph/index.html +++ b/examples/example 5 - Morph/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 6 - Interactivity/index.html b/examples/example 6 - Interactivity/index.html index 0ea43eb..2d4a3a5 100644 --- a/examples/example 6 - Interactivity/index.html +++ b/examples/example 6 - Interactivity/index.html @@ -22,7 +22,6 @@ diff --git a/examples/example 10 - Text/index.html b/examples/example 10 - Text/index.html index 04870e9..dbc2969 100644 --- a/examples/example 10 - Text/index.html +++ b/examples/example 10 - Text/index.html @@ -14,8 +14,7 @@ diff --git a/examples/example 15 - Filters/index.html b/examples/example 15 - Filters/index.html index 8186947..bab78a7 100644 --- a/examples/example 15 - Filters/index.html +++ b/examples/example 15 - Filters/index.html @@ -111,8 +111,6 @@ help.position.x = 10; stage.addChild(help); - requestAnimFrame(animate); - function animate() { bg.rotation += 0.01; bgFront.rotation -= 0.01; @@ -136,6 +134,8 @@ renderer.render(stage); requestAnimFrame(animate); } + + requestAnimFrame(animate); diff --git a/examples/example 15 - Filters/indexAll.html b/examples/example 15 - Filters/indexAll.html index 0ccd6b3..539f3e4 100644 --- a/examples/example 15 - Filters/indexAll.html +++ b/examples/example 15 - Filters/indexAll.html @@ -16,7 +16,6 @@ @@ -92,9 +90,6 @@ viewHeight + dudeBoundsPadding * 2); var tick = 0; - - requestAnimationFrame(animate); - function animate() { // iterate through the dudes and update the positions @@ -104,7 +99,7 @@ dude.direction += dude.turningSpeed * 0.01; dude.position.x += Math.sin(dude.direction) * dude.speed; dude.position.y += Math.cos(dude.direction) * dude.speed; - dude.rotation = -dude.direction - Math.PI/2; + dude.rotation = -dude.direction - Math.PI / 2; // wrap the dudes by testing there bounds.. if (dude.position.x < dudeBounds.x) @@ -127,6 +122,7 @@ // request another animation frame... requestAnimationFrame(animate); } + requestAnimationFrame(animate); diff --git a/examples/example 18 - Batch/index.html b/examples/example 18 - Batch/index.html index 00693fc..b362509 100644 --- a/examples/example 18 - Batch/index.html +++ b/examples/example 18 - Batch/index.html @@ -37,10 +37,10 @@ // create an new instance of a pixi stage var stage = new PIXI.Stage(0xFFFFFF); - var particles = new PIXI.SpriteBatch(PIXI.Texture.fromImage("eggHead.png")); - stage.addChild(particles); + var sprites = new PIXI.SpriteBatch(); + stage.addChild(sprites); - var tints = [0XFFFFFF, 0XFFFBEE, 0XFFEEEE, 0XFADEED, 0XE8D4CD]; + var tints = [0xFFFFFF, 0xFFFBEE, 0xFFEEEE, 0xFADEED, 0xE8D4CD]; // create an array to store a refference to the fish in the pond var dudeArray = []; @@ -51,7 +51,7 @@ // create a new Sprite that uses the image name that we just generated as its source var dude = PIXI.Sprite.fromImage("tinyMaggot.png"); - dude.tint = Math.random() * 0XE8D4CD; + dude.tint = Math.random() * 0xE8D4CD; // set the anchor point so the the dude texture is centerd on the sprite dude.anchor.x = dude.anchor.y = 0.5; @@ -80,7 +80,7 @@ // finally we push the dude into the dudeArray so it it can be easily accessed later dudeArray.push(dude); - particles.addChild(dude); + sprites.addChild(dude); } // create a bounding box box for the little dudes @@ -91,8 +91,6 @@ viewHeight + dudeBoundsPadding * 2); var tick = 0; - requestAnimationFrame(animate); - function animate() { // iterate through the dude and update the position @@ -126,6 +124,8 @@ // request another animation frame.. requestAnimationFrame(animate); } + + requestAnimationFrame(animate); diff --git a/examples/example 2 - SpriteSheet/index.html b/examples/example 2 - SpriteSheet/index.html index 579f4ca..529568f 100644 --- a/examples/example 2 - SpriteSheet/index.html +++ b/examples/example 2 - SpriteSheet/index.html @@ -95,7 +95,6 @@ requestAnimFrame(animate); } - diff --git a/examples/example 3 - MovieClip/index.html b/examples/example 3 - MovieClip/index.html index 9ae42ae..9705c4b 100755 --- a/examples/example 3 - MovieClip/index.html +++ b/examples/example 3 - MovieClip/index.html @@ -50,21 +50,18 @@ explosionTextures.push(texture); }; - // create a texture from an image path - // add a bunch of aliens for (var i = 0; i < 50; i++) { // create an explosion MovieClip var explosion = new PIXI.MovieClip(explosionTextures); - explosion.position.x = Math.random() * 800; explosion.position.y = Math.random() * 600; explosion.anchor.x = 0.5; explosion.anchor.y = 0.5; explosion.rotation = Math.random() * Math.PI; - explosion.scale.x = explosion.scale.y = 0.75 + Math.random() * 0.5 + explosion.scale.x = explosion.scale.y = 0.75 + Math.random() * 0.5; explosion.gotoAndPlay(Math.random() * 27); @@ -73,17 +70,13 @@ // start animating requestAnimFrame( animate ); - - } function animate() { - - requestAnimFrame( animate ); - renderer.render(stage); - } + requestAnimFrame(animate); + } diff --git a/examples/example 4 - Balls/index.html b/examples/example 4 - Balls/index.html index 53c52fe..92514f2 100755 --- a/examples/example 4 - Balls/index.html +++ b/examples/example 4 - Balls/index.html @@ -16,7 +16,6 @@
SX: 0
SY: 0
diff --git a/examples/example 5 - Morph/index.html b/examples/example 5 - Morph/index.html index dd246f7..1716043 100755 --- a/examples/example 5 - Morph/index.html +++ b/examples/example 5 - Morph/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 6 - Interactivity/index.html b/examples/example 6 - Interactivity/index.html index 0ea43eb..2d4a3a5 100644 --- a/examples/example 6 - Interactivity/index.html +++ b/examples/example 6 - Interactivity/index.html @@ -22,7 +22,6 @@ diff --git a/examples/example 7 - Transparent Background/index.html b/examples/example 7 - Transparent Background/index.html index 019f645..e82bd32 100644 --- a/examples/example 7 - Transparent Background/index.html +++ b/examples/example 7 - Transparent Background/index.html @@ -26,12 +26,10 @@ blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah diff --git a/examples/example 10 - Text/index.html b/examples/example 10 - Text/index.html index 04870e9..dbc2969 100644 --- a/examples/example 10 - Text/index.html +++ b/examples/example 10 - Text/index.html @@ -14,8 +14,7 @@ diff --git a/examples/example 15 - Filters/index.html b/examples/example 15 - Filters/index.html index 8186947..bab78a7 100644 --- a/examples/example 15 - Filters/index.html +++ b/examples/example 15 - Filters/index.html @@ -111,8 +111,6 @@ help.position.x = 10; stage.addChild(help); - requestAnimFrame(animate); - function animate() { bg.rotation += 0.01; bgFront.rotation -= 0.01; @@ -136,6 +134,8 @@ renderer.render(stage); requestAnimFrame(animate); } + + requestAnimFrame(animate); diff --git a/examples/example 15 - Filters/indexAll.html b/examples/example 15 - Filters/indexAll.html index 0ccd6b3..539f3e4 100644 --- a/examples/example 15 - Filters/indexAll.html +++ b/examples/example 15 - Filters/indexAll.html @@ -16,7 +16,6 @@ @@ -92,9 +90,6 @@ viewHeight + dudeBoundsPadding * 2); var tick = 0; - - requestAnimationFrame(animate); - function animate() { // iterate through the dudes and update the positions @@ -104,7 +99,7 @@ dude.direction += dude.turningSpeed * 0.01; dude.position.x += Math.sin(dude.direction) * dude.speed; dude.position.y += Math.cos(dude.direction) * dude.speed; - dude.rotation = -dude.direction - Math.PI/2; + dude.rotation = -dude.direction - Math.PI / 2; // wrap the dudes by testing there bounds.. if (dude.position.x < dudeBounds.x) @@ -127,6 +122,7 @@ // request another animation frame... requestAnimationFrame(animate); } + requestAnimationFrame(animate); diff --git a/examples/example 18 - Batch/index.html b/examples/example 18 - Batch/index.html index 00693fc..b362509 100644 --- a/examples/example 18 - Batch/index.html +++ b/examples/example 18 - Batch/index.html @@ -37,10 +37,10 @@ // create an new instance of a pixi stage var stage = new PIXI.Stage(0xFFFFFF); - var particles = new PIXI.SpriteBatch(PIXI.Texture.fromImage("eggHead.png")); - stage.addChild(particles); + var sprites = new PIXI.SpriteBatch(); + stage.addChild(sprites); - var tints = [0XFFFFFF, 0XFFFBEE, 0XFFEEEE, 0XFADEED, 0XE8D4CD]; + var tints = [0xFFFFFF, 0xFFFBEE, 0xFFEEEE, 0xFADEED, 0xE8D4CD]; // create an array to store a refference to the fish in the pond var dudeArray = []; @@ -51,7 +51,7 @@ // create a new Sprite that uses the image name that we just generated as its source var dude = PIXI.Sprite.fromImage("tinyMaggot.png"); - dude.tint = Math.random() * 0XE8D4CD; + dude.tint = Math.random() * 0xE8D4CD; // set the anchor point so the the dude texture is centerd on the sprite dude.anchor.x = dude.anchor.y = 0.5; @@ -80,7 +80,7 @@ // finally we push the dude into the dudeArray so it it can be easily accessed later dudeArray.push(dude); - particles.addChild(dude); + sprites.addChild(dude); } // create a bounding box box for the little dudes @@ -91,8 +91,6 @@ viewHeight + dudeBoundsPadding * 2); var tick = 0; - requestAnimationFrame(animate); - function animate() { // iterate through the dude and update the position @@ -126,6 +124,8 @@ // request another animation frame.. requestAnimationFrame(animate); } + + requestAnimationFrame(animate); diff --git a/examples/example 2 - SpriteSheet/index.html b/examples/example 2 - SpriteSheet/index.html index 579f4ca..529568f 100644 --- a/examples/example 2 - SpriteSheet/index.html +++ b/examples/example 2 - SpriteSheet/index.html @@ -95,7 +95,6 @@ requestAnimFrame(animate); } - diff --git a/examples/example 3 - MovieClip/index.html b/examples/example 3 - MovieClip/index.html index 9ae42ae..9705c4b 100755 --- a/examples/example 3 - MovieClip/index.html +++ b/examples/example 3 - MovieClip/index.html @@ -50,21 +50,18 @@ explosionTextures.push(texture); }; - // create a texture from an image path - // add a bunch of aliens for (var i = 0; i < 50; i++) { // create an explosion MovieClip var explosion = new PIXI.MovieClip(explosionTextures); - explosion.position.x = Math.random() * 800; explosion.position.y = Math.random() * 600; explosion.anchor.x = 0.5; explosion.anchor.y = 0.5; explosion.rotation = Math.random() * Math.PI; - explosion.scale.x = explosion.scale.y = 0.75 + Math.random() * 0.5 + explosion.scale.x = explosion.scale.y = 0.75 + Math.random() * 0.5; explosion.gotoAndPlay(Math.random() * 27); @@ -73,17 +70,13 @@ // start animating requestAnimFrame( animate ); - - } function animate() { - - requestAnimFrame( animate ); - renderer.render(stage); - } + requestAnimFrame(animate); + } diff --git a/examples/example 4 - Balls/index.html b/examples/example 4 - Balls/index.html index 53c52fe..92514f2 100755 --- a/examples/example 4 - Balls/index.html +++ b/examples/example 4 - Balls/index.html @@ -16,7 +16,6 @@
SX: 0
SY: 0
diff --git a/examples/example 5 - Morph/index.html b/examples/example 5 - Morph/index.html index dd246f7..1716043 100755 --- a/examples/example 5 - Morph/index.html +++ b/examples/example 5 - Morph/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 6 - Interactivity/index.html b/examples/example 6 - Interactivity/index.html index 0ea43eb..2d4a3a5 100644 --- a/examples/example 6 - Interactivity/index.html +++ b/examples/example 6 - Interactivity/index.html @@ -22,7 +22,6 @@ diff --git a/examples/example 7 - Transparent Background/index.html b/examples/example 7 - Transparent Background/index.html index 019f645..e82bd32 100644 --- a/examples/example 7 - Transparent Background/index.html +++ b/examples/example 7 - Transparent Background/index.html @@ -26,12 +26,10 @@ blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah diff --git a/examples/example 8 - Dragging/index.html b/examples/example 8 - Dragging/index.html index 934f671..1cadbc7 100644 --- a/examples/example 8 - Dragging/index.html +++ b/examples/example 8 - Dragging/index.html @@ -14,9 +14,8 @@ diff --git a/examples/example 15 - Filters/index.html b/examples/example 15 - Filters/index.html index 8186947..bab78a7 100644 --- a/examples/example 15 - Filters/index.html +++ b/examples/example 15 - Filters/index.html @@ -111,8 +111,6 @@ help.position.x = 10; stage.addChild(help); - requestAnimFrame(animate); - function animate() { bg.rotation += 0.01; bgFront.rotation -= 0.01; @@ -136,6 +134,8 @@ renderer.render(stage); requestAnimFrame(animate); } + + requestAnimFrame(animate); diff --git a/examples/example 15 - Filters/indexAll.html b/examples/example 15 - Filters/indexAll.html index 0ccd6b3..539f3e4 100644 --- a/examples/example 15 - Filters/indexAll.html +++ b/examples/example 15 - Filters/indexAll.html @@ -16,7 +16,6 @@ @@ -92,9 +90,6 @@ viewHeight + dudeBoundsPadding * 2); var tick = 0; - - requestAnimationFrame(animate); - function animate() { // iterate through the dudes and update the positions @@ -104,7 +99,7 @@ dude.direction += dude.turningSpeed * 0.01; dude.position.x += Math.sin(dude.direction) * dude.speed; dude.position.y += Math.cos(dude.direction) * dude.speed; - dude.rotation = -dude.direction - Math.PI/2; + dude.rotation = -dude.direction - Math.PI / 2; // wrap the dudes by testing there bounds.. if (dude.position.x < dudeBounds.x) @@ -127,6 +122,7 @@ // request another animation frame... requestAnimationFrame(animate); } + requestAnimationFrame(animate); diff --git a/examples/example 18 - Batch/index.html b/examples/example 18 - Batch/index.html index 00693fc..b362509 100644 --- a/examples/example 18 - Batch/index.html +++ b/examples/example 18 - Batch/index.html @@ -37,10 +37,10 @@ // create an new instance of a pixi stage var stage = new PIXI.Stage(0xFFFFFF); - var particles = new PIXI.SpriteBatch(PIXI.Texture.fromImage("eggHead.png")); - stage.addChild(particles); + var sprites = new PIXI.SpriteBatch(); + stage.addChild(sprites); - var tints = [0XFFFFFF, 0XFFFBEE, 0XFFEEEE, 0XFADEED, 0XE8D4CD]; + var tints = [0xFFFFFF, 0xFFFBEE, 0xFFEEEE, 0xFADEED, 0xE8D4CD]; // create an array to store a refference to the fish in the pond var dudeArray = []; @@ -51,7 +51,7 @@ // create a new Sprite that uses the image name that we just generated as its source var dude = PIXI.Sprite.fromImage("tinyMaggot.png"); - dude.tint = Math.random() * 0XE8D4CD; + dude.tint = Math.random() * 0xE8D4CD; // set the anchor point so the the dude texture is centerd on the sprite dude.anchor.x = dude.anchor.y = 0.5; @@ -80,7 +80,7 @@ // finally we push the dude into the dudeArray so it it can be easily accessed later dudeArray.push(dude); - particles.addChild(dude); + sprites.addChild(dude); } // create a bounding box box for the little dudes @@ -91,8 +91,6 @@ viewHeight + dudeBoundsPadding * 2); var tick = 0; - requestAnimationFrame(animate); - function animate() { // iterate through the dude and update the position @@ -126,6 +124,8 @@ // request another animation frame.. requestAnimationFrame(animate); } + + requestAnimationFrame(animate); diff --git a/examples/example 2 - SpriteSheet/index.html b/examples/example 2 - SpriteSheet/index.html index 579f4ca..529568f 100644 --- a/examples/example 2 - SpriteSheet/index.html +++ b/examples/example 2 - SpriteSheet/index.html @@ -95,7 +95,6 @@ requestAnimFrame(animate); } - diff --git a/examples/example 3 - MovieClip/index.html b/examples/example 3 - MovieClip/index.html index 9ae42ae..9705c4b 100755 --- a/examples/example 3 - MovieClip/index.html +++ b/examples/example 3 - MovieClip/index.html @@ -50,21 +50,18 @@ explosionTextures.push(texture); }; - // create a texture from an image path - // add a bunch of aliens for (var i = 0; i < 50; i++) { // create an explosion MovieClip var explosion = new PIXI.MovieClip(explosionTextures); - explosion.position.x = Math.random() * 800; explosion.position.y = Math.random() * 600; explosion.anchor.x = 0.5; explosion.anchor.y = 0.5; explosion.rotation = Math.random() * Math.PI; - explosion.scale.x = explosion.scale.y = 0.75 + Math.random() * 0.5 + explosion.scale.x = explosion.scale.y = 0.75 + Math.random() * 0.5; explosion.gotoAndPlay(Math.random() * 27); @@ -73,17 +70,13 @@ // start animating requestAnimFrame( animate ); - - } function animate() { - - requestAnimFrame( animate ); - renderer.render(stage); - } + requestAnimFrame(animate); + } diff --git a/examples/example 4 - Balls/index.html b/examples/example 4 - Balls/index.html index 53c52fe..92514f2 100755 --- a/examples/example 4 - Balls/index.html +++ b/examples/example 4 - Balls/index.html @@ -16,7 +16,6 @@
SX: 0
SY: 0
diff --git a/examples/example 5 - Morph/index.html b/examples/example 5 - Morph/index.html index dd246f7..1716043 100755 --- a/examples/example 5 - Morph/index.html +++ b/examples/example 5 - Morph/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 6 - Interactivity/index.html b/examples/example 6 - Interactivity/index.html index 0ea43eb..2d4a3a5 100644 --- a/examples/example 6 - Interactivity/index.html +++ b/examples/example 6 - Interactivity/index.html @@ -22,7 +22,6 @@ diff --git a/examples/example 7 - Transparent Background/index.html b/examples/example 7 - Transparent Background/index.html index 019f645..e82bd32 100644 --- a/examples/example 7 - Transparent Background/index.html +++ b/examples/example 7 - Transparent Background/index.html @@ -26,12 +26,10 @@ blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah diff --git a/examples/example 8 - Dragging/index.html b/examples/example 8 - Dragging/index.html index 934f671..1cadbc7 100644 --- a/examples/example 8 - Dragging/index.html +++ b/examples/example 8 - Dragging/index.html @@ -14,9 +14,8 @@