Skip to content

Commit

Permalink
Preparing to extend the Loader to handle script loading.
Browse files Browse the repository at this point in the history
  • Loading branch information
photonstorm committed Nov 26, 2013
1 parent e8646de commit 2fc5c89
Show file tree
Hide file tree
Showing 9 changed files with 422 additions and 263 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ Version 1.1.3 - in build
* Fixed: Math.normalizeAngle and Math.wrapAngle (thanks theJare)
* Fixed: Device.isTouch modified to test maxTouchPointers instead of MSPointer.
* Fixed: InputHandler.checkPointerOver now checks the visible status of the Sprite Group before processing.
* Fixed: The Sprite hulls (used for tile collision) were not being updated in sprite->sprite separations (thanks jcs)

* Updated: ArcadePhysics.updateMotion applies the dt to the velocity calculations as well as position now (thanks jcs)
* Updated: RequestAnimationFrame now retains the callbackID which is passed to cancelRequestAnimationFrame.
Expand All @@ -94,6 +95,7 @@ Version 1.1.3 - in build
* Updated: Skip preupdate/update for PIXI hierarchies in which an ancestor doesn't exist (thanks cocoademon)
* Updated: Loader.audio can now accept either an array of URL strings or a single URL string (thanks crazysam + kevinthompson)
* Updated: MSPointer updated to support IE11 by dropping the prefix from the event listeners.
* Updated: Device.cocoonJS added to detect if the game is running under Cocoon or a native browser.

You can view the complete Change Log for all previous versions at https://github.com/photonstorm/phaser/changelog.md

Expand Down
6 changes: 6 additions & 0 deletions examples/_site/examples.json
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,12 @@
"title": "render texture trail"
}
],
"filters": [
{
"file": "fire.js",
"title": "fire"
}
],
"games": [
{
"file": "breakout.js",
Expand Down
14 changes: 0 additions & 14 deletions examples/_site/view_full.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,7 @@
<script src="../src/pixi/extras/TilingSprite.js"></script>

<script src="../src/pixi/filters/AbstractFilter.js"></script>
<script src="../src/pixi/filters/BlurFilter.js"></script>
<script src="../src/pixi/filters/BlurXFilter.js"></script>
<script src="../src/pixi/filters/BlurYFilter.js"></script>
<script src="../src/pixi/filters/ColorMatrixFilter.js"></script>
<script src="../src/pixi/filters/CrossHatchFilter.js"></script>
<script src="../src/pixi/filters/DisplacementFilter.js"></script>
<script src="../src/pixi/filters/DotScreenFilter.js"></script>
<script src="../src/pixi/filters/FilterBlock.js"></script>
<script src="../src/pixi/filters/GrayFilter.js"></script>
<script src="../src/pixi/filters/InvertFilter.js"></script>
<script src="../src/pixi/filters/PixelateFilter.js"></script>
<script src="../src/pixi/filters/RGBSplitFilter.js"></script>
<script src="../src/pixi/filters/SepiaFilter.js"></script>
<script src="../src/pixi/filters/SmartBlurFilter.js"></script>
<script src="../src/pixi/filters/TwistFilter.js"></script>

<script src="../src/pixi/primitives/Graphics.js"></script>

Expand Down
14 changes: 0 additions & 14 deletions examples/_site/view_lite.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,7 @@
<script src="../src/pixi/extras/TilingSprite.js"></script>

<script src="../src/pixi/filters/AbstractFilter.js"></script>
<script src="../src/pixi/filters/BlurFilter.js"></script>
<script src="../src/pixi/filters/BlurXFilter.js"></script>
<script src="../src/pixi/filters/BlurYFilter.js"></script>
<script src="../src/pixi/filters/ColorMatrixFilter.js"></script>
<script src="../src/pixi/filters/CrossHatchFilter.js"></script>
<script src="../src/pixi/filters/DisplacementFilter.js"></script>
<script src="../src/pixi/filters/DotScreenFilter.js"></script>
<script src="../src/pixi/filters/FilterBlock.js"></script>
<script src="../src/pixi/filters/GrayFilter.js"></script>
<script src="../src/pixi/filters/InvertFilter.js"></script>
<script src="../src/pixi/filters/PixelateFilter.js"></script>
<script src="../src/pixi/filters/RGBSplitFilter.js"></script>
<script src="../src/pixi/filters/SepiaFilter.js"></script>
<script src="../src/pixi/filters/SmartBlurFilter.js"></script>
<script src="../src/pixi/filters/TwistFilter.js"></script>

<script src="../src/pixi/primitives/Graphics.js"></script>

Expand Down
33 changes: 33 additions & 0 deletions examples/filters/fire.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@

var game = new Phaser.Game(800, 600, Phaser.WEBGL, 'phaser-example', { preload: preload, create: create, update: update });

var background;
var filter;

function preload() {

game.load.image('phaser', 'assets/sprites/phaser2.png');

}

function create() {

var logo = game.add.sprite(game.world.centerX, game.world.centerY, 'phaser');
logo.anchor.setTo(0.5, 0.5);

background = game.add.sprite(0, 0);
background.width = 800;
background.height = 600;

filter = game.add.filter('Fire', 800, 600);
filter.alpha = 0.0;

background.filters = [filter];

}

function update() {

filter.update();

}
2 changes: 1 addition & 1 deletion filters/Tunnel.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Phaser.Filter.Tunnel = function (game) {

this.uniforms.alpha = { type: '1f', value: 1 }
this.uniforms.origin = { type: '1f', value: 2.0 }
this.uniforms.iChannel0 = { type: 'sampler2D', value: null, repeat: true }
this.uniforms.iChannel0 = { type: 'sampler2D', value: null, textureData: { repeat: true } }

this.fragmentSrc = [

Expand Down
Loading

0 comments on commit 2fc5c89

Please sign in to comment.