Skip to content

Commit

Permalink
New Timer class and scale event updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
photonstorm committed Nov 24, 2013
1 parent 7d7aa79 commit 155c863
Show file tree
Hide file tree
Showing 12 changed files with 370 additions and 177 deletions.
1 change: 1 addition & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ module.exports = function (grunt) {
'src/tween/Tween.js',
'src/tween/Easing.js',
'src/time/Time.js',
'src/time/Timer.js',
'src/animation/AnimationManager.js',
'src/animation/Animation.js',
'src/animation/Frame.js',
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ Version 1.1.3 - in build
* New: Added Group.sort. You can now sort the Group based on any given numeric property (x, y, health), finally you can do depth-sorting :) Example created to show.
* New: Enhanced renderTexture so it can accept a Phaser.Group object and improved documentation and examples.
* New: Device.littleEndian boolean added. Only safe to use if the browser supports TypedArrays (which IE9 doesn't, but nearly all others do)
* New: You can now call game.sound.play() and simply pass it a key. The sound will play if the audio system is unlocked and optionally destroy itself on complete.
* New: Mouse.capture is a boolean. If set to true then DOM mouse events will have event.preventDefault() applied, if false they will propogate fully.

* Fixed: Lots of fixes to the TypeScript definitions file (many thanks gltovar)
* Fixed: Tilemap commands use specified layer when one given (thanks Izzimach)
Expand All @@ -79,7 +81,7 @@ Version 1.1.3 - in build
* Updated: Tided up the Graphics object (thanks BorisKozo)
* Updated: If running in Canvas mode and you have a render function it will save the context and reset the transform before running your render function.
* Updated: Sprite will now check the exists property of the Group it is in, if the Group.exists = false the Sprite won't update.
* Updated: Lots of documentation tweaks across various files such as Pointer and Color.
* Updated: Lots of documentation tweaks across various files such as Pointer, Sound and Color.
* Updated: If you specify 'null' as a Group parent it will now revert to using the World as the parent (before only 'undefined' worked)
* Updated: Skip preupdate/update for PIXI hierarchies in which an ancestor doesn't exist (thanks cocoademon)

Expand Down
301 changes: 155 additions & 146 deletions build/config.php
Original file line number Diff line number Diff line change
@@ -1,150 +1,159 @@
<?php
// All JS files in build order.
// Much easier for debugging re: line numbers
?>
<script src="../src/Intro.js"></script>
<script src="../src/pixi/Pixi.js"></script>
<script src="../src/Phaser.js"></script>
<script src="../src/utils/Utils.js"></script>

<script src="../src/pixi/core/Matrix.js"></script>
<script src="../src/pixi/core/Point.js"></script>
<script src="../src/pixi/core/Rectangle.js"></script>
<script src="../src/pixi/core/Polygon.js"></script>

<script src="../src/pixi/display/DisplayObject.js"></script>
<script src="../src/pixi/display/DisplayObjectContainer.js"></script>
<script src="../src/pixi/display/Sprite.js"></script>
<script src="../src/pixi/display/Stage.js"></script>

<script src="../src/pixi/extras/CustomRenderable.js"></script>
<script src="../src/pixi/extras/Strip.js"></script>
<script src="../src/pixi/extras/Rope.js"></script>
<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>

<script src="../src/pixi/renderers/canvas/CanvasGraphics.js"></script>
<script src="../src/pixi/renderers/canvas/CanvasRenderer.js"></script>

<script src="../src/pixi/renderers/webgl/PixiShader.js"></script>
<script src="../src/pixi/renderers/webgl/PrimitiveShader.js"></script>
<script src="../src/pixi/renderers/webgl/StripShader.js"></script>
<script src="../src/pixi/renderers/webgl/WebGLBatch.js"></script>
<script src="../src/pixi/renderers/webgl/WebGLFilterManager.js"></script>
<script src="../src/pixi/renderers/webgl/WebGLGraphics.js"></script>
<script src="../src/pixi/renderers/webgl/WebGLRenderer.js"></script>
<script src="../src/pixi/renderers/webgl/WebGLRenderGroup.js"></script>
<script src="../src/pixi/renderers/webgl/WebGLShaders.js"></script>

<script src="../src/pixi/text/BitmapText.js"></script>
<script src="../src/pixi/text/Text.js"></script>

<script src="../src/pixi/textures/BaseTexture.js"></script>
<script src="../src/pixi/textures/Texture.js"></script>

<script src="../src/pixi/utils/EventTarget.js"></script>
<script src="../src/pixi/utils/Polyk.js"></script>

<script src="../src/core/Camera.js"></script>
<script src="../src/core/State.js"></script>
<script src="../src/core/StateManager.js"></script>
<script src="../src/core/LinkedList.js"></script>
<script src="../src/core/Signal.js"></script>
<script src="../src/core/SignalBinding.js"></script>
<script src="../src/core/Filter.js"></script>
<script src="../src/core/Plugin.js"></script>
<script src="../src/core/PluginManager.js"></script>
<script src="../src/core/Stage.js"></script>
<script src="../src/core/Group.js"></script>
<script src="../src/core/World.js"></script>
<script src="../src/core/Game.js"></script>

<script src="../src/input/Input.js"></script>
<script src="../src/input/Key.js"></script>
<script src="../src/input/Keyboard.js"></script>
<script src="../src/input/Mouse.js"></script>
<script src="../src/input/MSPointer.js"></script>
<script src="../src/input/Pointer.js"></script>
<script src="../src/input/Touch.js"></script>
<script src="../src/input/InputHandler.js"></script>

<script src="../src/gameobjects/Events.js"></script>
<script src="../src/gameobjects/GameObjectFactory.js"></script>
<script src="../src/gameobjects/BitmapData.js"></script>
<script src="../src/gameobjects/Sprite.js"></script>
<script src="../src/gameobjects/TileSprite.js"></script>
<script src="../src/gameobjects/Text.js"></script>
<script src="../src/gameobjects/BitmapText.js"></script>
<script src="../src/gameobjects/Button.js"></script>
<script src="../src/gameobjects/Graphics.js"></script>
<script src="../src/gameobjects/RenderTexture.js"></script>

<script src="../src/system/Canvas.js"></script>
<script src="../src/system/StageScaleMode.js"></script>
<script src="../src/system/Device.js"></script>
<script src="../src/system/RequestAnimationFrame.js"></script>

<script src="../src/math/RandomDataGenerator.js"></script>
<script src="../src/math/Math.js"></script>
<script src="../src/math/QuadTree.js"></script>

<script src="../src/geom/Circle.js"></script>
<script src="../src/geom/Point.js"></script>
<script src="../src/geom/Rectangle.js"></script>

<script src="../src/net/Net.js"></script>

<script src="../src/tween/TweenManager.js"></script>
<script src="../src/tween/Tween.js"></script>
<script src="../src/tween/Easing.js"></script>

<script src="../src/time/Time.js"></script>

<script src="../src/animation/AnimationManager.js"></script>
<script src="../src/animation/Animation.js"></script>
<script src="../src/animation/Frame.js"></script>
<script src="../src/animation/FrameData.js"></script>
<script src="../src/animation/AnimationParser.js"></script>

<script src="../src/loader/Cache.js"></script>
<script src="../src/loader/Loader.js"></script>
<script src="../src/loader/LoaderParser.js"></script>

<script src="../src/sound/Sound.js"></script>
<script src="../src/sound/SoundManager.js"></script>

<script src="../src/utils/Debug.js"></script>
<script src="../src/utils/Color.js"></script>

<script src="../src/physics/arcade/ArcadePhysics.js"></script>
<script src="../src/physics/arcade/Body.js"></script>

<script src="../src/particles/Particles.js"></script>
<script src="../src/particles/arcade/ArcadeParticles.js"></script>
<script src="../src/particles/arcade/Emitter.js"></script>

<script src="../src/tilemap/Tile.js"></script>
<script src="../src/tilemap/Tilemap.js"></script>
<script src="../src/tilemap/TilemapLayer.js"></script>
<script src="../src/tilemap/TilemapParser.js"></script>
<script src="../src/tilemap/Tileset.js"></script>
if (!isset($path))
{
$path = '..';
}

echo <<<EOL
<script src="$path/src/Intro.js"></script>
<script src="$path/src/pixi/Pixi.js"></script>
<script src="$path/src/Phaser.js"></script>
<script src="$path/src/utils/Utils.js"></script>
<script src="$path/src/pixi/core/Matrix.js"></script>
<script src="$path/src/pixi/core/Point.js"></script>
<script src="$path/src/pixi/core/Rectangle.js"></script>
<script src="$path/src/pixi/core/Polygon.js"></script>
<script src="$path/src/pixi/display/DisplayObject.js"></script>
<script src="$path/src/pixi/display/DisplayObjectContainer.js"></script>
<script src="$path/src/pixi/display/Sprite.js"></script>
<script src="$path/src/pixi/display/Stage.js"></script>
<script src="$path/src/pixi/extras/CustomRenderable.js"></script>
<script src="$path/src/pixi/extras/Strip.js"></script>
<script src="$path/src/pixi/extras/Rope.js"></script>
<script src="$path/src/pixi/extras/TilingSprite.js"></script>
<script src="$path/src/pixi/filters/AbstractFilter.js"></script>
<script src="$path/src/pixi/filters/BlurFilter.js"></script>
<script src="$path/src/pixi/filters/BlurXFilter.js"></script>
<script src="$path/src/pixi/filters/BlurYFilter.js"></script>
<script src="$path/src/pixi/filters/ColorMatrixFilter.js"></script>
<script src="$path/src/pixi/filters/CrossHatchFilter.js"></script>
<script src="$path/src/pixi/filters/DisplacementFilter.js"></script>
<script src="$path/src/pixi/filters/DotScreenFilter.js"></script>
<script src="$path/src/pixi/filters/FilterBlock.js"></script>
<script src="$path/src/pixi/filters/GrayFilter.js"></script>
<script src="$path/src/pixi/filters/InvertFilter.js"></script>
<script src="$path/src/pixi/filters/PixelateFilter.js"></script>
<script src="$path/src/pixi/filters/RGBSplitFilter.js"></script>
<script src="$path/src/pixi/filters/SepiaFilter.js"></script>
<script src="$path/src/pixi/filters/SmartBlurFilter.js"></script>
<script src="$path/src/pixi/filters/TwistFilter.js"></script>
<script src="$path/src/pixi/primitives/Graphics.js"></script>
<script src="$path/src/pixi/renderers/canvas/CanvasGraphics.js"></script>
<script src="$path/src/pixi/renderers/canvas/CanvasRenderer.js"></script>
<script src="$path/src/pixi/renderers/webgl/PixiShader.js"></script>
<script src="$path/src/pixi/renderers/webgl/PrimitiveShader.js"></script>
<script src="$path/src/pixi/renderers/webgl/StripShader.js"></script>
<script src="$path/src/pixi/renderers/webgl/WebGLBatch.js"></script>
<script src="$path/src/pixi/renderers/webgl/WebGLFilterManager.js"></script>
<script src="$path/src/pixi/renderers/webgl/WebGLGraphics.js"></script>
<script src="$path/src/pixi/renderers/webgl/WebGLRenderer.js"></script>
<script src="$path/src/pixi/renderers/webgl/WebGLRenderGroup.js"></script>
<script src="$path/src/pixi/renderers/webgl/WebGLShaders.js"></script>
<script src="$path/src/pixi/text/BitmapText.js"></script>
<script src="$path/src/pixi/text/Text.js"></script>
<script src="$path/src/pixi/textures/BaseTexture.js"></script>
<script src="$path/src/pixi/textures/Texture.js"></script>
<script src="$path/src/pixi/utils/EventTarget.js"></script>
<script src="$path/src/pixi/utils/Polyk.js"></script>
<script src="$path/src/core/Camera.js"></script>
<script src="$path/src/core/State.js"></script>
<script src="$path/src/core/StateManager.js"></script>
<script src="$path/src/core/LinkedList.js"></script>
<script src="$path/src/core/Signal.js"></script>
<script src="$path/src/core/SignalBinding.js"></script>
<script src="$path/src/core/Filter.js"></script>
<script src="$path/src/core/Plugin.js"></script>
<script src="$path/src/core/PluginManager.js"></script>
<script src="$path/src/core/Stage.js"></script>
<script src="$path/src/core/Group.js"></script>
<script src="$path/src/core/World.js"></script>
<script src="$path/src/core/Game.js"></script>
<script src="$path/src/input/Input.js"></script>
<script src="$path/src/input/Key.js"></script>
<script src="$path/src/input/Keyboard.js"></script>
<script src="$path/src/input/Mouse.js"></script>
<script src="$path/src/input/MSPointer.js"></script>
<script src="$path/src/input/Pointer.js"></script>
<script src="$path/src/input/Touch.js"></script>
<script src="$path/src/input/InputHandler.js"></script>
<script src="$path/src/gameobjects/Events.js"></script>
<script src="$path/src/gameobjects/GameObjectFactory.js"></script>
<script src="$path/src/gameobjects/BitmapData.js"></script>
<script src="$path/src/gameobjects/Sprite.js"></script>
<script src="$path/src/gameobjects/TileSprite.js"></script>
<script src="$path/src/gameobjects/Text.js"></script>
<script src="$path/src/gameobjects/BitmapText.js"></script>
<script src="$path/src/gameobjects/Button.js"></script>
<script src="$path/src/gameobjects/Graphics.js"></script>
<script src="$path/src/gameobjects/RenderTexture.js"></script>
<script src="$path/src/system/Canvas.js"></script>
<script src="$path/src/system/StageScaleMode.js"></script>
<script src="$path/src/system/Device.js"></script>
<script src="$path/src/system/RequestAnimationFrame.js"></script>
<script src="$path/src/math/RandomDataGenerator.js"></script>
<script src="$path/src/math/Math.js"></script>
<script src="$path/src/math/QuadTree.js"></script>
<script src="$path/src/geom/Circle.js"></script>
<script src="$path/src/geom/Point.js"></script>
<script src="$path/src/geom/Rectangle.js"></script>
<script src="$path/src/net/Net.js"></script>
<script src="$path/src/tween/TweenManager.js"></script>
<script src="$path/src/tween/Tween.js"></script>
<script src="$path/src/tween/Easing.js"></script>
<script src="$path/src/time/Time.js"></script>
<script src="$path/src/time/Timer.js"></script>
<script src="$path/src/animation/AnimationManager.js"></script>
<script src="$path/src/animation/Animation.js"></script>
<script src="$path/src/animation/Frame.js"></script>
<script src="$path/src/animation/FrameData.js"></script>
<script src="$path/src/animation/AnimationParser.js"></script>
<script src="$path/src/loader/Cache.js"></script>
<script src="$path/src/loader/Loader.js"></script>
<script src="$path/src/loader/LoaderParser.js"></script>
<script src="$path/src/sound/Sound.js"></script>
<script src="$path/src/sound/SoundManager.js"></script>
<script src="$path/src/utils/Debug.js"></script>
<script src="$path/src/utils/Color.js"></script>
<script src="$path/src/physics/arcade/ArcadePhysics.js"></script>
<script src="$path/src/physics/arcade/Body.js"></script>
<script src="$path/src/particles/Particles.js"></script>
<script src="$path/src/particles/arcade/ArcadeParticles.js"></script>
<script src="$path/src/particles/arcade/Emitter.js"></script>
<script src="$path/src/tilemap/Tile.js"></script>
<script src="$path/src/tilemap/Tilemap.js"></script>
<script src="$path/src/tilemap/TilemapLayer.js"></script>
<script src="$path/src/tilemap/TilemapParser.js"></script>
<script src="$path/src/tilemap/Tileset.js"></script>
<script src="../src/PixiPatch.js"></script>
<script src="$path/src/PixiPatch.js"></script>
EOL;
?>
1 change: 1 addition & 0 deletions examples/_site/view_full.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
<script src="../src/tween/Tween.js"></script>
<script src="../src/tween/Easing.js"></script>
<script src="../src/time/Time.js"></script>
<script src="../src/time/Timer.js"></script>
<script src="../src/animation/AnimationManager.js"></script>
<script src="../src/animation/Animation.js"></script>
<script src="../src/animation/Frame.js"></script>
Expand Down
1 change: 1 addition & 0 deletions examples/_site/view_lite.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@
<script src="../src/tween/Tween.js"></script>
<script src="../src/tween/Easing.js"></script>
<script src="../src/time/Time.js"></script>
<script src="../src/time/Timer.js"></script>
<script src="../src/animation/AnimationManager.js"></script>
<script src="../src/animation/Animation.js"></script>
<script src="../src/animation/Frame.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion src/PixiPatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ PIXI.CanvasRenderer.prototype.render = function(stage)
// if(this.view.style.backgroundColor!=stage.backgroundColorString && !this.transparent)this.view.style.backgroundColor = stage.backgroundColorString;

this.context.setTransform(1, 0, 0, 1, 0, 0);
this.context.clearRect(0, 0, this.width, this.height)
// this.context.clearRect(0, 0, this.width, this.height)
this.renderDisplayObject(stage);

// Remove frame updates
Expand Down
Loading

0 comments on commit 155c863

Please sign in to comment.