From 96da57cac03add75e362160ba10093bec4edfcaa Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 3 Oct 2013 02:38:35 +0100 Subject: [PATCH] Fixed up the namespace in the documentation and finished off all sections other than Game Objects and Physics (yuck). --- Docs/conf.json | 2 +- Docs/out/Animation.js.html | 122 +- Docs/out/AnimationManager.js.html | 126 +- Docs/out/AnimationParser.js.html | 703 ++ Docs/out/Back.html | 874 +++ Docs/out/Bounce.html | 874 +++ Docs/out/Cache.js.html | 146 +- Docs/out/Camera.js.html | 119 +- Docs/out/Canvas.js.html | 118 +- Docs/out/Circle.js.html | 118 +- Docs/out/Circular.html | 874 +++ Docs/out/Color.js.html | 712 ++ Docs/out/Cubic.html | 874 +++ Docs/out/Debug.js.html | 1214 ++++ Docs/out/Device.js.html | 118 +- Docs/out/Easing.js.html | 946 +++ Docs/out/Elastic.html | 874 +++ Docs/out/Emitter.js.html | 118 +- Docs/out/Exponential.html | 874 +++ Docs/out/Frame.js.html | 126 +- Docs/out/FrameData.js.html | 150 +- Docs/out/Game.js.html | 118 +- Docs/out/Group.js.html | 118 +- Docs/out/Input.js.html | 118 +- Docs/out/InputHandler.js.html | 118 +- Docs/out/Intro.js.html | 414 ++ Docs/out/Key.js.html | 118 +- Docs/out/Keyboard.js.html | 118 +- Docs/out/Linear.html | 592 ++ Docs/out/LinkedList.js.html | 118 +- Docs/out/Loader.js.html | 118 +- Docs/out/LoaderParser.js.html | 467 ++ Docs/out/MSPointer.js.html | 118 +- Docs/out/Math.js.html | 118 +- Docs/out/Mouse.js.html | 118 +- Docs/out/Net.js.html | 118 +- Docs/out/Particles.js.html | 118 +- Docs/out/Phaser.Animation.html | 137 +- Docs/out/Phaser.AnimationManager.html | 124 +- Docs/out/Phaser.AnimationParser.html | 1355 ++++ Docs/out/Phaser.Cache.html | 140 +- Docs/out/Phaser.Camera.html | 168 +- Docs/out/Phaser.Canvas.html | 120 +- Docs/out/Phaser.Circle.html | 120 +- Docs/out/Phaser.Color.html | 3564 ++++++++++ Docs/out/Phaser.Device.html | 120 +- Docs/out/Phaser.Easing.Back.html | 916 +++ Docs/out/Phaser.Easing.Bounce.html | 916 +++ Docs/out/Phaser.Easing.Circular.html | 916 +++ Docs/out/Phaser.Easing.Cubic.html | 916 +++ Docs/out/Phaser.Easing.Elastic.html | 916 +++ Docs/out/Phaser.Easing.Exponential.html | 916 +++ Docs/out/Phaser.Easing.Linear.html | 634 ++ Docs/out/Phaser.Easing.Quadratic.html | 916 +++ Docs/out/Phaser.Easing.Quartic.html | 916 +++ Docs/out/Phaser.Easing.Quintic.html | 916 +++ Docs/out/Phaser.Easing.Sinusoidal.html | 916 +++ Docs/out/Phaser.Easing.html | 526 ++ Docs/out/Phaser.Frame.html | 2901 ++++++++ Docs/out/Phaser.FrameData.html | 1848 ++++++ Docs/out/Phaser.Game.html | 124 +- Docs/out/Phaser.Group.html | 120 +- Docs/out/Phaser.Input.html | 120 +- Docs/out/Phaser.InputHandler.html | 120 +- Docs/out/Phaser.Key.html | 120 +- Docs/out/Phaser.Keyboard.html | 120 +- Docs/out/Phaser.LinkedList.html | 120 +- Docs/out/Phaser.Loader.html | 127 +- Docs/out/Phaser.LoaderParser.html | 634 ++ Docs/out/Phaser.MSPointer.html | 120 +- Docs/out/Phaser.Math.html | 120 +- Docs/out/Phaser.Mouse.html | 120 +- Docs/out/Phaser.Net.html | 120 +- Docs/out/Phaser.Particles.Arcade.Emitter.html | 118 +- Docs/out/Phaser.Particles.html | 120 +- Docs/out/Phaser.Plugin.html | 120 +- Docs/out/Phaser.PluginManager.html | 120 +- Docs/out/Phaser.Point.html | 120 +- Docs/out/Phaser.Pointer.html | 120 +- Docs/out/Phaser.QuadTree.html | 132 +- Docs/out/Phaser.RandomDataGenerator.html | 120 +- Docs/out/Phaser.Rectangle.html | 120 +- Docs/out/Phaser.RequestAnimationFrame.html | 120 +- Docs/out/Phaser.Signal.html | 122 +- Docs/out/Phaser.Sound.html | 120 +- Docs/out/Phaser.SoundManager.html | 120 +- Docs/out/Phaser.Stage.html | 120 +- Docs/out/Phaser.StageScaleMode.html | 120 +- Docs/out/Phaser.State.html | 122 +- Docs/out/Phaser.StateManager.html | 120 +- Docs/out/Phaser.Time.html | 2842 ++++++++ Docs/out/Phaser.Touch.html | 120 +- Docs/out/Phaser.Tween.html | 3199 +++++++++ Docs/out/Phaser.TweenManager.html | 1555 +++++ Docs/out/Phaser.Utils.Debug.html | 5908 +++++++++++++++++ Docs/out/Phaser.Utils.html | 995 +++ Docs/out/Phaser.World.html | 120 +- Docs/out/Phaser.html | 602 ++ Docs/out/Phaser.js.html | 122 +- Docs/out/Plugin.js.html | 118 +- Docs/out/PluginManager.js.html | 118 +- Docs/out/Point.js.html | 118 +- Docs/out/Pointer.js.html | 118 +- Docs/out/QuadTree.js.html | 119 +- Docs/out/Quadratic.html | 874 +++ Docs/out/Quartic.html | 874 +++ Docs/out/Quintic.html | 874 +++ Docs/out/RandomDataGenerator.js.html | 118 +- Docs/out/Rectangle.js.html | 118 +- Docs/out/RequestAnimationFrame.js.html | 118 +- Docs/out/Signal.js.html | 118 +- Docs/out/SignalBinding.html | 118 +- Docs/out/SignalBinding.js.html | 118 +- Docs/out/Sinusoidal.html | 874 +++ Docs/out/Sound.js.html | 118 +- Docs/out/SoundManager.js.html | 118 +- Docs/out/Stage.js.html | 118 +- Docs/out/StageScaleMode.js.html | 118 +- Docs/out/State.js.html | 118 +- Docs/out/StateManager.js.html | 118 +- Docs/out/Time.js.html | 650 ++ Docs/out/Touch.js.html | 118 +- Docs/out/Tween.js.html | 992 +++ Docs/out/TweenManager.js.html | 571 ++ Docs/out/Utils.html | 502 ++ Docs/out/Utils.js.html | 596 ++ Docs/out/Utils_.html | 513 ++ Docs/out/World.js.html | 118 +- Docs/out/classes.list.html | 199 +- Docs/out/global.html | 193 +- Docs/out/index.html | 138 +- Docs/out/module-Phaser.html | 98 +- Docs/out/module-Tween-Phaser.Tween.html | 1070 +++ .../out/module-Tween-Phaser.TweenManager.html | 746 +++ Docs/out/module-Tween.html | 458 ++ Docs/out/modules.list.html | 227 +- Docs/out/namespaces.list.html | 646 ++ README.md | 5 + examples/js.php | 2 +- src/Intro.js | 5 +- src/Phaser.js | 4 +- src/animation/Animation.js | 4 +- src/animation/AnimationManager.js | 8 +- src/animation/AnimationParser.js | 24 +- src/animation/Frame.js | 8 +- src/animation/FrameData.js | 32 +- src/loader/Cache.js | 18 +- src/loader/{Parser.js => LoaderParser.js} | 10 +- src/math/QuadTree.js | 1 - src/time/Time.js | 21 +- src/tween/Easing.js | 447 +- src/tween/Tween.js | 102 +- src/tween/TweenManager.js | 24 +- src/utils/Color.js | 85 +- src/utils/Debug.js | 200 +- src/utils/Utils.js | 27 +- 156 files changed, 65938 insertions(+), 2035 deletions(-) create mode 100644 Docs/out/AnimationParser.js.html create mode 100644 Docs/out/Back.html create mode 100644 Docs/out/Bounce.html create mode 100644 Docs/out/Circular.html create mode 100644 Docs/out/Color.js.html create mode 100644 Docs/out/Cubic.html create mode 100644 Docs/out/Debug.js.html create mode 100644 Docs/out/Easing.js.html create mode 100644 Docs/out/Elastic.html create mode 100644 Docs/out/Exponential.html create mode 100644 Docs/out/Intro.js.html create mode 100644 Docs/out/Linear.html create mode 100644 Docs/out/LoaderParser.js.html create mode 100644 Docs/out/Phaser.AnimationParser.html create mode 100644 Docs/out/Phaser.Color.html create mode 100644 Docs/out/Phaser.Easing.Back.html create mode 100644 Docs/out/Phaser.Easing.Bounce.html create mode 100644 Docs/out/Phaser.Easing.Circular.html create mode 100644 Docs/out/Phaser.Easing.Cubic.html create mode 100644 Docs/out/Phaser.Easing.Elastic.html create mode 100644 Docs/out/Phaser.Easing.Exponential.html create mode 100644 Docs/out/Phaser.Easing.Linear.html create mode 100644 Docs/out/Phaser.Easing.Quadratic.html create mode 100644 Docs/out/Phaser.Easing.Quartic.html create mode 100644 Docs/out/Phaser.Easing.Quintic.html create mode 100644 Docs/out/Phaser.Easing.Sinusoidal.html create mode 100644 Docs/out/Phaser.Easing.html create mode 100644 Docs/out/Phaser.Frame.html create mode 100644 Docs/out/Phaser.FrameData.html create mode 100644 Docs/out/Phaser.LoaderParser.html create mode 100644 Docs/out/Phaser.Time.html create mode 100644 Docs/out/Phaser.Tween.html create mode 100644 Docs/out/Phaser.TweenManager.html create mode 100644 Docs/out/Phaser.Utils.Debug.html create mode 100644 Docs/out/Phaser.Utils.html create mode 100644 Docs/out/Phaser.html create mode 100644 Docs/out/Quadratic.html create mode 100644 Docs/out/Quartic.html create mode 100644 Docs/out/Quintic.html create mode 100644 Docs/out/Sinusoidal.html create mode 100644 Docs/out/Time.js.html create mode 100644 Docs/out/Tween.js.html create mode 100644 Docs/out/TweenManager.js.html create mode 100644 Docs/out/Utils.html create mode 100644 Docs/out/Utils.js.html create mode 100644 Docs/out/Utils_.html create mode 100644 Docs/out/module-Tween-Phaser.Tween.html create mode 100644 Docs/out/module-Tween-Phaser.TweenManager.html create mode 100644 Docs/out/module-Tween.html create mode 100644 Docs/out/namespaces.list.html rename src/loader/{Parser.js => LoaderParser.js} (89%) diff --git a/Docs/conf.json b/Docs/conf.json index c04e4df9..92674fb8 100644 --- a/Docs/conf.json +++ b/Docs/conf.json @@ -3,7 +3,7 @@ "allowUnknownTags": true }, "source": { - "include": [ "../src/Phaser.js", "../src/animation/", "../src/core/", "../src/geom/", "../src/input/", "../src/loader/", "../src/math/", "../src/net/", "../src/particles/", "../src/sound/", "../src/system/" ], + "include": [ "../src/Phaser.js", "../src/Intro.js", "../src/animation/", "../src/core/", "../src/geom/", "../src/input/", "../src/loader/", "../src/math/", "../src/net/", "../src/particles/", "../src/sound/", "../src/system/", "../src/time/", "../src/tween/", "../src/utils/" ], "exclude": [], "includePattern": ".+\\.js(doc)?$", "excludePattern": "(^|\\/|\\\\)_" diff --git a/Docs/out/Animation.js.html b/Docs/out/Animation.js.html index 8cd9d0b5..10581936 100644 --- a/Docs/out/Animation.js.html +++ b/Docs/out/Animation.js.html @@ -23,13 +23,13 @@ @@ -250,7 +336,7 @@ * @param {Phaser.Game} game - A reference to the currently running game. * @param {Phaser.Sprite} parent - A reference to the owner of this Animation. * @param {string} name - The unique name for this animation, used in playback commands. -* @param {Phaser.Animation.FrameData} frameData - The FrameData object that contains all frames used by this Animation. +* @param {Phaser.FrameData} frameData - The FrameData object that contains all frames used by this Animation. * @param {(Array.<number>|Array.<string>)} frames - An array of numbers or strings indicating which frames to play in which order. * @param {number} delay - The time between each frame of the animation, given in ms. * @param {boolean} looped - Should this animation loop or play through once. @@ -343,7 +429,7 @@ Phaser.Animation = function (game, parent, name, frameData, frames, delay, loope this._frameSkip = 1; /** - * @property {Phaser.Animation.Frame} currentFrame - The currently displayed frame of the Animation. + * @property {Phaser.Frame} currentFrame - The currently displayed frame of the Animation. */ this.currentFrame = this._frameData.getFrame(this._frames[this._frameIndex]); @@ -679,7 +765,7 @@ Phaser.Animation.generateFrameNames = function (prefix, min, max, suffix, zeroPa Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:41 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/AnimationManager.js.html b/Docs/out/AnimationManager.js.html index b6cf1bc8..2bc72698 100644 --- a/Docs/out/AnimationManager.js.html +++ b/Docs/out/AnimationManager.js.html @@ -23,13 +23,13 @@ @@ -262,7 +348,7 @@ Phaser.AnimationManager = function (sprite) { this.game = sprite.game; /** - * @property {Phaser.Animation.Frame} currentFrame - The currently displayed Frame of animation, if any. + * @property {Phaser.Frame} currentFrame - The currently displayed Frame of animation, if any. * @default */ this.currentFrame = null; @@ -274,7 +360,7 @@ Phaser.AnimationManager = function (sprite) { this.updateIfVisible = true; /** - * @property {Phaser.Animation.FrameData} _frameData - A temp. var for holding the currently playing Animations FrameData. + * @property {Phaser.FrameData} _frameData - A temp. var for holding the currently playing Animations FrameData. * @private * @default */ @@ -302,7 +388,7 @@ Phaser.AnimationManager.prototype = { * * @method Phaser.AnimationManager#loadFrameData * @private - * @param {Phaser.Animation.FrameData} frameData - The FrameData set to load. + * @param {Phaser.FrameData} frameData - The FrameData set to load. */ loadFrameData: function (frameData) { @@ -495,7 +581,7 @@ Phaser.AnimationManager.prototype = { /** * @name Phaser.AnimationManager#frameData -* @property {Phaser.Animation.FrameData} frameData - The current animations FrameData. +* @property {Phaser.FrameData} frameData - The current animations FrameData. * @readonly */ Object.defineProperty(Phaser.AnimationManager.prototype, "frameData", { @@ -628,7 +714,7 @@ Object.defineProperty(Phaser.AnimationManager.prototype, "frameName", { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:41 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/AnimationParser.js.html b/Docs/out/AnimationParser.js.html new file mode 100644 index 00000000..7bd92100 --- /dev/null +++ b/Docs/out/AnimationParser.js.html @@ -0,0 +1,703 @@ + + + + + + Phaser Source: animation/AnimationParser.js + + + + + + + + + + +
+ + +
+ + +
+ +
+ + + +

Source: animation/AnimationParser.js

+ +
+
+
/**
+* @author       Richard Davey <rich@photonstorm.com>
+* @copyright    2013 Photon Storm Ltd.
+* @license      {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
+*/
+
+/**
+* Responsible for parsing sprite sheet and JSON data into the internal FrameData format that Phaser uses for animations.
+*
+* @class Phaser.AnimationParser
+*/
+Phaser.AnimationParser = {
+
+    /**
+    * Parse a Sprite Sheet and extract the animation frame data from it.
+    *
+    * @method Phaser.AnimationParser.spriteSheet
+    * @param {Phaser.Game} game - A reference to the currently running game.
+    * @param {string} key - The Game.Cache asset key of the Sprite Sheet image.
+    * @param {number} frameWidth - The fixed width of each frame of the animation.
+    * @param {number} frameHeight - The fixed height of each frame of the animation.
+    * @param {number} [frameMax=-1] - The total number of animation frames to extact from the Sprite Sheet. The default value of -1 means "extract all frames".
+    * @return {Phaser.FrameData} A FrameData object containing the parsed frames.
+    */
+    spriteSheet: function (game, key, frameWidth, frameHeight, frameMax) {
+
+        //  How big is our image?
+        var img = game.cache.getImage(key);
+
+        if (img == null)
+        {
+            return null;
+        }
+
+        var width = img.width;
+        var height = img.height;
+
+        if (frameWidth <= 0)
+        {
+            frameWidth = Math.floor(-width / Math.min(-1, frameWidth));
+        }
+
+        if (frameHeight <= 0)
+        {
+            frameHeight = Math.floor(-height / Math.min(-1, frameHeight));
+        }
+
+        var row = Math.round(width / frameWidth);
+        var column = Math.round(height / frameHeight);
+        var total = row * column;
+        
+        if (frameMax !== -1)
+        {
+            total = frameMax;
+        }
+
+        //  Zero or smaller than frame sizes?
+        if (width == 0 || height == 0 || width < frameWidth || height < frameHeight || total === 0)
+        {
+            console.warn("Phaser.AnimationParser.spriteSheet: width/height zero or width/height < given frameWidth/frameHeight");
+            return null;
+        }
+
+        //  Let's create some frames then
+        var data = new Phaser.FrameData();
+        var x = 0;
+        var y = 0;
+
+        for (var i = 0; i < total; i++)
+        {
+            var uuid = game.rnd.uuid();
+
+            data.addFrame(new Phaser.Frame(i, x, y, frameWidth, frameHeight, '', uuid));
+
+            PIXI.TextureCache[uuid] = new PIXI.Texture(PIXI.BaseTextureCache[key], {
+                x: x,
+                y: y,
+                width: frameWidth,
+                height: frameHeight
+            });
+
+            x += frameWidth;
+
+            if (x === width)
+            {
+                x = 0;
+                y += frameHeight;
+            }
+        }
+
+        return data;
+
+    },
+
+    /**
+    * Parse the JSON data and extract the animation frame data from it.
+    *
+    * @method Phaser.AnimationParser.JSONData
+    * @param {Phaser.Game} game - A reference to the currently running game.
+    * @param {Object} json - The JSON data from the Texture Atlas. Must be in Array format.
+    * @param {string} cacheKey - The Game.Cache asset key of the texture image.
+    * @return {Phaser.FrameData} A FrameData object containing the parsed frames.
+    */
+    JSONData: function (game, json, cacheKey) {
+
+        //  Malformed?
+        if (!json['frames'])
+        {
+            console.warn("Phaser.AnimationParser.JSONData: Invalid Texture Atlas JSON given, missing 'frames' array");
+            console.log(json);
+            return;
+        }
+
+        //  Let's create some frames then
+        var data = new Phaser.FrameData();
+        
+        //  By this stage frames is a fully parsed array
+        var frames = json['frames'];
+        var newFrame;
+        
+        for (var i = 0; i < frames.length; i++)
+        {
+            var uuid = game.rnd.uuid();
+
+            newFrame = data.addFrame(new Phaser.Frame(
+                i,
+            	frames[i].frame.x, 
+            	frames[i].frame.y, 
+            	frames[i].frame.w, 
+            	frames[i].frame.h, 
+            	frames[i].filename,
+                uuid
+			));
+
+            PIXI.TextureCache[uuid] = new PIXI.Texture(PIXI.BaseTextureCache[cacheKey], {
+                x: frames[i].frame.x,
+                y: frames[i].frame.y,
+                width: frames[i].frame.w,
+                height: frames[i].frame.h
+            });
+
+            if (frames[i].trimmed)
+            {
+                newFrame.setTrim(
+                    frames[i].trimmed, 
+                    frames[i].sourceSize.w, 
+                    frames[i].sourceSize.h, 
+                    frames[i].spriteSourceSize.x, 
+                    frames[i].spriteSourceSize.y, 
+                    frames[i].spriteSourceSize.w, 
+                    frames[i].spriteSourceSize.h
+                );
+
+                //  We had to hack Pixi to get this to work :(
+                PIXI.TextureCache[uuid].trimmed = true;
+                PIXI.TextureCache[uuid].trim.x = frames[i].spriteSourceSize.x;
+                PIXI.TextureCache[uuid].trim.y = frames[i].spriteSourceSize.y;
+
+            }
+        }
+
+        return data;
+
+    },
+
+    /**
+    * Parse the JSON data and extract the animation frame data from it.
+    *
+    * @method Phaser.AnimationParser.JSONDataHash
+    * @param {Phaser.Game} game - A reference to the currently running game.
+    * @param {Object} json - The JSON data from the Texture Atlas. Must be in JSON Hash format.
+    * @param {string} cacheKey - The Game.Cache asset key of the texture image.
+    * @return {Phaser.FrameData} A FrameData object containing the parsed frames.
+    */
+    JSONDataHash: function (game, json, cacheKey) {
+
+        //  Malformed?
+        if (!json['frames'])
+        {
+            console.warn("Phaser.AnimationParser.JSONDataHash: Invalid Texture Atlas JSON given, missing 'frames' object");
+            console.log(json);
+            return;
+        }
+            
+        //  Let's create some frames then
+        var data = new Phaser.FrameData();
+
+        //  By this stage frames is a fully parsed array
+        var frames = json['frames'];
+        var newFrame;
+        var i = 0;
+        
+        for (var key in frames)
+        {
+            var uuid = game.rnd.uuid();
+
+            newFrame = data.addFrame(new Phaser.Frame(
+                i,
+                frames[key].frame.x, 
+                frames[key].frame.y, 
+                frames[key].frame.w, 
+                frames[key].frame.h, 
+                key,
+                uuid
+            ));
+
+            PIXI.TextureCache[uuid] = new PIXI.Texture(PIXI.BaseTextureCache[cacheKey], {
+                x: frames[key].frame.x,
+                y: frames[key].frame.y,
+                width: frames[key].frame.w,
+                height: frames[key].frame.h
+            });
+
+            if (frames[key].trimmed)
+            {
+                newFrame.setTrim(
+                    frames[key].trimmed, 
+                    frames[key].sourceSize.w, 
+                    frames[key].sourceSize.h, 
+                    frames[key].spriteSourceSize.x, 
+                    frames[key].spriteSourceSize.y, 
+                    frames[key].spriteSourceSize.w, 
+                    frames[key].spriteSourceSize.h
+                );
+
+                //  We had to hack Pixi to get this to work :(
+                PIXI.TextureCache[uuid].trimmed = true;
+                PIXI.TextureCache[uuid].trim.x = frames[key].spriteSourceSize.x;
+                PIXI.TextureCache[uuid].trim.y = frames[key].spriteSourceSize.y;
+
+            }
+
+            i++;
+        }
+
+        return data;
+
+    },
+
+    /**
+    * Parse the XML data and extract the animation frame data from it.
+    *
+    * @method Phaser.AnimationParser.XMLData
+    * @param {Phaser.Game} game - A reference to the currently running game.
+    * @param {Object} xml - The XML data from the Texture Atlas. Must be in Starling XML format.
+    * @param {string} cacheKey - The Game.Cache asset key of the texture image.
+    * @return {Phaser.FrameData} A FrameData object containing the parsed frames.
+    */
+    XMLData: function (game, xml, cacheKey) {
+
+        //  Malformed?
+        if (!xml.getElementsByTagName('TextureAtlas'))
+        {
+            console.warn("Phaser.AnimationParser.XMLData: Invalid Texture Atlas XML given, missing <TextureAtlas> tag");
+            return;
+        }
+
+        //  Let's create some frames then
+        var data = new Phaser.FrameData();
+        var frames = xml.getElementsByTagName('SubTexture');
+        var newFrame;
+        
+        for (var i = 0; i < frames.length; i++)
+        {
+            var uuid = game.rnd.uuid();
+
+            var frame = frames[i].attributes;
+
+            newFrame = data.addFrame(new Phaser.Frame(
+                i,
+            	frame.x.nodeValue, 
+            	frame.y.nodeValue, 
+            	frame.width.nodeValue, 
+            	frame.height.nodeValue, 
+            	frame.name.nodeValue,
+                uuid
+            ));
+
+            PIXI.TextureCache[uuid] = new PIXI.Texture(PIXI.BaseTextureCache[cacheKey], {
+                x: frame.x.nodeValue,
+                y: frame.y.nodeValue,
+                width: frame.width.nodeValue,
+                height: frame.height.nodeValue
+            });
+
+            //  Trimmed?
+            if (frame.frameX.nodeValue != '-0' || frame.frameY.nodeValue != '-0')
+            {
+                newFrame.setTrim(
+                	true, 
+                	frame.width.nodeValue, 
+                	frame.height.nodeValue, 
+                	Math.abs(frame.frameX.nodeValue), 
+                	Math.abs(frame.frameY.nodeValue), 
+                	frame.frameWidth.nodeValue, 
+                	frame.frameHeight.nodeValue
+                );
+
+                PIXI.TextureCache[uuid].realSize = {
+                    x: Math.abs(frame.frameX.nodeValue),
+                    y: Math.abs(frame.frameY.nodeValue),
+                    w: frame.frameWidth.nodeValue,
+                    h: frame.frameHeight.nodeValue
+                };
+
+                //  We had to hack Pixi to get this to work :(
+                PIXI.TextureCache[uuid].trimmed = true;
+                PIXI.TextureCache[uuid].trim.x = Math.abs(frame.frameX.nodeValue);
+                PIXI.TextureCache[uuid].trim.y = Math.abs(frame.frameY.nodeValue);
+
+            }
+        }
+
+        return data;
+
+    }
+
+};
+
+
+
+ + + + + +
+ +
+
+ + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
+ + + Documentation generated by JSDoc 3.2.0-dev + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + +
+
+ + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + diff --git a/Docs/out/Back.html b/Docs/out/Back.html new file mode 100644 index 00000000..b21a0a88 --- /dev/null +++ b/Docs/out/Back.html @@ -0,0 +1,874 @@ + + + + + + Phaser Namespace: Back + + + + + + + + + + +
+ + +
+ + +
+ +
+ + + +

Namespace: Back

+
+ +
+

+ Back +

+ +
+ +
+
+ + + + +

Back easing.

+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + +
+ + + + + + + + + + + + + + +

Methods

+ +
+ +
+

<static> In(k) → {number}

+ + +
+
+ + +
+

Back ease-in.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

Description.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

Description.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

<static> InOut(k) → {number}

+ + +
+
+ + +
+

Back ease-in/out.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

Description.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

Description.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

<static> Out(k) → {number}

+ + +
+
+ + +
+

Back ease-out.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

Description.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

Description.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ +
+
+ + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
+ + + Documentation generated by JSDoc 3.2.0-dev + on Thu Oct 03 2013 01:56:58 GMT+0100 (BST) using the DocStrap template. + +
+
+ + +
+
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Docs/out/Bounce.html b/Docs/out/Bounce.html new file mode 100644 index 00000000..8767df5c --- /dev/null +++ b/Docs/out/Bounce.html @@ -0,0 +1,874 @@ + + + + + + Phaser Namespace: Bounce + + + + + + + + + + +
+ + +
+ + +
+ +
+ + + +

Namespace: Bounce

+
+ +
+

+ Bounce +

+ +
+ +
+
+ + + + +

Bounce easing.

+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + +
+ + + + + + + + + + + + + + +

Methods

+ +
+ +
+

<static> In(k) → {number}

+ + +
+
+ + +
+

Bounce ease-in.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

Description.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

Description.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

<static> InOut(k) → {number}

+ + +
+
+ + +
+

Bounce ease-in/out.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

Description.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

Description.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

<static> Out(k) → {number}

+ + +
+
+ + +
+

Bounce ease-out.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

Description.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

Description.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ +
+
+ + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
+ + + Documentation generated by JSDoc 3.2.0-dev + on Thu Oct 03 2013 01:56:58 GMT+0100 (BST) using the DocStrap template. + +
+
+ + +
+
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Docs/out/Cache.js.html b/Docs/out/Cache.js.html index 72829b93..cbdf8a80 100644 --- a/Docs/out/Cache.js.html +++ b/Docs/out/Cache.js.html @@ -23,13 +23,13 @@ @@ -327,7 +413,7 @@ Phaser.Cache.prototype = { */ addRenderTexture: function (key, texture) { - var frame = new Phaser.Animation.Frame(0, 0, 0, texture.width, texture.height, '', ''); + var frame = new Phaser.Frame(0, 0, 0, texture.width, texture.height, '', ''); this._textures[key] = { texture: texture, frame: frame }; @@ -351,7 +437,7 @@ Phaser.Cache.prototype = { PIXI.BaseTextureCache[key] = new PIXI.BaseTexture(data); PIXI.TextureCache[key] = new PIXI.Texture(PIXI.BaseTextureCache[key]); - this._images[key].frameData = Phaser.Animation.Parser.spriteSheet(this.game, key, frameWidth, frameHeight, frameMax); + this._images[key].frameData = Phaser.AnimationParser.spriteSheet(this.game, key, frameWidth, frameHeight, frameMax); }, @@ -393,15 +479,15 @@ Phaser.Cache.prototype = { if (format == Phaser.Loader.TEXTURE_ATLAS_JSON_ARRAY) { - this._images[key].frameData = Phaser.Animation.Parser.JSONData(this.game, atlasData, key); + this._images[key].frameData = Phaser.AnimationParser.JSONData(this.game, atlasData, key); } else if (format == Phaser.Loader.TEXTURE_ATLAS_JSON_HASH) { - this._images[key].frameData = Phaser.Animation.Parser.JSONDataHash(this.game, atlasData, key); + this._images[key].frameData = Phaser.AnimationParser.JSONDataHash(this.game, atlasData, key); } else if (format == Phaser.Loader.TEXTURE_ATLAS_XML_STARLING) { - this._images[key].frameData = Phaser.Animation.Parser.XMLData(this.game, atlasData, key); + this._images[key].frameData = Phaser.AnimationParser.XMLData(this.game, atlasData, key); } }, @@ -422,8 +508,8 @@ Phaser.Cache.prototype = { PIXI.BaseTextureCache[key] = new PIXI.BaseTexture(data); PIXI.TextureCache[key] = new PIXI.Texture(PIXI.BaseTextureCache[key]); - Phaser.Loader.Parser.bitmapFont(this.game, xmlData, key); - // this._images[key].frameData = Phaser.Animation.Parser.XMLData(this.game, xmlData, key); + Phaser.LoaderParser.bitmapFont(this.game, xmlData, key); + // this._images[key].frameData = Phaser.AnimationParser.XMLData(this.game, xmlData, key); }, @@ -435,7 +521,7 @@ Phaser.Cache.prototype = { addDefaultImage: function () { this._images['__default'] = { url: null, data: null, spriteSheet: false }; - this._images['__default'].frame = new Phaser.Animation.Frame(0, 0, 0, 32, 32, '', ''); + this._images['__default'].frame = new Phaser.Frame(0, 0, 0, 32, 32, '', ''); var base = new PIXI.BaseTexture(); base.width = 32; @@ -458,7 +544,7 @@ Phaser.Cache.prototype = { addImage: function (key, url, data) { this._images[key] = { url: url, data: data, spriteSheet: false }; - this._images[key].frame = new Phaser.Animation.Frame(0, 0, 0, data.width, data.height, '', ''); + this._images[key].frame = new Phaser.Frame(0, 0, 0, data.width, data.height, '', ''); PIXI.BaseTextureCache[key] = new PIXI.BaseTexture(data); PIXI.TextureCache[key] = new PIXI.Texture(PIXI.BaseTextureCache[key]); @@ -648,7 +734,7 @@ Phaser.Cache.prototype = { * * @method Phaser.Cache#getFrameData * @param {string} key - Asset key of the frame data you want. - * @return {Phaser.Animation.FrameData} The frame data you want. + * @return {Phaser.FrameData} The frame data you want. */ getFrameData: function (key) { @@ -665,7 +751,7 @@ Phaser.Cache.prototype = { * * @method Phaser.Cache#getFrameByIndex * @param {string} key - Asset key of the frame data you want. - * @return {Phaser.Animation.Frame} The frame data you want. + * @return {Phaser.Frame} The frame data you want. */ getFrameByIndex: function (key, frame) { @@ -682,7 +768,7 @@ Phaser.Cache.prototype = { * * @method Phaser.Cache#getFrameByName * @param {string} key - Asset key of the frame data you want. - * @return {Phaser.Animation.Frame} The frame data you want. + * @return {Phaser.Frame} The frame data you want. */ getFrameByName: function (key, frame) { @@ -699,7 +785,7 @@ Phaser.Cache.prototype = { * * @method Phaser.Cache#getFrame * @param {string} key - Asset key of the frame data you want. - * @return {Phaser.Animation.Frame} The frame data you want. + * @return {Phaser.Frame} The frame data you want. */ getFrame: function (key) { @@ -716,7 +802,7 @@ Phaser.Cache.prototype = { * * @method Phaser.Cache#getTextureFrame * @param {string} key - Asset key of the frame data you want. - * @return {Phaser.Animation.Frame} The frame data you want. + * @return {Phaser.Frame} The frame data you want. */ getTextureFrame: function (key) { @@ -991,7 +1077,7 @@ Phaser.Cache.prototype = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:41 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Camera.js.html b/Docs/out/Camera.js.html index a97d4c89..b627c6fc 100644 --- a/Docs/out/Camera.js.html +++ b/Docs/out/Camera.js.html @@ -23,13 +23,13 @@ @@ -242,7 +328,6 @@ */ /** -* * A Camera is your view into the game world. It has a position and size and renders only those objects within its field of view. * The game automatically creates a single Stage sized camera on boot. Move the camera around the world with Phaser.Camera.x/y * @@ -608,7 +693,7 @@ Object.defineProperty(Phaser.Camera.prototype, "height", { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:41 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Canvas.js.html b/Docs/out/Canvas.js.html index 995fd165..331f0b84 100644 --- a/Docs/out/Canvas.js.html +++ b/Docs/out/Canvas.js.html @@ -23,13 +23,13 @@ @@ -511,7 +597,7 @@ Phaser.Canvas = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:41 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Circle.js.html b/Docs/out/Circle.js.html index 018910a5..930cf7fa 100644 --- a/Docs/out/Circle.js.html +++ b/Docs/out/Circle.js.html @@ -23,13 +23,13 @@ @@ -726,7 +812,7 @@ Phaser.Circle.intersectsRectangle = function (c, r) { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:41 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Circular.html b/Docs/out/Circular.html new file mode 100644 index 00000000..bc4edeae --- /dev/null +++ b/Docs/out/Circular.html @@ -0,0 +1,874 @@ + + + + + + Phaser Namespace: Circular + + + + + + + + + + +
+ + +
+ + +
+ +
+ + + +

Namespace: Circular

+
+ +
+

+ Circular +

+ +
+ +
+
+ + + + +

Circular easing.

+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + +
+ + + + + + + + + + + + + + +

Methods

+ +
+ +
+

<static> In(k) → {number}

+ + +
+
+ + +
+

Circular ease-in.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

Description.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

Description.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

<static> InOut(k) → {number}

+ + +
+
+ + +
+

Circular ease-in/out.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

Description.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

Description.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

<static> Out(k) → {number}

+ + +
+
+ + +
+

Circular ease-out.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

Description.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

Description.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ +
+
+ + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
+ + + Documentation generated by JSDoc 3.2.0-dev + on Thu Oct 03 2013 01:56:58 GMT+0100 (BST) using the DocStrap template. + +
+
+ + +
+
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Docs/out/Color.js.html b/Docs/out/Color.js.html new file mode 100644 index 00000000..d1472e35 --- /dev/null +++ b/Docs/out/Color.js.html @@ -0,0 +1,712 @@ + + + + + + Phaser Source: utils/Color.js + + + + + + + + + + +
+ + +
+ + +
+ +
+ + + +

Source: utils/Color.js

+ +
+
+
/**
+* @author       Richard Davey <rich@photonstorm.com>
+* @copyright    2013 Photon Storm Ltd.
+* @license      {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
+*/
+
+/**
+* A collection of methods useful for manipulating and comparing colors.
+*
+* @class Phaser.Color
+*/
+Phaser.Color = {
+
+    /**
+    * Given an alpha and 3 color values this will return an integer representation of it.
+    *
+    * @method Phaser.Color.getColor32
+    * @param {number} alpha - The Alpha value (between 0 and 255).
+    * @param {number} red - The Red channel value (between 0 and 255).
+    * @param {number} green - The Green channel value (between 0 and 255).
+    * @param {number} blue - The Blue channel value (between 0 and 255).
+    * @returns {number} A native color value integer (format: 0xAARRGGBB).
+    */
+    getColor32: function (alpha, red, green, blue) {
+        return alpha << 24 | red << 16 | green << 8 | blue;
+    },
+
+    /**
+    * Given 3 color values this will return an integer representation of it.
+    *
+    * @method Phaser.Color.getColor
+    * @param {number} red - The Red channel value (between 0 and 255).
+    * @param {number} green - The Green channel value (between 0 and 255).
+    * @param {number} blue - The Blue channel value (between 0 and 255).
+    * @returns {number} A native color value integer (format: 0xRRGGBB).
+    */
+    getColor: function (red, green, blue) {
+        return red << 16 | green << 8 | blue;
+    },
+
+    /**
+    * Converts the given hex string into an object containing the RGB values.
+    *
+    * @method Phaser.Color.hexToRGB
+    * @param {string} h - The string hex color to convert.
+    * @returns {object} An object with 3 properties: r,g and b.
+    */
+    hexToRGB: function (h) {
+
+        var hex16 = (h.charAt(0) == "#") ? h.substring(1, 7) : h;
+        var red = parseInt(hex16.substring(0, 2), 16);
+        var green = parseInt(hex16.substring(2, 4), 16);
+        var blue = parseInt(hex16.substring(4, 6), 16);
+
+        return red << 16 | green << 8 | blue;
+        
+    },
+
+    /**
+    * Returns a string containing handy information about the given color including string hex value,
+    * RGB format information and HSL information. Each section starts on a newline, 3 lines in total.
+    *
+    * @method Phaser.Color.getColorInfo
+    * @param {number} color - A color value in the format 0xAARRGGBB.
+    * @returns {string} String containing the 3 lines of information.
+    */
+    getColorInfo: function (color) {
+
+        var argb = Phaser.Color.getRGB(color);
+        var hsl = Phaser.Color.RGBtoHSV(color);
+        
+        //	Hex format
+        var result = Phaser.Color.RGBtoHexstring(color) + "\n";
+        
+        //	RGB format
+        result = result.concat("Alpha: " + argb.alpha + " Red: " + argb.red + " Green: " + argb.green + " Blue: " + argb.blue) + "\n";
+        
+        //	HSL info
+        result = result.concat("Hue: " + hsl.hue + " Saturation: " + hsl.saturation + " Lightnes: " + hsl.lightness);
+
+        return result;
+
+    },
+
+    /**
+    * Return a string representation of the color in the format 0xAARRGGBB.
+    *
+    * @method Phaser.Color.RGBtoHexstring
+    * @param {number} color - The color to get the string representation for
+    * @returns {string} A string of length 10 characters in the format 0xAARRGGBB
+    */
+    RGBtoHexstring: function (color) {
+
+        var argb = Phaser.Color.getRGB(color);
+
+        return "0x" + Phaser.Color.colorToHexstring(argb.alpha) + Phaser.Color.colorToHexstring(argb.red) + Phaser.Color.colorToHexstring(argb.green) + Phaser.Color.colorToHexstring(argb.blue);
+
+    },
+
+    /**
+    * Return a string representation of the color in the format #RRGGBB.
+    *
+    * @method Phaser.Color.RGBtoWebstring
+    * @param {number} color - The color to get the string representation for.
+    * @returns {string} A string of length 10 characters in the format 0xAARRGGBB.
+    */
+    RGBtoWebstring: function (color) {
+
+        var argb = Phaser.Color.getRGB(color);
+
+        return "#" + Phaser.Color.colorToHexstring(argb.red) + Phaser.Color.colorToHexstring(argb.green) + Phaser.Color.colorToHexstring(argb.blue);
+
+    },
+
+    /**
+    * Return a string containing a hex representation of the given color.
+    *
+    * @method Phaser.Color.colorToHexstring
+    * @param {number} color - The color channel to get the hex value for, must be a value between 0 and 255).
+    * @returns {string} A string of length 2 characters, i.e. 255 = FF, 0 = 00.
+    */
+    colorToHexstring: function (color) {
+
+        var digits = "0123456789ABCDEF";
+        var lsd = color % 16;
+        var msd = (color - lsd) / 16;
+        var hexified = digits.charAt(msd) + digits.charAt(lsd);
+        return hexified;
+
+    },
+
+    /**
+    * Interpolates the two given colours based on the supplied step and currentStep properties.
+    * @method Phaser.Color.interpolateColor
+    * @param {number} color1 - Description.
+    * @param {number} color2 - Description.
+    * @param {number} steps - Description.
+    * @param {number} currentStep - Description.
+    * @param {number} alpha - Description.
+    * @returns {number} The interpolated color value.
+    */
+    interpolateColor: function (color1, color2, steps, currentStep, alpha) {
+
+        if (typeof alpha === "undefined") { alpha = 255; }
+
+        var src1 = Phaser.Color.getRGB(color1);
+        var src2 = Phaser.Color.getRGB(color2);
+        var r = (((src2.red - src1.red) * currentStep) / steps) + src1.red;
+        var g = (((src2.green - src1.green) * currentStep) / steps) + src1.green;
+        var b = (((src2.blue - src1.blue) * currentStep) / steps) + src1.blue;
+
+        return Phaser.Color.getColor32(alpha, r, g, b);
+
+    },
+
+    /**
+    * Interpolates the two given colours based on the supplied step and currentStep properties.
+    * @method Phaser.Color.interpolateColorWithRGB
+    * @param {number} color - Description.
+    * @param {number} r - Description.
+    * @param {number} g - Description.
+    * @param {number} b - Description.
+    * @param {number} steps - Description.
+    * @param {number} currentStep - Description.
+    * @returns {number} The interpolated color value.
+    */
+    interpolateColorWithRGB: function (color, r, g, b, steps, currentStep) {
+
+        var src = Phaser.Color.getRGB(color);
+        var or = (((r - src.red) * currentStep) / steps) + src.red;
+        var og = (((g - src.green) * currentStep) / steps) + src.green;
+        var ob = (((b - src.blue) * currentStep) / steps) + src.blue;
+
+        return Phaser.Color.getColor(or, og, ob);
+
+    },
+
+    /**
+    * Interpolates the two given colours based on the supplied step and currentStep properties.
+    * @method Phaser.Color.interpolateRGB
+    * @param {number} r1 - Description.
+    * @param {number} g1 - Description.
+    * @param {number} b1 - Description.
+    * @param {number} r2 - Description.
+    * @param {number} g2 - Description.
+    * @param {number} b2 - Description.
+    * @param {number} steps - Description.
+    * @param {number} currentStep - Description.
+    * @returns {number} The interpolated color value.
+    */
+    interpolateRGB: function (r1, g1, b1, r2, g2, b2, steps, currentStep) {
+
+        var r = (((r2 - r1) * currentStep) / steps) + r1;
+        var g = (((g2 - g1) * currentStep) / steps) + g1;
+        var b = (((b2 - b1) * currentStep) / steps) + b1;
+
+        return Phaser.Color.getColor(r, g, b);
+
+    },
+
+    /**
+    * Returns a random color value between black and white
+    * <p>Set the min value to start each channel from the given offset.</p>
+    * <p>Set the max value to restrict the maximum color used per channel</p>
+    *
+    * @method Phaser.Color.getRandomColor
+    * @param {number} min - The lowest value to use for the color.
+    * @param {number} max - The highest value to use for the color.
+    * @param {number} alpha - The alpha value of the returning color (default 255 = fully opaque).
+    * @returns {number} 32-bit color value with alpha.
+    */
+    getRandomColor: function (min, max, alpha) {
+
+        if (typeof min === "undefined") { min = 0; }
+        if (typeof max === "undefined") { max = 255; }
+        if (typeof alpha === "undefined") { alpha = 255; }
+
+        //	Sanity checks
+        if (max > 255) {
+            return Phaser.Color.getColor(255, 255, 255);
+        }
+
+        if (min > max) {
+            return Phaser.Color.getColor(255, 255, 255);
+        }
+
+        var red = min + Math.round(Math.random() * (max - min));
+        var green = min + Math.round(Math.random() * (max - min));
+        var blue = min + Math.round(Math.random() * (max - min));
+
+        return Phaser.Color.getColor32(alpha, red, green, blue);
+
+    },
+
+    /**
+    * Return the component parts of a color as an Object with the properties alpha, red, green, blue
+    *
+    * <p>Alpha will only be set if it exist in the given color (0xAARRGGBB)</p>
+    *
+    * @method Phaser.Color.getRGB
+    * @param {number} color - Color in RGB (0xRRGGBB) or ARGB format (0xAARRGGBB).
+    * @returns {object} An Object with properties: alpha, red, green, blue.
+    */
+    getRGB: function (color) {
+
+        return {
+            alpha: color >>> 24,
+            red: color >> 16 & 0xFF,
+            green: color >> 8 & 0xFF,
+            blue: color & 0xFF
+        };
+
+    },
+
+    /**
+    * Returns a CSS friendly string value from the given color.
+    * @method Phaser.Color.getWebRGB
+    * @param {number} color
+    * @returns {string}A string in the format: 'rgba(r,g,b,a)'
+    */
+    getWebRGB: function (color) {
+
+        var alpha = (color >>> 24) / 255;
+        var red = color >> 16 & 0xFF;
+        var green = color >> 8 & 0xFF;
+        var blue = color & 0xFF;
+
+        return 'rgba(' + red.toString() + ',' + green.toString() + ',' + blue.toString() + ',' + alpha.toString() + ')';
+        
+    },
+
+    /**
+    * Given a native color value (in the format 0xAARRGGBB) this will return the Alpha component, as a value between 0 and 255.
+    *
+    * @method Phaser.Color.getAlpha
+    * @param {number} color - In the format 0xAARRGGBB.
+    * @returns {number} The Alpha component of the color, will be between 0 and 1 (0 being no Alpha (opaque), 1 full Alpha (transparent)).
+    */
+    getAlpha: function (color) {
+        return color >>> 24;
+    },
+
+    /**
+    * Given a native color value (in the format 0xAARRGGBB) this will return the Alpha component as a value between 0 and 1.
+    *
+    * @method Phaser.Color.getAlphaFloat
+    * @param {number} color - In the format 0xAARRGGBB.
+    * @returns {number} The Alpha component of the color, will be between 0 and 1 (0 being no Alpha (opaque), 1 full Alpha (transparent)).
+    */
+    getAlphaFloat: function (color) {
+        return (color >>> 24) / 255;
+    },
+
+    /**
+    * Given a native color value (in the format 0xAARRGGBB) this will return the Red component, as a value between 0 and 255.
+    *
+    * @method Phaser.Color.getRed
+    * @param {number} color In the format 0xAARRGGBB.
+    * @returns {number} The Red component of the color, will be between 0 and 255 (0 being no color, 255 full Red).
+    */
+    getRed: function (color) {
+        return color >> 16 & 0xFF;
+    },
+
+    /**
+    * Given a native color value (in the format 0xAARRGGBB) this will return the Green component, as a value between 0 and 255.
+    *
+    * @method Phaser.Color.getGreen
+    * @param {number} color - In the format 0xAARRGGBB.
+    * @returns {number} The Green component of the color, will be between 0 and 255 (0 being no color, 255 full Green).
+    */
+    getGreen: function (color) {
+        return color >> 8 & 0xFF;
+    },
+
+    /**
+    * Given a native color value (in the format 0xAARRGGBB) this will return the Blue component, as a value between 0 and 255.
+    *
+    * @method Phaser.Color.getBlue
+    * @param {number} color - In the format 0xAARRGGBB.
+    * @returns {number} The Blue component of the color, will be between 0 and 255 (0 being no color, 255 full Blue).
+    */
+    getBlue: function (color) {
+        return color & 0xFF;
+    }
+	
+};
+
+
+
+ + + + + +
+ +
+
+ + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
+ + + Documentation generated by JSDoc 3.2.0-dev + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + +
+
+ + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + diff --git a/Docs/out/Cubic.html b/Docs/out/Cubic.html new file mode 100644 index 00000000..d5580a6f --- /dev/null +++ b/Docs/out/Cubic.html @@ -0,0 +1,874 @@ + + + + + + Phaser Namespace: Cubic + + + + + + + + + + +
+ + +
+ + +
+ +
+ + + +

Namespace: Cubic

+
+ +
+

+ Cubic +

+ +
+ +
+
+ + + + +

Cubic easing.

+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + +
+ + + + + + + + + + + + + + +

Methods

+ +
+ +
+

<static> In(k) → {number}

+ + +
+
+ + +
+

Cubic ease-in.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

Description.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

Description.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

<static> InOut(k) → {number}

+ + +
+
+ + +
+

Cubic ease-in/out.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

Description.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

Description.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

<static> Out(k) → {number}

+ + +
+
+ + +
+

Cubic ease-out.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

Description.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

Description.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ +
+
+ + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
+ + + Documentation generated by JSDoc 3.2.0-dev + on Thu Oct 03 2013 01:56:58 GMT+0100 (BST) using the DocStrap template. + +
+
+ + +
+
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Docs/out/Debug.js.html b/Docs/out/Debug.js.html new file mode 100644 index 00000000..70765275 --- /dev/null +++ b/Docs/out/Debug.js.html @@ -0,0 +1,1214 @@ + + + + + + Phaser Source: utils/Debug.js + + + + + + + + + + +
+ + +
+ + +
+ +
+ + + +

Source: utils/Debug.js

+ +
+
+
/**
+* @author       Richard Davey <rich@photonstorm.com>
+* @copyright    2013 Photon Storm Ltd.
+* @license      {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
+*/
+
+/**
+* A collection of methods for displaying debug information about game objects. Phaser.Debug requires a CANVAS game type in order to render, so if you've got
+* your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL doesn't kick in, then the Debug functions will all display.
+*
+* @class Phaser.Utils.Debug
+* @constructor
+* @param {Phaser.Game} game - A reference to the currently running game.
+*/
+Phaser.Utils.Debug = function (game) {
+
+    /**
+	* @property {Phaser.Game} game - A reference to the currently running Game.
+	*/
+    this.game = game;
+  
+	/**
+	* @property {Context} context - The canvas context on which to render the debug information.
+	*/
+    this.context = game.context;
+
+	/**
+	* @property {string} font - The font that the debug information is rendered in.
+	* @default '14px Courier'
+	*/
+    this.font = '14px Courier';
+   
+	/**
+	* @property {number} lineHeight - The line height between the debug text.
+	*/
+    this.lineHeight = 16;
+    
+	/**
+	* @property {boolean} renderShadow - Should the text be rendered with a slight shadow? Makes it easier to read on different types of background.
+	*/
+    this.renderShadow = true;
+    
+	/**
+	* @property {Context} currentX - The current X position the debug information will be rendered at.
+	* @default
+	*/
+    this.currentX = 0;
+    
+	/**
+	* @property {number} currentY - The current Y position the debug information will be rendered at.
+	* @default
+	*/
+    this.currentY = 0;
+    
+	/**
+	* @property {number} currentAlpha - The current alpha the debug information will be rendered at.
+	* @default
+	*/
+    this.currentAlpha = 1;
+
+};
+
+Phaser.Utils.Debug.prototype = {
+
+    /**
+    * Internal method that resets and starts the debug output values.
+    * @method Phaser.Utils.Debug#start
+    * @param {number} x - The X value the debug info will start from.
+    * @param {number} y - The Y value the debug info will start from.
+    * @param {string} color - The color the debug info will drawn in.
+    */
+    start: function (x, y, color) {
+
+        if (this.context == null)
+        {
+            return;
+        }
+
+        x = x || null;
+        y = y || null;
+        color = color || 'rgb(255,255,255)';
+
+        if (x && y)
+        {
+            this.currentX = x;
+            this.currentY = y;
+            this.currentColor = color;
+        }
+
+        this.currentAlpha = this.context.globalAlpha;
+
+        this.context.save();
+        this.context.setTransform(1, 0, 0, 1, 0, 0);
+        this.context.fillStyle = color;
+        this.context.font = this.font;
+        this.context.globalAlpha = 1;
+
+    },
+
+    /**
+    * Internal method that stops the debug output.
+    * @method Phaser.Utils.Debug#stop
+    */
+    stop: function () {
+
+        this.context.restore();
+        this.context.globalAlpha = this.currentAlpha;
+
+    },
+
+    /**
+    * Internal method that outputs a single line of text.
+    * @method Phaser.Utils.Debug#line
+    * @param {string} text - The line of text to draw.
+    * @param {number} x - The X value the debug info will start from.
+    * @param {number} y - The Y value the debug info will start from.
+    */
+    line: function (text, x, y) {
+
+        if (this.context == null)
+        {
+            return;
+        }
+
+        x = x || null;
+        y = y || null;
+
+        if (x !== null) {
+            this.currentX = x;
+        }
+
+        if (y !== null) {
+            this.currentY = y;
+        }
+
+        if (this.renderShadow)
+        {
+            this.context.fillStyle = 'rgb(0,0,0)';
+            this.context.fillText(text, this.currentX + 1, this.currentY + 1);
+            this.context.fillStyle = this.currentColor;
+        }
+
+        this.context.fillText(text, this.currentX, this.currentY);
+        this.currentY += this.lineHeight;
+
+    },
+
+    /**
+    * Visually renders a QuadTree to the display.
+    * @method Phaser.Utils.Debug#renderQuadTree
+    * @param {Phaser.QuadTree} quadtree - The quadtree to render.
+    * @param {string} color - The color of the lines in the quadtree.
+    */
+    renderQuadTree: function (quadtree, color) {
+
+        color = color || 'rgba(255,0,0,0.3)';
+
+        this.start();
+
+        var bounds = quadtree.bounds;
+
+        if (quadtree.nodes.length === 0)
+        {
+            this.context.strokeStyle = color;
+            this.context.strokeRect(bounds.x, bounds.y, bounds.width, bounds.height);
+            this.renderText(quadtree.ID + ' / ' + quadtree.objects.length, bounds.x + 4, bounds.y + 16, 'rgb(0,200,0)', '12px Courier');
+
+            this.context.strokeStyle = 'rgb(0,255,0)';
+
+            // children
+            for (var i = 0; i < quadtree.objects.length; i++)
+            {
+                this.context.strokeRect(quadtree.objects[i].x, quadtree.objects[i].y, quadtree.objects[i].width, quadtree.objects[i].height);
+            }
+        }
+        else
+        {
+            for (var i = 0; i < quadtree.nodes.length; i++)
+            {
+                this.renderQuadTree(quadtree.nodes[i]);
+            }
+        }
+
+        this.stop();
+
+    },
+
+    /**
+     * Renders the corners and point information of the given Sprite.
+     * @method Phaser.Utils.Debug#renderSpriteCorners
+     * @param {Phaser.Sprite} sprite - The sprite to be rendered.
+     * @param {boolean} [showText=false] - If true the x/y coordinates of each point will be rendered.
+     * @param {boolean} [showBounds=false] - If true the bounds will be rendered over the top of the sprite.
+     * @param {string} [color='rgb(255,0,255)'] - The color the text is rendered in.
+     */
+    renderSpriteCorners: function (sprite, showText, showBounds, color) {
+
+        if (this.context == null)
+        {
+            return;
+        }
+
+        showText = showText || false;
+        showBounds = showBounds || false;
+        color = color || 'rgb(255,0,255)';
+
+        this.start(0, 0, color);
+
+        if (showBounds)
+        {
+            this.context.strokeStyle = 'rgba(255,0,255,0.5)';
+            this.context.strokeRect(sprite.bounds.x, sprite.bounds.y, sprite.bounds.width, sprite.bounds.height);
+            this.context.stroke();
+        }
+
+        this.context.beginPath();
+        this.context.moveTo(sprite.topLeft.x, sprite.topLeft.y);
+        this.context.lineTo(sprite.topRight.x, sprite.topRight.y);
+        this.context.lineTo(sprite.bottomRight.x, sprite.bottomRight.y);
+        this.context.lineTo(sprite.bottomLeft.x, sprite.bottomLeft.y);
+        this.context.closePath();
+        this.context.strokeStyle = 'rgba(0,0,255,0.8)';
+        this.context.stroke();
+
+        this.renderPoint(sprite.center);
+        this.renderPoint(sprite.topLeft);
+        this.renderPoint(sprite.topRight);
+        this.renderPoint(sprite.bottomLeft);
+        this.renderPoint(sprite.bottomRight);
+
+        if (showText)
+        {
+            this.currentColor = color;
+            this.line('x: ' + Math.floor(sprite.topLeft.x) + ' y: ' + Math.floor(sprite.topLeft.y), sprite.topLeft.x, sprite.topLeft.y);
+            this.line('x: ' + Math.floor(sprite.topRight.x) + ' y: ' + Math.floor(sprite.topRight.y), sprite.topRight.x, sprite.topRight.y);
+            this.line('x: ' + Math.floor(sprite.bottomLeft.x) + ' y: ' + Math.floor(sprite.bottomLeft.y), sprite.bottomLeft.x, sprite.bottomLeft.y);
+            this.line('x: ' + Math.floor(sprite.bottomRight.x) + ' y: ' + Math.floor(sprite.bottomRight.y), sprite.bottomRight.x, sprite.bottomRight.y);
+        }
+
+        this.stop();
+
+    },
+
+    /**
+    * Render Sound information, including decoded state, duration, volume and more.
+    * @method Phaser.Utils.Debug#renderSoundInfo
+    * @param {Phaser.Sound} sound - The sound object to debug.
+    * @param {number} x - X position of the debug info to be rendered.
+    * @param {number} y - Y position of the debug info to be rendered.
+    * @param {string} [color='rgb(255,255,255)'] - color of the debug info to be rendered. (format is css color string).
+    */
+    renderSoundInfo: function (sound, x, y, color) {
+
+        if (this.context == null)
+        {
+            return;
+        }
+
+        color = color || 'rgb(255,255,255)';
+
+        this.start(x, y, color);
+        this.line('Sound: ' + sound.key + ' Locked: ' + sound.game.sound.touchLocked);
+        this.line('Is Ready?: ' + this.game.cache.isSoundReady(sound.key) + ' Pending Playback: ' + sound.pendingPlayback);
+        this.line('Decoded: ' + sound.isDecoded + ' Decoding: ' + sound.isDecoding);
+        this.line('Total Duration: ' + sound.totalDuration + ' Playing: ' + sound.isPlaying);
+        this.line('Time: ' + sound.currentTime);
+        this.line('Volume: ' + sound.volume + ' Muted: ' + sound.mute);
+        this.line('WebAudio: ' + sound.usingWebAudio + ' Audio: ' + sound.usingAudioTag);
+
+        if (sound.currentMarker !== '')
+        {
+            this.line('Marker: ' + sound.currentMarker + ' Duration: ' + sound.duration);
+            this.line('Start: ' + sound.markers[sound.currentMarker].start + ' Stop: ' + sound.markers[sound.currentMarker].stop);
+            this.line('Position: ' + sound.position);
+        }
+
+        this.stop();
+
+    },
+
+    /**
+    * Render camera information including dimensions and location.
+    * @method Phaser.Utils.Debug#renderCameraInfo
+    * @param {Phaser.Camera} camera - Description.
+    * @param {number} x - X position of the debug info to be rendered.
+    * @param {number} y - Y position of the debug info to be rendered.
+    * @param {string} [color='rgb(255,255,255)'] - color of the debug info to be rendered. (format is css color string).
+    */
+    renderCameraInfo: function (camera, x, y, color) {
+
+        if (this.context == null)
+        {
+            return;
+        }
+
+        color = color || 'rgb(255,255,255)';
+
+        this.start(x, y, color);
+        this.line('Camera (' + camera.width + ' x ' + camera.height + ')');
+        this.line('X: ' + camera.x + ' Y: ' + camera.y);
+        this.stop();
+        
+    },
+
+    /**
+    * Renders the Pointer.circle object onto the stage in green if down or red if up along with debug text.
+    * @method Phaser.Utils.Debug#renderDebug
+    * @param {Phaser.Pointer} pointer - Description.
+    * @param {boolean} [hideIfUp=false] - Doesn't render the circle if the pointer is up.
+    * @param {string} [downColor='rgba(0,255,0,0.5)'] - The color the circle is rendered in if down.
+    * @param {string} [upColor='rgba(255,0,0,0.5)'] - The color the circle is rendered in if up (and hideIfUp is false).
+    * @param {string} [color='rgb(255,255,255)'] - color of the debug info to be rendered. (format is css color string).
+    */
+    renderPointer: function (pointer, hideIfUp, downColor, upColor, color) {
+
+        if (this.context == null || pointer == null)
+        {
+            return;
+        }
+
+        if (typeof hideIfUp === 'undefined') { hideIfUp = false; }
+        downColor = downColor || 'rgba(0,255,0,0.5)';
+        upColor = upColor || 'rgba(255,0,0,0.5)';
+        color = color || 'rgb(255,255,255)';
+
+        if (hideIfUp == true && pointer.isUp == true)
+        {
+            return;
+        }
+
+        this.start(pointer.x, pointer.y - 100, color);
+        this.context.beginPath();
+        this.context.arc(pointer.x, pointer.y, pointer.circle.radius, 0, Math.PI * 2);
+
+        if (pointer.active)
+        {
+            this.context.fillStyle = downColor;
+        }
+        else
+        {
+            this.context.fillStyle = upColor;
+        }
+
+        this.context.fill();
+        this.context.closePath();
+
+        //  Render the points
+        this.context.beginPath();
+        this.context.moveTo(pointer.positionDown.x, pointer.positionDown.y);
+        this.context.lineTo(pointer.position.x, pointer.position.y);
+        this.context.lineWidth = 2;
+        this.context.stroke();
+        this.context.closePath();
+
+        //  Render the text
+        // this.start(pointer.x, pointer.y - 100, color);
+        this.line('ID: ' + pointer.id + " Active: " + pointer.active);
+        this.line('World X: ' + pointer.worldX + " World Y: " + pointer.worldY);
+        this.line('Screen X: ' + pointer.x + " Screen Y: " + pointer.y);
+        this.line('Duration: ' + pointer.duration + " ms");
+        this.stop();
+
+    },
+
+    /**
+    * Render Sprite Input Debug information.
+    * @method Phaser.Utils.Debug#renderSpriteInputInfo
+    * @param {Phaser.Sprite} sprite - The sprite to be rendered.
+    * @param {number} x - X position of the debug info to be rendered.
+    * @param {number} y - Y position of the debug info to be rendered.
+    * @param {string} [color='rgb(255,255,255)'] - color of the debug info to be rendered. (format is css color string).
+    */    
+    renderSpriteInputInfo: function (sprite, x, y, color) {
+
+        color = color || 'rgb(255,255,255)';
+
+        this.start(x, y, color);
+        this.line('Sprite Input: (' + sprite.width + ' x ' + sprite.height + ')');
+        this.line('x: ' + sprite.input.pointerX().toFixed(1) + ' y: ' + sprite.input.pointerY().toFixed(1));
+        this.line('over: ' + sprite.input.pointerOver() + ' duration: ' + sprite.input.overDuration().toFixed(0));
+        this.line('down: ' + sprite.input.pointerDown() + ' duration: ' + sprite.input.downDuration().toFixed(0));
+        this.line('just over: ' + sprite.input.justOver() + ' just out: ' + sprite.input.justOut());
+        this.stop();
+
+    },
+
+    /**
+     * Render Sprite collision.
+     * @method Phaser.Utils.Debug#renderSpriteCollision
+     * @param {Phaser.Sprite} sprite - The sprite to be rendered.
+     * @param {number} x - X position of the debug info to be rendered.
+     * @param {number} y - Y position of the debug info to be rendered.
+    * @param {string} [color='rgb(255,255,255)'] - color of the debug info to be rendered. (format is css color string).
+     */ 
+    renderSpriteCollision: function (sprite, x, y, color) {
+
+        color = color || 'rgb(255,255,255)';
+
+        this.start(x, y, color);
+        this.line('Sprite Collision: (' + sprite.width + ' x ' + sprite.height + ')');
+        this.line('left: ' + sprite.body.touching.left);
+        this.line('right: ' + sprite.body.touching.right);
+        this.line('up: ' + sprite.body.touching.up);
+        this.line('down: ' + sprite.body.touching.down);
+        this.line('velocity.x: ' + sprite.body.velocity.x);
+        this.line('velocity.y: ' + sprite.body.velocity.y);
+        this.stop();
+
+    },
+
+    /**
+    * Render debug information about the Input object.
+    * @method Phaser.Utils.Debug#renderInputInfo
+    * @param {number} x - X position of the debug info to be rendered.
+    * @param {number} y - Y position of the debug info to be rendered.
+    * @param {string} [color='rgb(255,255,255)'] - color of the debug info to be rendered. (format is css color string).
+    */
+    renderInputInfo: function (x, y, color) {
+
+        if (this.context == null)
+        {
+            return;
+        }
+
+        color = color || 'rgb(255,255,0)';
+
+        this.start(x, y, color);
+        this.line('Input');
+        this.line('X: ' + this.game.input.x + ' Y: ' + this.game.input.y);
+        this.line('World X: ' + this.game.input.worldX + ' World Y: ' + this.game.input.worldY);
+        this.line('Scale X: ' + this.game.input.scale.x.toFixed(1) + ' Scale Y: ' + this.game.input.scale.x.toFixed(1));
+        this.line('Screen X: ' + this.game.input.activePointer.screenX + ' Screen Y: ' + this.game.input.activePointer.screenY);
+        this.stop();
+
+    },
+
+    /**
+    * Render debug infos (including name, bounds info, position and some other properties) about the Sprite.
+    * @method Phaser.Utils.Debug#renderSpriteInfo
+    * @param {Phaser.Sprite} sprite - Description.
+    * @param {number} x - X position of the debug info to be rendered.
+    * @param {number} y - Y position of the debug info to be rendered.
+    * @param {string} [color='rgb(255,255,255)'] - color of the debug info to be rendered. (format is css color string).
+    */
+    renderSpriteInfo: function (sprite, x, y, color) {
+
+        if (this.context == null)
+        {
+            return;
+        }
+
+        color = color || 'rgb(255, 255, 255)';
+
+        this.start(x, y, color);
+
+        this.line('Sprite: ' + ' (' + sprite.width + ' x ' + sprite.height + ') anchor: ' + sprite.anchor.x + ' x ' + sprite.anchor.y);
+        this.line('x: ' + sprite.x.toFixed(1) + ' y: ' + sprite.y.toFixed(1) + ' rotation: ' + sprite.rotation.toFixed(1));
+        this.line('visible: ' + sprite.visible);
+        this.line('in camera: ' + sprite.inCamera);
+        this.line('body x: ' + sprite.body.x.toFixed(1) + ' y: ' + sprite.body.y.toFixed(1));
+
+        //  0 = scaleX
+        //  1 = skewY
+        //  2 = translateX
+        //  3 = skewX
+        //  4 = scaleY
+        //  5 = translateY
+
+
+        // this.line('id: ' + sprite._id);
+        // this.line('scale x: ' + sprite.worldTransform[0]);
+        // this.line('scale y: ' + sprite.worldTransform[4]);
+        // this.line('tx: ' + sprite.worldTransform[2]);
+        // this.line('ty: ' + sprite.worldTransform[5]);
+        // this.line('skew x: ' + sprite.worldTransform[3]);
+        // this.line('skew y: ' + sprite.worldTransform[1]);
+        this.line('dx: ' + sprite.body.deltaX());
+        this.line('dy: ' + sprite.body.deltaY());
+        this.line('sdx: ' + sprite.deltaX());
+        this.line('sdy: ' + sprite.deltaY());
+
+        // this.line('inCamera: ' + this.game.renderer.spriteRenderer.inCamera(this.game.camera, sprite));
+
+    },
+
+    /**
+    * Render the World Transform information of the given Sprite.
+    * @method Phaser.Utils.Debug#renderWorldTransformInfo
+    * @param {Phaser.Sprite} sprite - Description.
+    * @param {number} x - X position of the debug info to be rendered.
+    * @param {number} y - Y position of the debug info to be rendered.
+    * @param {string} [color='rgb(255,255,255)'] - color of the debug info to be rendered. (format is css color string).
+    */
+    renderWorldTransformInfo: function (sprite, x, y, color) {
+
+        if (this.context == null)
+        {
+            return;
+        }
+
+        color = color || 'rgb(255, 255, 255)';
+
+        this.start(x, y, color);
+
+        this.line('World Transform');
+        this.line('skewX:  ' + sprite.worldTransform[3]);
+        this.line('skewY:  ' + sprite.worldTransform[1]);
+        this.line('scaleX: ' + sprite.worldTransform[0]);
+        this.line('scaleY: ' + sprite.worldTransform[4]);
+        this.line('transX: ' + sprite.worldTransform[2]);
+        this.line('transY: ' + sprite.worldTransform[5]);
+
+    },
+
+    /**
+    * Render the Local Transform information of the given Sprite.
+    * @method Phaser.Utils.Debug#renderLocalTransformInfo
+    * @param {Phaser.Sprite} sprite - Description.
+    * @param {number} x - X position of the debug info to be rendered.
+    * @param {number} y - Y position of the debug info to be rendered.
+    * @param {string} [color='rgb(255,255,255)'] - color of the debug info to be rendered. (format is css color string).
+    */
+    renderLocalTransformInfo: function (sprite, x, y, color) {
+
+        if (this.context == null)
+        {
+            return;
+        }
+
+        color = color || 'rgb(255, 255, 255)';
+
+        this.start(x, y, color);
+
+        this.line('Local Transform');
+        this.line('skewX:  ' + sprite.localTransform[3]);
+        this.line('skewY:  ' + sprite.localTransform[1]);
+        this.line('scaleX: ' + sprite.localTransform[0]);
+        this.line('scaleY: ' + sprite.localTransform[4]);
+        this.line('transX: ' + sprite.localTransform[2]);
+        this.line('transY: ' + sprite.localTransform[5]);
+        this.line('sX:     ' + sprite._sx);
+        this.line('sY:     ' + sprite._sy);
+
+    },
+
+    /**
+    * Renders Point coordinates in the given color.
+    * @method Phaser.Utils.Debug#renderPointInfo
+    * @param {Phaser.Point} sprite - Description.
+    * @param {number} x - X position of the debug info to be rendered.
+    * @param {number} y - Y position of the debug info to be rendered.
+    * @param {string} [color='rgb(255,255,255)'] - color of the debug info to be rendered. (format is css color string).
+    */
+    renderPointInfo: function (point, x, y, color) {
+
+        if (this.context == null)
+        {
+            return;
+        }
+
+        color = color || 'rgb(255, 255, 255)';
+
+        this.start(x, y, color);
+        this.line('px: ' + point.x.toFixed(1) + ' py: ' + point.y.toFixed(1));
+        this.stop();
+
+    },
+
+    /**
+    * Renders just the Sprite.body bounds.
+    * @method Phaser.Utils.Debug#renderSpriteBody
+    * @param {Phaser.Sprite} sprite - Description.
+    * @param {string} [color] - Color of the debug info to be rendered (format is css color string).
+    */
+    renderSpriteBody: function (sprite, color) {
+
+        if (this.context == null)
+        {
+            return;
+        }
+
+        color = color || 'rgba(255,0,255, 0.3)';
+
+        this.start(0, 0, color);
+
+        this.context.fillStyle = color;
+        // this.context.fillRect(sprite.body.x - sprite.body.deltaX(), sprite.body.y - sprite.body.deltaY(), sprite.body.width, sprite.body.height);
+        this.context.fillRect(sprite.body.x, sprite.body.y, sprite.body.width, sprite.body.height);
+
+        this.stop();
+
+    },
+
+    /**
+    * Renders just the full Sprite bounds.
+    * @method Phaser.Utils.Debug#renderSpriteBounds
+    * @param {Phaser.Sprite} sprite - Description.
+    * @param {string} [color] - Color of the debug info to be rendered (format is css color string).
+    * @param {boolean} [fill=false] - If false the bounds outline is rendered, if true the whole rectangle is rendered.
+    */
+    renderSpriteBounds: function (sprite, color, fill) {
+
+        if (this.context == null)
+        {
+            return;
+        }
+
+        color = color || 'rgb(255,0,255)';
+
+        if (typeof fill === 'undefined') { fill = false; }
+
+        this.start(0, 0, color);
+
+        if (fill)
+        {
+            this.context.fillStyle = color;
+            this.context.fillRect(sprite.bounds.x, sprite.bounds.y, sprite.bounds.width, sprite.bounds.height);
+        }
+        else
+        {
+            this.context.strokeStyle = color;
+            this.context.strokeRect(sprite.bounds.x, sprite.bounds.y, sprite.bounds.width, sprite.bounds.height);
+            this.context.stroke();
+        }
+
+        this.stop();
+
+    },
+
+    /**
+    * Renders a single pixel.
+    * @method Phaser.Utils.Debug#renderPixel
+    * @param {number} x - X position of the debug info to be rendered.
+    * @param {number} y - Y position of the debug info to be rendered.
+    * @param {string} [color] - Color of the debug info to be rendered (format is css color string).
+    */
+    renderPixel: function (x, y, color) {
+
+        if (this.context == null)
+        {
+            return;
+        }
+
+        color = color || 'rgba(0,255,0,1)';
+
+        this.start();
+        this.context.fillStyle = color;
+        this.context.fillRect(x, y, 2, 2);
+        this.stop();
+
+    },
+
+    /**
+    * Renders a Point object.
+    * @method Phaser.Utils.Debug#renderPoint
+    * @param {Phaser.Point} point - The Point to render.
+    * @param {string} [color] - Color of the debug info to be rendered (format is css color string).
+    */
+    renderPoint: function (point, color) {
+
+        if (this.context == null)
+        {
+            return;
+        }
+
+        color = color || 'rgba(0,255,0,1)';
+
+        this.start();
+        this.context.fillStyle = color;
+        this.context.fillRect(point.x, point.y, 4, 4);
+        this.stop();
+
+    },
+
+    /**
+    * Renders a Rectangle.
+    * @method Phaser.Utils.Debug#renderRectangle
+    * @param {Phaser.Rectangle} rect - The Rectangle to render.
+    * @param {string} [color] - Color of the debug info to be rendered (format is css color string).
+    */
+    renderRectangle: function (rect, color) {
+
+        if (this.context == null)
+        {
+            return;
+        }
+
+        color = color || 'rgba(0,255,0,0.3)';
+
+        this.start();
+        this.context.fillStyle = color;
+        this.context.fillRect(rect.x, rect.y, rect.width, rect.height);
+        this.stop();
+        
+    },
+
+    /**
+    * Renders a Circle.
+    * @method Phaser.Utils.Debug#renderCircle
+    * @param {Phaser.Circle} circle - The Circle to render.
+    * @param {string} [color] - Color of the debug info to be rendered (format is css color string).
+    */
+    renderCircle: function (circle, color) {
+
+        if (this.context == null)
+        {
+            return;
+        }
+
+        color = color || 'rgba(0,255,0,0.3)';
+
+        this.start();
+        this.context.beginPath();
+        this.context.fillStyle = color;
+        this.context.arc(circle.x, circle.y, circle.radius, 0, Math.PI * 2, false);
+        this.context.fill();
+        this.context.closePath();
+        this.stop();
+
+    },
+
+    /**
+    * Render text.
+    * @method Phaser.Utils.Debug#renderText
+    * @param {string} text - The line of text to draw.
+    * @param {number} x - X position of the debug info to be rendered.
+    * @param {number} y - Y position of the debug info to be rendered.
+    * @param {string} [color] - Color of the debug info to be rendered (format is css color string).
+    * @param {string} font - The font of text to draw.
+    */    
+    renderText: function (text, x, y, color, font) {
+
+        if (this.context == null)
+        {
+            return;
+        }
+
+        color = color || 'rgb(255,255,255)';
+        font = font || '16px Courier';
+
+        this.start();
+        this.context.font = font;
+        this.context.fillStyle = color;
+        this.context.fillText(text, x, y);
+        this.stop();
+
+    },
+
+    /**
+    * Dumps the Linked List to the console.
+    * 
+    * @method Phaser.Utils.Debug#Phaser.LinkedList#dump 
+    * @param {Phaser.LinkedList} list - The LinkedList to dump.
+    */
+    dumpLinkedList: function (list) {
+
+        var spacing = 20;
+
+        var output = "\n" + Phaser.Utils.pad('Node', spacing) + "|" + Phaser.Utils.pad('Next', spacing) + "|" + Phaser.Utils.pad('Previous', spacing) + "|" + Phaser.Utils.pad('First', spacing) + "|" + Phaser.Utils.pad('Last', spacing);
+        console.log(output);
+
+        var output = Phaser.Utils.pad('----------', spacing) + "|" + Phaser.Utils.pad('----------', spacing) + "|" + Phaser.Utils.pad('----------', spacing) + "|" + Phaser.Utils.pad('----------', spacing) + "|" + Phaser.Utils.pad('----------', spacing);
+        console.log(output);
+
+        var entity = list;
+
+        var testObject = entity.last.next;
+        entity = entity.first;
+        
+        do  
+        {
+            var name = entity.sprite.name || '*';
+            var nameNext = '-';
+            var namePrev = '-';
+            var nameFirst = '-';
+            var nameLast = '-';
+
+            if (entity.next)
+            {
+                nameNext = entity.next.sprite.name;
+            }
+
+            if (entity.prev)
+            {
+                namePrev = entity.prev.sprite.name;
+            }
+
+            if (entity.first)
+            {
+                nameFirst = entity.first.sprite.name;
+            }
+
+            if (entity.last)
+            {
+                nameLast = entity.last.sprite.name;
+            }
+
+            if (typeof nameNext === 'undefined')
+            {
+                nameNext = '-';
+            }
+
+            if (typeof namePrev === 'undefined')
+            {
+                namePrev = '-';
+            }
+
+            if (typeof nameFirst === 'undefined')
+            {
+                nameFirst = '-';
+            }
+
+            if (typeof nameLast === 'undefined')
+            {
+                nameLast = '-';
+            }
+
+            var output = Phaser.Utils.pad(name, spacing) + "|" + Phaser.Utils.pad(nameNext, spacing) + "|" + Phaser.Utils.pad(namePrev, spacing) + "|" + Phaser.Utils.pad(nameFirst, spacing) + "|" + Phaser.Utils.pad(nameLast, spacing);
+            console.log(output);
+
+            entity = entity.next;
+
+        }
+        while(entity != testObject)
+
+    }
+
+
+};
+
+
+
+ + + + + +
+ +
+
+ + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
+ + + Documentation generated by JSDoc 3.2.0-dev + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + +
+
+ + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + diff --git a/Docs/out/Device.js.html b/Docs/out/Device.js.html index 420c4ae0..d098e87b 100644 --- a/Docs/out/Device.js.html +++ b/Docs/out/Device.js.html @@ -23,13 +23,13 @@ @@ -790,7 +876,7 @@ Phaser.Device.prototype = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:41 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Easing.js.html b/Docs/out/Easing.js.html new file mode 100644 index 00000000..4f6714d1 --- /dev/null +++ b/Docs/out/Easing.js.html @@ -0,0 +1,946 @@ + + + + + + Phaser Source: tween/Easing.js + + + + + + + + + + +
+ + +
+ + +
+ +
+ + + +

Source: tween/Easing.js

+ +
+
+
/**
+* @author       Richard Davey <rich@photonstorm.com>
+* @copyright    2013 Photon Storm Ltd.
+* @license      {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
+*/
+
+/**
+* A collection of easing methods defining ease-in ease-out curves.
+*
+* @class Phaser.Easing
+*/
+Phaser.Easing = {
+
+    /**
+    * Linear easing.
+    *
+    * @class Phaser.Easing.Linear
+    */
+	Linear: {
+
+		/**
+		* Ease-in.
+		*
+		* @method Phaser.Easing.Linear#In 
+		* @param {number} k - The value to be tweened.
+		* @returns {number} k^2.
+		*/
+		None: function ( k ) {
+
+			return k;
+
+		}
+
+	},
+
+    /**
+    * Quadratic easing.
+    *
+    * @class Phaser.Easing.Quadratic
+    */
+	Quadratic: {
+
+		/**
+		* Ease-in.
+		*
+		* @method Phaser.Easing.Quadratic#In 
+		* @param {number} k - The value to be tweened. 
+		* @returns {number} k^2.
+		*/
+		In: function ( k ) {
+
+			return k * k;
+
+		},
+
+		/**
+		* Ease-out.
+		*
+		* @method Phaser.Easing.Quadratic#Out 
+		* @param {number} k - The value to be tweened. 
+		* @returns {number} k* (2-k).
+		*/
+		Out: function ( k ) {
+
+			return k * ( 2 - k );
+
+		},
+
+		/**
+		* Ease-in/out.
+		*
+		* @method Phaser.Easing.Quadratic#InOut
+		* @param {number} k - The value to be tweened. 
+		* @returns {number} The tweened value.
+		*/
+		InOut: function ( k ) {
+
+			if ( ( k *= 2 ) < 1 ) return 0.5 * k * k;
+			return - 0.5 * ( --k * ( k - 2 ) - 1 );
+
+		}
+
+	},
+
+    /**
+    * Cubic easing.
+    *
+    * @class Phaser.Easing.Cubic
+    */
+	Cubic: {
+
+		/**
+		* Cubic ease-in.
+		*
+		* @method Phaser.Easing.Cubic#In 
+		* @param {number} k - The value to be tweened. 
+		* @returns {number} The tweened value.
+		*/
+		In: function ( k ) {
+
+			return k * k * k;
+
+		},
+
+		/**
+		* Cubic ease-out.
+		*
+		* @method Phaser.Easing.Cubic#Out
+		* @param {number} k - The value to be tweened. 
+		* @returns {number} The tweened value.
+		*/
+		Out: function ( k ) {
+
+			return --k * k * k + 1;
+
+		},
+
+		/**
+		* Cubic ease-in/out.
+		*
+		* @method Phaser.Easing.Cubic#InOut
+		* @param {number} k - The value to be tweened. 
+		* @returns {number} The tweened value.
+		*/
+		InOut: function ( k ) {
+
+			if ( ( k *= 2 ) < 1 ) return 0.5 * k * k * k;
+			return 0.5 * ( ( k -= 2 ) * k * k + 2 );
+
+		}
+
+	},
+
+    /**
+    * Quartic easing.
+    *
+    * @class Phaser.Easing.Quartic
+    */
+	Quartic: {
+
+		/**
+		* Quartic ease-in.
+		*
+		* @method Phaser.Easing.Quartic#In 
+		* @param {number} k - The value to be tweened. 
+		* @returns {number} The tweened value.
+		*/
+		In: function ( k ) {
+
+			return k * k * k * k;
+
+		},
+
+		/**
+		* Quartic ease-out.
+		*
+		* @method Phaser.Easing.Quartic#Out
+		* @param {number} k - The value to be tweened. 
+		* @returns {number} The tweened value.
+		*/
+		Out: function ( k ) {
+
+			return 1 - ( --k * k * k * k );
+
+		},
+
+		/**
+		* Quartic ease-in/out.
+		*
+		* @method Phaser.Easing.Quartic#InOut
+		* @param {number} k - The value to be tweened. 
+		* @returns {number} The tweened value.
+		*/
+		InOut: function ( k ) {
+
+			if ( ( k *= 2 ) < 1) return 0.5 * k * k * k * k;
+			return - 0.5 * ( ( k -= 2 ) * k * k * k - 2 );
+
+		}
+
+	},
+
+    /**
+    * Quintic easing.
+    *
+    * @class Phaser.Easing.Quintic
+    */
+	Quintic: {
+
+		/**
+		* Quintic ease-in.
+		*
+		* @method Phaser.Easing.Quintic#In 
+		* @param {number} k - The value to be tweened. 
+		* @returns {number} The tweened value.
+		*/
+		In: function ( k ) {
+
+			return k * k * k * k * k;
+
+		},
+
+		/**
+		* Quintic ease-out.
+		*
+		* @method Phaser.Easing.Quintic#Out
+		* @param {number} k - The value to be tweened. 
+		* @returns {number} The tweened value.
+		*/
+		Out: function ( k ) {
+
+			return --k * k * k * k * k + 1;
+
+		},
+
+		/**
+		* Quintic ease-in/out.
+		*
+		* @method Phaser.Easing.Quintic#InOut
+		* @param {number} k - The value to be tweened. 
+		* @returns {number} The tweened value.
+		*/
+		InOut: function ( k ) {
+
+			if ( ( k *= 2 ) < 1 ) return 0.5 * k * k * k * k * k;
+			return 0.5 * ( ( k -= 2 ) * k * k * k * k + 2 );
+
+		}
+
+	},
+
+    /**
+    * Sinusoidal easing.
+    *
+    * @class Phaser.Easing.Sinusoidal
+    */
+	Sinusoidal: {
+
+		/**
+		* Sinusoidal ease-in.
+		*
+		* @method Phaser.Easing.Sinusoidal#In 
+		* @param {number} k - The value to be tweened. 
+		* @returns {number} The tweened value.
+		*/
+		In: function ( k ) {
+
+			return 1 - Math.cos( k * Math.PI / 2 );
+
+		},
+
+		/**
+		* Sinusoidal ease-out.
+		*
+		* @method Phaser.Easing.Sinusoidal#Out
+		* @param {number} k - The value to be tweened. 
+		* @returns {number} The tweened value.
+		*/
+		Out: function ( k ) {
+
+			return Math.sin( k * Math.PI / 2 );
+
+		},
+
+		/**
+		* Sinusoidal ease-in/out.
+		*
+		* @method Phaser.Easing.Sinusoidal#InOut
+		* @param {number} k - The value to be tweened. 
+		* @returns {number} The tweened value.
+		*/
+		InOut: function ( k ) {
+
+			return 0.5 * ( 1 - Math.cos( Math.PI * k ) );
+
+		}
+
+	},
+
+    /**
+    * Exponential easing.
+    *
+    * @class Phaser.Easing.Exponential
+    */
+	Exponential: {
+
+		/**
+		* Exponential ease-in.
+		*
+		* @method Phaser.Easing.Exponential#In 
+		* @param {number} k - The value to be tweened. 
+		* @returns {number} The tweened value.
+		*/
+		In: function ( k ) {
+
+			return k === 0 ? 0 : Math.pow( 1024, k - 1 );
+
+		},
+
+		/**
+		* Exponential ease-out.
+		*
+		* @method Phaser.Easing.Exponential#Out
+		* @param {number} k - The value to be tweened. 
+		* @returns {number} The tweened value.
+		*/
+		Out: function ( k ) {
+
+			return k === 1 ? 1 : 1 - Math.pow( 2, - 10 * k );
+
+		},
+
+		/**
+		* Exponential ease-in/out.
+		*
+		* @method Phaser.Easing.Exponential#InOut
+		* @param {number} k - The value to be tweened. 
+		* @returns {number} The tweened value.
+		*/
+		InOut: function ( k ) {
+
+			if ( k === 0 ) return 0;
+			if ( k === 1 ) return 1;
+			if ( ( k *= 2 ) < 1 ) return 0.5 * Math.pow( 1024, k - 1 );
+			return 0.5 * ( - Math.pow( 2, - 10 * ( k - 1 ) ) + 2 );
+
+		}
+
+	},
+
+    /**
+    * Circular easing.
+    *
+    * @class Phaser.Easing.Circular
+    */
+	Circular: {
+
+		/**
+		* Circular ease-in.
+		*
+		* @method Phaser.Easing.Circular#In 
+		* @param {number} k - The value to be tweened. 
+		* @returns {number} The tweened value.
+		*/
+		In: function ( k ) {
+
+			return 1 - Math.sqrt( 1 - k * k );
+
+		},
+
+		/**
+		* Circular ease-out.
+		*
+		* @method Phaser.Easing.Circular#Out
+		* @param {number} k - The value to be tweened. 
+		* @returns {number} The tweened value.
+		*/
+		Out: function ( k ) {
+
+			return Math.sqrt( 1 - ( --k * k ) );
+
+		},
+
+		/**
+		* Circular ease-in/out.
+        *
+		* @method Phaser.Easing.Circular#InOut
+		* @param {number} k - The value to be tweened. 
+		* @returns {number} The tweened value.
+        */
+		InOut: function ( k ) {
+
+			if ( ( k *= 2 ) < 1) return - 0.5 * ( Math.sqrt( 1 - k * k) - 1);
+			return 0.5 * ( Math.sqrt( 1 - ( k -= 2) * k) + 1);
+
+		}
+
+	},
+
+    /**
+    * Elastic easing.
+    *
+    * @class Phaser.Easing.Elastic
+    */
+	Elastic: {
+
+		/**
+		* Elastic ease-in.
+        *
+		* @method Phaser.Easing.Elastic#In 
+		* @param {number} k - The value to be tweened. 
+		* @returns {number} The tweened value.
+        */
+		In: function ( k ) {
+
+			var s, a = 0.1, p = 0.4;
+			if ( k === 0 ) return 0;
+			if ( k === 1 ) return 1;
+			if ( !a || a < 1 ) { a = 1; s = p / 4; }
+			else s = p * Math.asin( 1 / a ) / ( 2 * Math.PI );
+			return - ( a * Math.pow( 2, 10 * ( k -= 1 ) ) * Math.sin( ( k - s ) * ( 2 * Math.PI ) / p ) );
+
+		},
+
+		/**
+		* Elastic ease-out.
+        *
+		* @method Phaser.Easing.Elastic#Out
+		* @param {number} k - The value to be tweened. 
+		* @returns {number} The tweened value.
+        */
+		Out: function ( k ) {
+
+			var s, a = 0.1, p = 0.4;
+			if ( k === 0 ) return 0;
+			if ( k === 1 ) return 1;
+			if ( !a || a < 1 ) { a = 1; s = p / 4; }
+			else s = p * Math.asin( 1 / a ) / ( 2 * Math.PI );
+			return ( a * Math.pow( 2, - 10 * k) * Math.sin( ( k - s ) * ( 2 * Math.PI ) / p ) + 1 );
+
+		},
+
+		/**
+		* Elastic ease-in/out.
+        *
+		* @method Phaser.Easing.Elastic#InOut
+		* @param {number} k - The value to be tweened. 
+		* @returns {number} The tweened value.
+        */
+		InOut: function ( k ) {
+
+			var s, a = 0.1, p = 0.4;
+			if ( k === 0 ) return 0;
+			if ( k === 1 ) return 1;
+			if ( !a || a < 1 ) { a = 1; s = p / 4; }
+			else s = p * Math.asin( 1 / a ) / ( 2 * Math.PI );
+			if ( ( k *= 2 ) < 1 ) return - 0.5 * ( a * Math.pow( 2, 10 * ( k -= 1 ) ) * Math.sin( ( k - s ) * ( 2 * Math.PI ) / p ) );
+			return a * Math.pow( 2, -10 * ( k -= 1 ) ) * Math.sin( ( k - s ) * ( 2 * Math.PI ) / p ) * 0.5 + 1;
+
+		}
+
+	},
+
+    /**
+    * Back easing.
+    *
+    * @class Phaser.Easing.Back
+    */
+	Back: {
+
+		/**
+		* Back ease-in.
+        *
+		* @method Phaser.Easing.Back#In 
+		* @param {number} k - The value to be tweened. 
+		* @returns {number} The tweened value.
+        */
+		In: function ( k ) {
+
+			var s = 1.70158;
+			return k * k * ( ( s + 1 ) * k - s );
+
+		},
+
+		/**
+		* Back ease-out.
+        *
+		* @method Phaser.Easing.Back#Out
+		* @param {number} k - The value to be tweened. 
+		* @returns {number} The tweened value.
+        */
+		Out: function ( k ) {
+
+			var s = 1.70158;
+			return --k * k * ( ( s + 1 ) * k + s ) + 1;
+
+		},
+
+		/**
+		* Back ease-in/out.
+        *
+		* @method Phaser.Easing.Back#InOut
+		* @param {number} k - The value to be tweened. 
+		* @returns {number} The tweened value.
+        */
+		InOut: function ( k ) {
+
+			var s = 1.70158 * 1.525;
+			if ( ( k *= 2 ) < 1 ) return 0.5 * ( k * k * ( ( s + 1 ) * k - s ) );
+			return 0.5 * ( ( k -= 2 ) * k * ( ( s + 1 ) * k + s ) + 2 );
+
+		}
+
+	},
+
+    /**
+    * Bounce easing.
+    *
+    * @class Phaser.Easing.Bounce
+    */
+	Bounce: {
+
+		/**
+		* Bounce ease-in.
+        *
+		* @method Phaser.Easing.Bounce#In 
+		* @param {number} k - The value to be tweened. 
+		* @returns {number} The tweened value.
+        */
+		In: function ( k ) {
+
+			return 1 - Phaser.Easing.Bounce.Out( 1 - k );
+
+		},
+
+		/**
+		* Bounce ease-out.
+        *
+		* @method Phaser.Easing.Bounce#Out
+		* @param {number} k - The value to be tweened. 
+		* @returns {number} The tweened value.
+        */
+		Out: function ( k ) {
+
+			if ( k < ( 1 / 2.75 ) ) {
+
+				return 7.5625 * k * k;
+
+			} else if ( k < ( 2 / 2.75 ) ) {
+
+				return 7.5625 * ( k -= ( 1.5 / 2.75 ) ) * k + 0.75;
+
+			} else if ( k < ( 2.5 / 2.75 ) ) {
+
+				return 7.5625 * ( k -= ( 2.25 / 2.75 ) ) * k + 0.9375;
+
+			} else {
+
+				return 7.5625 * ( k -= ( 2.625 / 2.75 ) ) * k + 0.984375;
+
+			}
+
+		},
+
+		/**
+		* Bounce ease-in/out.
+        *
+		* @method Phaser.Easing.Bounce#InOut
+		* @param {number} k - The value to be tweened. 
+		* @returns {number} The tweened value.
+        */
+		InOut: function ( k ) {
+
+			if ( k < 0.5 ) return Phaser.Easing.Bounce.In( k * 2 ) * 0.5;
+			return Phaser.Easing.Bounce.Out( k * 2 - 1 ) * 0.5 + 0.5;
+
+		}
+
+	}
+
+};
+
+
+
+ + + + + +
+ +
+
+ + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
+ + + Documentation generated by JSDoc 3.2.0-dev + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + +
+
+ + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + diff --git a/Docs/out/Elastic.html b/Docs/out/Elastic.html new file mode 100644 index 00000000..c5338776 --- /dev/null +++ b/Docs/out/Elastic.html @@ -0,0 +1,874 @@ + + + + + + Phaser Namespace: Elastic + + + + + + + + + + +
+ + +
+ + +
+ +
+ + + +

Namespace: Elastic

+
+ +
+

+ Elastic +

+ +
+ +
+
+ + + + +

Elastic easing.

+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + +
+ + + + + + + + + + + + + + +

Methods

+ +
+ +
+

<static> In(k) → {number}

+ + +
+
+ + +
+

Elastic ease-in.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

Description.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

Description.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

<static> InOut(k) → {number}

+ + +
+
+ + +
+

Elastic ease-in/out.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

Description.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

Description.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

<static> Out(k) → {number}

+ + +
+
+ + +
+

Elastic ease-out.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

Description.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

Description.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ +
+
+ + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
+ + + Documentation generated by JSDoc 3.2.0-dev + on Thu Oct 03 2013 01:56:58 GMT+0100 (BST) using the DocStrap template. + +
+
+ + +
+
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Docs/out/Emitter.js.html b/Docs/out/Emitter.js.html index 972435b1..58892cf8 100644 --- a/Docs/out/Emitter.js.html +++ b/Docs/out/Emitter.js.html @@ -23,13 +23,13 @@ @@ -931,7 +1017,7 @@ Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype, "bottom", { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:41 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Exponential.html b/Docs/out/Exponential.html new file mode 100644 index 00000000..080e8300 --- /dev/null +++ b/Docs/out/Exponential.html @@ -0,0 +1,874 @@ + + + + + + Phaser Namespace: Exponential + + + + + + + + + + +
+ + +
+ + +
+ +
+ + + +

Namespace: Exponential

+
+ +
+

+ Exponential +

+ +
+ +
+
+ + + + +

Exponential easing.

+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + +
+ + + + + + + + + + + + + + +

Methods

+ +
+ +
+

<static> In(k) → {number}

+ + +
+
+ + +
+

Exponential ease-in.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

Description.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

Description.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

<static> InOut(k) → {number}

+ + +
+
+ + +
+

Exponential ease-in/out.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

Description.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

Description.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

<static> Out(k) → {number}

+ + +
+
+ + +
+

Exponential ease-out.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

Description.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

Description.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ +
+
+ + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
+ + + Documentation generated by JSDoc 3.2.0-dev + on Thu Oct 03 2013 01:56:58 GMT+0100 (BST) using the DocStrap template. + +
+
+ + +
+
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Docs/out/Frame.js.html b/Docs/out/Frame.js.html index f84e81f9..50966e30 100644 --- a/Docs/out/Frame.js.html +++ b/Docs/out/Frame.js.html @@ -23,13 +23,13 @@ @@ -244,7 +330,7 @@ /** * A Frame is a single frame of an animation and is part of a FrameData collection. * -* @class Phaser.Animation.Frame +* @class Phaser.Frame * @constructor * @param {number} index - The index of this Frame within the FrameData set it is being added to. * @param {number} x - X position of the frame within the texture image. @@ -254,7 +340,7 @@ * @param {string} name - The name of the frame. In Texture Atlas data this is usually set to the filename. * @param {string} uuid - Internal UUID key. */ -Phaser.Animation.Frame = function (index, x, y, width, height, name, uuid) { +Phaser.Frame = function (index, x, y, width, height, name, uuid) { /** * @property {number} index - The index of this Frame within the FrameData set it is being added to. @@ -360,12 +446,12 @@ Phaser.Animation.Frame = function (index, x, y, width, height, name, uuid) { }; -Phaser.Animation.Frame.prototype = { +Phaser.Frame.prototype = { /** * If the frame was trimmed when added to the Texture Atlas this records the trim and source data. * - * @method Phaser.Animation.Frame#setTrim + * @method Phaser.Frame#setTrim * @param {boolean} trimmed - If this frame was trimmed or not. * @param {number} actualWidth - The width of the frame before being trimmed. * @param {number} actualHeight - The height of the frame before being trimmed. @@ -416,7 +502,7 @@ Phaser.Animation.Frame.prototype = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:41 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/FrameData.js.html b/Docs/out/FrameData.js.html index 570a29a7..7651fbad 100644 --- a/Docs/out/FrameData.js.html +++ b/Docs/out/FrameData.js.html @@ -23,13 +23,13 @@ @@ -244,10 +330,10 @@ /** * FrameData is a container for Frame objects, which are the internal representation of animation data in Phaser. * -* @class Phaser.Animation.FrameData +* @class Phaser.FrameData * @constructor */ -Phaser.Animation.FrameData = function () { +Phaser.FrameData = function () { /** * @property {Array} _frames - Local array of frames. @@ -264,14 +350,14 @@ Phaser.Animation.FrameData = function () { }; -Phaser.Animation.FrameData.prototype = { +Phaser.FrameData.prototype = { /** * Adds a new Frame to this FrameData collection. Typically called by the Animation.Parser and not directly. * - * @method Phaser.Animation.FrameData#addFrame - * @param {Phaser.Animation.Frame} frame - The frame to add to this FrameData set. - * @return {Phaser.Animation.Frame} The frame that was just added. + * @method Phaser.FrameData#addFrame + * @param {Phaser.Frame} frame - The frame to add to this FrameData set. + * @return {Phaser.Frame} The frame that was just added. */ addFrame: function (frame) { @@ -291,9 +377,9 @@ Phaser.Animation.FrameData.prototype = { /** * Get a Frame by its numerical index. * - * @method Phaser.Animation.FrameData#getFrame + * @method Phaser.FrameData#getFrame * @param {number} index - The index of the frame you want to get. - * @return {Phaser.Animation.Frame} The frame, if found. + * @return {Phaser.Frame} The frame, if found. */ getFrame: function (index) { @@ -309,9 +395,9 @@ Phaser.Animation.FrameData.prototype = { /** * Get a Frame by its frame name. * - * @method Phaser.Animation.FrameData#getFrameByName + * @method Phaser.FrameData#getFrameByName * @param {string} name - The name of the frame you want to get. - * @return {Phaser.Animation.Frame} The frame, if found. + * @return {Phaser.Frame} The frame, if found. */ getFrameByName: function (name) { @@ -327,7 +413,7 @@ Phaser.Animation.FrameData.prototype = { /** * Check if there is a Frame with the given name. * - * @method Phaser.Animation.FrameData#checkFrameName + * @method Phaser.FrameData#checkFrameName * @param {string} name - The name of the frame you want to check. * @return {boolean} True if the frame is found, otherwise false. */ @@ -345,7 +431,7 @@ Phaser.Animation.FrameData.prototype = { /** * Returns a range of frames based on the given start and end frame indexes and returns them in an Array. * - * @method Phaser.Animation.FrameData#getFrameRange + * @method Phaser.FrameData#getFrameRange * @param {number} start - The starting frame index. * @param {number} end - The ending frame index. * @param {Array} [output] - If given the results will be appended to the end of this array otherwise a new array will be created. @@ -368,7 +454,7 @@ Phaser.Animation.FrameData.prototype = { * Returns all of the Frames in this FrameData set where the frame index is found in the input array. * The frames are returned in the output array, or if none is provided in a new Array object. * - * @method Phaser.Animation.FrameData#getFrames + * @method Phaser.FrameData#getFrames * @param {Array} frames - An Array containing the indexes of the frames to retrieve. If the array is empty then all frames in the FrameData are returned. * @param {boolean} [useNumericIndex=true] - Are the given frames using numeric indexes (default) or strings? (false) * @param {Array} [output] - If given the results will be appended to the end of this array otherwise a new array will be created. @@ -415,7 +501,7 @@ Phaser.Animation.FrameData.prototype = { * Returns all of the Frame indexes in this FrameData set. * The frames indexes are returned in the output array, or if none is provided in a new Array object. * - * @method Phaser.Animation.FrameData#getFrameIndexes + * @method Phaser.FrameData#getFrameIndexes * @param {Array} frames - An Array containing the indexes of the frames to retrieve. If the array is empty then all frames in the FrameData are returned. * @param {boolean} [useNumericIndex=true] - Are the given frames using numeric indexes (default) or strings? (false) * @param {Array} [output] - If given the results will be appended to the end of this array otherwise a new array will be created. @@ -458,11 +544,11 @@ Phaser.Animation.FrameData.prototype = { }; /** -* @name Phaser.Animation.FrameData#total +* @name Phaser.FrameData#total * @property {number} total - The total number of frames in this FrameData set. * @readonly */ -Object.defineProperty(Phaser.Animation.FrameData.prototype, "total", { +Object.defineProperty(Phaser.FrameData.prototype, "total", { get: function () { return this._frames.length; @@ -490,7 +576,7 @@ Object.defineProperty(Phaser.Animation.FrameData.prototype, "total", { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:41 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Game.js.html b/Docs/out/Game.js.html index 3e32bbe2..e1d8aa56 100644 --- a/Docs/out/Game.js.html +++ b/Docs/out/Game.js.html @@ -23,13 +23,13 @@ @@ -731,7 +817,7 @@ Object.defineProperty(Phaser.Game.prototype, "paused", { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:41 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Group.js.html b/Docs/out/Group.js.html index 4e0129ba..a291b5a3 100644 --- a/Docs/out/Group.js.html +++ b/Docs/out/Group.js.html @@ -23,13 +23,13 @@ @@ -1412,7 +1498,7 @@ Object.defineProperty(Phaser.Group.prototype, "visible", { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:41 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Input.js.html b/Docs/out/Input.js.html index 22ff0c06..396c2a03 100644 --- a/Docs/out/Input.js.html +++ b/Docs/out/Input.js.html @@ -23,13 +23,13 @@ @@ -1077,7 +1163,7 @@ Object.defineProperty(Phaser.Input.prototype, "worldY", { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:41 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/InputHandler.js.html b/Docs/out/InputHandler.js.html index 23d89119..73c3b1f4 100644 --- a/Docs/out/InputHandler.js.html +++ b/Docs/out/InputHandler.js.html @@ -23,13 +23,13 @@ @@ -1308,7 +1394,7 @@ Phaser.InputHandler.prototype = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:41 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Intro.js.html b/Docs/out/Intro.js.html new file mode 100644 index 00000000..0dc48941 --- /dev/null +++ b/Docs/out/Intro.js.html @@ -0,0 +1,414 @@ + + + + + + Phaser Source: Intro.js + + + + + + + + + + +
+ + +
+ + +
+ +
+ + + +

Source: Intro.js

+ +
+
+
/**
+* @author       Richard Davey <rich@photonstorm.com>
+* @copyright    2013 Photon Storm Ltd.
+* @license      {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
+*/
+
+/**
+* @overview
+*
+* Phaser - http://www.phaser.io
+*
+* v{version} - Built at: {buildDate}
+*
+* By Richard Davey http://www.photonstorm.com @photonstorm
+*
+* A feature-packed 2D HTML5 game framework born from the smouldering pits of Flixel and
+* constructed via plenty of blood, sweat, tears and coffee by Richard Davey (@photonstorm).
+*
+* Phaser uses Pixi.js for rendering, created by Mat Groves http://matgroves.com/ @Doormat23.
+*
+* Follow Phaser development progress at http://www.photonstorm.com
+*
+* Many thanks to Adam Saltsman (@ADAMATOMIC) for releasing Flixel, from both which Phaser
+* and my love of game development originate.
+*
+* "If you want your children to be intelligent,  read them fairy tales."
+* "If you want them to be more intelligent, read them more fairy tales."
+*                                                     -- Albert Einstein
+*/
+
+
+
+ + + + + +
+ +
+
+ + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
+ + + Documentation generated by JSDoc 3.2.0-dev + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + +
+
+ + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + diff --git a/Docs/out/Key.js.html b/Docs/out/Key.js.html index 2ae08ef7..95bfed53 100644 --- a/Docs/out/Key.js.html +++ b/Docs/out/Key.js.html @@ -23,13 +23,13 @@ @@ -427,7 +513,7 @@ Phaser.Key.prototype = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:41 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Keyboard.js.html b/Docs/out/Keyboard.js.html index 26e8acc9..fdde4632 100644 --- a/Docs/out/Keyboard.js.html +++ b/Docs/out/Keyboard.js.html @@ -23,13 +23,13 @@ @@ -719,7 +805,7 @@ Phaser.Keyboard.NUM_LOCK = 144; Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:41 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Linear.html b/Docs/out/Linear.html new file mode 100644 index 00000000..53d2fdde --- /dev/null +++ b/Docs/out/Linear.html @@ -0,0 +1,592 @@ + + + + + + Phaser Namespace: Linear + + + + + + + + + + +
+ + +
+ + +
+ +
+ + + +

Namespace: Linear

+
+ +
+

+ Linear +

+ +
+ +
+
+ + + + +

Linear easing.

+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + +
+ + + + + + + + + + + + + + +

Methods

+ +
+ +
+

<static> In(k) → {number}

+ + +
+
+ + +
+

Ease-in.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

Description.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

k^2.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ +
+
+ + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
+ + + Documentation generated by JSDoc 3.2.0-dev + on Thu Oct 03 2013 01:56:58 GMT+0100 (BST) using the DocStrap template. + +
+
+ + +
+
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Docs/out/LinkedList.js.html b/Docs/out/LinkedList.js.html index 2889f659..3f82b5c7 100644 --- a/Docs/out/LinkedList.js.html +++ b/Docs/out/LinkedList.js.html @@ -23,13 +23,13 @@ @@ -409,7 +495,7 @@ Phaser.LinkedList.prototype = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:41 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Loader.js.html b/Docs/out/Loader.js.html index 7f8839d6..24bcb861 100644 --- a/Docs/out/Loader.js.html +++ b/Docs/out/Loader.js.html @@ -23,13 +23,13 @@ @@ -1319,7 +1405,7 @@ Phaser.Loader.prototype = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:41 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/LoaderParser.js.html b/Docs/out/LoaderParser.js.html new file mode 100644 index 00000000..954aa275 --- /dev/null +++ b/Docs/out/LoaderParser.js.html @@ -0,0 +1,467 @@ + + + + + + Phaser Source: loader/LoaderParser.js + + + + + + + + + + +
+ + +
+ + +
+ +
+ + + +

Source: loader/LoaderParser.js

+ +
+
+
/**
+* @author       Richard Davey <rich@photonstorm.com>
+* @copyright    2013 Photon Storm Ltd.
+* @license      {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
+*/
+
+/**
+* Phaser.LoaderParser parses data objects from Phaser.Loader that need more preparation before they can be inserted into the Cache.
+*
+* @class Phaser.LoaderParser
+*/
+Phaser.LoaderParser = {
+	
+    /**
+    * Parse frame data from an XML file.
+    * @method Phaser.LoaderParser.bitmapFont
+    * @param {object} xml - XML data you want to parse.
+    * @return {FrameData} Generated FrameData object.
+    */
+	bitmapFont: function (game, xml, cacheKey) {
+
+        //  Malformed?
+        if (!xml.getElementsByTagName('font'))
+        {
+            console.warn("Phaser.LoaderParser.bitmapFont: Invalid XML given, missing <font> tag");
+            return;
+        }
+
+        var texture = PIXI.TextureCache[cacheKey];
+
+        var data = {};
+        var info = xml.getElementsByTagName("info")[0];
+        var common = xml.getElementsByTagName("common")[0];
+        data.font = info.attributes.getNamedItem("face").nodeValue;
+        data.size = parseInt(info.attributes.getNamedItem("size").nodeValue, 10);
+        data.lineHeight = parseInt(common.attributes.getNamedItem("lineHeight").nodeValue, 10);
+        data.chars = {};
+
+        //parse letters
+        var letters = xml.getElementsByTagName("char");
+
+        for (var i = 0; i < letters.length; i++)
+        {
+            var charCode = parseInt(letters[i].attributes.getNamedItem("id").nodeValue, 10);
+
+            var textureRect = {
+                x: parseInt(letters[i].attributes.getNamedItem("x").nodeValue, 10),
+                y: parseInt(letters[i].attributes.getNamedItem("y").nodeValue, 10),
+                width: parseInt(letters[i].attributes.getNamedItem("width").nodeValue, 10),
+                height: parseInt(letters[i].attributes.getNamedItem("height").nodeValue, 10)
+            };
+
+            //	Note: This means you can only have 1 BitmapFont loaded at once!
+            //	Need to replace this with our own handler soon.
+            PIXI.TextureCache[charCode] = new PIXI.Texture(texture, textureRect);
+
+            data.chars[charCode] = {
+                xOffset: parseInt(letters[i].attributes.getNamedItem("xoffset").nodeValue, 10),
+                yOffset: parseInt(letters[i].attributes.getNamedItem("yoffset").nodeValue, 10),
+                xAdvance: parseInt(letters[i].attributes.getNamedItem("xadvance").nodeValue, 10),
+                kerning: {},
+                texture:new PIXI.Texture(texture, textureRect)
+
+            };
+        }
+
+        //parse kernings
+        var kernings = xml.getElementsByTagName("kerning");
+
+        for (i = 0; i < kernings.length; i++)
+        {
+           var first = parseInt(kernings[i].attributes.getNamedItem("first").nodeValue, 10);
+           var second = parseInt(kernings[i].attributes.getNamedItem("second").nodeValue, 10);
+           var amount = parseInt(kernings[i].attributes.getNamedItem("amount").nodeValue, 10);
+
+            data.chars[second].kerning[first] = amount;
+        }
+
+        PIXI.BitmapText.fonts[data.font] = data;
+
+    }
+
+};
+
+
+ + + + + +
+ +
+
+ + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
+ + + Documentation generated by JSDoc 3.2.0-dev + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + +
+
+ + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + diff --git a/Docs/out/MSPointer.js.html b/Docs/out/MSPointer.js.html index 0376b56c..b35087e0 100644 --- a/Docs/out/MSPointer.js.html +++ b/Docs/out/MSPointer.js.html @@ -23,13 +23,13 @@ @@ -438,7 +524,7 @@ Phaser.MSPointer.prototype = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:41 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Math.js.html b/Docs/out/Math.js.html index 47adc120..2e64859e 100644 --- a/Docs/out/Math.js.html +++ b/Docs/out/Math.js.html @@ -23,13 +23,13 @@ @@ -1373,7 +1459,7 @@ Phaser.Math = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:41 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Mouse.js.html b/Docs/out/Mouse.js.html index 6c2f4c2b..9c2ac90e 100644 --- a/Docs/out/Mouse.js.html +++ b/Docs/out/Mouse.js.html @@ -23,13 +23,13 @@ @@ -514,7 +600,7 @@ Phaser.Mouse.prototype = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:41 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Net.js.html b/Docs/out/Net.js.html index beea729f..fdf53fe8 100644 --- a/Docs/out/Net.js.html +++ b/Docs/out/Net.js.html @@ -23,13 +23,13 @@ @@ -424,7 +510,7 @@ Phaser.Net.prototype = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:41 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Particles.js.html b/Docs/out/Particles.js.html index a7c00a0b..4b2c691a 100644 --- a/Docs/out/Particles.js.html +++ b/Docs/out/Particles.js.html @@ -23,13 +23,13 @@ @@ -329,7 +415,7 @@ Phaser.Particles.prototype = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:41 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Phaser.Animation.html b/Docs/out/Phaser.Animation.html index b7a2ed88..d2b20340 100644 --- a/Docs/out/Phaser.Animation.html +++ b/Docs/out/Phaser.Animation.html @@ -23,13 +23,13 @@ @@ -236,6 +322,8 @@

+ Phaser. + Animation

@@ -368,7 +456,7 @@ It is created by the AnimationManager, consists of Animation.Frame objects and b -Phaser.Animation.FrameData +Phaser.FrameData @@ -517,19 +605,6 @@ It is created by the AnimationManager, consists of Animation.Frame objects and b -

Classes

- -
-
Frame
-
- -
FrameData
-
- -
Parser
-
-
- @@ -584,7 +659,7 @@ It is created by the AnimationManager, consists of Animation.Frame objects and b -Phaser.Animation.Frame +Phaser.Frame @@ -2599,7 +2674,7 @@ You could use this function to generate those by doing: Phaser.Animation.generat Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:41 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:45 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Phaser.AnimationManager.html b/Docs/out/Phaser.AnimationManager.html index 513b6d5c..92c33b28 100644 --- a/Docs/out/Phaser.AnimationManager.html +++ b/Docs/out/Phaser.AnimationManager.html @@ -23,13 +23,13 @@ @@ -236,6 +322,8 @@

+ Phaser. + AnimationManager

@@ -430,7 +518,7 @@ Any Game Object such as Phaser.Sprite that supports animation contains a single -Phaser.Animation.Frame +Phaser.Frame @@ -637,7 +725,7 @@ Any Game Object such as Phaser.Sprite that supports animation contains a single -Phaser.Animation.FrameData +Phaser.FrameData @@ -2423,7 +2511,7 @@ The currentAnim property of the AnimationManager is automatically set to the ani Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:42 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:45 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Phaser.AnimationParser.html b/Docs/out/Phaser.AnimationParser.html new file mode 100644 index 00000000..0b069c2f --- /dev/null +++ b/Docs/out/Phaser.AnimationParser.html @@ -0,0 +1,1355 @@ + + + + + + Phaser Class: AnimationParser + + + + + + + + + + +
+ + +
+ + +
+ +
+ + + +

Class: AnimationParser

+
+ +
+

+ Phaser. + + AnimationParser +

+ +
+ +
+
+ + + + +
+

new AnimationParser()

+ + +
+
+ + +
+

Responsible for parsing sprite sheet and JSON data into the internal FrameData format that Phaser uses for animations.

+
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + +

Methods

+ +
+ +
+

<static> JSONData(game, json, cacheKey) → {Phaser.FrameData}

+ + +
+
+ + +
+

Parse the JSON data and extract the animation frame data from it.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
game + + +Phaser.Game + + + +

A reference to the currently running game.

json + + +Object + + + +

The JSON data from the Texture Atlas. Must be in Array format.

cacheKey + + +string + + + +

The Game.Cache asset key of the texture image.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

A FrameData object containing the parsed frames.

+
+ + + +
+
+ Type +
+
+ +Phaser.FrameData + + +
+
+ + + + + +
+ + + +
+

<static> JSONDataHash(game, json, cacheKey) → {Phaser.FrameData}

+ + +
+
+ + +
+

Parse the JSON data and extract the animation frame data from it.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
game + + +Phaser.Game + + + +

A reference to the currently running game.

json + + +Object + + + +

The JSON data from the Texture Atlas. Must be in JSON Hash format.

cacheKey + + +string + + + +

The Game.Cache asset key of the texture image.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

A FrameData object containing the parsed frames.

+
+ + + +
+
+ Type +
+
+ +Phaser.FrameData + + +
+
+ + + + + +
+ + + +
+

<static> spriteSheet(game, key, frameWidth, frameHeight, frameMax) → {Phaser.FrameData}

+ + +
+
+ + +
+

Parse a Sprite Sheet and extract the animation frame data from it.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
game + + +Phaser.Game + + + + + + + + + + + +

A reference to the currently running game.

key + + +string + + + + + + + + + + + +

The Game.Cache asset key of the Sprite Sheet image.

frameWidth + + +number + + + + + + + + + + + +

The fixed width of each frame of the animation.

frameHeight + + +number + + + + + + + + + + + +

The fixed height of each frame of the animation.

frameMax + + +number + + + + + + <optional>
+ + + + + +
+ + -1 + +

The total number of animation frames to extact from the Sprite Sheet. The default value of -1 means "extract all frames".

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

A FrameData object containing the parsed frames.

+
+ + + +
+
+ Type +
+
+ +Phaser.FrameData + + +
+
+ + + + + +
+ + + +
+

<static> XMLData(game, xml, cacheKey) → {Phaser.FrameData}

+ + +
+
+ + +
+

Parse the XML data and extract the animation frame data from it.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
game + + +Phaser.Game + + + +

A reference to the currently running game.

xml + + +Object + + + +

The XML data from the Texture Atlas. Must be in Starling XML format.

cacheKey + + +string + + + +

The Game.Cache asset key of the texture image.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

A FrameData object containing the parsed frames.

+
+ + + +
+
+ Type +
+
+ +Phaser.FrameData + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ +
+
+ + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
+ + + Documentation generated by JSDoc 3.2.0-dev + on Thu Oct 03 2013 02:35:45 GMT+0100 (BST) using the DocStrap template. + +
+
+ + +
+
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Docs/out/Phaser.Cache.html b/Docs/out/Phaser.Cache.html index a2f025d4..e3e38b52 100644 --- a/Docs/out/Phaser.Cache.html +++ b/Docs/out/Phaser.Cache.html @@ -23,13 +23,13 @@ @@ -236,6 +322,8 @@

+ Phaser. + Cache

@@ -2839,7 +2927,7 @@ as images, sounds and data files as a result of Loader calls. Cache items use st
-

getFrame(key) → {Phaser.Animation.Frame}

+

getFrame(key) → {Phaser.Frame}

@@ -2965,7 +3053,7 @@ as images, sounds and data files as a result of Loader calls. Cache items use st
-Phaser.Animation.Frame +Phaser.Frame
@@ -2980,7 +3068,7 @@ as images, sounds and data files as a result of Loader calls. Cache items use st
-

getFrameByIndex(key) → {Phaser.Animation.Frame}

+

getFrameByIndex(key) → {Phaser.Frame}

@@ -3106,7 +3194,7 @@ as images, sounds and data files as a result of Loader calls. Cache items use st
-Phaser.Animation.Frame +Phaser.Frame
@@ -3121,7 +3209,7 @@ as images, sounds and data files as a result of Loader calls. Cache items use st
-

getFrameByName(key) → {Phaser.Animation.Frame}

+

getFrameByName(key) → {Phaser.Frame}

@@ -3247,7 +3335,7 @@ as images, sounds and data files as a result of Loader calls. Cache items use st
-Phaser.Animation.Frame +Phaser.Frame
@@ -3262,7 +3350,7 @@ as images, sounds and data files as a result of Loader calls. Cache items use st
-

getFrameData(key) → {Phaser.Animation.FrameData}

+

getFrameData(key) → {Phaser.FrameData}

@@ -3388,7 +3476,7 @@ as images, sounds and data files as a result of Loader calls. Cache items use st
-Phaser.Animation.FrameData +Phaser.FrameData
@@ -4526,7 +4614,7 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys
-

getTextureFrame(key) → {Phaser.Animation.Frame}

+

getTextureFrame(key) → {Phaser.Frame}

@@ -4652,7 +4740,7 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys
-Phaser.Animation.Frame +Phaser.Frame
@@ -6080,7 +6168,7 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:42 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:45 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Phaser.Camera.html b/Docs/out/Phaser.Camera.html index 6f2da9bc..629b1cc2 100644 --- a/Docs/out/Phaser.Camera.html +++ b/Docs/out/Phaser.Camera.html @@ -23,13 +23,13 @@ @@ -236,6 +322,8 @@

+ Phaser. + Camera

@@ -456,7 +544,7 @@ The game automatically creates a single Stage sized camera on boot. Move the cam
Source:
@@ -542,7 +630,7 @@ The game automatically creates a single Stage sized camera on boot. Move the cam
Source:
@@ -602,7 +690,7 @@ The game automatically creates a single Stage sized camera on boot. Move the cam
Source:
@@ -662,7 +750,7 @@ The game automatically creates a single Stage sized camera on boot. Move the cam
Source:
@@ -722,7 +810,7 @@ The game automatically creates a single Stage sized camera on boot. Move the cam
Source:
@@ -824,7 +912,7 @@ The game automatically creates a single Stage sized camera on boot. Move the cam
Source:
@@ -926,7 +1014,7 @@ The game automatically creates a single Stage sized camera on boot. Move the cam
Source:
@@ -1028,7 +1116,7 @@ The game automatically creates a single Stage sized camera on boot. Move the cam
Source:
@@ -1134,7 +1222,7 @@ The game automatically creates a single Stage sized camera on boot. Move the cam
Source:
@@ -1239,7 +1327,7 @@ The game automatically creates a single Stage sized camera on boot. Move the cam
Source:
@@ -1341,7 +1429,7 @@ The game automatically creates a single Stage sized camera on boot. Move the cam
Source:
@@ -1446,7 +1534,7 @@ The game automatically creates a single Stage sized camera on boot. Move the cam
Source:
@@ -1555,7 +1643,7 @@ Objects outside of this view are not rendered (unless set to ignore the Camera,
Source:
@@ -1660,7 +1748,7 @@ Objects outside of this view are not rendered (unless set to ignore the Camera,
Source:
@@ -1766,7 +1854,7 @@ Objects outside of this view are not rendered (unless set to ignore the Camera,
Source:
@@ -1868,7 +1956,7 @@ Objects outside of this view are not rendered (unless set to ignore the Camera,
Source:
@@ -1974,7 +2062,7 @@ Objects outside of this view are not rendered (unless set to ignore the Camera,
Source:
@@ -2080,7 +2168,7 @@ Objects outside of this view are not rendered (unless set to ignore the Camera,
Source:
@@ -2145,7 +2233,7 @@ Objects outside of this view are not rendered (unless set to ignore the Camera,
Source:
@@ -2286,7 +2374,7 @@ Objects outside of this view are not rendered (unless set to ignore the Camera,
Source:
@@ -2447,7 +2535,7 @@ Objects outside of this view are not rendered (unless set to ignore the Camera,
Source:
@@ -2589,7 +2677,7 @@ without having to use game.camera.x and game.camera.y.

Source:
@@ -2730,7 +2818,7 @@ without having to use game.camera.x and game.camera.y.

Source:
@@ -2799,7 +2887,7 @@ without having to use game.camera.x and game.camera.y.

Source:
@@ -2850,7 +2938,7 @@ without having to use game.camera.x and game.camera.y.

Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:42 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:45 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Phaser.Canvas.html b/Docs/out/Phaser.Canvas.html index 094ea103..2718c62a 100644 --- a/Docs/out/Phaser.Canvas.html +++ b/Docs/out/Phaser.Canvas.html @@ -23,13 +23,13 @@ @@ -236,6 +322,8 @@

+ Phaser. + Canvas

@@ -2320,7 +2408,7 @@ patchy on earlier browsers, especially on mobile.

Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:42 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:45 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Phaser.Circle.html b/Docs/out/Phaser.Circle.html index 03088d06..eee8dab7 100644 --- a/Docs/out/Phaser.Circle.html +++ b/Docs/out/Phaser.Circle.html @@ -23,13 +23,13 @@ @@ -236,6 +322,8 @@

+ Phaser. + Circle

@@ -4100,7 +4188,7 @@ This method checks the radius distances between the two Circle objects to see if Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:42 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:45 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Phaser.Color.html b/Docs/out/Phaser.Color.html new file mode 100644 index 00000000..98a6f65b --- /dev/null +++ b/Docs/out/Phaser.Color.html @@ -0,0 +1,3564 @@ + + + + + + Phaser Class: Color + + + + + + + + + + +
+ + +
+ + +
+ +
+ + + +

Class: Color

+
+ +
+

+ Phaser. + + Color +

+ +
+ +
+
+ + + + +
+

new Color()

+ + +
+
+ + +
+

A collection of methods useful for manipulating and comparing colors.

+
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + +

Methods

+ +
+ +
+

<static> colorToHexstring(color) → {string}

+ + +
+
+ + +
+

Return a string containing a hex representation of the given color.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
color + + +number + + + +

The color channel to get the hex value for, must be a value between 0 and 255).

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

A string of length 2 characters, i.e. 255 = FF, 0 = 00.

+
+ + + +
+
+ Type +
+
+ +string + + +
+
+ + + + + +
+ + + +
+

<static> getAlpha(color) → {number}

+ + +
+
+ + +
+

Given a native color value (in the format 0xAARRGGBB) this will return the Alpha component, as a value between 0 and 255.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
color + + +number + + + +

In the format 0xAARRGGBB.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The Alpha component of the color, will be between 0 and 1 (0 being no Alpha (opaque), 1 full Alpha (transparent)).

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

<static> getAlphaFloat(color) → {number}

+ + +
+
+ + +
+

Given a native color value (in the format 0xAARRGGBB) this will return the Alpha component as a value between 0 and 1.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
color + + +number + + + +

In the format 0xAARRGGBB.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The Alpha component of the color, will be between 0 and 1 (0 being no Alpha (opaque), 1 full Alpha (transparent)).

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

<static> getBlue(color) → {number}

+ + +
+
+ + +
+

Given a native color value (in the format 0xAARRGGBB) this will return the Blue component, as a value between 0 and 255.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
color + + +number + + + +

In the format 0xAARRGGBB.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The Blue component of the color, will be between 0 and 255 (0 being no color, 255 full Blue).

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

<static> getColor(red, green, blue) → {number}

+ + +
+
+ + +
+

Given 3 color values this will return an integer representation of it.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
red + + +number + + + +

The Red channel value (between 0 and 255).

green + + +number + + + +

The Green channel value (between 0 and 255).

blue + + +number + + + +

The Blue channel value (between 0 and 255).

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

A native color value integer (format: 0xRRGGBB).

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

<static> getColor32(alpha, red, green, blue) → {number}

+ + +
+
+ + +
+

Given an alpha and 3 color values this will return an integer representation of it.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
alpha + + +number + + + +

The Alpha value (between 0 and 255).

red + + +number + + + +

The Red channel value (between 0 and 255).

green + + +number + + + +

The Green channel value (between 0 and 255).

blue + + +number + + + +

The Blue channel value (between 0 and 255).

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

A native color value integer (format: 0xAARRGGBB).

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

<static> getColorInfo(color) → {string}

+ + +
+
+ + +
+

Returns a string containing handy information about the given color including string hex value, +RGB format information and HSL information. Each section starts on a newline, 3 lines in total.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
color + + +number + + + +

A color value in the format 0xAARRGGBB.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

String containing the 3 lines of information.

+
+ + + +
+
+ Type +
+
+ +string + + +
+
+ + + + + +
+ + + +
+

<static> getGreen(color) → {number}

+ + +
+
+ + +
+

Given a native color value (in the format 0xAARRGGBB) this will return the Green component, as a value between 0 and 255.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
color + + +number + + + +

In the format 0xAARRGGBB.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The Green component of the color, will be between 0 and 255 (0 being no color, 255 full Green).

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

<static> getRandomColor(min, max, alpha) → {number}

+ + +
+
+ + +
+

Returns a random color value between black and white

+

<p>Set the min value to start each channel from the given offset.</p> +<p>Set the max value to restrict the maximum color used per channel</p>

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
min + + +number + + + +

The lowest value to use for the color.

max + + +number + + + +

The highest value to use for the color.

alpha + + +number + + + +

The alpha value of the returning color (default 255 = fully opaque).

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

32-bit color value with alpha.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

<static> getRed(color) → {number}

+ + +
+
+ + +
+

Given a native color value (in the format 0xAARRGGBB) this will return the Red component, as a value between 0 and 255.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
color + + +number + + + +

In the format 0xAARRGGBB.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The Red component of the color, will be between 0 and 255 (0 being no color, 255 full Red).

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

<static> getRGB(color) → {object}

+ + +
+
+ + +
+

Return the component parts of a color as an Object with the properties alpha, red, green, blue

+

<p>Alpha will only be set if it exist in the given color (0xAARRGGBB)</p>

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
color + + +number + + + +

Color in RGB (0xRRGGBB) or ARGB format (0xAARRGGBB).

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

An Object with properties: alpha, red, green, blue.

+
+ + + +
+
+ Type +
+
+ +object + + +
+
+ + + + + +
+ + + +
+

<static> getWebRGB(color) → {string}

+ + +
+
+ + +
+

Returns a CSS friendly string value from the given color.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
color + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

A string in the format: 'rgba(r,g,b,a)'

+
+ + + +
+
+ Type +
+
+ +string + + +
+
+ + + + + +
+ + + +
+

<static> hexToRGB(h) → {object}

+ + +
+
+ + +
+

Converts the given hex string into an object containing the RGB values.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
h + + +string + + + +

The string hex color to convert.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

An object with 3 properties: r,g and b.

+
+ + + +
+
+ Type +
+
+ +object + + +
+
+ + + + + +
+ + + +
+

<static> interpolateColor(color1, color2, steps, currentStep, alpha) → {number}

+ + +
+
+ + +
+

Interpolates the two given colours based on the supplied step and currentStep properties.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
color1 + + +number + + + +

Description.

color2 + + +number + + + +

Description.

steps + + +number + + + +

Description.

currentStep + + +number + + + +

Description.

alpha + + +number + + + +

Description.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The interpolated color value.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

<static> interpolateColorWithRGB(color, r, g, b, steps, currentStep) → {number}

+ + +
+
+ + +
+

Interpolates the two given colours based on the supplied step and currentStep properties.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
color + + +number + + + +

Description.

r + + +number + + + +

Description.

g + + +number + + + +

Description.

b + + +number + + + +

Description.

steps + + +number + + + +

Description.

currentStep + + +number + + + +

Description.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The interpolated color value.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

<static> interpolateRGB(r1, g1, b1, r2, g2, b2, steps, currentStep) → {number}

+ + +
+
+ + +
+

Interpolates the two given colours based on the supplied step and currentStep properties.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
r1 + + +number + + + +

Description.

g1 + + +number + + + +

Description.

b1 + + +number + + + +

Description.

r2 + + +number + + + +

Description.

g2 + + +number + + + +

Description.

b2 + + +number + + + +

Description.

steps + + +number + + + +

Description.

currentStep + + +number + + + +

Description.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The interpolated color value.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

<static> RGBtoHexstring(color) → {string}

+ + +
+
+ + +
+

Return a string representation of the color in the format 0xAARRGGBB.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
color + + +number + + + +

The color to get the string representation for

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

A string of length 10 characters in the format 0xAARRGGBB

+
+ + + +
+
+ Type +
+
+ +string + + +
+
+ + + + + +
+ + + +
+

<static> RGBtoWebstring(color) → {string}

+ + +
+
+ + +
+

Return a string representation of the color in the format #RRGGBB.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
color + + +number + + + +

The color to get the string representation for.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

A string of length 10 characters in the format 0xAARRGGBB.

+
+ + + +
+
+ Type +
+
+ +string + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ +
+
+ + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
+ + + Documentation generated by JSDoc 3.2.0-dev + on Thu Oct 03 2013 02:35:45 GMT+0100 (BST) using the DocStrap template. + +
+
+ + +
+
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Docs/out/Phaser.Device.html b/Docs/out/Phaser.Device.html index b023b825..75999d0f 100644 --- a/Docs/out/Phaser.Device.html +++ b/Docs/out/Phaser.Device.html @@ -23,13 +23,13 @@ @@ -236,6 +322,8 @@

+ Phaser. + Device

@@ -4805,7 +4893,7 @@ Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:42 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:45 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Phaser.Easing.Back.html b/Docs/out/Phaser.Easing.Back.html new file mode 100644 index 00000000..2631979f --- /dev/null +++ b/Docs/out/Phaser.Easing.Back.html @@ -0,0 +1,916 @@ + + + + + + Phaser Class: Back + + + + + + + + + + +
+ + +
+ + +
+ +
+ + + +

Class: Back

+
+ +
+

+ Phaser.Easing. + + Back +

+ +
+ +
+
+ + + + +
+

new Back()

+ + +
+
+ + +
+

Back easing.

+
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + +

Methods

+ +
+ +
+

In(k) → {number}

+ + +
+
+ + +
+

Back ease-in.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

The value to be tweened.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The tweened value.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

InOut(k) → {number}

+ + +
+
+ + +
+

Back ease-in/out.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

The value to be tweened.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The tweened value.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

Out(k) → {number}

+ + +
+
+ + +
+

Back ease-out.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

The value to be tweened.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The tweened value.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ +
+
+ + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
+ + + Documentation generated by JSDoc 3.2.0-dev + on Thu Oct 03 2013 02:35:46 GMT+0100 (BST) using the DocStrap template. + +
+
+ + +
+
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Docs/out/Phaser.Easing.Bounce.html b/Docs/out/Phaser.Easing.Bounce.html new file mode 100644 index 00000000..bcd2ea9f --- /dev/null +++ b/Docs/out/Phaser.Easing.Bounce.html @@ -0,0 +1,916 @@ + + + + + + Phaser Class: Bounce + + + + + + + + + + +
+ + +
+ + +
+ +
+ + + +

Class: Bounce

+
+ +
+

+ Phaser.Easing. + + Bounce +

+ +
+ +
+
+ + + + +
+

new Bounce()

+ + +
+
+ + +
+

Bounce easing.

+
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + +

Methods

+ +
+ +
+

In(k) → {number}

+ + +
+
+ + +
+

Bounce ease-in.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

The value to be tweened.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The tweened value.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

InOut(k) → {number}

+ + +
+
+ + +
+

Bounce ease-in/out.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

The value to be tweened.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The tweened value.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

Out(k) → {number}

+ + +
+
+ + +
+

Bounce ease-out.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

The value to be tweened.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The tweened value.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ +
+
+ + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
+ + + Documentation generated by JSDoc 3.2.0-dev + on Thu Oct 03 2013 02:35:46 GMT+0100 (BST) using the DocStrap template. + +
+
+ + +
+
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Docs/out/Phaser.Easing.Circular.html b/Docs/out/Phaser.Easing.Circular.html new file mode 100644 index 00000000..b257f4fe --- /dev/null +++ b/Docs/out/Phaser.Easing.Circular.html @@ -0,0 +1,916 @@ + + + + + + Phaser Class: Circular + + + + + + + + + + +
+ + +
+ + +
+ +
+ + + +

Class: Circular

+
+ +
+

+ Phaser.Easing. + + Circular +

+ +
+ +
+
+ + + + +
+

new Circular()

+ + +
+
+ + +
+

Circular easing.

+
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + +

Methods

+ +
+ +
+

In(k) → {number}

+ + +
+
+ + +
+

Circular ease-in.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

The value to be tweened.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The tweened value.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

InOut(k) → {number}

+ + +
+
+ + +
+

Circular ease-in/out.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

The value to be tweened.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The tweened value.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

Out(k) → {number}

+ + +
+
+ + +
+

Circular ease-out.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

The value to be tweened.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The tweened value.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ +
+
+ + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
+ + + Documentation generated by JSDoc 3.2.0-dev + on Thu Oct 03 2013 02:35:46 GMT+0100 (BST) using the DocStrap template. + +
+
+ + +
+
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Docs/out/Phaser.Easing.Cubic.html b/Docs/out/Phaser.Easing.Cubic.html new file mode 100644 index 00000000..26938598 --- /dev/null +++ b/Docs/out/Phaser.Easing.Cubic.html @@ -0,0 +1,916 @@ + + + + + + Phaser Class: Cubic + + + + + + + + + + +
+ + +
+ + +
+ +
+ + + +

Class: Cubic

+
+ +
+

+ Phaser.Easing. + + Cubic +

+ +
+ +
+
+ + + + +
+

new Cubic()

+ + +
+
+ + +
+

Cubic easing.

+
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + +

Methods

+ +
+ +
+

In(k) → {number}

+ + +
+
+ + +
+

Cubic ease-in.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

The value to be tweened.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The tweened value.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

InOut(k) → {number}

+ + +
+
+ + +
+

Cubic ease-in/out.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

The value to be tweened.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The tweened value.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

Out(k) → {number}

+ + +
+
+ + +
+

Cubic ease-out.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

The value to be tweened.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The tweened value.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ +
+
+ + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
+ + + Documentation generated by JSDoc 3.2.0-dev + on Thu Oct 03 2013 02:35:46 GMT+0100 (BST) using the DocStrap template. + +
+
+ + +
+
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Docs/out/Phaser.Easing.Elastic.html b/Docs/out/Phaser.Easing.Elastic.html new file mode 100644 index 00000000..874d16c6 --- /dev/null +++ b/Docs/out/Phaser.Easing.Elastic.html @@ -0,0 +1,916 @@ + + + + + + Phaser Class: Elastic + + + + + + + + + + +
+ + +
+ + +
+ +
+ + + +

Class: Elastic

+
+ +
+

+ Phaser.Easing. + + Elastic +

+ +
+ +
+
+ + + + +
+

new Elastic()

+ + +
+
+ + +
+

Elastic easing.

+
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + +

Methods

+ +
+ +
+

In(k) → {number}

+ + +
+
+ + +
+

Elastic ease-in.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

The value to be tweened.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The tweened value.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

InOut(k) → {number}

+ + +
+
+ + +
+

Elastic ease-in/out.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

The value to be tweened.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The tweened value.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

Out(k) → {number}

+ + +
+
+ + +
+

Elastic ease-out.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

The value to be tweened.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The tweened value.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ +
+
+ + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
+ + + Documentation generated by JSDoc 3.2.0-dev + on Thu Oct 03 2013 02:35:46 GMT+0100 (BST) using the DocStrap template. + +
+
+ + +
+
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Docs/out/Phaser.Easing.Exponential.html b/Docs/out/Phaser.Easing.Exponential.html new file mode 100644 index 00000000..cf97a610 --- /dev/null +++ b/Docs/out/Phaser.Easing.Exponential.html @@ -0,0 +1,916 @@ + + + + + + Phaser Class: Exponential + + + + + + + + + + +
+ + +
+ + +
+ +
+ + + +

Class: Exponential

+
+ +
+

+ Phaser.Easing. + + Exponential +

+ +
+ +
+
+ + + + +
+

new Exponential()

+ + +
+
+ + +
+

Exponential easing.

+
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + +

Methods

+ +
+ +
+

In(k) → {number}

+ + +
+
+ + +
+

Exponential ease-in.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

The value to be tweened.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The tweened value.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

InOut(k) → {number}

+ + +
+
+ + +
+

Exponential ease-in/out.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

The value to be tweened.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The tweened value.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

Out(k) → {number}

+ + +
+
+ + +
+

Exponential ease-out.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

The value to be tweened.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The tweened value.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ +
+
+ + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
+ + + Documentation generated by JSDoc 3.2.0-dev + on Thu Oct 03 2013 02:35:46 GMT+0100 (BST) using the DocStrap template. + +
+
+ + +
+
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Docs/out/Phaser.Easing.Linear.html b/Docs/out/Phaser.Easing.Linear.html new file mode 100644 index 00000000..bec902b2 --- /dev/null +++ b/Docs/out/Phaser.Easing.Linear.html @@ -0,0 +1,634 @@ + + + + + + Phaser Class: Linear + + + + + + + + + + +
+ + +
+ + +
+ +
+ + + +

Class: Linear

+
+ +
+

+ Phaser.Easing. + + Linear +

+ +
+ +
+
+ + + + +
+

new Linear()

+ + +
+
+ + +
+

Linear easing.

+
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + +

Methods

+ +
+ +
+

In(k) → {number}

+ + +
+
+ + +
+

Ease-in.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

The value to be tweened.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

k^2.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ +
+
+ + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
+ + + Documentation generated by JSDoc 3.2.0-dev + on Thu Oct 03 2013 02:35:46 GMT+0100 (BST) using the DocStrap template. + +
+
+ + +
+
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Docs/out/Phaser.Easing.Quadratic.html b/Docs/out/Phaser.Easing.Quadratic.html new file mode 100644 index 00000000..762c25e8 --- /dev/null +++ b/Docs/out/Phaser.Easing.Quadratic.html @@ -0,0 +1,916 @@ + + + + + + Phaser Class: Quadratic + + + + + + + + + + +
+ + +
+ + +
+ +
+ + + +

Class: Quadratic

+
+ +
+

+ Phaser.Easing. + + Quadratic +

+ +
+ +
+
+ + + + +
+

new Quadratic()

+ + +
+
+ + +
+

Quadratic easing.

+
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + +

Methods

+ +
+ +
+

In(k) → {number}

+ + +
+
+ + +
+

Ease-in.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

The value to be tweened.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

k^2.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

InOut(k) → {number}

+ + +
+
+ + +
+

Ease-in/out.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

The value to be tweened.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The tweened value.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

Out(k) → {number}

+ + +
+
+ + +
+

Ease-out.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

The value to be tweened.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

k* (2-k).

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ +
+
+ + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
+ + + Documentation generated by JSDoc 3.2.0-dev + on Thu Oct 03 2013 02:35:46 GMT+0100 (BST) using the DocStrap template. + +
+
+ + +
+
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Docs/out/Phaser.Easing.Quartic.html b/Docs/out/Phaser.Easing.Quartic.html new file mode 100644 index 00000000..b5769b92 --- /dev/null +++ b/Docs/out/Phaser.Easing.Quartic.html @@ -0,0 +1,916 @@ + + + + + + Phaser Class: Quartic + + + + + + + + + + +
+ + +
+ + +
+ +
+ + + +

Class: Quartic

+
+ +
+

+ Phaser.Easing. + + Quartic +

+ +
+ +
+
+ + + + +
+

new Quartic()

+ + +
+
+ + +
+

Quartic easing.

+
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + +

Methods

+ +
+ +
+

In(k) → {number}

+ + +
+
+ + +
+

Quartic ease-in.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

The value to be tweened.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The tweened value.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

InOut(k) → {number}

+ + +
+
+ + +
+

Quartic ease-in/out.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

The value to be tweened.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The tweened value.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

Out(k) → {number}

+ + +
+
+ + +
+

Quartic ease-out.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

The value to be tweened.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The tweened value.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ +
+
+ + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
+ + + Documentation generated by JSDoc 3.2.0-dev + on Thu Oct 03 2013 02:35:46 GMT+0100 (BST) using the DocStrap template. + +
+
+ + +
+
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Docs/out/Phaser.Easing.Quintic.html b/Docs/out/Phaser.Easing.Quintic.html new file mode 100644 index 00000000..fe8003c6 --- /dev/null +++ b/Docs/out/Phaser.Easing.Quintic.html @@ -0,0 +1,916 @@ + + + + + + Phaser Class: Quintic + + + + + + + + + + +
+ + +
+ + +
+ +
+ + + +

Class: Quintic

+
+ +
+

+ Phaser.Easing. + + Quintic +

+ +
+ +
+
+ + + + +
+

new Quintic()

+ + +
+
+ + +
+

Quintic easing.

+
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + +

Methods

+ +
+ +
+

In(k) → {number}

+ + +
+
+ + +
+

Quintic ease-in.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

The value to be tweened.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The tweened value.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

InOut(k) → {number}

+ + +
+
+ + +
+

Quintic ease-in/out.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

The value to be tweened.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The tweened value.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

Out(k) → {number}

+ + +
+
+ + +
+

Quintic ease-out.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

The value to be tweened.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The tweened value.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ +
+
+ + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
+ + + Documentation generated by JSDoc 3.2.0-dev + on Thu Oct 03 2013 02:35:46 GMT+0100 (BST) using the DocStrap template. + +
+
+ + +
+
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Docs/out/Phaser.Easing.Sinusoidal.html b/Docs/out/Phaser.Easing.Sinusoidal.html new file mode 100644 index 00000000..be21a206 --- /dev/null +++ b/Docs/out/Phaser.Easing.Sinusoidal.html @@ -0,0 +1,916 @@ + + + + + + Phaser Class: Sinusoidal + + + + + + + + + + +
+ + +
+ + +
+ +
+ + + +

Class: Sinusoidal

+
+ +
+

+ Phaser.Easing. + + Sinusoidal +

+ +
+ +
+
+ + + + +
+

new Sinusoidal()

+ + +
+
+ + +
+

Sinusoidal easing.

+
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + +

Methods

+ +
+ +
+

In(k) → {number}

+ + +
+
+ + +
+

Sinusoidal ease-in.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

The value to be tweened.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The tweened value.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

InOut(k) → {number}

+ + +
+
+ + +
+

Sinusoidal ease-in/out.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

The value to be tweened.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The tweened value.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

Out(k) → {number}

+ + +
+
+ + +
+

Sinusoidal ease-out.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

The value to be tweened.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The tweened value.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ +
+
+ + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
+ + + Documentation generated by JSDoc 3.2.0-dev + on Thu Oct 03 2013 02:35:46 GMT+0100 (BST) using the DocStrap template. + +
+
+ + +
+
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Docs/out/Phaser.Easing.html b/Docs/out/Phaser.Easing.html new file mode 100644 index 00000000..d3b194c9 --- /dev/null +++ b/Docs/out/Phaser.Easing.html @@ -0,0 +1,526 @@ + + + + + + Phaser Class: Easing + + + + + + + + + + +
+ + +
+ + +
+ +
+ + + +

Class: Easing

+
+ +
+

+ Phaser. + + Easing +

+ +
+ + + +
+ + + + +
+ +
+
+ + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
+ + + Documentation generated by JSDoc 3.2.0-dev + on Thu Oct 03 2013 02:35:46 GMT+0100 (BST) using the DocStrap template. + +
+
+ + +
+
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Docs/out/Phaser.Frame.html b/Docs/out/Phaser.Frame.html new file mode 100644 index 00000000..78174ce0 --- /dev/null +++ b/Docs/out/Phaser.Frame.html @@ -0,0 +1,2901 @@ + + + + + + Phaser Class: Frame + + + + + + + + + + +
+ + +
+ + +
+ +
+ + + +

Class: Frame

+
+ +
+

+ Phaser. + + Frame +

+ +

Phaser.Frame

+ +
+ +
+
+ + + + +
+

new Frame(index, x, y, width, height, name, uuid)

+ + +
+
+ + +
+

A Frame is a single frame of an animation and is part of a FrameData collection.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
index + + +number + + + +

The index of this Frame within the FrameData set it is being added to.

x + + +number + + + +

X position of the frame within the texture image.

y + + +number + + + +

Y position of the frame within the texture image.

width + + +number + + + +

Width of the frame within the texture image.

height + + +number + + + +

Height of the frame within the texture image.

name + + +string + + + +

The name of the frame. In Texture Atlas data this is usually set to the filename.

uuid + + +string + + + +

Internal UUID key.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + +

Members

+ +
+ +
+

centerX

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
centerX + + +number + + + +

Center X position within the image to cut from.

+
+ + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

centerY

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
centerY + + +number + + + +

Center Y position within the image to cut from.

+
+ + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

distance

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
distance + + +number + + + +

The distance from the top left to the bottom-right of this Frame.

+
+ + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

height

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
height + + +number + + + +

Height of the frame.

+
+ + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

index

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
index + + +number + + + +

The index of this Frame within the FrameData set it is being added to.

+
+ + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

name

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + +

Useful for Texture Atlas files (is set to the filename value).

+
+ + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

rotated

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
rotated + + +boolean + + + +

Rotated? (not yet implemented)

+
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • false
+ + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

rotationDirection

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
rotationDirection + + +string + + + +

Either 'cw' or 'ccw', rotation is always 90 degrees.

+
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • 'cw'
+ + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

sourceSizeH

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
sourceSizeH + + +number + + + +

Height of the original sprite.

+
+ + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

sourceSizeW

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
sourceSizeW + + +number + + + +

Width of the original sprite.

+
+ + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

spriteSourceSizeH

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
spriteSourceSizeH + + +number + + + +

Height of the trimmed sprite.

+
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • 0
+ + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

spriteSourceSizeW

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
spriteSourceSizeW + + +number + + + +

Width of the trimmed sprite.

+
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • 0
+ + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

spriteSourceSizeX

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
spriteSourceSizeX + + +number + + + +

X position of the trimmed sprite inside original sprite.

+
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • 0
+ + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

spriteSourceSizeY

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
spriteSourceSizeY + + +number + + + +

Y position of the trimmed sprite inside original sprite.

+
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • 0
+ + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

trimmed

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
trimmed + + +boolean + + + +

Was it trimmed when packed?

+
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • false
+ + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

uuid

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
uuid + + +string + + + +

A link to the PIXI.TextureCache entry.

+
+ + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

width

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
width + + +number + + + +

Width of the frame.

+
+ + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

x

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
x + + +number + + + +

X position within the image to cut from.

+
+ + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

y

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
y + + +number + + + +

Y position within the image to cut from.

+
+ + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + +
+ +
+ + + +

Methods

+ +
+ +
+

setTrim(trimmed, actualWidth, actualHeight, destX, destY, destWidth, destHeight)

+ + +
+
+ + +
+

If the frame was trimmed when added to the Texture Atlas this records the trim and source data.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
trimmed + + +boolean + + + +

If this frame was trimmed or not.

actualWidth + + +number + + + +

The width of the frame before being trimmed.

actualHeight + + +number + + + +

The height of the frame before being trimmed.

destX + + +number + + + +

The destination X position of the trimmed frame for display.

destY + + +number + + + +

The destination Y position of the trimmed frame for display.

destWidth + + +number + + + +

The destination width of the trimmed frame for display.

destHeight + + +number + + + +

The destination height of the trimmed frame for display.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ +
+
+ + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
+ + + Documentation generated by JSDoc 3.2.0-dev + on Thu Oct 03 2013 02:35:46 GMT+0100 (BST) using the DocStrap template. + +
+
+ + +
+
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Docs/out/Phaser.FrameData.html b/Docs/out/Phaser.FrameData.html new file mode 100644 index 00000000..f1016736 --- /dev/null +++ b/Docs/out/Phaser.FrameData.html @@ -0,0 +1,1848 @@ + + + + + + Phaser Class: FrameData + + + + + + + + + + +
+ + +
+ + +
+ +
+ + + +

Class: FrameData

+
+ +
+

+ Phaser. + + FrameData +

+ +

Phaser.FrameData

+ +
+ +
+
+ + + + +
+

new FrameData()

+ + +
+
+ + +
+

FrameData is a container for Frame objects, which are the internal representation of animation data in Phaser.

+
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + +

Members

+ +
+ +
+

<readonly> total

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
total + + +number + + + +

The total number of frames in this FrameData set.

+
+ + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + +
+ +
+ + + +

Methods

+ +
+ +
+

addFrame(frame) → {Phaser.Frame}

+ + +
+
+ + +
+

Adds a new Frame to this FrameData collection. Typically called by the Animation.Parser and not directly.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
frame + + +Phaser.Frame + + + +

The frame to add to this FrameData set.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The frame that was just added.

+
+ + + +
+
+ Type +
+
+ +Phaser.Frame + + +
+
+ + + + + +
+ + + +
+

checkFrameName(name) → {boolean}

+ + +
+
+ + +
+

Check if there is a Frame with the given name.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + +

The name of the frame you want to check.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

True if the frame is found, otherwise false.

+
+ + + +
+
+ Type +
+
+ +boolean + + +
+
+ + + + + +
+ + + +
+

getFrame(index) → {Phaser.Frame}

+ + +
+
+ + +
+

Get a Frame by its numerical index.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
index + + +number + + + +

The index of the frame you want to get.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The frame, if found.

+
+ + + +
+
+ Type +
+
+ +Phaser.Frame + + +
+
+ + + + + +
+ + + +
+

getFrameByName(name) → {Phaser.Frame}

+ + +
+
+ + +
+

Get a Frame by its frame name.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + +

The name of the frame you want to get.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The frame, if found.

+
+ + + +
+
+ Type +
+
+ +Phaser.Frame + + +
+
+ + + + + +
+ + + +
+

getFrameIndexes(frames, useNumericIndex, output) → {Array}

+ + +
+
+ + +
+

Returns all of the Frame indexes in this FrameData set. +The frames indexes are returned in the output array, or if none is provided in a new Array object.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
frames + + +Array + + + + + + + + + + + +

An Array containing the indexes of the frames to retrieve. If the array is empty then all frames in the FrameData are returned.

useNumericIndex + + +boolean + + + + + + <optional>
+ + + + + +
+ + true + +

Are the given frames using numeric indexes (default) or strings? (false)

output + + +Array + + + + + + <optional>
+ + + + + +
+ +

If given the results will be appended to the end of this array otherwise a new array will be created.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

An array of all Frame indexes matching the given names or IDs.

+
+ + + +
+
+ Type +
+
+ +Array + + +
+
+ + + + + +
+ + + +
+

getFrameRange(start, end, output) → {Array}

+ + +
+
+ + +
+

Returns a range of frames based on the given start and end frame indexes and returns them in an Array.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
start + + +number + + + + + + + + + +

The starting frame index.

end + + +number + + + + + + + + + +

The ending frame index.

output + + +Array + + + + + + <optional>
+ + + + + +

If given the results will be appended to the end of this array otherwise a new array will be created.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

An array of Frames between the start and end index values, or an empty array if none were found.

+
+ + + +
+
+ Type +
+
+ +Array + + +
+
+ + + + + +
+ + + +
+

getFrames(frames, useNumericIndex, output) → {Array}

+ + +
+
+ + +
+

Returns all of the Frames in this FrameData set where the frame index is found in the input array. +The frames are returned in the output array, or if none is provided in a new Array object.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
frames + + +Array + + + + + + + + + + + +

An Array containing the indexes of the frames to retrieve. If the array is empty then all frames in the FrameData are returned.

useNumericIndex + + +boolean + + + + + + <optional>
+ + + + + +
+ + true + +

Are the given frames using numeric indexes (default) or strings? (false)

output + + +Array + + + + + + <optional>
+ + + + + +
+ +

If given the results will be appended to the end of this array otherwise a new array will be created.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

An array of all Frames in this FrameData set matching the given names or IDs.

+
+ + + +
+
+ Type +
+
+ +Array + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ +
+
+ + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
+ + + Documentation generated by JSDoc 3.2.0-dev + on Thu Oct 03 2013 02:35:47 GMT+0100 (BST) using the DocStrap template. + +
+
+ + +
+
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Docs/out/Phaser.Game.html b/Docs/out/Phaser.Game.html index 3ae8d7cf..bfa2b6bc 100644 --- a/Docs/out/Phaser.Game.html +++ b/Docs/out/Phaser.Game.html @@ -23,13 +23,13 @@ @@ -236,6 +322,8 @@

+ Phaser. + Game

@@ -1198,7 +1286,7 @@ providing quick access to common functions and handling the boot process.

-Phaser.Utils.Debug +Phaser.Utils.Debug @@ -3597,7 +3685,7 @@ When a game is paused the onPause event is dispatched. When it is resumed the on -Phaser.TweenManager +Phaser.TweenManager @@ -4287,7 +4375,7 @@ When a game is paused the onPause event is dispatched. When it is resumed the on Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:42 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:47 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Phaser.Group.html b/Docs/out/Phaser.Group.html index 996aaf1e..d6c1443b 100644 --- a/Docs/out/Phaser.Group.html +++ b/Docs/out/Phaser.Group.html @@ -23,13 +23,13 @@ @@ -236,6 +322,8 @@

+ Phaser. + Group

@@ -6213,7 +6301,7 @@ Group.subAll('x', 10) will minus 10 from the child.x value.

Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:43 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:47 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Phaser.Input.html b/Docs/out/Phaser.Input.html index a8a92d49..4db98bf2 100644 --- a/Docs/out/Phaser.Input.html +++ b/Docs/out/Phaser.Input.html @@ -23,13 +23,13 @@ @@ -236,6 +322,8 @@

+ Phaser. + Input

@@ -7385,7 +7473,7 @@ If you need more then use this to create a new one, up to a maximum of 10.

Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:43 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:47 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Phaser.InputHandler.html b/Docs/out/Phaser.InputHandler.html index 9282d52c..3c78611a 100644 --- a/Docs/out/Phaser.InputHandler.html +++ b/Docs/out/Phaser.InputHandler.html @@ -23,13 +23,13 @@ @@ -236,6 +322,8 @@

+ Phaser. + InputHandler

@@ -7301,7 +7389,7 @@ This value is only set when the pointer is over this Sprite.

Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:43 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:47 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Phaser.Key.html b/Docs/out/Phaser.Key.html index d4dc5b81..d457c4b8 100644 --- a/Docs/out/Phaser.Key.html +++ b/Docs/out/Phaser.Key.html @@ -23,13 +23,13 @@ @@ -236,6 +322,8 @@

+ Phaser. + Key

@@ -2348,7 +2436,7 @@ If the key is up it holds the duration of the previous down session.

Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:43 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:47 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Phaser.Keyboard.html b/Docs/out/Phaser.Keyboard.html index c65f620c..353ab542 100644 --- a/Docs/out/Phaser.Keyboard.html +++ b/Docs/out/Phaser.Keyboard.html @@ -23,13 +23,13 @@ @@ -236,6 +322,8 @@

+ Phaser. + Keyboard

@@ -2683,7 +2771,7 @@ This is called automatically by Phaser.Input and should not normally be invoked Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:43 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:47 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Phaser.LinkedList.html b/Docs/out/Phaser.LinkedList.html index 8e7030ef..05060e49 100644 --- a/Docs/out/Phaser.LinkedList.html +++ b/Docs/out/Phaser.LinkedList.html @@ -23,13 +23,13 @@ @@ -236,6 +322,8 @@

+ Phaser. + LinkedList

@@ -1267,7 +1355,7 @@ The function must exist on the member.

Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:43 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:48 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Phaser.Loader.html b/Docs/out/Phaser.Loader.html index ef2866eb..c566fd56 100644 --- a/Docs/out/Phaser.Loader.html +++ b/Docs/out/Phaser.Loader.html @@ -23,13 +23,13 @@ @@ -236,6 +322,8 @@

+ Phaser. + Loader

@@ -378,13 +466,6 @@ It uses a combination of Image() loading and xhr and provides progress and compl -

Classes

- -
-
Parser
-
-
- @@ -5320,7 +5401,7 @@ This allows you to easily make loading bars for games.

Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:43 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:48 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Phaser.LoaderParser.html b/Docs/out/Phaser.LoaderParser.html new file mode 100644 index 00000000..249b200f --- /dev/null +++ b/Docs/out/Phaser.LoaderParser.html @@ -0,0 +1,634 @@ + + + + + + Phaser Class: LoaderParser + + + + + + + + + + +
+ + +
+ + +
+ +
+ + + +

Class: LoaderParser

+
+ +
+

+ Phaser. + + LoaderParser +

+ +
+ +
+
+ + + + +
+

new LoaderParser()

+ + +
+
+ + +
+

Phaser.LoaderParser parses data objects from Phaser.Loader that need more preparation before they can be inserted into the Cache.

+
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + +

Methods

+ +
+ +
+

<static> bitmapFont(xml) → {FrameData}

+ + +
+
+ + +
+

Parse frame data from an XML file.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
xml + + +object + + + +

XML data you want to parse.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

Generated FrameData object.

+
+ + + +
+
+ Type +
+
+ +FrameData + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ +
+
+ + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
+ + + Documentation generated by JSDoc 3.2.0-dev + on Thu Oct 03 2013 02:35:48 GMT+0100 (BST) using the DocStrap template. + +
+
+ + +
+
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Docs/out/Phaser.MSPointer.html b/Docs/out/Phaser.MSPointer.html index e5ca9737..b0be4c20 100644 --- a/Docs/out/Phaser.MSPointer.html +++ b/Docs/out/Phaser.MSPointer.html @@ -23,13 +23,13 @@ @@ -236,6 +322,8 @@

+ Phaser. + MSPointer

@@ -1532,7 +1620,7 @@ It will work only in Internet Explorer 10 and Windows Store or Windows Phone 8 a Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:44 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:48 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Phaser.Math.html b/Docs/out/Phaser.Math.html index a5321e5f..b7bac697 100644 --- a/Docs/out/Phaser.Math.html +++ b/Docs/out/Phaser.Math.html @@ -23,13 +23,13 @@ @@ -236,6 +322,8 @@

+ Phaser. + Math

@@ -9811,7 +9899,7 @@ Should be called whenever the angle is updated on the Sprite to stop it from goi Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:44 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:48 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Phaser.Mouse.html b/Docs/out/Phaser.Mouse.html index b9d594f8..59e78675 100644 --- a/Docs/out/Phaser.Mouse.html +++ b/Docs/out/Phaser.Mouse.html @@ -23,13 +23,13 @@ @@ -236,6 +322,8 @@

+ Phaser. + Mouse

@@ -2078,7 +2166,7 @@ Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:44 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:48 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Phaser.Net.html b/Docs/out/Phaser.Net.html index 2b23a9ec..2a6eeb0d 100644 --- a/Docs/out/Phaser.Net.html +++ b/Docs/out/Phaser.Net.html @@ -23,13 +23,13 @@ @@ -236,6 +322,8 @@

+ Phaser. + Net

@@ -1157,7 +1245,7 @@ Optionally you can redirect to the new url, or just return it as a string.

Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:44 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:48 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Phaser.Particles.Arcade.Emitter.html b/Docs/out/Phaser.Particles.Arcade.Emitter.html index cdb70d11..ba5e1e19 100644 --- a/Docs/out/Phaser.Particles.Arcade.Emitter.html +++ b/Docs/out/Phaser.Particles.Arcade.Emitter.html @@ -23,13 +23,13 @@ @@ -10533,7 +10619,7 @@ Group.subAll('x', 10) will minus 10 from the child.x value.

Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:44 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:48 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Phaser.Particles.html b/Docs/out/Phaser.Particles.html index 69f7d173..bdc6602f 100644 --- a/Docs/out/Phaser.Particles.html +++ b/Docs/out/Phaser.Particles.html @@ -23,13 +23,13 @@ @@ -236,6 +322,8 @@

+ Phaser. + Particles

@@ -948,7 +1036,7 @@ Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:44 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:48 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Phaser.Plugin.html b/Docs/out/Phaser.Plugin.html index 41b946f0..23a58ab1 100644 --- a/Docs/out/Phaser.Plugin.html +++ b/Docs/out/Phaser.Plugin.html @@ -23,13 +23,13 @@ @@ -236,6 +322,8 @@

+ Phaser. + Plugin

@@ -1619,7 +1707,7 @@ It is only called if active is set to true.

Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:44 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:49 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Phaser.PluginManager.html b/Docs/out/Phaser.PluginManager.html index 8b21015f..c4e1f416 100644 --- a/Docs/out/Phaser.PluginManager.html +++ b/Docs/out/Phaser.PluginManager.html @@ -23,13 +23,13 @@ @@ -236,6 +322,8 @@

+ Phaser. + PluginManager

@@ -1249,7 +1337,7 @@ It only calls plugins who have active=true.

Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:44 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:49 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Phaser.Point.html b/Docs/out/Phaser.Point.html index 3b3896cd..ecfa3d57 100644 --- a/Docs/out/Phaser.Point.html +++ b/Docs/out/Phaser.Point.html @@ -23,13 +23,13 @@ @@ -236,6 +322,8 @@

+ Phaser. + Point

@@ -4809,7 +4897,7 @@ Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:44 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:49 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Phaser.Pointer.html b/Docs/out/Phaser.Pointer.html index 48f5c24c..3fa406db 100644 --- a/Docs/out/Phaser.Pointer.html +++ b/Docs/out/Phaser.Pointer.html @@ -23,13 +23,13 @@ @@ -236,6 +322,8 @@

+ Phaser. + Pointer

@@ -4652,7 +4740,7 @@ Default size of 44px (Apple's recommended "finger tip" size).

Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:45 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:49 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Phaser.QuadTree.html b/Docs/out/Phaser.QuadTree.html index 12aa091c..671356f3 100644 --- a/Docs/out/Phaser.QuadTree.html +++ b/Docs/out/Phaser.QuadTree.html @@ -23,13 +23,13 @@ @@ -236,6 +322,8 @@

+ Phaser. + QuadTree

@@ -502,7 +590,7 @@ it massively to add node indexing, removed lots of temp. var creation and signif
Source:
@@ -590,7 +678,7 @@ Clear the quadtree.

Source:
@@ -709,7 +797,7 @@ Determine which node the object belongs to.

Source:
@@ -853,7 +941,7 @@ objects to their corresponding subnodes.

Source:
@@ -972,7 +1060,7 @@ Return all objects that could collide with the given object.

Source:
@@ -1067,7 +1155,7 @@ Split the node into 4 subnodes

Source:
@@ -1118,7 +1206,7 @@ Split the node into 4 subnodes

Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:45 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:49 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Phaser.RandomDataGenerator.html b/Docs/out/Phaser.RandomDataGenerator.html index d47c2a65..2dfefa0a 100644 --- a/Docs/out/Phaser.RandomDataGenerator.html +++ b/Docs/out/Phaser.RandomDataGenerator.html @@ -23,13 +23,13 @@ @@ -236,6 +322,8 @@

+ Phaser. + RandomDataGenerator

@@ -1811,7 +1899,7 @@ Random number generator from Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:45 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:49 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Phaser.Rectangle.html b/Docs/out/Phaser.Rectangle.html index 6f55c154..ad97a39e 100644 --- a/Docs/out/Phaser.Rectangle.html +++ b/Docs/out/Phaser.Rectangle.html @@ -23,13 +23,13 @@ @@ -236,6 +322,8 @@

+ Phaser. + Rectangle

@@ -7150,7 +7238,7 @@ This method checks the x, y, width, and height properties of the Rectangles.

Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:45 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:49 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Phaser.RequestAnimationFrame.html b/Docs/out/Phaser.RequestAnimationFrame.html index 50e66a68..662a17be 100644 --- a/Docs/out/Phaser.RequestAnimationFrame.html +++ b/Docs/out/Phaser.RequestAnimationFrame.html @@ -23,13 +23,13 @@ @@ -236,6 +322,8 @@

+ Phaser. + RequestAnimationFrame

@@ -1121,7 +1209,7 @@ Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:45 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:49 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Phaser.Signal.html b/Docs/out/Phaser.Signal.html index a3238ac5..dc498ed8 100644 --- a/Docs/out/Phaser.Signal.html +++ b/Docs/out/Phaser.Signal.html @@ -23,13 +23,13 @@ @@ -236,6 +322,8 @@

+ Phaser. + Signal

@@ -1608,7 +1696,7 @@ already dispatched before.

-Function +Function @@ -2106,7 +2194,7 @@ already dispatched before.

Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:45 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:49 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Phaser.Sound.html b/Docs/out/Phaser.Sound.html index 21d18a7a..5b5f8c1c 100644 --- a/Docs/out/Phaser.Sound.html +++ b/Docs/out/Phaser.Sound.html @@ -23,13 +23,13 @@ @@ -236,6 +322,8 @@

+ Phaser. + Sound

@@ -5330,7 +5418,7 @@ This allows you to bundle multiple sounds together into a single audio file and Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:45 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:49 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Phaser.SoundManager.html b/Docs/out/Phaser.SoundManager.html index ac46cabc..6e62d2b9 100644 --- a/Docs/out/Phaser.SoundManager.html +++ b/Docs/out/Phaser.SoundManager.html @@ -23,13 +23,13 @@ @@ -236,6 +322,8 @@

+ Phaser. + SoundManager

@@ -2238,7 +2326,7 @@ Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:45 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:49 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Phaser.Stage.html b/Docs/out/Phaser.Stage.html index 26c7bc91..ba75184b 100644 --- a/Docs/out/Phaser.Stage.html +++ b/Docs/out/Phaser.Stage.html @@ -23,13 +23,13 @@ @@ -236,6 +322,8 @@

+ Phaser. + Stage

@@ -1295,7 +1383,7 @@ focus handling, game resizing, scaling and the pause, boot and orientation scree Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:45 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:50 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Phaser.StageScaleMode.html b/Docs/out/Phaser.StageScaleMode.html index e8b4ac7e..72c3c1eb 100644 --- a/Docs/out/Phaser.StageScaleMode.html +++ b/Docs/out/Phaser.StageScaleMode.html @@ -23,13 +23,13 @@ @@ -236,6 +322,8 @@

+ Phaser. + StageScaleMode

@@ -3632,7 +3720,7 @@ Please note that this needs to be supported by the web browser and isn't the sam Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:45 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:50 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Phaser.State.html b/Docs/out/Phaser.State.html index 87b6e742..1885f076 100644 --- a/Docs/out/Phaser.State.html +++ b/Docs/out/Phaser.State.html @@ -23,13 +23,13 @@ @@ -236,6 +322,8 @@

+ Phaser. + State

@@ -1638,7 +1726,7 @@ It provides quick access to common functions such as the camera, cache, input, m -Phaser.TweenManager +Phaser.TweenManager @@ -2386,7 +2474,7 @@ If you need to use the loader, you may need to use them here.

Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:46 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:50 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Phaser.StateManager.html b/Docs/out/Phaser.StateManager.html index 34a49233..06fbce89 100644 --- a/Docs/out/Phaser.StateManager.html +++ b/Docs/out/Phaser.StateManager.html @@ -23,13 +23,13 @@ @@ -236,6 +322,8 @@

+ Phaser. + StateManager

@@ -3243,7 +3331,7 @@ Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:46 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:50 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Phaser.Time.html b/Docs/out/Phaser.Time.html new file mode 100644 index 00000000..5f84d403 --- /dev/null +++ b/Docs/out/Phaser.Time.html @@ -0,0 +1,2842 @@ + + + + + + Phaser Class: Time + + + + + + + + + + +
+ + +
+ + +
+ +
+ + + +

Class: Time

+
+ +
+

+ Phaser. + + Time +

+ +

This is the core internal game clock. It manages the elapsed time and calculation of elapsed values, used for game object motion and tweens.

+ +
+ +
+
+ + + + +
+

new Time(game)

+ + +
+
+ + +
+

Time constructor.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
game + + +Phaser.Game + + + +

A reference to the currently running game.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + +

Members

+ +
+ +
+

_justResumed

+ + +
+
+ +
+

Description.

+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
_justResumed + + +boolean + + + +
+
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • false
+ + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

elapsed

+ + +
+
+ +
+

Elapsed time since the last frame.

+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
elapsed + + +number + + + +
+
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • 0
+ + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

fps

+ + +
+
+ +
+

Frames per second.

+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
fps + + +number + + + +
+
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • 0
+ + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

fpsMax

+ + +
+
+ +
+

The highest rate the fps has reached (usually no higher than 60fps).

+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
fpsMax + + +number + + + +
+
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • 0
+ + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

fpsMin

+ + +
+
+ +
+

The lowest rate the fps has dropped to.

+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
fpsMin + + +number + + + +
+
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • 1000
+ + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

frames

+ + +
+
+ +
+

The number of frames record in the last second.

+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
frames + + +number + + + +
+
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • 0
+ + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

game

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
game + + +Phaser.Game + + + +

Local reference to game.

+
+ + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

lastTime

+ + +
+
+ +
+

Internal value used by timeToCall as part of the setTimeout loop

+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
lastTime + + +number + + + +
+
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • 0
+ + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

msMax

+ + +
+
+ +
+

The maximum amount of time the game has taken between two frames.

+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
msMax + + +number + + + +
+
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • 0
+ + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

msMin

+ + +
+
+ +
+

The minimum amount of time the game has taken between two frames.

+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
msMin + + +number + + + +
+
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • 1000
+ + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

now

+ + +
+
+ +
+

The time right now.

+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
now + + +number + + + +
+
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • 0
+ + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

pausedTime

+ + +
+
+ +
+

Records how long the game has been paused for. Is reset each time the game pauses.

+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
pausedTime + + +number + + + +
+
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • 0
+ + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

pauseDuration

+ + +
+
+ +
+

Records how long the game was paused for in miliseconds.

+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
pauseDuration + + +number + + + +
+
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • 0
+ + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

physicsElapsed

+ + +
+
+ +
+

The elapsed time calculated for the physics motion updates.

+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
physicsElapsed + + +number + + + +
+
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • 0
+ + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

time

+ + +
+
+ +
+

Game time counter.

+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
time + + +number + + + +
+
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • 0
+ + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

timeToCall

+ + +
+
+ +
+

The value that setTimeout needs to work out when to next update

+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
timeToCall + + +number + + + +
+
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • 0
+ + + +
Source:
+
+ + + + + + + +
+ + + +
+ +
+ + + +

Methods

+ +
+ +
+

elapsedSecondsSince(since) → {number}

+ + +
+
+ + +
+

How long has passed since the given time (in seconds).

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
since + + +number + + + +

The time you want to measure (in seconds).

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

Duration between given time and now (in seconds).

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

elapsedSince(since) → {number}

+ + +
+
+ + +
+

How long has passed since the given time.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
since + + +number + + + +

The time you want to measure against.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The difference between the given time and now.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

reset()

+ + +
+
+ + +
+

Resets the private _started value to now.

+
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + + +
+

totalElapsedSeconds() → {number}

+ + +
+
+ + +
+

The number of seconds that have elapsed since the game was started.

+
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

update(time)

+ + +
+
+ + +
+

Updates the game clock and calculate the fps. This is called automatically by Phaser.Game.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
time + + +number + + + +

The current timestamp, either performance.now or Date.now depending on the browser.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ +
+
+ + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
+ + + Documentation generated by JSDoc 3.2.0-dev + on Thu Oct 03 2013 02:35:50 GMT+0100 (BST) using the DocStrap template. + +
+
+ + +
+
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Docs/out/Phaser.Touch.html b/Docs/out/Phaser.Touch.html index 1bc1f8c0..9250159d 100644 --- a/Docs/out/Phaser.Touch.html +++ b/Docs/out/Phaser.Touch.html @@ -23,13 +23,13 @@ @@ -236,6 +322,8 @@

+ Phaser. + Touch

@@ -2358,7 +2446,7 @@ Doesn't appear to be supported by most browsers on a canvas element yet.

Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:46 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:50 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Phaser.Tween.html b/Docs/out/Phaser.Tween.html new file mode 100644 index 00000000..d017c164 --- /dev/null +++ b/Docs/out/Phaser.Tween.html @@ -0,0 +1,3199 @@ + + + + + + Phaser Class: Tween + + + + + + + + + + +
+ + +
+ + +
+ +
+ + + +

Class: Tween

+
+ +
+

+ Phaser. + + Tween +

+ +

Phaser.Tween

+ +
+ +
+
+ + + + +
+

new Tween(object, game)

+ + +
+
+ + +
+

Tween constructor +Create a new <code>Tween</code>.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
object + + +object + + + +

Target object will be affected by this tween.

game + + +Phaser.Game + + + +

Current game instance.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + +

Members

+ +
+ +
+

game

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
game + + +Phaser.Game + + + +

A reference to the currently running Game.

+
+ + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

isRunning

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
isRunning + + +boolean + + + +

Description.

+
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • false
+ + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

onComplete

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
onComplete + + +Phaser.Signal + + + +

Description.

+
+ + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

onStart

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
onStart + + +Phaser.Signal + + + +

Description.

+
+ + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

pendingDelete

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
pendingDelete + + +boolean + + + +

If this tween is ready to be deleted by the TweenManager.

+
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • false
+ + + +
Source:
+
+ + + + + + + +
+ + + +
+ +
+ + + +

Methods

+ +
+ +
+

chain() → {Phaser.Tween}

+ + +
+
+ + +
+

You can chain tweens together by passing a reference to the chain function. This enables one tween to call another on completion. +You can pass as many tweens as you like to this function, they will each be chained in sequence.

+
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

Itself.

+
+ + + +
+
+ Type +
+
+ +Phaser.Tween + + +
+
+ + + + + +
+ + + +
+

delay(amount) → {Phaser.Tween}

+ + +
+
+ + +
+

Sets a delay time before this tween will start.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
amount + + +number + + + +

The amount of the delay in ms.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

Itself.

+
+ + + +
+
+ Type +
+
+ +Phaser.Tween + + +
+
+ + + + + +
+ + + +
+

easing(easing) → {Phaser.Tween}

+ + +
+
+ + +
+

Set easing function this tween will use, i.e. Phaser.Easing.Linear.None.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
easing + + +function + + + +

The easing function this tween will use, i.e. Phaser.Easing.Linear.None.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

Itself.

+
+ + + +
+
+ Type +
+
+ +Phaser.Tween + + +
+
+ + + + + +
+ + + +
+

interpolation(interpolation) → {Phaser.Tween}

+ + +
+
+ + +
+

Set interpolation function the tween will use, by default it uses Phaser.Math.linearInterpolation.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
interpolation + + +function + + + +

The interpolation function to use (Phaser.Math.linearInterpolation by default)

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

Itself.

+
+ + + +
+
+ Type +
+
+ +Phaser.Tween + + +
+
+ + + + + +
+ + + +
+

loop() → {Tween}

+ + +
+
+ + +
+

Loop a chain of tweens

+

Usage: +game.add.tween(p).to({ x: 700 }, 1000, Phaser.Easing.Linear.None, true) +.to({ y: 300 }, 1000, Phaser.Easing.Linear.None) +.to({ x: 0 }, 1000, Phaser.Easing.Linear.None) +.to({ y: 0 }, 1000, Phaser.Easing.Linear.None) +.loop();

+
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

Itself.

+
+ + + +
+
+ Type +
+
+ +Tween + + +
+
+ + + + + +
+ + + +
+

onCompleteCallback(callback) → {Phaser.Tween}

+ + +
+
+ + +
+

Sets a callback to be fired when the tween completes. Note: callback will be called in the context of the global scope.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
callback + + +function + + + +

The callback to invoke on completion.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

Itself.

+
+ + + +
+
+ Type +
+
+ +Phaser.Tween + + +
+
+ + + + + +
+ + + +
+

onStartCallback(callback) → {Phaser.Tween}

+ + +
+
+ + +
+

Sets a callback to be fired when the tween starts. Note: callback will be called in the context of the global scope.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
callback + + +function + + + +

The callback to invoke on start.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

Itself.

+
+ + + +
+
+ Type +
+
+ +Phaser.Tween + + +
+
+ + + + + +
+ + + +
+

onUpdateCallback(callback) → {Phaser.Tween}

+ + +
+
+ + +
+

Sets a callback to be fired each time this tween updates. Note: callback will be called in the context of the global scope.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
callback + + +function + + + +

The callback to invoke each time this tween is updated.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

Itself.

+
+ + + +
+
+ Type +
+
+ +Phaser.Tween + + +
+
+ + + + + +
+ + + +
+

pause()

+ + +
+
+ + +
+

Pauses the tween.

+
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + + +
+

repeat(times) → {Phaser.Tween}

+ + +
+
+ + +
+

Sets the number of times this tween will repeat.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
times + + +number + + + +

How many times to repeat.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

Itself.

+
+ + + +
+
+ Type +
+
+ +Phaser.Tween + + +
+
+ + + + + +
+ + + +
+

resume()

+ + +
+
+ + +
+

Resumes a paused tween.

+
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + + +
+

start(time) → {Phaser.Tween}

+ + +
+
+ + +
+

Starts the tween running. Can also be called by the autoStart parameter of Tween.to.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
time + + +number + + + +

Description.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

Itself.

+
+ + + +
+
+ Type +
+
+ +Phaser.Tween + + +
+
+ + + + + +
+ + + +
+

stop() → {Phaser.Tween}

+ + +
+
+ + +
+

Stops the tween if running and removes it from the TweenManager. If there are any onComplete callbacks or events they are not dispatched.

+
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

Itself.

+
+ + + +
+
+ Type +
+
+ +Phaser.Tween + + +
+
+ + + + + +
+ + + +
+

to(properties, duration, ease, autoStart, delay, repeat, yoyo) → {Phaser.Tween}

+ + +
+
+ + +
+

Configure the Tween

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
properties + + +object + + + +

Properties you want to tween.

duration + + +number + + + +

Duration of this tween.

ease + + +function + + + +

Easing function.

autoStart + + +boolean + + + +

Whether this tween will start automatically or not.

delay + + +number + + + +

Delay before this tween will start, defaults to 0 (no delay).

repeat + + +boolean + + + +

Should the tween automatically restart once complete? (ignores any chained tweens).

yoyo + + +Phaser.Tween + + + +

Description.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

Itself.

+
+ + + +
+
+ Type +
+
+ +Phaser.Tween + + +
+
+ + + + + +
+ + + +
+

update(time) → {boolean}

+ + +
+
+ + +
+

Core tween update function called by the TweenManager. Does not need to be invoked directly.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
time + + +number + + + +

A timestamp passed in by the TweenManager.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

false if the tween has completed and should be deleted from the manager, otherwise true (still active).

+
+ + + +
+
+ Type +
+
+ +boolean + + +
+
+ + + + + +
+ + + +
+

yoyo(yoyo) → {Phaser.Tween}

+ + +
+
+ + +
+

A tween that has yoyo set to true will run through from start to finish, then reverse from finish to start. +Used in combination with repeat you can create endless loops.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
yoyo + + +boolean + + + +

Set to true to yoyo this tween.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

Itself.

+
+ + + +
+
+ Type +
+
+ +Phaser.Tween + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ +
+
+ + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
+ + + Documentation generated by JSDoc 3.2.0-dev + on Thu Oct 03 2013 02:35:50 GMT+0100 (BST) using the DocStrap template. + +
+
+ + +
+
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Docs/out/Phaser.TweenManager.html b/Docs/out/Phaser.TweenManager.html new file mode 100644 index 00000000..5af078a5 --- /dev/null +++ b/Docs/out/Phaser.TweenManager.html @@ -0,0 +1,1555 @@ + + + + + + Phaser Class: TweenManager + + + + + + + + + + +
+ + +
+ + +
+ +
+ + + +

Class: TweenManager

+
+ +
+

+ Phaser. + + TweenManager +

+ +

Phaser.Game has a single instance of the TweenManager through which all Tween objects are created and updated. +Tweens are hooked into the game clock and pause system, adjusting based on the game state.

+

TweenManager is based heavily on tween.js by http://soledadpenades.com. +The difference being that tweens belong to a games instance of TweenManager, rather than to a global TWEEN object. +It also has callbacks swapped for Signals and a few issues patched with regard to properties and completion errors. +Please see https://github.com/sole/tween.js for a full list of contributors.

+ +
+ +
+
+ + + + +
+

new TweenManager(game)

+ + +
+
+ + +
+

Phaser - TweenManager

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
game + + +Phaser.Game + + + +

A reference to the currently running game.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + +

Members

+ +
+ +
+

game

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
game + + +Phaser.Game + + + +

Local reference to game.

+
+ + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

REVISION

+ + +
+
+ +
+

Version number of this library.

+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
REVISION + + +string + + + +
+
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • "11dev"
+ + + +
Source:
+
+ + + + + + + +
+ + + +
+ +
+ + + +

Methods

+ +
+ +
+

add(tween) → {Phaser.Tween}

+ + +
+
+ + +
+

Add a new tween into the TweenManager.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
tween + + +Phaser.Tween + + + +

The tween object you want to add.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The tween object you added to the manager.

+
+ + + +
+
+ Type +
+
+ +Phaser.Tween + + +
+
+ + + + + +
+ + + +
+

create(object) → {Phaser.Tween}

+ + +
+
+ + +
+

Create a tween object for a specific object. The object can be any JavaScript object or Phaser object such as Sprite.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
object + + +Object + + + +

Object the tween will be run on.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The newly created tween object.

+
+ + + +
+
+ Type +
+
+ +Phaser.Tween + + +
+
+ + + + + +
+ + + +
+

getAll() → {Phaser.Tween[]}

+ + +
+
+ + +
+

Get all the tween objects in an array.

+
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

Array with all tween objects.

+
+ + + +
+
+ Type +
+
+ +Phaser.Tween[] + + +
+
+ + + + + +
+ + + +
+

remove(tween)

+ + +
+
+ + +
+

Remove a tween from this manager.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
tween + + +Phaser.Tween + + + +

The tween object you want to remove.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + + +
+

removeAll()

+ + +
+
+ + +
+

Remove all tween objects.

+
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + + +
+

resumeAll()

+ + +
+
+ + +
+

Pauses all currently paused tweens.

+
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + + +
+

update() → {boolean}

+ + +
+
+ + +
+

Update all the tween objects you added to this manager.

+
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

Return false if there's no tween to update, otherwise return true.

+
+ + + +
+
+ Type +
+
+ +boolean + + +
+
+ + + + + +
+ + + +
+

update()

+ + +
+
+ + +
+

Pauses all currently running tweens.

+
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ +
+
+ + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
+ + + Documentation generated by JSDoc 3.2.0-dev + on Thu Oct 03 2013 02:35:50 GMT+0100 (BST) using the DocStrap template. + +
+
+ + +
+
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Docs/out/Phaser.Utils.Debug.html b/Docs/out/Phaser.Utils.Debug.html new file mode 100644 index 00000000..fc7a472d --- /dev/null +++ b/Docs/out/Phaser.Utils.Debug.html @@ -0,0 +1,5908 @@ + + + + + + Phaser Class: Debug + + + + + + + + + + +
+ + +
+ + +
+ +
+ + + +

Class: Debug

+
+ +
+

+ Phaser.Utils. + + Debug +

+ +

Phaser.Utils.Debug

+ +
+ +
+
+ + + + +
+

new Debug(game)

+ + +
+
+ + +
+

A collection of methods for displaying debug information about game objects. Phaser.Debug requires a CANVAS game type in order to render, so if you've got +your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL doesn't kick in, then the Debug functions will all display.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
game + + +Phaser.Game + + + +

A reference to the currently running game.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + +

Members

+ +
+ +
+

context

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
context + + +Context + + + +

The canvas context on which to render the debug information.

+
+ + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

currentAlpha

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
currentAlpha + + +number + + + +

The current alpha the debug information will be rendered at.

+
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • 1
+ + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

currentX

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
currentX + + +Context + + + +

The current X position the debug information will be rendered at.

+
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • 0
+ + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

currentY

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
currentY + + +number + + + +

The current Y position the debug information will be rendered at.

+
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • 0
+ + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

font

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
font + + +string + + + +

The font that the debug information is rendered in.

+
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • '14px Courier'
+ + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

game

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
game + + +Phaser.Game + + + +

A reference to the currently running Game.

+
+ + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

lineHeight

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
lineHeight + + +number + + + +

The line height between the debug text.

+
+ + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

renderShadow

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
renderShadow + + +boolean + + + +

Should the text be rendered with a slight shadow? Makes it easier to read on different types of background.

+
+ + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + +
+ +
+ + + +

Methods

+ +
+ +
+

line(text, x, y)

+ + +
+
+ + +
+

Internal method that outputs a single line of text.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
text + + +string + + + +

The line of text to draw.

x + + +number + + + +

The X value the debug info will start from.

y + + +number + + + +

The Y value the debug info will start from.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + + +
+

renderCameraInfo(camera, x, y, color)

+ + +
+
+ + +
+

Render camera information including dimensions and location.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
camera + + +Phaser.Camera + + + + + + + + + + + +

Description.

x + + +number + + + + + + + + + + + +

X position of the debug info to be rendered.

y + + +number + + + + + + + + + + + +

Y position of the debug info to be rendered.

color + + +string + + + + + + <optional>
+ + + + + +
+ + 'rgb(255,255,255)' + +

color of the debug info to be rendered. (format is css color string).

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + + +
+

renderCircle(circle, color)

+ + +
+
+ + +
+

Renders a Circle.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
circle + + +Phaser.Circle + + + + + + + + + +

The Circle to render.

color + + +string + + + + + + <optional>
+ + + + + +

Color of the debug info to be rendered (format is css color string).

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + + +
+

renderDebug(pointer, hideIfUp, downColor, upColor, color)

+ + +
+
+ + +
+

Renders the Pointer.circle object onto the stage in green if down or red if up along with debug text.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
pointer + + +Phaser.Pointer + + + + + + + + + + + +

Description.

hideIfUp + + +boolean + + + + + + <optional>
+ + + + + +
+ + false + +

Doesn't render the circle if the pointer is up.

downColor + + +string + + + + + + <optional>
+ + + + + +
+ + 'rgba(0,255,0,0.5)' + +

The color the circle is rendered in if down.

upColor + + +string + + + + + + <optional>
+ + + + + +
+ + 'rgba(255,0,0,0.5)' + +

The color the circle is rendered in if up (and hideIfUp is false).

color + + +string + + + + + + <optional>
+ + + + + +
+ + 'rgb(255,255,255)' + +

color of the debug info to be rendered. (format is css color string).

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + + +
+

renderInputInfo(x, y, color)

+ + +
+
+ + +
+

Render debug information about the Input object.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
x + + +number + + + + + + + + + + + +

X position of the debug info to be rendered.

y + + +number + + + + + + + + + + + +

Y position of the debug info to be rendered.

color + + +string + + + + + + <optional>
+ + + + + +
+ + 'rgb(255,255,255)' + +

color of the debug info to be rendered. (format is css color string).

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + + +
+

renderLocalTransformInfo(sprite, x, y, color)

+ + +
+
+ + +
+

Render the Local Transform information of the given Sprite.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
sprite + + +Phaser.Sprite + + + + + + + + + + + +

Description.

x + + +number + + + + + + + + + + + +

X position of the debug info to be rendered.

y + + +number + + + + + + + + + + + +

Y position of the debug info to be rendered.

color + + +string + + + + + + <optional>
+ + + + + +
+ + 'rgb(255,255,255)' + +

color of the debug info to be rendered. (format is css color string).

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + + +
+

renderPixel(x, y, color)

+ + +
+
+ + +
+

Renders a single pixel.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
x + + +number + + + + + + + + + +

X position of the debug info to be rendered.

y + + +number + + + + + + + + + +

Y position of the debug info to be rendered.

color + + +string + + + + + + <optional>
+ + + + + +

Color of the debug info to be rendered (format is css color string).

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + + +
+

renderPoint(point, color)

+ + +
+
+ + +
+

Renders a Point object.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
point + + +Phaser.Point + + + + + + + + + +

The Point to render.

color + + +string + + + + + + <optional>
+ + + + + +

Color of the debug info to be rendered (format is css color string).

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + + +
+

renderPointInfo(sprite, x, y, color)

+ + +
+
+ + +
+

Renders Point coordinates in the given color.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
sprite + + +Phaser.Point + + + + + + + + + + + +

Description.

x + + +number + + + + + + + + + + + +

X position of the debug info to be rendered.

y + + +number + + + + + + + + + + + +

Y position of the debug info to be rendered.

color + + +string + + + + + + <optional>
+ + + + + +
+ + 'rgb(255,255,255)' + +

color of the debug info to be rendered. (format is css color string).

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + + +
+

renderQuadTree(quadtree, color)

+ + +
+
+ + +
+

Visually renders a QuadTree to the display.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
quadtree + + +Phaser.QuadTree + + + +

The quadtree to render.

color + + +string + + + +

The color of the lines in the quadtree.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + + +
+

renderRectangle(rect, color)

+ + +
+
+ + +
+

Renders a Rectangle.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
rect + + +Phaser.Rectangle + + + + + + + + + +

The Rectangle to render.

color + + +string + + + + + + <optional>
+ + + + + +

Color of the debug info to be rendered (format is css color string).

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + + +
+

renderSoundInfo(sound, x, y, color)

+ + +
+
+ + +
+

Render Sound information, including decoded state, duration, volume and more.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
sound + + +Phaser.Sound + + + + + + + + + + + +

The sound object to debug.

x + + +number + + + + + + + + + + + +

X position of the debug info to be rendered.

y + + +number + + + + + + + + + + + +

Y position of the debug info to be rendered.

color + + +string + + + + + + <optional>
+ + + + + +
+ + 'rgb(255,255,255)' + +

color of the debug info to be rendered. (format is css color string).

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + + +
+

renderSpriteBody(sprite, color)

+ + +
+
+ + +
+

Renders just the Sprite.body bounds.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
sprite + + +Phaser.Sprite + + + + + + + + + +

Description.

color + + +string + + + + + + <optional>
+ + + + + +

Color of the debug info to be rendered (format is css color string).

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + + +
+

renderSpriteBounds(sprite, color, fill)

+ + +
+
+ + +
+

Renders just the full Sprite bounds.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
sprite + + +Phaser.Sprite + + + + + + + + + + + +

Description.

color + + +string + + + + + + <optional>
+ + + + + +
+ +

Color of the debug info to be rendered (format is css color string).

fill + + +boolean + + + + + + <optional>
+ + + + + +
+ + false + +

If false the bounds outline is rendered, if true the whole rectangle is rendered.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + + +
+

renderSpriteCollision(sprite, x, y, color)

+ + +
+
+ + +
+

Render Sprite collision.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
sprite + + +Phaser.Sprite + + + + + + + + + + + +

The sprite to be rendered.

x + + +number + + + + + + + + + + + +

X position of the debug info to be rendered.

y + + +number + + + + + + + + + + + +

Y position of the debug info to be rendered.

color + + +string + + + + + + <optional>
+ + + + + +
+ + 'rgb(255,255,255)' + +

color of the debug info to be rendered. (format is css color string).

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + + +
+

renderSpriteCorners(sprite, showText, showBounds, color)

+ + +
+
+ + +
+

Renders the corners and point information of the given Sprite.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
sprite + + +Phaser.Sprite + + + + + + + + + + + +

The sprite to be rendered.

showText + + +boolean + + + + + + <optional>
+ + + + + +
+ + false + +

If true the x/y coordinates of each point will be rendered.

showBounds + + +boolean + + + + + + <optional>
+ + + + + +
+ + false + +

If true the bounds will be rendered over the top of the sprite.

color + + +string + + + + + + <optional>
+ + + + + +
+ + 'rgb(255,0,255)' + +

The color the text is rendered in.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + + +
+

renderSpriteInfo(sprite, x, y, color)

+ + +
+
+ + +
+

Render debug infos (including name, bounds info, position and some other properties) about the Sprite.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
sprite + + +Phaser.Sprite + + + + + + + + + + + +

Description.

x + + +number + + + + + + + + + + + +

X position of the debug info to be rendered.

y + + +number + + + + + + + + + + + +

Y position of the debug info to be rendered.

color + + +string + + + + + + <optional>
+ + + + + +
+ + 'rgb(255,255,255)' + +

color of the debug info to be rendered. (format is css color string).

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + + +
+

renderSpriteInputInfo(sprite, x, y, color)

+ + +
+
+ + +
+

Render Sprite Input Debug information.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
sprite + + +Phaser.Sprite + + + + + + + + + + + +

The sprite to be rendered.

x + + +number + + + + + + + + + + + +

X position of the debug info to be rendered.

y + + +number + + + + + + + + + + + +

Y position of the debug info to be rendered.

color + + +string + + + + + + <optional>
+ + + + + +
+ + 'rgb(255,255,255)' + +

color of the debug info to be rendered. (format is css color string).

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + + +
+

renderText(text, x, y, color, font)

+ + +
+
+ + +
+

Render text.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
text + + +string + + + + + + + + + +

The line of text to draw.

x + + +number + + + + + + + + + +

X position of the debug info to be rendered.

y + + +number + + + + + + + + + +

Y position of the debug info to be rendered.

color + + +string + + + + + + <optional>
+ + + + + +

Color of the debug info to be rendered (format is css color string).

font + + +string + + + + + + + + + +

The font of text to draw.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + + +
+

renderWorldTransformInfo(sprite, x, y, color)

+ + +
+
+ + +
+

Render the World Transform information of the given Sprite.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
sprite + + +Phaser.Sprite + + + + + + + + + + + +

Description.

x + + +number + + + + + + + + + + + +

X position of the debug info to be rendered.

y + + +number + + + + + + + + + + + +

Y position of the debug info to be rendered.

color + + +string + + + + + + <optional>
+ + + + + +
+ + 'rgb(255,255,255)' + +

color of the debug info to be rendered. (format is css color string).

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + + +
+

start(x, y, color)

+ + +
+
+ + +
+

Internal method that resets and starts the debug output values.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
x + + +number + + + +

The X value the debug info will start from.

y + + +number + + + +

The Y value the debug info will start from.

color + + +string + + + +

The color the debug info will drawn in.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + + +
+

stop()

+ + +
+
+ + +
+

Internal method that stops the debug output.

+
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ +
+
+ + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
+ + + Documentation generated by JSDoc 3.2.0-dev + on Thu Oct 03 2013 02:35:50 GMT+0100 (BST) using the DocStrap template. + +
+
+ + +
+
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Docs/out/Phaser.Utils.html b/Docs/out/Phaser.Utils.html new file mode 100644 index 00000000..08a0b7a2 --- /dev/null +++ b/Docs/out/Phaser.Utils.html @@ -0,0 +1,995 @@ + + + + + + Phaser Class: Utils + + + + + + + + + + +
+ + +
+ + +
+ +
+ + + +

Class: Utils

+
+ +
+

+ Phaser. + + Utils +

+ +
+ +
+
+ + + + +
+

new Utils()

+ + +
+
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + +
+ + + + + + + + +

Classes

+ +
+
Debug
+
+
+ + + + + + + +

Methods

+ +
+ +
+

<static> extend() → {object}

+ + +
+
+ + +
+

This is a slightly modified version of http://api.jquery.com/jQuery.extend/

+
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The extended object.

+
+ + + +
+
+ Type +
+
+ +object + + +
+
+ + + + + +
+ + + +
+

<static> isPlainObject(obj) → {boolean}

+ + +
+
+ + +
+

This is a slightly modified version of jQuery.isPlainObject. A plain object is an object whose internal class property is [object Object].

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
obj + + +object + + + +

The object to inspect.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+
    +
  • true if the object is plain, otherwise false.
  • +
+
+ + + +
+
+ Type +
+
+ +boolean + + +
+
+ + + + + +
+ + + +
+

<static> pad(str, len, pad, dir) → {string}

+ + +
+
+ + +
+

Javascript string pad http://www.webtoolkit.info/. +pad = the string to pad it out with (defaults to a space)<br> +dir = 1 (left), 2 (right), 3 (both)

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
str + + +string + + + + + + + + + + + +

The target string.

len + + +number + + + + + + + + + + + +

Description.

pad + + +number + + + + + + + + + + + +

the string to pad it out with (defaults to a space).

dir + + +number + + + + + + <optional>
+ + + + + +
+ + 3 + +

the direction dir = 1 (left), 2 (right), 3 (both).

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +string + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ +
+
+ + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
+ + + Documentation generated by JSDoc 3.2.0-dev + on Thu Oct 03 2013 02:35:50 GMT+0100 (BST) using the DocStrap template. + +
+
+ + +
+
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Docs/out/Phaser.World.html b/Docs/out/Phaser.World.html index 0a9a5c50..de9146f6 100644 --- a/Docs/out/Phaser.World.html +++ b/Docs/out/Phaser.World.html @@ -23,13 +23,13 @@ @@ -236,6 +322,8 @@

+ Phaser. + World

@@ -1956,7 +2044,7 @@ the world at world-based coordinates. By default a world is created the same siz Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:46 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:50 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Phaser.html b/Docs/out/Phaser.html new file mode 100644 index 00000000..37f7c00c --- /dev/null +++ b/Docs/out/Phaser.html @@ -0,0 +1,602 @@ + + + + + + Phaser Namespace: Phaser + + + + + + + + + + +
+ + +
+ + +
+ +
+ + + +

Namespace: Phaser

+
+ +
+

+ Phaser +

+ +
+ +
+
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + +
+ + + + + + + + +

Classes

+ +
+
Animation
+
+ +
AnimationManager
+
+ +
AnimationParser
+
+ +
Cache
+
+ +
Camera
+
+ +
Canvas
+
+ +
Circle
+
+ +
Color
+
+ +
Device
+
+ +
Easing
+
+ +
Frame
+
+ +
FrameData
+
+ +
Game
+
+ +
Group
+
+ +
Input
+
+ +
InputHandler
+
+ +
Key
+
+ +
Keyboard
+
+ +
LinkedList
+
+ +
Loader
+
+ +
LoaderParser
+
+ +
Math
+
+ +
Mouse
+
+ +
MSPointer
+
+ +
Net
+
+ +
Particles
+
+ +
Plugin
+
+ +
PluginManager
+
+ +
Point
+
+ +
Pointer
+
+ +
QuadTree
+
+ +
RandomDataGenerator
+
+ +
Rectangle
+
+ +
RequestAnimationFrame
+
+ +
Signal
+
+ +
Sound
+
+ +
SoundManager
+
+ +
Stage
+
+ +
StageScaleMode
+
+ +
State
+
+ +
StateManager
+
+ +
Time
+
+ +
Touch
+
+ +
Tween
+
+ +
TweenManager
+
+ +
Utils
+
+ +
World
+
+
+ + + + + + + + + + + +
+ +
+ + + + +
+ +
+
+ + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
+ + + Documentation generated by JSDoc 3.2.0-dev + on Thu Oct 03 2013 02:35:45 GMT+0100 (BST) using the DocStrap template. + +
+
+ + +
+
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Docs/out/Phaser.js.html b/Docs/out/Phaser.js.html index 7684fc65..fb8766ac 100644 --- a/Docs/out/Phaser.js.html +++ b/Docs/out/Phaser.js.html @@ -23,13 +23,13 @@ @@ -242,8 +328,8 @@ */ /** - * @module Phaser - */ +* @namespace Phaser +*/ var Phaser = Phaser || { VERSION: '1.0.7-beta', @@ -297,7 +383,7 @@ PIXI.InteractionManager = function (dummy) { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:41 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Plugin.js.html b/Docs/out/Plugin.js.html index 82e28e31..25527f23 100644 --- a/Docs/out/Plugin.js.html +++ b/Docs/out/Plugin.js.html @@ -23,13 +23,13 @@ @@ -371,7 +457,7 @@ Phaser.Plugin.prototype = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:41 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/PluginManager.js.html b/Docs/out/PluginManager.js.html index cf42d21e..35fbc1c0 100644 --- a/Docs/out/PluginManager.js.html +++ b/Docs/out/PluginManager.js.html @@ -23,13 +23,13 @@ @@ -488,7 +574,7 @@ Phaser.PluginManager.prototype = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:41 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Point.js.html b/Docs/out/Point.js.html index d71e36b4..82b1f646 100644 --- a/Docs/out/Point.js.html +++ b/Docs/out/Point.js.html @@ -23,13 +23,13 @@ @@ -651,7 +737,7 @@ Phaser.Point.rotate = function (a, x, y, angle, asDegrees, distance) { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:41 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Pointer.js.html b/Docs/out/Pointer.js.html index f72b8c0e..84fd2bcf 100644 --- a/Docs/out/Pointer.js.html +++ b/Docs/out/Pointer.js.html @@ -23,13 +23,13 @@ @@ -947,7 +1033,7 @@ Object.defineProperty(Phaser.Pointer.prototype, "worldY", { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:41 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/QuadTree.js.html b/Docs/out/QuadTree.js.html index a3dec105..c9dcf1a9 100644 --- a/Docs/out/QuadTree.js.html +++ b/Docs/out/QuadTree.js.html @@ -23,13 +23,13 @@ @@ -256,7 +342,6 @@ */ /** -* @overview * @copyright © 2012 Timo Hausmann * * Permission is hereby granted, free of charge, to any person obtaining @@ -521,7 +606,7 @@ Phaser.QuadTree.prototype = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:41 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Quadratic.html b/Docs/out/Quadratic.html new file mode 100644 index 00000000..300ea209 --- /dev/null +++ b/Docs/out/Quadratic.html @@ -0,0 +1,874 @@ + + + + + + Phaser Namespace: Quadratic + + + + + + + + + + +
+ + +
+ + +
+ +
+ + + +

Namespace: Quadratic

+
+ +
+

+ Quadratic +

+ +
+ +
+
+ + + + +

Quadratic easing.

+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + +
+ + + + + + + + + + + + + + +

Methods

+ +
+ +
+

<static> In(k) → {number}

+ + +
+
+ + +
+

Ease-in.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

Description.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

k^2.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

<static> InOut(k) → {number}

+ + +
+
+ + +
+

Ease-in/out.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

Description.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

Description.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

<static> Out(k) → {number}

+ + +
+
+ + +
+

Ease-out.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

Description.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

k* (2-k).

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ +
+
+ + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
+ + + Documentation generated by JSDoc 3.2.0-dev + on Thu Oct 03 2013 01:57:03 GMT+0100 (BST) using the DocStrap template. + +
+
+ + +
+
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Docs/out/Quartic.html b/Docs/out/Quartic.html new file mode 100644 index 00000000..c9913fe0 --- /dev/null +++ b/Docs/out/Quartic.html @@ -0,0 +1,874 @@ + + + + + + Phaser Namespace: Quartic + + + + + + + + + + +
+ + +
+ + +
+ +
+ + + +

Namespace: Quartic

+
+ +
+

+ Quartic +

+ +
+ +
+
+ + + + +

Quartic easing.

+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + +
+ + + + + + + + + + + + + + +

Methods

+ +
+ +
+

<static> In(k) → {number}

+ + +
+
+ + +
+

Quartic ease-in.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

Description.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

Description.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

<static> InOut(k) → {number}

+ + +
+
+ + +
+

Quartic ease-in/out.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

Description.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

Description.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

<static> Out(k) → {number}

+ + +
+
+ + +
+

Quartic ease-out.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

Description.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

Description.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ +
+
+ + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
+ + + Documentation generated by JSDoc 3.2.0-dev + on Thu Oct 03 2013 01:57:03 GMT+0100 (BST) using the DocStrap template. + +
+
+ + +
+
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Docs/out/Quintic.html b/Docs/out/Quintic.html new file mode 100644 index 00000000..9e505166 --- /dev/null +++ b/Docs/out/Quintic.html @@ -0,0 +1,874 @@ + + + + + + Phaser Namespace: Quintic + + + + + + + + + + +
+ + +
+ + +
+ +
+ + + +

Namespace: Quintic

+
+ +
+

+ Quintic +

+ +
+ +
+
+ + + + +

Quintic easing.

+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + +
+ + + + + + + + + + + + + + +

Methods

+ +
+ +
+

<static> In(k) → {number}

+ + +
+
+ + +
+

Quintic ease-in.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

Description.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

Description.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

<static> InOut(k) → {number}

+ + +
+
+ + +
+

Quintic ease-in/out.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

Description.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

Description.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

<static> Out(k) → {number}

+ + +
+
+ + +
+

Quintic ease-out.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

Description.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

Description.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ +
+
+ + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
+ + + Documentation generated by JSDoc 3.2.0-dev + on Thu Oct 03 2013 01:57:03 GMT+0100 (BST) using the DocStrap template. + +
+
+ + +
+
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Docs/out/RandomDataGenerator.js.html b/Docs/out/RandomDataGenerator.js.html index 663767b4..c224b404 100644 --- a/Docs/out/RandomDataGenerator.js.html +++ b/Docs/out/RandomDataGenerator.js.html @@ -23,13 +23,13 @@ @@ -503,7 +589,7 @@ Phaser.RandomDataGenerator.prototype = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:41 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Rectangle.js.html b/Docs/out/Rectangle.js.html index dde8c1a5..2fa30312 100644 --- a/Docs/out/Rectangle.js.html +++ b/Docs/out/Rectangle.js.html @@ -23,13 +23,13 @@ @@ -920,7 +1006,7 @@ Phaser.Rectangle.union = function (a, b, out) { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:41 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/RequestAnimationFrame.js.html b/Docs/out/RequestAnimationFrame.js.html index d9dd800e..0442a6d6 100644 --- a/Docs/out/RequestAnimationFrame.js.html +++ b/Docs/out/RequestAnimationFrame.js.html @@ -23,13 +23,13 @@ @@ -408,7 +494,7 @@ Phaser.RequestAnimationFrame.prototype = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:41 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Signal.js.html b/Docs/out/Signal.js.html index 5b2134e9..2e7088d9 100644 --- a/Docs/out/Signal.js.html +++ b/Docs/out/Signal.js.html @@ -23,13 +23,13 @@ @@ -553,7 +639,7 @@ Phaser.Signal.prototype = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:41 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/SignalBinding.html b/Docs/out/SignalBinding.html index f8ab245a..43738708 100644 --- a/Docs/out/SignalBinding.html +++ b/Docs/out/SignalBinding.html @@ -23,13 +23,13 @@ @@ -553,7 +639,7 @@ Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:46 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:51 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/SignalBinding.js.html b/Docs/out/SignalBinding.js.html index 107f0379..09bf658a 100644 --- a/Docs/out/SignalBinding.js.html +++ b/Docs/out/SignalBinding.js.html @@ -23,13 +23,13 @@ @@ -418,7 +504,7 @@ Phaser.SignalBinding.prototype = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:41 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Sinusoidal.html b/Docs/out/Sinusoidal.html new file mode 100644 index 00000000..e335ad15 --- /dev/null +++ b/Docs/out/Sinusoidal.html @@ -0,0 +1,874 @@ + + + + + + Phaser Namespace: Sinusoidal + + + + + + + + + + +
+ + +
+ + +
+ +
+ + + +

Namespace: Sinusoidal

+
+ +
+

+ Sinusoidal +

+ +
+ +
+
+ + + + +

Sinusoidal easing.

+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + +
+ + + + + + + + + + + + + + +

Methods

+ +
+ +
+

<static> In(k) → {number}

+ + +
+
+ + +
+

Sinusoidal ease-in.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

Description.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

Description.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

<static> InOut(k) → {number}

+ + +
+
+ + +
+

Sinusoidal ease-in/out.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

Description.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

Description.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

<static> Out(k) → {number}

+ + +
+
+ + +
+

Sinusoidal ease-out.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
k + + +number + + + +

Description.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

Description.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ +
+
+ + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
+ + + Documentation generated by JSDoc 3.2.0-dev + on Thu Oct 03 2013 01:57:03 GMT+0100 (BST) using the DocStrap template. + +
+
+ + +
+
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Docs/out/Sound.js.html b/Docs/out/Sound.js.html index 36fb04a3..a7a0c4f5 100644 --- a/Docs/out/Sound.js.html +++ b/Docs/out/Sound.js.html @@ -23,13 +23,13 @@ @@ -1062,7 +1148,7 @@ Object.defineProperty(Phaser.Sound.prototype, "volume", { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:41 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/SoundManager.js.html b/Docs/out/SoundManager.js.html index 1f07bcb5..fb3a6ba9 100644 --- a/Docs/out/SoundManager.js.html +++ b/Docs/out/SoundManager.js.html @@ -23,13 +23,13 @@ @@ -705,7 +791,7 @@ Object.defineProperty(Phaser.SoundManager.prototype, "volume", { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:41 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Stage.js.html b/Docs/out/Stage.js.html index c30552bc..ec57fcf1 100644 --- a/Docs/out/Stage.js.html +++ b/Docs/out/Stage.js.html @@ -23,13 +23,13 @@ @@ -402,7 +488,7 @@ Object.defineProperty(Phaser.Stage.prototype, "backgroundColor", { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:41 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/StageScaleMode.js.html b/Docs/out/StageScaleMode.js.html index 4921b965..cf64c588 100644 --- a/Docs/out/StageScaleMode.js.html +++ b/Docs/out/StageScaleMode.js.html @@ -23,13 +23,13 @@ @@ -827,7 +913,7 @@ Object.defineProperty(Phaser.StageScaleMode.prototype, "isLandscape", { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:41 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/State.js.html b/Docs/out/State.js.html index 0d701d24..3b440932 100644 --- a/Docs/out/State.js.html +++ b/Docs/out/State.js.html @@ -23,13 +23,13 @@ @@ -425,7 +511,7 @@ Phaser.State.prototype = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:41 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/StateManager.js.html b/Docs/out/StateManager.js.html index e3f8037a..78442321 100644 --- a/Docs/out/StateManager.js.html +++ b/Docs/out/StateManager.js.html @@ -23,13 +23,13 @@ @@ -781,7 +867,7 @@ Phaser.StateManager.prototype = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:41 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Time.js.html b/Docs/out/Time.js.html new file mode 100644 index 00000000..fca332d6 --- /dev/null +++ b/Docs/out/Time.js.html @@ -0,0 +1,650 @@ + + + + + + Phaser Source: time/Time.js + + + + + + + + + + +
+ + +
+ + +
+ +
+ + + +

Source: time/Time.js

+ +
+
+
/**
+* @author       Richard Davey <rich@photonstorm.com>
+* @copyright    2013 Photon Storm Ltd.
+* @license      {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
+*/
+
+/**
+* Time constructor.
+*
+* @class Phaser.Time
+* @classdesc This is the core internal game clock. It manages the elapsed time and calculation of elapsed values, used for game object motion and tweens.
+* @constructor
+* @param {Phaser.Game} game A reference to the currently running game.
+*/
+Phaser.Time = function (game) {
+
+	/**
+	* @property {Phaser.Game} game - Local reference to game.
+	*/
+	this.game = game;
+
+	/**
+	* The time at which the Game instance started.
+	* @property {number} _started
+	* @private
+	* @default
+	*/
+	this._started = 0;
+
+	/**
+	* The time (in ms) that the last second counter ticked over.
+	* @property {number} _timeLastSecond
+	* @private
+	* @default
+	*/
+	this._timeLastSecond = 0;
+
+	/**
+	* The time the game started being paused.
+	* @property {number} _pauseStarted
+	* @private
+	* @default
+	*/
+	this._pauseStarted = 0;
+
+	/**
+	* The elapsed time calculated for the physics motion updates.
+	* @property {number} physicsElapsed
+	* @default
+	*/
+	this.physicsElapsed = 0;
+
+	/**
+	* Game time counter.
+	* @property {number} time
+	* @default
+	*/
+	this.time = 0;
+
+	/**
+	* Records how long the game has been paused for. Is reset each time the game pauses.
+	* @property {number} pausedTime
+	* @default
+	*/
+	this.pausedTime = 0;
+
+	/**
+	* The time right now.
+	* @property {number} now
+    * @default
+	*/
+	this.now = 0;
+
+	/**
+	* Elapsed time since the last frame.
+	* @property {number} elapsed
+	* @default
+	*/
+	this.elapsed = 0;
+
+	/**
+	* Frames per second.
+	* @property {number} fps
+	* @default
+	*/
+	this.fps = 0;
+
+	/**
+	* The lowest rate the fps has dropped to.
+	* @property {number} fpsMin
+	* @default
+	*/
+	this.fpsMin = 1000;
+
+	/**
+	* The highest rate the fps has reached (usually no higher than 60fps).
+	* @property {number} fpsMax
+	* @default
+	*/
+	this.fpsMax = 0;
+
+	/**
+	* The minimum amount of time the game has taken between two frames.
+	* @property {number} msMin
+	* @default
+	*/
+	this.msMin = 1000;
+
+	/**
+	* The maximum amount of time the game has taken between two frames.
+	* @property {number} msMax
+	* @default
+	*/
+	this.msMax = 0;
+
+	/**
+	* The number of frames record in the last second.
+	* @property {number} frames
+	* @default
+	*/
+	this.frames = 0;
+
+	/**
+	* Records how long the game was paused for in miliseconds.
+	* @property {number} pauseDuration
+	* @default
+	*/
+	this.pauseDuration = 0;
+
+	/**
+	* The value that setTimeout needs to work out when to next update
+	* @property {number} timeToCall
+	* @default
+	*/
+	this.timeToCall = 0;
+
+	/**
+	* Internal value used by timeToCall as part of the setTimeout loop
+	* @property {number} lastTime
+	* @default
+	*/
+	this.lastTime = 0;
+
+	//	Listen for game pause/resume events
+	this.game.onPause.add(this.gamePaused, this);
+	this.game.onResume.add(this.gameResumed, this);
+
+	/**
+	* Description.
+	* @property {boolean} _justResumed
+    * @default
+	*/
+	this._justResumed = false;
+
+};
+
+Phaser.Time.prototype = {
+
+	/**
+	* The number of seconds that have elapsed since the game was started.
+	* @method Phaser.Time#totalElapsedSeconds
+	* @return {number}
+	*/
+	totalElapsedSeconds: function() {
+		return (this.now - this._started) * 0.001;
+	},
+
+	/**
+	* Updates the game clock and calculate the fps. This is called automatically by Phaser.Game.
+	* @method Phaser.Time#update
+	* @param {number} time - The current timestamp, either performance.now or Date.now depending on the browser.
+	*/
+	update: function (time) {
+
+		this.now = time;
+
+		if (this._justResumed)
+		{
+			this.time = this.now;
+			this._justResumed = false;
+		}
+
+		this.timeToCall = this.game.math.max(0, 16 - (time - this.lastTime));
+
+		this.elapsed = this.now - this.time;
+
+		this.msMin = this.game.math.min(this.msMin, this.elapsed);
+		this.msMax = this.game.math.max(this.msMax, this.elapsed);
+
+		this.frames++;
+
+		if (this.now > this._timeLastSecond + 1000)
+		{
+			this.fps = Math.round((this.frames * 1000) / (this.now - this._timeLastSecond));
+			this.fpsMin = this.game.math.min(this.fpsMin, this.fps);
+			this.fpsMax = this.game.math.max(this.fpsMax, this.fps);
+			this._timeLastSecond = this.now;
+			this.frames = 0;
+		}
+
+		this.time = this.now;
+        this.lastTime = time + this.timeToCall;
+		this.physicsElapsed = 1.0 * (this.elapsed / 1000);
+
+		//  Paused?
+		if (this.game.paused)
+		{
+			this.pausedTime = this.now - this._pauseStarted;
+		}
+
+	},
+
+	/**
+	* Called when the game enters a paused state.
+	* @method Phaser.Time#gamePaused
+	* @private
+	*/
+	gamePaused: function () {
+		
+		this._pauseStarted = this.now;
+
+	},
+
+	/**
+	* Called when the game resumes from a paused state.
+	* @method Phaser.Time#gameResumed
+	* @private
+	*/
+	gameResumed: function () {
+
+		//  Level out the elapsed timer to avoid spikes
+		this.time = Date.now();
+		this.pauseDuration = this.pausedTime;
+		this._justResumed = true;
+
+	},
+
+	/**
+	* How long has passed since the given time.
+	* @method Phaser.Time#elapsedSince
+	* @param {number} since - The time you want to measure against.
+	* @return {number} The difference between the given time and now.
+	*/
+	elapsedSince: function (since) {
+		return this.now - since;
+	},
+
+	/**
+	* How long has passed since the given time (in seconds).
+	* @method Phaser.Time#elapsedSecondsSince
+	* @param {number} since - The time you want to measure (in seconds).
+	* @return {number} Duration between given time and now (in seconds).
+	*/
+	elapsedSecondsSince: function (since) {
+		return (this.now - since) * 0.001;
+	},
+
+	/**
+	* Resets the private _started value to now.
+	* @method Phaser.Time#reset
+	*/
+	reset: function () {
+		this._started = this.now;
+	}
+
+};
+
+
+ + + + + +
+ +
+
+ + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
+ + + Documentation generated by JSDoc 3.2.0-dev + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + +
+
+ + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + diff --git a/Docs/out/Touch.js.html b/Docs/out/Touch.js.html index c0d8e1ec..74e26b48 100644 --- a/Docs/out/Touch.js.html +++ b/Docs/out/Touch.js.html @@ -23,13 +23,13 @@ @@ -589,7 +675,7 @@ Phaser.Touch.prototype = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:41 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/Tween.js.html b/Docs/out/Tween.js.html new file mode 100644 index 00000000..a7520358 --- /dev/null +++ b/Docs/out/Tween.js.html @@ -0,0 +1,992 @@ + + + + + + Phaser Source: tween/Tween.js + + + + + + + + + + +
+ + +
+ + +
+ +
+ + + +

Source: tween/Tween.js

+ +
+
+
/**
+* @author       Richard Davey <rich@photonstorm.com>
+* @copyright    2013 Photon Storm Ltd.
+* @license      {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
+*/
+
+/**
+* Tween constructor
+* Create a new <code>Tween</code>.
+*
+* @class Phaser.Tween
+* @constructor
+* @param {object} object - Target object will be affected by this tween.
+* @param {Phaser.Game} game - Current game instance.
+*/
+Phaser.Tween = function (object, game) {
+
+    /**
+    * Reference to the target object.
+    * @property {object} _object
+    * @private
+    */
+	this._object = object;
+
+    /**
+    * @property {Phaser.Game} game - A reference to the currently running Game.
+    */
+    this.game = game;
+
+    /**
+    * @property {object} _manager - Description.
+    * @private
+    */
+    this._manager = this.game.tweens;
+
+    /**
+    * @property {object} _valuesStart - Description.
+    * @private
+    */
+    this._valuesStart = {};
+
+    /**
+    * @property {object} _valuesEnd - Description.
+    * @private
+    */
+    this._valuesEnd = {};
+
+    /**
+    * @property {object} _valuesStartRepeat - Description.
+    * @private
+    */
+    this._valuesStartRepeat = {};
+
+    /**
+    * @property {number} _duration - Description.
+    * @private
+    * @default
+    */
+    this._duration = 1000;
+
+    /**
+    * @property {number} _repeat - Description.
+    * @private
+    * @default
+    */
+    this._repeat = 0;
+
+    /**
+    * @property {boolean} _yoyo - Description.
+    * @private
+    * @default
+    */
+    this._yoyo = false;
+
+    /**
+    * @property {boolean} _reversed - Description.
+    * @private
+    * @default
+    */
+    this._reversed = false;
+
+    /**
+    * @property {number} _delayTime - Description.
+    * @private
+    * @default
+    */
+    this._delayTime = 0;
+
+    /**
+    * @property {Description} _startTime - Description.
+    * @private
+    * @default null
+    */
+    this._startTime = null;
+
+    /**
+    * @property {Description} _easingFunction - Description.
+    * @private
+    */
+    this._easingFunction = Phaser.Easing.Linear.None;
+
+    /**
+    * @property {Description} _interpolationFunction - Description.
+    * @private
+    */
+    this._interpolationFunction = Phaser.Math.linearInterpolation;
+
+    /**
+    * @property {Description} _chainedTweens - Description.
+    * @private
+    */
+    this._chainedTweens = [];
+
+    /**
+    * @property {Description} _onStartCallback - Description.
+    * @private
+    * @default
+    */
+    this._onStartCallback = null;
+
+    /**
+    * @property {boolean} _onStartCallbackFired - Description.
+    * @private
+    * @default
+    */
+    this._onStartCallbackFired = false;
+
+    /**
+    * @property {Description} _onUpdateCallback - Description.
+    * @private
+    * @default null
+    */
+    this._onUpdateCallback = null;
+
+    /**
+    * @property {Description} _onCompleteCallback - Description.
+    * @private
+    * @default null
+    */
+    this._onCompleteCallback = null;
+    
+    /**
+    * @property {number} _pausedTime - Description.
+    * @private
+    * @default
+    */
+    this._pausedTime = 0;
+
+    /**
+    * @property {boolean} pendingDelete - If this tween is ready to be deleted by the TweenManager.
+    * @default
+    */
+    this.pendingDelete = false;
+
+    // Set all starting values present on the target object
+    for ( var field in object ) {
+    	this._valuesStart[ field ] = parseFloat(object[field], 10);
+    }
+    
+    /**
+    * @property {Phaser.Signal} onStart - Description.
+    */
+    this.onStart = new Phaser.Signal();
+
+    /**
+    * @property {Phaser.Signal} onComplete - Description.
+    */
+    this.onComplete = new Phaser.Signal();
+
+    /**
+    * @property {boolean} isRunning - Description.
+    * @default
+    */
+    this.isRunning = false;
+
+};
+
+Phaser.Tween.prototype = {
+
+	/**
+	* Configure the Tween
+	*
+	* @method Phaser.Tween#to
+	* @param {object} properties - Properties you want to tween.
+	* @param {number} duration - Duration of this tween.
+	* @param {function} ease - Easing function.
+	* @param {boolean} autoStart - Whether this tween will start automatically or not.
+	* @param {number} delay - Delay before this tween will start, defaults to 0 (no delay).
+	* @param {boolean} repeat - Should the tween automatically restart once complete? (ignores any chained tweens).
+	* @param {Phaser.Tween} yoyo - Description.
+	* @return {Phaser.Tween} Itself.
+	*/
+	to: function ( properties, duration, ease, autoStart, delay, repeat, yoyo ) {
+
+		duration = duration || 1000;
+		ease = ease || null;
+		autoStart = autoStart || false;
+		delay = delay || 0;
+		repeat = repeat || 0;
+		yoyo = yoyo || false;
+
+		var self;
+		if (this._parent)
+		{
+			self = this._manager.create(this._object);
+			self._parent = this._parent;
+			this.chain(self);
+		}
+		else
+		{
+			self = this;
+			self._parent = self;
+		}
+
+		self._repeat = repeat;
+        self._duration = duration;
+		self._valuesEnd = properties;
+
+        if (ease !== null)
+        {
+            self._easingFunction = ease;
+        }
+
+        if (delay > 0)
+        {
+            self._delayTime = delay;
+        }
+
+        self._yoyo = yoyo;
+
+        if (autoStart) {
+            return self.start();
+        } else {
+            return self;
+        }
+
+	},
+
+	/**
+	* Starts the tween running. Can also be called by the autoStart parameter of Tween.to.
+	*
+	* @method Phaser.Tween#start
+	* @param {number} time - Description.
+	* @return {Phaser.Tween} Itself.
+	*/
+	start: function ( time ) {
+
+        if (this.game === null || this._object === null) {
+            return;
+        }
+
+		this._manager.add(this);
+
+		this.onStart.dispatch(this._object);
+
+        this.isRunning = true;
+
+		this._onStartCallbackFired = false;
+
+        this._startTime = this.game.time.now + this._delayTime;
+
+		for ( var property in this._valuesEnd ) {
+
+			// check if an Array was provided as property value
+			if ( this._valuesEnd[ property ] instanceof Array ) {
+
+				if ( this._valuesEnd[ property ].length === 0 ) {
+
+					continue;
+
+				}
+
+				// create a local copy of the Array with the start value at the front
+				this._valuesEnd[ property ] = [ this._object[ property ] ].concat( this._valuesEnd[ property ] );
+
+			}
+
+			this._valuesStart[ property ] = this._object[ property ];
+
+			if ( ( this._valuesStart[ property ] instanceof Array ) === false ) {
+				this._valuesStart[ property ] *= 1.0; // Ensures we're using numbers, not strings
+			}
+
+			this._valuesStartRepeat[ property ] = this._valuesStart[ property ] || 0;
+
+		}
+
+		return this;
+
+	},
+
+	/**
+	* Stops the tween if running and removes it from the TweenManager. If there are any onComplete callbacks or events they are not dispatched.
+	*
+	* @method Phaser.Tween#stop
+	* @return {Phaser.Tween} Itself.
+	*/
+	stop: function () {
+
+		this._manager.remove(this);
+        this.isRunning = false;
+
+		return this;
+
+	},
+
+	/**
+	* Sets a delay time before this tween will start.
+	*
+	* @method Phaser.Tween#delay
+	* @param {number} amount - The amount of the delay in ms.
+	* @return {Phaser.Tween} Itself.
+	*/
+	delay: function ( amount ) {
+
+		this._delayTime = amount;
+		return this;
+
+	},
+
+	/**
+	* Sets the number of times this tween will repeat.
+	*
+	* @method Phaser.Tween#repeat
+	* @param {number} times - How many times to repeat.
+	* @return {Phaser.Tween} Itself.
+	*/
+	repeat: function ( times ) {
+
+		this._repeat = times;
+		return this;
+
+	},
+
+	/**
+	* A tween that has yoyo set to true will run through from start to finish, then reverse from finish to start.
+	* Used in combination with repeat you can create endless loops.
+	*
+	* @method Phaser.Tween#yoyo
+	* @param {boolean} yoyo - Set to true to yoyo this tween.
+	* @return {Phaser.Tween} Itself.
+	*/
+	yoyo: function( yoyo ) {
+
+		this._yoyo = yoyo;
+		return this;
+
+	},
+
+	/**
+	* Set easing function this tween will use, i.e. Phaser.Easing.Linear.None. 
+	*
+	* @method Phaser.Tween#easing
+	* @param {function} easing - The easing function this tween will use, i.e. Phaser.Easing.Linear.None.
+	* @return {Phaser.Tween} Itself.
+	*/
+	easing: function ( easing ) {
+
+		this._easingFunction = easing;
+		return this;
+
+	},
+
+	/**
+	* Set interpolation function the tween will use, by default it uses Phaser.Math.linearInterpolation.
+	*
+	* @method Phaser.Tween#interpolation
+	* @param {function} interpolation - The interpolation function to use (Phaser.Math.linearInterpolation by default)
+	* @return {Phaser.Tween} Itself.
+	*/
+	interpolation: function ( interpolation ) {
+
+		this._interpolationFunction = interpolation;
+		return this;
+
+	},
+
+	/**
+	* You can chain tweens together by passing a reference to the chain function. This enables one tween to call another on completion.
+	* You can pass as many tweens as you like to this function, they will each be chained in sequence.
+	*
+	* @method Phaser.Tween#chain
+	* @return {Phaser.Tween} Itself.
+	*/
+	chain: function () {
+
+		this._chainedTweens = arguments;
+		return this;
+
+	},
+
+	/**
+	* Loop a chain of tweens
+	* 
+	* Usage:
+	* game.add.tween(p).to({ x: 700 }, 1000, Phaser.Easing.Linear.None, true)
+	* .to({ y: 300 }, 1000, Phaser.Easing.Linear.None)
+	* .to({ x: 0 }, 1000, Phaser.Easing.Linear.None)
+	* .to({ y: 0 }, 1000, Phaser.Easing.Linear.None)
+	* .loop();
+	* @method Phaser.Tween#loop
+	* @return {Tween} Itself.
+	*/
+	loop: function() {
+
+		if (this._parent) this.chain(this._parent);
+		return this;
+
+	},
+
+	/**
+	* Sets a callback to be fired when the tween starts. Note: callback will be called in the context of the global scope.
+	*
+	* @method Phaser.Tween#onStartCallback
+	* @param {function} callback - The callback to invoke on start.
+	* @return {Phaser.Tween} Itself.
+	*/
+	onStartCallback: function ( callback ) {
+
+		this._onStartCallback = callback;
+		return this;
+
+	},
+
+	/**
+	* Sets a callback to be fired each time this tween updates. Note: callback will be called in the context of the global scope.
+	*
+	* @method Phaser.Tween#onUpdateCallback
+	* @param {function} callback - The callback to invoke each time this tween is updated.
+	* @return {Phaser.Tween} Itself.
+	*/
+	onUpdateCallback: function ( callback ) {
+
+		this._onUpdateCallback = callback;
+		return this;
+
+	},
+
+	/**
+	* Sets a callback to be fired when the tween completes. Note: callback will be called in the context of the global scope.
+	*
+	* @method Phaser.Tween#onCompleteCallback
+	* @param {function} callback - The callback to invoke on completion.
+	* @return {Phaser.Tween} Itself.
+	*/
+	onCompleteCallback: function ( callback ) {
+
+		this._onCompleteCallback = callback;
+		return this;
+
+	},
+
+	/**
+	* Pauses the tween. 
+	*
+	* @method Phaser.Tween#pause
+	*/
+    pause: function () {
+        this._paused = true;
+    },
+
+	/**
+	* Resumes a paused tween.
+	*
+	* @method Phaser.Tween#resume
+	*/
+    resume: function () {
+        this._paused = false;
+        this._startTime += this.game.time.pauseDuration;
+    },
+
+	/**
+	* Core tween update function called by the TweenManager. Does not need to be invoked directly.
+	*
+	* @method Phaser.Tween#update
+	* @param {number} time - A timestamp passed in by the TweenManager.
+	* @return {boolean} false if the tween has completed and should be deleted from the manager, otherwise true (still active).
+	*/
+	update: function ( time ) {
+
+		if (this.pendingDelete)
+		{
+			return false;
+		}
+
+        if (this._paused || time < this._startTime) {
+
+            return true;
+
+        }
+
+		var property;
+
+		if ( time < this._startTime ) {
+
+			return true;
+
+		}
+
+		if ( this._onStartCallbackFired === false ) {
+
+			if ( this._onStartCallback !== null ) {
+
+				this._onStartCallback.call( this._object );
+
+			}
+
+			this._onStartCallbackFired = true;
+
+		}
+
+		var elapsed = ( time - this._startTime ) / this._duration;
+		elapsed = elapsed > 1 ? 1 : elapsed;
+
+		var value = this._easingFunction( elapsed );
+
+		for ( property in this._valuesEnd ) {
+
+			var start = this._valuesStart[ property ] || 0;
+			var end = this._valuesEnd[ property ];
+
+			if ( end instanceof Array ) {
+
+				this._object[ property ] = this._interpolationFunction( end, value );
+
+			} else {
+
+                // Parses relative end values with start as base (e.g.: +10, -3)
+				if ( typeof(end) === "string" ) {
+					end = start + parseFloat(end, 10);
+				}
+
+				// protect against non numeric properties.
+                if ( typeof(end) === "number" ) {
+					this._object[ property ] = start + ( end - start ) * value;
+				}
+
+			}
+
+		}
+
+		if ( this._onUpdateCallback !== null ) {
+
+			this._onUpdateCallback.call( this._object, value );
+
+		}
+
+		if ( elapsed == 1 ) {
+
+			if ( this._repeat > 0 ) {
+
+				if ( isFinite( this._repeat ) ) {
+					this._repeat--;
+				}
+
+				// reassign starting values, restart by making startTime = now
+				for ( property in this._valuesStartRepeat ) {
+
+					if ( typeof( this._valuesEnd[ property ] ) === "string" ) {
+						this._valuesStartRepeat[ property ] = this._valuesStartRepeat[ property ] + parseFloat(this._valuesEnd[ property ], 10);
+					}
+
+					if (this._yoyo) {
+						var tmp = this._valuesStartRepeat[ property ];
+						this._valuesStartRepeat[ property ] = this._valuesEnd[ property ];
+						this._valuesEnd[ property ] = tmp;
+						this._reversed = !this._reversed;
+					}
+					this._valuesStart[ property ] = this._valuesStartRepeat[ property ];
+
+				}
+
+				this._startTime = time + this._delayTime;
+
+				this.onComplete.dispatch(this._object);
+
+				if ( this._onCompleteCallback !== null ) {
+					this._onCompleteCallback.call( this._object );
+				}
+
+				return true;
+
+			} else {
+
+				this.onComplete.dispatch(this._object);
+
+				if ( this._onCompleteCallback !== null ) {
+					this._onCompleteCallback.call( this._object );
+				}
+
+				for ( var i = 0, numChainedTweens = this._chainedTweens.length; i < numChainedTweens; i ++ ) {
+
+					this._chainedTweens[ i ].start( time );
+
+				}
+
+				return false;
+
+			}
+
+		}
+
+		return true;
+
+	}
+	
+};
+
+
+
+ + + + + +
+ +
+
+ + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
+ + + Documentation generated by JSDoc 3.2.0-dev + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + +
+
+ + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + diff --git a/Docs/out/TweenManager.js.html b/Docs/out/TweenManager.js.html new file mode 100644 index 00000000..ee805c09 --- /dev/null +++ b/Docs/out/TweenManager.js.html @@ -0,0 +1,571 @@ + + + + + + Phaser Source: tween/TweenManager.js + + + + + + + + + + +
+ + +
+ + +
+ +
+ + + +

Source: tween/TweenManager.js

+ +
+
+
/**
+* @author       Richard Davey <rich@photonstorm.com>
+* @copyright    2013 Photon Storm Ltd.
+* @license      {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
+*/
+
+/**
+* Phaser - TweenManager
+* 
+* @class Phaser.TweenManager
+* @classdesc 
+* Phaser.Game has a single instance of the TweenManager through which all Tween objects are created and updated.
+* Tweens are hooked into the game clock and pause system, adjusting based on the game state.
+*
+* TweenManager is based heavily on tween.js by http://soledadpenades.com.
+* The difference being that tweens belong to a games instance of TweenManager, rather than to a global TWEEN object.
+* It also has callbacks swapped for Signals and a few issues patched with regard to properties and completion errors.
+* Please see https://github.com/sole/tween.js for a full list of contributors.
+* @constructor
+*
+* @param {Phaser.Game} game - A reference to the currently running game.
+*/
+Phaser.TweenManager = function (game) {
+
+	/**
+	* @property {Phaser.Game} game - Local reference to game.
+	*/
+	this.game = game;
+	
+	/**
+	* @property {array} _tweens - Description.
+	* @private
+	*/
+	this._tweens = [];
+	
+	/**
+	* @property {array} _add - Description.
+	* @private
+	*/
+	this._add = [];
+
+	this.game.onPause.add(this.pauseAll, this);
+	this.game.onResume.add(this.resumeAll, this);
+
+};
+
+Phaser.TweenManager.prototype = {
+
+	/**
+	* Version number of this library.
+	* @property {string} REVISION
+	* @default 
+	*/	
+	REVISION: '11dev',
+
+	/**
+	* Get all the tween objects in an array.
+	* @method Phaser.TweenManager#getAll
+	* @returns {Phaser.Tween[]} Array with all tween objects.
+	*/
+	getAll: function () {
+
+		return this._tweens;
+
+	},
+
+	/**
+	* Remove all tween objects.
+	* @method Phaser.TweenManager#removeAll
+	*/
+	removeAll: function () {
+
+		this._tweens = [];
+
+	},
+
+	/**
+	* Add a new tween into the TweenManager.
+	*
+	* @method Phaser.TweenManager#add
+	* @param {Phaser.Tween} tween - The tween object you want to add.
+	* @returns {Phaser.Tween} The tween object you added to the manager.
+	*/
+	add: function ( tween ) {
+
+		this._add.push( tween );
+
+	},
+
+	/**
+	* Create a tween object for a specific object. The object can be any JavaScript object or Phaser object such as Sprite. 
+	*
+	* @method Phaser.TweenManager#create
+	* @param {Object} object - Object the tween will be run on.
+	* @returns {Phaser.Tween} The newly created tween object.
+	*/
+    create: function (object) {
+
+        return new Phaser.Tween(object, this.game);
+
+    },
+
+	/**
+	* Remove a tween from this manager.
+	*
+	* @method Phaser.TweenManager#remove
+	* @param {Phaser.Tween} tween - The tween object you want to remove.
+	*/
+	remove: function ( tween ) {
+
+		var i = this._tweens.indexOf( tween );
+
+		if ( i !== -1 ) {
+
+			this._tweens[i].pendingDelete = true;
+
+		}
+
+	},
+
+	/**
+	* Update all the tween objects you added to this manager.
+	*
+	* @method Phaser.TweenManager#update
+	* @returns {boolean} Return false if there's no tween to update, otherwise return true.
+	*/
+	update: function () {
+
+		if ( this._tweens.length === 0 && this._add.length === 0 ) return false;
+
+		var i = 0;
+		var numTweens = this._tweens.length;
+
+		while ( i < numTweens ) {
+
+			if ( this._tweens[ i ].update( this.game.time.now ) ) {
+
+				i++;
+
+			} else {
+
+				this._tweens.splice( i, 1 );
+
+				numTweens--;
+
+			}
+
+		}
+
+		//	If there are any new tweens to be added, do so now - otherwise they can be spliced out of the array before ever running
+		if (this._add.length > 0)
+		{
+			this._tweens = this._tweens.concat(this._add);
+			this._add.length = 0;
+		}
+
+		return true;
+
+	},
+
+	/**
+	* Pauses all currently running tweens.
+	*
+	* @method Phaser.TweenManager#update
+	*/
+	pauseAll: function () {
+
+    	for (var i = this._tweens.length - 1; i >= 0; i--) {
+    		this._tweens[i].pause();
+    	};
+
+    },
+
+	/**
+	* Pauses all currently paused tweens.
+	*
+	* @method Phaser.TweenManager#resumeAll
+	*/
+   	resumeAll: function () {
+
+    	for (var i = this._tweens.length - 1; i >= 0; i--) {
+    		this._tweens[i].resume();
+    	};
+
+    }
+
+};
+
+
+ + + + + +
+ +
+
+ + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
+ + + Documentation generated by JSDoc 3.2.0-dev + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + +
+
+ + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + diff --git a/Docs/out/Utils.html b/Docs/out/Utils.html new file mode 100644 index 00000000..d664e73f --- /dev/null +++ b/Docs/out/Utils.html @@ -0,0 +1,502 @@ + + + + + + Phaser Module: Utils + + + + + + + + + + +
+ + +
+ + +
+ +
+ + + +

Module: Utils

+
+ +
+

+ Phaser. + + Utils +

+ +
+ +
+
+ + + + + + +
+ + + + + + + + + + + +
Author:
+
+ +
+ + + + + + + + +
License:
+
+ + + + + +
Source:
+
+ + + + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + +
+ +
+ + + + +
+ +
+
+ + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
+ + + Documentation generated by JSDoc 3.2.0-dev + on Thu Oct 03 2013 02:27:21 GMT+0100 (BST) using the DocStrap template. + +
+
+ + +
+
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Docs/out/Utils.js.html b/Docs/out/Utils.js.html new file mode 100644 index 00000000..29698418 --- /dev/null +++ b/Docs/out/Utils.js.html @@ -0,0 +1,596 @@ + + + + + + Phaser Source: utils/Utils.js + + + + + + + + + + +
+ + +
+ + +
+ +
+ + + +

Source: utils/Utils.js

+ +
+
+
/**
+* @author       Richard Davey <rich@photonstorm.com>
+* @copyright    2013 Photon Storm Ltd.
+* @license      {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
+*/
+
+/**
+* @class Phaser.Utils
+* @static
+*/
+Phaser.Utils = {
+	
+	/**
+	* Javascript string pad http://www.webtoolkit.info/.
+	* pad = the string to pad it out with (defaults to a space)<br>
+	* dir = 1 (left), 2 (right), 3 (both)
+	* @method Phaser.Utils.pad
+	* @param {string} str - The target string. 
+	* @param {number} len - Description.
+	* @param {number} pad - the string to pad it out with (defaults to a space).
+	* @param {number} [dir=3] the direction dir = 1 (left), 2 (right), 3 (both).
+	* @return {string}
+	*/
+	pad: function (str, len, pad, dir) {
+
+	    if (typeof(len) == "undefined") { var len = 0; }
+	    if (typeof(pad) == "undefined") { var pad = ' '; }
+	    if (typeof(dir) == "undefined") { var dir = 3; }
+
+	    if (len + 1 >= str.length)
+	    {
+	        switch (dir)
+	        {
+	            case 1:
+	                str = Array(len + 1 - str.length).join(pad) + str;
+		            break;
+
+	            case 3:
+	                var right = Math.ceil((padlen = len - str.length) / 2);
+	                var left = padlen - right;
+	                str = Array(left+1).join(pad) + str + Array(right+1).join(pad);
+		            break;
+
+	            default:
+	                str = str + Array(len + 1 - str.length).join(pad);
+		            break;
+	        }
+	    }
+
+	    return str;
+
+	},
+
+    /**
+    * This is a slightly modified version of jQuery.isPlainObject. A plain object is an object whose internal class property is [object Object].
+    * @method Phaser.Utils.isPlainObject
+    * @param {object} obj - The object to inspect.
+    * @return {boolean} - true if the object is plain, otherwise false.
+    */
+	isPlainObject: function (obj) {
+
+		// Not plain objects:
+		// - Any object or value whose internal [[Class]] property is not "[object Object]"
+		// - DOM nodes
+		// - window
+		if (typeof(obj) !== "object" || obj.nodeType || obj === obj.window)
+		{
+			return false;
+		}
+
+		// Support: Firefox <20
+		// The try/catch suppresses exceptions thrown when attempting to access
+		// the "constructor" property of certain host objects, ie. |window.location|
+		// https://bugzilla.mozilla.org/show_bug.cgi?id=814622
+		try {
+			if (obj.constructor && !hasOwn.call(obj.constructor.prototype, "isPrototypeOf"))
+			{
+				return false;
+			}
+		} catch (e) {
+			return false;
+		}
+
+		// If the function hasn't returned already, we're confident that
+		// |obj| is a plain object, created by {} or constructed with new Object
+		return true;
+	},
+
+
+	//	deep, target, objects to copy to the target object
+	//	This is a slightly modified version of {@link http://api.jquery.com/jQuery.extend/|jQuery.extend}
+	//	deep (boolean)
+	//	target (object to add to)
+	//	objects ... (objects to recurse and copy from)
+
+    /**
+    * This is a slightly modified version of http://api.jquery.com/jQuery.extend/
+    * @method Phaser.Utils.extend
+    * @return {object} The extended object.
+    */
+	extend: function () {
+
+		var options, name, src, copy, copyIsArray, clone,
+			target = arguments[0] || {},
+			i = 1,
+			length = arguments.length,
+			deep = false;
+
+		// Handle a deep copy situation
+		if (typeof target === "boolean")
+		{
+			deep = target;
+			target = arguments[1] || {};
+			// skip the boolean and the target
+			i = 2;
+		}
+
+		// extend Phaser if only one argument is passed
+		if (length === i)
+		{
+			target = this;
+			--i;
+		}
+
+		for ( ; i < length; i++ )
+		{
+			// Only deal with non-null/undefined values
+			if ((options = arguments[i]) != null)
+			{
+				// Extend the base object
+				for (name in options)
+				{
+					src = target[name];
+					copy = options[name];
+
+					// Prevent never-ending loop
+					if (target === copy)
+					{
+						continue;
+					}
+
+					// Recurse if we're merging plain objects or arrays
+					if (deep && copy && (Phaser.Utils.isPlainObject(copy) || (copyIsArray = Array.isArray(copy))))
+					{
+						if (copyIsArray)
+						{
+							copyIsArray = false;
+							clone = src && Array.isArray(src) ? src : [];
+						}
+						else
+						{
+							clone = src && Phaser.Utils.isPlainObject(src) ? src : {};
+						}
+
+						// Never move original objects, clone them
+						target[name] = Phaser.Utils.extend(deep, clone, copy);
+
+					// Don't bring in undefined values
+					}
+					else if (copy !== undefined)
+					{
+						target[name] = copy;
+					}
+				}
+			}
+		}
+
+		// Return the modified object
+		return target;
+	}
+
+};
+
+//	Global functions that PIXI needs
+
+ /**
+ * Converts a hex color number to an [R, G, B] array
+ *
+ * @param {number} hex 
+ * @return {array}
+ */
+function HEXtoRGB(hex) {
+	return [(hex >> 16 & 0xFF) / 255, ( hex >> 8 & 0xFF) / 255, (hex & 0xFF)/ 255];
+}
+
+ /**
+ * A polyfill for Function.prototype.bind
+ */
+if (typeof Function.prototype.bind != 'function') {
+  Function.prototype.bind = (function () {
+    var slice = Array.prototype.slice;
+    return function (thisArg) {
+      var target = this, boundArgs = slice.call(arguments, 1);
+ 
+      if (typeof target != 'function') throw new TypeError();
+ 
+      function bound() {
+	var args = boundArgs.concat(slice.call(arguments));
+	target.apply(this instanceof bound ? this : thisArg, args);
+      }
+ 
+      bound.prototype = (function F(proto) {
+          proto && (F.prototype = proto);
+          if (!(this instanceof F)) return new F;          
+	})(target.prototype);
+ 
+      return bound;
+    };
+  })();
+}
+
+
+
+
+ + + + + +
+ +
+
+ + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
+ + + Documentation generated by JSDoc 3.2.0-dev + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + +
+
+ + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + diff --git a/Docs/out/Utils_.html b/Docs/out/Utils_.html new file mode 100644 index 00000000..fa393369 --- /dev/null +++ b/Docs/out/Utils_.html @@ -0,0 +1,513 @@ + + + + + + Phaser Class: Utils + + + + + + + + + + +
+ + +
+ + +
+ +
+ + + +

Class: Utils

+
+ +
+

+ Utils +

+ +
+ +
+
+ + + + +
+

new Utils()

+ + +
+
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + + +
+ +
+ + + + +
+ +
+
+ + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
+ + + Documentation generated by JSDoc 3.2.0-dev + on Thu Oct 03 2013 02:27:23 GMT+0100 (BST) using the DocStrap template. + +
+
+ + +
+
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Docs/out/World.js.html b/Docs/out/World.js.html index 4b18494f..a3a6d123 100644 --- a/Docs/out/World.js.html +++ b/Docs/out/World.js.html @@ -23,13 +23,13 @@ @@ -498,7 +584,7 @@ Object.defineProperty(Phaser.World.prototype, "randomY", { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:41 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/classes.list.html b/Docs/out/classes.list.html index 0b8a4e1a..5dee7711 100644 --- a/Docs/out/classes.list.html +++ b/Docs/out/classes.list.html @@ -23,13 +23,13 @@ @@ -295,18 +381,12 @@
Animation
-
Frame
-
- -
FrameData
-
- -
Parser
-
-
AnimationManager
+
AnimationParser
+
+
Cache
@@ -319,9 +399,54 @@
Circle
+
Color
+
+
Device
+
Easing
+
+ +
Back
+
+ +
Bounce
+
+ +
Circular
+
+ +
Cubic
+
+ +
Elastic
+
+ +
Exponential
+
+ +
Linear
+
+ +
Quadratic
+
+ +
Quartic
+
+ +
Quintic
+
+ +
Sinusoidal
+
+ +
Frame
+
+ +
FrameData
+
+
Game
@@ -346,7 +471,7 @@
Loader
-
Parser
+
LoaderParser
Math
@@ -412,9 +537,24 @@
StateManager
+
Time
+
+
Touch
+
Tween
+
+ +
TweenManager
+
+ +
Utils
+
+ +
Debug
+
+
World
@@ -424,6 +564,13 @@ +

Namespaces

+ +
+
Phaser
+
+
+ @@ -452,7 +599,7 @@ Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:41 GMT+0100 (BST) using the DocStrap template. + on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. diff --git a/Docs/out/global.html b/Docs/out/global.html index a52f33d0..1841e238 100644 --- a/Docs/out/global.html +++ b/Docs/out/global.html @@ -23,13 +23,13 @@