From ca113b85aa3c0435904ce84f7453414644bd50a4 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 1 Oct 2013 16:39:39 +0100 Subject: [PATCH] More docs coming on. --- Docs/conf.json | 2 +- Docs/out/Animation-Phaser.Animation.html | 12 +- Docs/out/Animation.html | 4 +- Docs/out/Camera-Phaser.Camera.html | 1345 ++++++ Docs/out/Camera.html | 135 + Docs/out/Game-Phaser.Game.html | 3542 ++++++++++++++++ Docs/out/Game.html | 135 + Docs/out/Group-Phaser.Group.html | 680 +++ Docs/out/Group.html | 135 + Docs/out/Phaser.Animation.Frame.html | 263 +- Docs/out/Phaser.Animation.FrameData.html | 1628 ++++++- Docs/out/Phaser.Animation.Parser.html | 862 +++- Docs/out/Phaser.AnimationManager.html | 1084 ++++- Docs/out/Phaser.html | 11 +- Docs/out/global.html | 4237 +------------------ Docs/out/index.html | 4 +- Docs/out/module-Phaser.html | 4 +- src/animation/AnimationManager.js | 15 + src/animation/Frame.js | 7 +- src/animation/FrameData.js | 10 +- src/animation/Parser.js | 4 + src/core/Camera.js | 10 +- src/core/Game.js | 21 +- src/core/Group.js | 42 +- src/core/Plugin.js | 12 +- src/core/Signal.js | 10 +- src/core/SignalBinding.js | 10 +- src/core/StateManager.js | 10 +- src/core/World.js | 4 +- src/gameobjects/BitmapText.js | 6 +- src/gameobjects/GameObjectFactory.js | 2 +- src/gameobjects/Sprite.js | 12 +- src/gameobjects/Text.js | 6 +- src/geom/Circle.js | 20 +- src/geom/Point.js | 18 +- src/geom/Rectangle.js | 28 +- src/input/Input.js | 8 +- src/input/InputHandler.js | 42 +- src/input/Key.js | 8 +- src/input/Keyboard.js | 8 +- src/input/MSPointer.js | 2 +- src/input/Mouse.js | 4 +- src/input/Pointer.js | 20 +- src/input/Touch.js | 4 +- src/loader/Cache.js | 2 +- src/loader/Loader.js | 12 +- src/math/Math.js | 24 +- src/particles/arcade/Emitter.js | 26 +- src/physics/arcade/Body.js | 8 +- src/pixi/core/Circle.js | 10 +- src/pixi/core/Ellipse.js | 12 +- src/pixi/core/Point.js | 4 +- src/pixi/core/Polygon.js | 4 +- src/pixi/core/Rectangle.js | 12 +- src/pixi/display/DisplayObjectContainer.js | 4 +- src/pixi/display/MovieClip.js | 4 +- src/pixi/display/Stage.js | 4 +- src/pixi/extras/TilingSprite.js | 4 +- src/pixi/primitives/Graphics.js | 38 +- src/pixi/renderers/canvas/CanvasRenderer.js | 8 +- src/pixi/renderers/webgl/WebGLRenderer.js | 8 +- src/pixi/text/Text.js | 8 +- src/pixi/textures/RenderTexture.js | 4 +- src/pixi/utils/Detector.js | 4 +- src/pixi/utils/Utils.js | 2 +- src/sound/Sound.js | 30 +- src/sound/SoundManager.js | 16 +- src/system/Canvas.js | 4 +- src/system/Device.js | 78 +- src/system/RequestAnimationFrame.js | 8 +- src/system/StageScaleMode.js | 12 +- src/tilemap/Tile.js | 34 +- src/tilemap/Tilemap.js | 36 +- src/tilemap/TilemapLayer.js | 6 +- src/tilemap/TilemapRenderer.js | 2 +- src/time/Time.js | 2 +- src/tween/Tween.js | 16 +- src/tween/TweenManager.js | 2 +- src/utils/Debug.js | 8 +- src/utils/Utils.js | 2 +- 80 files changed, 10121 insertions(+), 4763 deletions(-) create mode 100644 Docs/out/Camera-Phaser.Camera.html create mode 100644 Docs/out/Camera.html create mode 100644 Docs/out/Game-Phaser.Game.html create mode 100644 Docs/out/Game.html create mode 100644 Docs/out/Group-Phaser.Group.html create mode 100644 Docs/out/Group.html diff --git a/Docs/conf.json b/Docs/conf.json index 03c4a53d1..dab97499f 100644 --- a/Docs/conf.json +++ b/Docs/conf.json @@ -3,7 +3,7 @@ "allowUnknownTags": true }, "source": { - "include": [ "../src/Phaser.js", "../src/animation/Animation.js" ], + "include": [ "../src/Phaser.js", "../src/animation/", "../src/core/Camera.js", "../src/core/Game.js", "../src/core/Group.js" ], "exclude": [], "includePattern": ".+\\.js(doc)?$", "excludePattern": "(^|\\/|\\\\)_" diff --git a/Docs/out/Animation-Phaser.Animation.html b/Docs/out/Animation-Phaser.Animation.html index 18ced43aa..c35f1eede 100644 --- a/Docs/out/Animation-Phaser.Animation.html +++ b/Docs/out/Animation-Phaser.Animation.html @@ -89,7 +89,7 @@ -Phaser.Game +Phaser.Game @@ -158,7 +158,7 @@ -Phaser.Animation.FrameData +Phaser.Animation.FrameData @@ -360,7 +360,7 @@ -Phaser.Animation.Frame +Phaser.Animation.Frame @@ -562,7 +562,7 @@ -Phaser.Game +Phaser.Game @@ -1147,13 +1147,13 @@
diff --git a/Docs/out/Animation.html b/Docs/out/Animation.html index 430b23d05..46dd954ef 100644 --- a/Docs/out/Animation.html +++ b/Docs/out/Animation.html @@ -120,13 +120,13 @@
diff --git a/Docs/out/Camera-Phaser.Camera.html b/Docs/out/Camera-Phaser.Camera.html new file mode 100644 index 000000000..1ccf8e45b --- /dev/null +++ b/Docs/out/Camera-Phaser.Camera.html @@ -0,0 +1,1345 @@ + + + + + JSDoc: Class: Camera + + + + + + + + + + +
+ +

Class: Camera

+ + + + + +
+ +
+

+ Camera +

+ +
Camera
+ +
+ +
+
+ + + + +
+

new Camera(game, id, x, y, width, height)

+ + +
+
+ + +
+ 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 +
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
game + + +Phaser.Game + + + + Game reference to the currently running game.
id + + +number + + + + Not being used at the moment, will be when Phaser supports multiple camera
x + + +number + + + + Position of the camera on the X axis
y + + +number + + + + Position of the camera on the Y axis
width + + +number + + + + The width of the view rectangle
height + + +number + + + + The height of the view rectangle
+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
  • + core/Camera.js, line 23 +
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + +

Members

+ +
+ +
+

_edge

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
edge + + +number + + + + Edge property. Description.
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • 0
+ + + +
Source:
+
  • + core/Camera.js, line 81 +
+ + + + + + + +
+ + + +
+ + + +
+

atLimit

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
atLimit + + +bool + + + + Whether this camera is flush with the World Bounds or not.
+ + + + + + + + + + + + + + + + + + + + +
Source:
+
  • + core/Camera.js, line 69 +
+ + + + + + + +
+ + + +
+ + + +
+

deadzone

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
deadzone + + +Phaser.Rectangle + + + + Moving inside this Rectangle will not cause camera moving.
+ + + + + + + + + + + + + + + + + + + + +
Source:
+
  • + core/Camera.js, line 58 +
+ + + + + + + +
+ + + +
+ + + +
+

game

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
game + + +Phaser.Game + + + + A reference to the currently running Game.
+ + + + + + + + + + + + + + + + + + + + +
Source:
+
  • + core/Camera.js, line 28 +
+ + + + + + + +
+ + + +
+ + + +
+

id

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
id + + +number + + + + Reserved for future multiple camera set-ups.
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • 0
+ + + +
Source:
+
  • + core/Camera.js, line 39 +
+ + + + + + + +
+ + + +
+ + + +
+

screenView

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
screenView + + +Phaser.Rectangle + + + + Used by Sprites to work out Camera culling.
+ + + + + + + + + + + + + + + + + + + + +
Source:
+
  • + core/Camera.js, line 53 +
+ + + + + + + +
+ + + +
+ + + +
+

target

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
target + + +Phaser.Sprite + + + + If the camera is tracking a Sprite, this is a reference to it, otherwise null.
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • null
+ + + +
Source:
+
  • + core/Camera.js, line 75 +
+ + + + + + + +
+ + + +
+ + + +
+

view

+ + +
+
+ +
+ Camera view. The view into the world we wish to render (by default the game dimensions). The x/y values are in world coordinates, not screen coordinates, the width/height is how many pixels to render. Objects outside of this view are not rendered (unless set to ignore the Camera, i.e. UI?). +
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
view + + +Phaser.Rectangle + + + +
+ + + + + + + + + + + + + + + + + + + + +
Source:
+
  • + core/Camera.js, line 48 +
+ + + + + + + +
+ + + +
+ + + +
+

visible

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
visible + + +bool + + + + Whether this camera is visible or not.
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • true
+ + + +
Source:
+
  • + core/Camera.js, line 64 +
+ + + + + + + +
+ + + +
+ + + +
+

world

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
world + + +Phaser.World + + + + A reference to the game world.
+ + + + + + + + + + + + + + + + + + + + +
Source:
+
  • + core/Camera.js, line 33 +
+ + + + + + + +
+ + + +
+ +
+ + + + + + + +
+ +
+ + + + +
+ + + +
+ + + + + + + \ No newline at end of file diff --git a/Docs/out/Camera.html b/Docs/out/Camera.html new file mode 100644 index 000000000..d0d10d17e --- /dev/null +++ b/Docs/out/Camera.html @@ -0,0 +1,135 @@ + + + + + JSDoc: Module: Camera + + + + + + + + + + +
+ +

Module: Camera

+ + + + + +
+ +
+

+ Phaser. + + Camera +

+ +
+ +
+
+ + + + + + +
+ + + + + + + + + + + +
Author:
+
+ +
+ + + + + + + + +
License:
+
+ + + + + +
Source:
+
  • + core/Camera.js, line 1 +
+ + + + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + +
+ +
+ + + + +
+ + + +
+ + + + + + + \ No newline at end of file diff --git a/Docs/out/Game-Phaser.Game.html b/Docs/out/Game-Phaser.Game.html new file mode 100644 index 000000000..4c2447d67 --- /dev/null +++ b/Docs/out/Game-Phaser.Game.html @@ -0,0 +1,3542 @@ + + + + + JSDoc: Class: Game + + + + + + + + + + +
+ +

Class: Game

+ + + + + +
+ +
+

+ Game +

+ +
This is where the magic happens. The Game object is the heart of your game, providing quick access to common functions and handling the boot process.

"Hell, there are no rules here - we're trying to accomplish something."


Thomas A. Edison
+ +
+ +
+
+ + + + +
+

new Game(width, height, renderer, parent, state, transparent, antialias)

+ + +
+
+ + +
+ Game constructor Instantiate a new Phaser.Game object. +
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
width + + +number + + + + The width of your game in game pixels.
height + + +number + + + + The height of your game in game pixels.
renderer + + +number + + + + Which renderer to use (canvas or webgl)
parent + + +HTMLElement + + + + The Games DOM parent.
state + + +Description + + + + Description.
transparent + + +bool + + + + Use a transparent canvas background or not.
antialias + + +bool + + + + Anti-alias graphics.
+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
  • + core/Game.js, line 26 +
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + +

Members

+ +
+ +
+

add

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
add + + +Phaser.GameObjectFactory + + + + Reference to the GameObject Factory.
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • null
+ + + +
Source:
+
  • + core/Game.js, line 120 +
+ + + + + + + +
+ + + +
+ + + +
+

antialias

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
antialias + + +bool + + + + Anti-alias graphics (in WebGL this helps with edges, in Canvas2D it retains pixel-art quality).
+ + + + + + + + + + + + + + + + + + + + +
Source:
+
  • + core/Game.js, line 66 +
+ + + + + + + +
+ + + +
+ + + +
+

cache

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
cache + + +Phaser.Cache + + + + Reference to the assets cache.
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • null
+ + + +
Source:
+
  • + core/Game.js, line 126 +
+ + + + + + + +
+ + + +
+ + + +
+

camera

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
camera + + +Phaser.Physics.PhysicsManager + + + + A handy reference to world.camera.
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • null
+ + + +
Source:
+
  • + core/Game.js, line 204 +
+ + + + + + + +
+ + + +
+ + + +
+

canvas

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
canvas + + +HTMLCanvasElement + + + + A handy reference to renderer.view.
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • null
+ + + +
Source:
+
  • + core/Game.js, line 210 +
+ + + + + + + +
+ + + +
+ + + +
+

context

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
context + + +Context + + + + A handy reference to renderer.context (only set for CANVAS games)
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • null
+ + + +
Source:
+
  • + core/Game.js, line 216 +
+ + + + + + + +
+ + + +
+ + + +
+

debug

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
debug + + +Phaser.Utils.Debug + + + + A set of useful debug utilitie.
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • null
+ + + +
Source:
+
  • + core/Game.js, line 222 +
+ + + + + + + +
+ + + +
+ + + +
+

device

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
device + + +Phaser.Device + + + + Contains device information and capabilities.
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • null
+ + + +
Source:
+
  • + core/Game.js, line 198 +
+ + + + + + + +
+ + + +
+ + + +
+

height

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
height + + +number + + + + The Game height (in pixels).
+ + + + + + + + + + + + + + + + + + + + +
Source:
+
  • + core/Game.js, line 56 +
+ + + + + + + +
+ + + +
+ + + +
+

id

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
id + + +number + + + + Phaser Game ID (for when Pixi supports multiple instances).
+ + + + + + + + + + + + + + + + + + + + +
Source:
+
  • + core/Game.js, line 39 +
+ + + + + + + +
+ + + +
+ + + +
+

input

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
input + + +Phaser.Input + + + + Reference to the input manager
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • null
+ + + +
Source:
+
  • + core/Game.js, line 132 +
+ + + + + + + +
+ + + +
+ + + +
+

isBooted

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
isBooted + + +bool + + + + Whether the game engine is booted, aka available.
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • false
+ + + +
Source:
+
  • + core/Game.js, line 102 +
+ + + + + + + +
+ + + +
+ + + +
+

isRunning

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
id + + +bool + + + + Is game running or paused?
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • false
+ + + +
Source:
+
  • + core/Game.js, line 108 +
+ + + + + + + +
+ + + +
+ + + +
+

load

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
load + + +Phaser.Loader + + + + Reference to the assets loader.
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • null
+ + + +
Source:
+
  • + core/Game.js, line 138 +
+ + + + + + + +
+ + + +
+ + + +
+

math

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
math + + +Phaser.GameMath + + + + Reference to the math helper.
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • null
+ + + +
Source:
+
  • + core/Game.js, line 144 +
+ + + + + + + +
+ + + +
+ + + +
+

net

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
net + + +Phaser.Net + + + + Reference to the network class.
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • null
+ + + +
Source:
+
  • + core/Game.js, line 150 +
+ + + + + + + +
+ + + +
+ + + +
+

parent

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
parent + + +HTMLElement + + + + The Games DOM parent.
+ + + + + + + + + + + + + + + + + + + + +
Source:
+
  • + core/Game.js, line 44 +
+ + + + + + + +
+ + + +
+ + + +
+

particles

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
particles + + +Phaser.Particles + + + + The Particle Manager.
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • null
+ + + +
Source:
+
  • + core/Game.js, line 228 +
+ + + + + + + +
+ + + +
+ + + +
+

physics

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
physics + + +Phaser.Physics.PhysicsManager + + + + Reference to the physics manager.
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • null
+ + + +
Source:
+
  • + core/Game.js, line 186 +
+ + + + + + + +
+ + + +
+ + + +
+

raf

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
raf + + +Phaser.RequestAnimationFrame + + + + Automatically handles the core game loop via requestAnimationFrame or setTimeout
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • null
+ + + +
Source:
+
  • + core/Game.js, line 114 +
+ + + + + + + +
+ + + +
+ + + +
+

renderer

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
renderer + + +number + + + + The Pixi Renderer
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • null
+ + + +
Source:
+
  • + core/Game.js, line 72 +
+ + + + + + + +
+ + + +
+ + + +
+

renderType

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
renderType + + +number + + + + The Renderer this Phaser.Game will use. Either Phaser.RENDERER_AUTO, Phaser.RENDERER_CANVAS or Phaser.RENDERER_WEBGL.
+ + + + + + + + + + + + + + + + + + + + +
Source:
+
  • + core/Game.js, line 89 +
+ + + + + + + +
+ + + +
+ + + +
+

rnd

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
rnd + + +Phaser.RandomDataGenerator + + + + Instance of repeatable random data generator helper.
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • null
+ + + +
Source:
+
  • + core/Game.js, line 192 +
+ + + + + + + +
+ + + +
+ + + +
+

sound

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
sound + + +Phaser.SoundManager + + + + Reference to the sound manager.
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • null
+ + + +
Source:
+
  • + core/Game.js, line 156 +
+ + + + + + + +
+ + + +
+ + + +
+

stage

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
stage + + +Phaser.Stage + + + + Reference to the stage.
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • null
+ + + +
Source:
+
  • + core/Game.js, line 162 +
+ + + + + + + +
+ + + +
+ + + +
+

state

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
state + + +number + + + + The StateManager.
+ + + + + + + + + + + + + + + + + + + + +
Source:
+
  • + core/Game.js, line 77 +
+ + + + + + + +
+ + + +
+ + + +
+

time

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
time + + +Phaser.TimeManager + + + + Reference to game clock.
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • null
+ + + +
Source:
+
  • + core/Game.js, line 168 +
+ + + + + + + +
+ + + +
+ + + +
+

transparent

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
transparent + + +bool + + + + Use a transparent canvas background or not.
+ + + + + + + + + + + + + + + + + + + + +
Source:
+
  • + core/Game.js, line 61 +
+ + + + + + + +
+ + + +
+ + + +
+

tweens

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
tweens + + +Phaser.TweenManager + + + + Reference to the tween manager.
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • null
+ + + +
Source:
+
  • + core/Game.js, line 174 +
+ + + + + + + +
+ + + +
+ + + +
+

width

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
width + + +number + + + + The Game width (in pixels).
+ + + + + + + + + + + + + + + + + + + + +
Source:
+
  • + core/Game.js, line 51 +
+ + + + + + + +
+ + + +
+ + + +
+

world

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
world + + +Phaser.World + + + + Reference to the world.
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • null
+ + + +
Source:
+
  • + core/Game.js, line 180 +
+ + + + + + + +
+ + + +
+ +
+ + + + + + + +
+ +
+ + + + +
+ + + +
+ + + + + + + \ No newline at end of file diff --git a/Docs/out/Game.html b/Docs/out/Game.html new file mode 100644 index 000000000..f5b57424f --- /dev/null +++ b/Docs/out/Game.html @@ -0,0 +1,135 @@ + + + + + JSDoc: Module: Game + + + + + + + + + + +
+ +

Module: Game

+ + + + + +
+ +
+

+ Phaser. + + Game +

+ +
+ +
+
+ + + + + + +
+ + + + + + + + + + + +
Author:
+
+ +
+ + + + + + + + +
License:
+
+ + + + + +
Source:
+
  • + core/Game.js, line 1 +
+ + + + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + +
+ +
+ + + + +
+ + + +
+ + + + + + + \ No newline at end of file diff --git a/Docs/out/Group-Phaser.Group.html b/Docs/out/Group-Phaser.Group.html new file mode 100644 index 000000000..630663025 --- /dev/null +++ b/Docs/out/Group-Phaser.Group.html @@ -0,0 +1,680 @@ + + + + + JSDoc: Class: Group + + + + + + + + + + +
+ +

Class: Group

+ + + + + +
+ +
+

+ Group +

+ +
An Animation instance contains a single animation and the controls to play it. It is created by the AnimationManager, consists of Animation.Frame objects and belongs to a single Game Object such as a Sprite.
+ +
+ +
+
+ + + + +
+

new Group(game, parent, name, useStage)

+ + +
+
+ + +
+ Phaser Group constructor. +
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
game + + +Phaser.Game + + + + A reference to the currently running game.
parent + + +Description + + + + Description.
name + + +string + + + + The unique name for this animation, used in playback commands.
useStage + + +bool + + + + Description.
+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
  • + core/Group.js, line 19 +
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + +

Members

+ +
+ +
+

exists

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
exists + + +bool + + + + Description.
+ + + + + + + + + + + + + + + + + + +
Default Value:
+
  • true
+ + + +
Source:
+
  • + core/Group.js, line 73 +
+ + + + + + + +
+ + + +
+ + + +
+

game

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
game + + +Phaser.Game + + + + A reference to the currently running Game.
+ + + + + + + + + + + + + + + + + + + + +
Source:
+
  • + core/Group.js, line 31 +
+ + + + + + + +
+ + + +
+ + + +
+

name

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +Phaser.Game + + + + Description.
+ + + + + + + + + + + + + + + + + + + + +
Source:
+
  • + core/Group.js, line 36 +
+ + + + + + + +
+ + + +
+ + + +
+

type

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
type + + +Description + + + + Description.
+ + + + + + + + + + + + + + + + + + + + +
Source:
+
  • + core/Group.js, line 67 +
+ + + + + + + +
+ + + +
+ +
+ + + + + + + +
+ +
+ + + + +
+ + + +
+ + + + + + + \ No newline at end of file diff --git a/Docs/out/Group.html b/Docs/out/Group.html new file mode 100644 index 000000000..e5bb4cc7d --- /dev/null +++ b/Docs/out/Group.html @@ -0,0 +1,135 @@ + + + + + JSDoc: Module: Group + + + + + + + + + + +
+ +

Module: Group

+ + + + + +
+ +
+

+ Phaser. + + Group +

+ +
+ +
+
+ + + + + + +
+ + + + + + + + + + + +
Author:
+
+ +
+ + + + + + + + +
License:
+
+ + + + + +
Source:
+
  • + core/Group.js, line 1 +
+ + + + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + +
+ +
+ + + + +
+ + + +
+ + + + + + + \ No newline at end of file diff --git a/Docs/out/Phaser.Animation.Frame.html b/Docs/out/Phaser.Animation.Frame.html index f5208d260..1ae6098fc 100644 --- a/Docs/out/Phaser.Animation.Frame.html +++ b/Docs/out/Phaser.Animation.Frame.html @@ -2253,6 +2253,265 @@ +

Methods

+ +
+ +
+

<static> 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 + + +bool + + + + 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:
+
  • + animation/Frame.js, line 129 +
+ + + + + + + +
+ + + + + + + + + + + + + +
+ +
+ @@ -2267,13 +2526,13 @@
diff --git a/Docs/out/Phaser.Animation.FrameData.html b/Docs/out/Phaser.Animation.FrameData.html index 9a9c86620..150d583f9 100644 --- a/Docs/out/Phaser.Animation.FrameData.html +++ b/Docs/out/Phaser.Animation.FrameData.html @@ -1,152 +1,1478 @@ - - - - - JSDoc: Class: FrameData - - - - - - - - - - -
- -

Class: FrameData

- - - - - -
- -
-

- FrameData -

- -
Phaser.Animation.FrameData
- -
- -
-
- - - - -
-

new FrameData()

- - -
-
- - -
- FrameData is a container for Frame objects, which are the internal representation of animation data in Phaser. -
- - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
  • - animation/FrameData.js, line 14 -
- - - - - - - -
- - - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - + + + + + JSDoc: Class: FrameData + + + + + + + + + + +
+ +

Class: FrameData

+ + + + + +
+ +
+

+ FrameData +

+ +
Phaser.Animation.FrameData
+ +
+ +
+
+ + + + +
+

new FrameData()

+ + +
+
+ + +
+ FrameData is a container for Frame objects, which are the internal representation of animation data in Phaser. +
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
  • + animation/FrameData.js, line 14 +
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + +

Methods

+ +
+ +
+

<static> addFrame(frame) → {Phaser.Animation.Frame}

+ + +
+
+ + +
+ Adds a new Frame to this FrameData collection. Typically called by the Animation.Parser and not directly. +
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
frame + + +Phaser.Animation.Frame + + + + The frame to add to this FrameData set.
+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
  • + animation/FrameData.js, line 33 +
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+ The frame that was just added. +
+ + + +
+
+ Type +
+
+ +Phaser.Animation.Frame + + +
+
+ + + + +
+ + + +
+

<static> 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:
+
  • + animation/FrameData.js, line 94 +
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+ True if the frame is found, otherwise false. +
+ + + +
+
+ Type +
+
+ +boolean + + +
+
+ + + + +
+ + + +
+

<static> getFrame(index) → {Phaser.Animation.Frame}

+ + +
+
+ + +
+ Get a Frame by its numerical index. +
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
index + + +number + + + + The index of the frame you want to get.
+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
  • + animation/FrameData.js, line 56 +
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+ The frame, if found. +
+ + + +
+
+ Type +
+
+ +Phaser.Animation.Frame + + +
+
+ + + + +
+ + + +
+

<static> getFrameByName(name) → {Phaser.Animation.Frame}

+ + +
+
+ + +
+ Get a Frame by its frame name. +
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + + The name of the frame you want to get.
+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
  • + animation/FrameData.js, line 75 +
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+ The frame, if found. +
+ + + +
+
+ Type +
+
+ +Phaser.Animation.Frame + + +
+
+ + + + +
+ + + +
+

<static> 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:
+
  • + animation/FrameData.js, line 184 +
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+ An array of all Frame indexes matching the given names or IDs. +
+ + + +
+
+ Type +
+
+ +Array + + +
+
+ + + + +
+ + + +
+

<static> 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:
+
  • + animation/FrameData.js, line 113 +
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+ An array of Frames between the start and end index values, or an empty array if none were found. +
+ + + +
+
+ Type +
+
+ +Array + + +
+
+ + + + +
+ + + +
+

<static> 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:
+
  • + animation/FrameData.js, line 136 +
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+ An array of all Frames in this FrameData set matching the given names or IDs. +
+ + + +
+
+ Type +
+
+ +Array + + +
+
+ + + + +
+ + + +
+

<static> total() → {Number}

+ + +
+
+ + +
+ Returns the total number of frames in this FrameData set. +
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
  • + animation/FrameData.js, line 233 +
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+ The total number of frames in this FrameData set. +
+ + + +
+
+ Type +
+
+ +Number + + +
+
+ + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/Docs/out/Phaser.Animation.Parser.html b/Docs/out/Phaser.Animation.Parser.html index 3a6f1d33e..0d8469339 100644 --- a/Docs/out/Phaser.Animation.Parser.html +++ b/Docs/out/Phaser.Animation.Parser.html @@ -121,6 +121,864 @@ +

Methods

+ +
+ +
+

<static> JSONData(game, json, cacheKey) → {Phaser.Animation.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:
+
  • + animation/Parser.js, line 97 +
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+ A FrameData object containing the parsed frames. +
+ + + +
+
+ Type +
+
+ +Phaser.Animation.FrameData + + +
+
+ + + + +
+ + + +
+

<static> JSONDataHash(game, json, cacheKey) → {Phaser.Animation.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:
+
  • + animation/Parser.js, line 169 +
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+ A FrameData object containing the parsed frames. +
+ + + +
+
+ Type +
+
+ +Phaser.Animation.FrameData + + +
+
+ + + + +
+ + + +
+

<static> spriteSheet(game, key, frameWidth, frameHeight, frameMax) → {Phaser.Animation.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:
+
  • + animation/Parser.js, line 15 +
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+ A FrameData object containing the parsed frames. +
+ + + +
+
+ Type +
+
+ +Phaser.Animation.FrameData + + +
+
+ + + + +
+ + + +
+

<static> XMLData(game, xml, cacheKey) → {Phaser.Animation.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:
+
  • + animation/Parser.js, line 244 +
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+ A FrameData object containing the parsed frames. +
+ + + +
+
+ Type +
+
+ +Phaser.Animation.FrameData + + +
+
+ + + + +
+ +
+ @@ -135,13 +993,13 @@
diff --git a/Docs/out/Phaser.AnimationManager.html b/Docs/out/Phaser.AnimationManager.html index 7de98bb64..c5af2ecc0 100644 --- a/Docs/out/Phaser.AnimationManager.html +++ b/Docs/out/Phaser.AnimationManager.html @@ -325,7 +325,7 @@ -Phaser.Game +Phaser.Game @@ -587,6 +587,1084 @@ +

Methods

+ +
+ +
+

<static> add(name, frames, frameRate, loop, useNumericIndex) → {Phaser.Animation}

+ + +
+
+ + +
+ Adds a new animation under the given key. Optionally set the frames, frame rate and loop. Animations added in this way are played back with the play function. +
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
name + + +string + + + + + + + + + + + + The unique (within this Sprite) name for the animation, i.e. "run", "fire", "walk".
frames + + +Array + + + + + + <optional>
+ + + + + +
+ + null + + An array of numbers/strings that correspond to the frames to add to this animation and in which order. e.g. [1, 2, 3] or ['run0', 'run1', run2]). If null then all frames will be used.
frameRate + + +number + + + + + + <optional>
+ + + + + +
+ + 60 + + The speed at which the animation should play. The speed is given in frames per second.
loop + + +boolean + + + + + + <optional>
+ + + + + +
+ + false + + {boolean} - Whether or not the animation is looped or just plays once.
useNumericIndex + + +boolean + + + + + + <optional>
+ + + + + +
+ + true + + Are the given frames using numeric indexes (default) or strings?
+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
  • + animation/AnimationManager.js, line 79 +
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+ The Animation object that was created. +
+ + + +
+
+ Type +
+
+ +Phaser.Animation + + +
+
+ + + + +
+ + + +
+

<static> destroy()

+ + +
+
+ + +
+ Destroys all references this AnimationManager contains. Sets the _anims to a new object and nulls the current animation. +
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
  • + animation/AnimationManager.js, line 249 +
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + + +
+

<static> play(name, frameRate, loop) → {Phaser.Animation}

+ + +
+
+ + +
+ Play an animation based on the given key. The animation should previously have been added via sprite.animations.add() If the requested animation is already playing this request will be ignored. If you need to reset an already running animation do so directly on the Animation object itself. +
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
name + + +string + + + + + + + + + + + + The name of the animation to be played, e.g. "fire", "walk", "jump".
frameRate + + +number + + + + + + <optional>
+ + + + + +
+ + null + + The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used.
loop + + +boolean + + + + + + <optional>
+ + + + + +
+ + null + + Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used.
+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
  • + animation/AnimationManager.js, line 161 +
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+ A reference to playing Animation instance. +
+ + + +
+
+ Type +
+
+ +Phaser.Animation + + +
+
+ + + + +
+ + + +
+

<static> stop(name, resetFrame)

+ + +
+
+ + +
+ Stop playback of an animation. If a name is given that specific animation is stopped, otherwise the current animation is stopped. The currentAnim property of the AnimationManager is automatically set to the animation given. +
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
name + + +string + + + + + + <optional>
+ + + + + +
+ + null + + The name of the animation to be stopped, e.g. "fire". If none is given the currently running animation is stopped.
resetFrame + + +boolean + + + + + + <optional>
+ + + + + +
+ + false + + When the animation is stopped should the currentFrame be set to the first frame of the animation (true) or paused on the last frame displayed (false)
+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
  • + animation/AnimationManager.js, line 192 +
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + + +
+

<protected, static> update() → {boolean}

+ + +
+
+ + +
+ The main update function is called by the Sprites update loop. It's responsible for updating animation frames and firing related events. +
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
  • + animation/AnimationManager.js, line 223 +
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+ True if a new animation frame has been set, otherwise false. +
+ + + +
+
+ Type +
+
+ +boolean + + +
+
+ + + + +
+ + + +
+

<static> validateFrames(frames, useNumericIndex) → {boolean}

+ + +
+
+ + +
+ Check whether the frames in the given array are valid and exist. +
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
frames + + +Array + + + + + + + + + + + + An array of frames to be validated.
useNumericIndex + + +boolean + + + + + + <optional>
+ + + + + +
+ + true + + Validate the frames based on their numeric index (true) or string index (false)
+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
  • + animation/AnimationManager.js, line 126 +
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+ True if all given Frames are valid, otherwise false. +
+ + + +
+
+ Type +
+
+ +boolean + + +
+
+ + + + +
+ +
+ @@ -601,13 +1679,13 @@
diff --git a/Docs/out/Phaser.html b/Docs/out/Phaser.html index 27f59ac4b..db2e43d53 100644 --- a/Docs/out/Phaser.html +++ b/Docs/out/Phaser.html @@ -98,6 +98,13 @@ +

Classes

+ +
+
AnimationManager
+
+
+ @@ -118,13 +125,13 @@
diff --git a/Docs/out/global.html b/Docs/out/global.html index d968bd5b4..4e445f3c5 100644 --- a/Docs/out/global.html +++ b/Docs/out/global.html @@ -91,7 +91,7 @@
-

add(name, frames, frameRate, loop, useNumericIndex) → {Phaser.Animation}

+

multiplyAll(property, amount, checkAlive, checkVisible)

@@ -99,318 +99,7 @@
- Adds a new animation under the given key. Optionally set the frames, frame rate and loop. Animations added in this way are played back with the play function. -
- - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeArgumentDefaultDescription
name - - -string - - - - - - - - - - - - The unique (within this Sprite) name for the animation, i.e. "run", "fire", "walk".
frames - - -Array - - - - - - <optional>
- - - - - -
- - null - - An array of numbers/strings that correspond to the frames to add to this animation and in which order. e.g. [1, 2, 3] or ['run0', 'run1', run2]). If null then all frames will be used.
frameRate - - -number - - - - - - <optional>
- - - - - -
- - 60 - - The speed at which the animation should play. The speed is given in frames per second.
loop - - -boolean - - - - - - <optional>
- - - - - -
- - false - - {boolean} - Whether or not the animation is looped or just plays once.
useNumericIndex - - -boolean - - - - - - <optional>
- - - - - -
- - true - - Are the given frames using numeric indexes (default) or strings?
- - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
  • - animation/AnimationManager.js, line 78 -
- - - - - - - -
- - - - - - - - - - - -
Returns:
- - -
- The Animation object that was created. -
- - - -
-
- Type -
-
- -Phaser.Animation - - -
-
- - - - - - - - -
-

addFrame(frame) → {Phaser.Animation.Frame}

- - -
-
- - -
- Adds a new Frame to this FrameData collection. Typically called by the Animation.Parser and not directly. + Multiplies the given property by the amount on all children in this Group. Group.multiplyAll('x', 2) will x2 the child.x value.
@@ -444,146 +133,7 @@ - frame - - - - - -Phaser.Animation.Frame - - - - - - - - - - The frame to add to this FrameData set. - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
  • - animation/FrameData.js, line 33 -
- - - - - - - -
- - - - - - - - - - - -
Returns:
- - -
- The frame that was just added. -
- - - -
-
- Type -
-
- -Phaser.Animation.Frame - - -
-
- - - - -
- - - -
-

checkFrameName(name) → {boolean}

- - -
-
- - -
- Check if there is a Frame with the given name. -
- - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - + - - - - -
NameTypeDescription
nameproperty @@ -599,549 +149,14 @@ - The name of the frame you want to check.
- - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
  • - animation/FrameData.js, line 91 -
- - - - - - - -
- - - - - - - - - - - -
Returns:
- - -
- True if the frame is found, otherwise false. -
- - - -
-
- Type -
-
- -boolean - - -
-
- - - - -
- - - -
-

destroy()

- - -
-
- - -
- Cleans up this animation ready for deletion. Nulls all values and references. -
- - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
  • - animation/Animation.js, line 265 -
- - - - - - - -
- - - - - - - - - - - - - -
- - - -
-

destroy()

- - -
-
- - -
- Destroys all references this AnimationManager contains. Sets the _anims to a new object and nulls the current animation. -
- - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
  • - animation/AnimationManager.js, line 243 -
- - - - - - - -
- - - - - - - - - - - - - -
- - - -
-

generateFrameNames(prefix, min, max, suffix, zeroPad)

- - -
-
- - -
- Really handy function for when you are creating arrays of animation data but it's using frame names and not numbers. For example imagine you've got 30 frames named: 'explosion_0001-large' to 'explosion_0030-large' You could use this function to generate those by doing: Phaser.Animation.generateFrameNames('explosion_', 1, 30, '-large', 4); -
- - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeArgumentDefaultDescription
prefix - - -string - - - - - - - - - - - - The start of the filename. If the filename was 'explosion_0001-large' the prefix would be 'explosion_'.The property to multiply, for example 'body.velocity.x' or 'angle'.
min - - -number - - - - - - - - - - - - The number to start sequentially counting from. If your frames are named 'explosion_0001' to 'explosion_0034' the min is 1.
max - - -number - - - - - - - - - - - - The number to count up to. If your frames are named 'explosion_0001' to 'explosion_0034' the max is 34.
suffix - - -string - - - - - - <optional>
- - - - - -
- - '' - - The end of the filename. If the filename was 'explosion_0001-large' the prefix would be '-large'.
zeroPad - - -number - - - - - - <optional>
- - - - - -
- - 0 - - The number of zeroes to pad the min and max values with. If your frames are named 'explosion_0001' to 'explosion_0034' then the zeroPad is 4.
- - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
  • - animation/Animation.js, line 393 -
- - - - - - - -
- - - - - - - - - - - - - -
- - - -
-

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

- - -
-
- - -
- Get a Frame by its numerical index. -
- - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - + - - - - -
NameTypeDescription
indexamount @@ -1157,308 +172,14 @@ - The index of the frame you want to get.
- - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
  • - animation/FrameData.js, line 55 -
- - - - - - - -
- - - - - - - - - - - -
Returns:
- - -
- The frame, if found. -
- - - -
-
- Type -
-
- -Phaser.Animation.Frame - - -
-
- - - - -
- - - -
-

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

- - -
-
- - -
- Get a Frame by its frame name. -
- - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
name - - -string - - - - The name of the frame you want to get.
- - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
  • - animation/FrameData.js, line 73 -
- - - - - - - -
- - - - - - - - - - - -
Returns:
- - -
- The frame, if found. -
- - - -
-
- Type -
-
- -Phaser.Animation.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.The amount to multiply the property by. If child.x = 10 then multiplyAll('x', 2) would make child.x = 20.
useNumericIndexcheckAlive @@ -1471,438 +192,17 @@ - - <optional>
- - - - - -
- - true - - Are the given frames using numeric indexes (default) or strings? (false)If true the property will only be changed if the child is alive.
output - - -Array - - - - - - <optional>
- - - - - -
- - If given the results will be appended to the end of this array otherwise a new array will be created.
- - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
  • - animation/FrameData.js, line 178 -
- - - - - - - -
- - - - - - - - - - - -
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:
-
  • - animation/FrameData.js, line 109 -
- - - - - - - -
- - - - - - - - - - - -
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -2002,7 +249,7 @@
Source:
  • - animation/FrameData.js, line 131 + core/Group.js, line 516
@@ -2023,2464 +270,6 @@ -
Returns:
- - -
- An array of all Frames in this FrameData set matching the given names or IDs. -
- - - -
-
- Type -
-
- -Array - - -
-
- - - - - - - - -
-

JSONData(game, json, cacheKey) → {Phaser.Animation.FrameData}

- - -
-
- - -
- Parse the JSON data and extract the animation frame data from it. -
- - - - - - - -
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.
useNumericIndexcheckVisible @@ -1915,63 +215,10 @@ - - <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.If true the property will only be changed if the child is visible.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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:
-
  • - animation/Parser.js, line 96 -
- - - - - - - -
- - - - - - - - - - - -
Returns:
- - -
- A FrameData object containing the parsed frames. -
- - - -
-
- Type -
-
- -Phaser.Animation.FrameData - - -
-
- - - - -
- - - -
-

JSONDataHash(game, json, cacheKey) → {Phaser.Animation.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:
-
  • - animation/Parser.js, line 167 -
- - - - - - - -
- - - - - - - - - - - -
Returns:
- - -
- A FrameData object containing the parsed frames. -
- - - -
-
- Type -
-
- -Phaser.Animation.FrameData - - -
-
- - - - -
- - - -
-

onComplete()

- - -
-
- - -
- Called internally when the animation finishes playback. Sets the isPlaying and isFinished states and dispatches the onAnimationComplete event if it exists on the parent. -
- - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
  • - animation/Animation.js, line 281 -
- - - - - - - -
- - - - - - - - - - - - - -
- - - -
-

play(frameRate, loop) → {Phaser.Animation}

- - -
-
- - -
- Plays this animation. -
- - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeArgumentDefaultDescription
frameRate - - -number - - - - - - <optional>
- - - - - -
- - null - - The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used.
loop - - -boolean - - - - - - <optional>
- - - - - -
- - null - - Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used.
- - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
  • - animation/Animation.js, line 118 -
- - - - - - - -
- - - - - - - - - - - -
Returns:
- - -
- - A reference to this Animation instance. -
- - - -
-
- Type -
-
- -Phaser.Animation - - -
-
- - - - -
- - - -
-

play(name, frameRate, loop) → {Phaser.Animation}

- - -
-
- - -
- Play an animation based on the given key. The animation should previously have been added via sprite.animations.add() If the requested animation is already playing this request will be ignored. If you need to reset an already running animation do so directly on the Animation object itself. -
- - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeArgumentDefaultDescription
name - - -string - - - - - - - - - - - - The name of the animation to be played, e.g. "fire", "walk", "jump".
frameRate - - -number - - - - - - <optional>
- - - - - -
- - null - - The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used.
loop - - -boolean - - - - - - <optional>
- - - - - -
- - null - - Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used.
- - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
  • - animation/AnimationManager.js, line 158 -
- - - - - - - -
- - - - - - - - - - - -
Returns:
- - -
- A reference to playing Animation instance. -
- - - -
-
- Type -
-
- -Phaser.Animation - - -
-
- - - - -
- - - -
-

restart()

- - -
-
- - -
- Sets this animation back to the first frame and restarts the animation. -
- - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
  • - animation/Animation.js, line 160 -
- - - - - - - -
- - - - - - - - - - - - - -
- - - -
-

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 - - -bool - - - - 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:
-
  • - animation/Frame.js, line 129 -
- - - - - - - -
- - - - - - - - - - - - - -
- - - -
-

spriteSheet(game, key, frameWidth, frameHeight, frameMax) → {Phaser.Animation.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:
-
  • - animation/Parser.js, line 15 -
- - - - - - - -
- - - - - - - - - - - -
Returns:
- - -
- A FrameData object containing the parsed frames. -
- - - -
-
- Type -
-
- -Phaser.Animation.FrameData - - -
-
- - - - -
- - - -
-

stop(resetFrame)

- - -
-
- - -
- Stops playback of this animation and set it to a finished state. If a resetFrame is provided it will stop playback and set frame to the first in the animation. -
- - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeArgumentDefaultDescription
resetFrame - - -boolean - - - - - - <optional>
- - - - - -
- - false - - If true after the animation stops the currentFrame value will be set to the first frame in this animation.
- - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
  • - animation/Animation.js, line 179 -
- - - - - - - -
- - - - - - - - - - - - - -
- - - -
-

stop(name, resetFrame)

- - -
-
- - -
- Stop playback of an animation. If a name is given that specific animation is stopped, otherwise the current animation is stopped. The currentAnim property of the AnimationManager is automatically set to the animation given. -
- - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeArgumentDefaultDescription
name - - -string - - - - - - <optional>
- - - - - -
- - null - - The name of the animation to be stopped, e.g. "fire". If none is given the currently running animation is stopped.
resetFrame - - -boolean - - - - - - <optional>
- - - - - -
- - false - - When the animation is stopped should the currentFrame be set to the first frame of the animation (true) or paused on the last frame displayed (false)
- - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
  • - animation/AnimationManager.js, line 188 -
- - - - - - - -
- - - - - - - - - - - - - -
- - - -
-

total() → {Number}

- - -
-
- - -
- Returns the total number of frames in this FrameData set. -
- - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
  • - animation/FrameData.js, line 226 -
- - - - - - - -
- - - - - - - - - - - -
Returns:
- - -
- The total number of frames in this FrameData set. -
- - - -
-
- Type -
-
- -Number - - -
-
- - - - -
- - - -
-

update()

- - -
-
- - -
- Updates this animation. Called automatically by the AnimationManager. -
- - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
  • - animation/Animation.js, line 199 -
- - - - - - - -
- - - - - - - - - - - - - -
- - - -
-

<protected> update() → {boolean}

- - -
-
- - -
- The main update function is called by the Sprites update loop. It's responsible for updating animation frames and firing related events. -
- - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
  • - animation/AnimationManager.js, line 218 -
- - - - - - - -
- - - - - - - - - - - -
Returns:
- - -
- True if a new animation frame has been set, otherwise false. -
- - - -
-
- Type -
-
- -boolean - - -
-
- - - - -
- - - -
-

validateFrames(frames, useNumericIndex) → {boolean}

- - -
-
- - -
- Check whether the frames in the given array are valid and exist. -
- - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeArgumentDefaultDescription
frames - - -Array - - - - - - - - - - - - An array of frames to be validated.
useNumericIndex - - -boolean - - - - - - <optional>
- - - - - -
- - true - - Validate the frames based on their numeric index (true) or string index (false)
- - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
  • - animation/AnimationManager.js, line 124 -
- - - - - - - -
- - - - - - - - - - - -
Returns:
- - -
- True if all given Frames are valid, otherwise false. -
- - - -
-
- Type -
-
- -boolean - - -
-
- - - - -
- - - -
-

XMLData(game, xml, cacheKey) → {Phaser.Animation.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:
-
  • - animation/Parser.js, line 241 -
- - - - - - - -
- - - - - - - - - - - -
Returns:
- - -
- A FrameData object containing the parsed frames. -
- - - -
-
- Type -
-
- -Phaser.Animation.FrameData - - -
-
- -
@@ -4501,13 +290,13 @@
- Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:05:08 GMT+0100 (BST) + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:31:30 GMT+0100 (BST)
diff --git a/Docs/out/index.html b/Docs/out/index.html index baad952ea..bb7dcca26 100644 --- a/Docs/out/index.html +++ b/Docs/out/index.html @@ -48,13 +48,13 @@
- Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:09:01 GMT+0100 (BST) + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:31:58 GMT+0100 (BST)
diff --git a/Docs/out/module-Phaser.html b/Docs/out/module-Phaser.html index b711810af..7d5d6abae 100644 --- a/Docs/out/module-Phaser.html +++ b/Docs/out/module-Phaser.html @@ -105,13 +105,13 @@
- Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:09:01 GMT+0100 (BST) + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:31:58 GMT+0100 (BST)
diff --git a/src/animation/AnimationManager.js b/src/animation/AnimationManager.js index 22f6faa67..15765ac30 100644 --- a/src/animation/AnimationManager.js +++ b/src/animation/AnimationManager.js @@ -65,6 +65,7 @@ Phaser.AnimationManager.prototype = { * This is called automatically when a new Sprite is created. * * @method loadFrameData + * @memberof Phaser.AnimationManager * @private * @param {Phaser.Animation.FrameData} frameData - The FrameData set to load. */ @@ -80,6 +81,7 @@ Phaser.AnimationManager.prototype = { * Animations added in this way are played back with the play function. * * @method add + * @memberof Phaser.AnimationManager * @param {string} name - The unique (within this Sprite) name for the animation, i.e. "run", "fire", "walk". * @param {Array} [frames=null] - An array of numbers/strings that correspond to the frames to add to this animation and in which order. e.g. [1, 2, 3] or ['run0', 'run1', run2]). If null then all frames will be used. * @param {number} [frameRate=60] - The speed at which the animation should play. The speed is given in frames per second. @@ -125,6 +127,7 @@ Phaser.AnimationManager.prototype = { * Check whether the frames in the given array are valid and exist. * * @method validateFrames + * @memberof Phaser.AnimationManager * @param {Array} frames - An array of frames to be validated. * @param {boolean} [useNumericIndex=true] - Validate the frames based on their numeric index (true) or string index (false) * @return {boolean} True if all given Frames are valid, otherwise false. @@ -160,6 +163,7 @@ Phaser.AnimationManager.prototype = { * If the requested animation is already playing this request will be ignored. If you need to reset an already running animation do so directly on the Animation object itself. * * @method play + * @memberof Phaser.AnimationManager * @param {string} name - The name of the animation to be played, e.g. "fire", "walk", "jump". * @param {number} [frameRate=null] - The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used. * @param {boolean} [loop=null] - Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used. @@ -190,6 +194,7 @@ Phaser.AnimationManager.prototype = { * The currentAnim property of the AnimationManager is automatically set to the animation given. * * @method stop + * @memberof Phaser.AnimationManager * @param {string} [name=null] - The name of the animation to be stopped, e.g. "fire". If none is given the currently running animation is stopped. * @param {boolean} [resetFrame=false] - When the animation is stopped should the currentFrame be set to the first frame of the animation (true) or paused on the last frame displayed (false) */ @@ -219,6 +224,7 @@ Phaser.AnimationManager.prototype = { * The main update function is called by the Sprites update loop. It's responsible for updating animation frames and firing related events. * * @method update + * @memberof Phaser.AnimationManager * @protected * @return {boolean} True if a new animation frame has been set, otherwise false. */ @@ -244,6 +250,7 @@ Phaser.AnimationManager.prototype = { * Destroys all references this AnimationManager contains. Sets the _anims to a new object and nulls the current animation. * * @method destroy + * @memberof Phaser.AnimationManager */ destroy: function () { @@ -258,6 +265,7 @@ Phaser.AnimationManager.prototype = { }; /** +* @memberof Phaser.AnimationManager * @return {Phaser.Animation.FrameData} Returns the FrameData of the current animation. */ Object.defineProperty(Phaser.AnimationManager.prototype, "frameData", { @@ -269,6 +277,7 @@ Object.defineProperty(Phaser.AnimationManager.prototype, "frameData", { }); /** +* @memberof Phaser.AnimationManager * @return {number} Returns the total number of frames in the loaded FrameData, or -1 if no FrameData is loaded. */ Object.defineProperty(Phaser.AnimationManager.prototype, "frameTotal", { @@ -288,8 +297,10 @@ Object.defineProperty(Phaser.AnimationManager.prototype, "frameTotal", { }); /** +* @memberof Phaser.AnimationManager * @return {boolean} Returns the paused state of the current animation. *//** +* @memberof Phaser.AnimationManager * @param {boolean} value - Sets the paused state of the current animation. */ Object.defineProperty(Phaser.AnimationManager.prototype, "paused", { @@ -309,8 +320,10 @@ Object.defineProperty(Phaser.AnimationManager.prototype, "paused", { }); /** +* @memberof Phaser.AnimationManager * @return {number} Returns the index of the current frame. *//** +* @memberof Phaser.AnimationManager * @param {number} value - Sets the current frame on the Sprite and updates the texture cache for display. */ Object.defineProperty(Phaser.AnimationManager.prototype, "frame", { @@ -339,8 +352,10 @@ Object.defineProperty(Phaser.AnimationManager.prototype, "frame", { }); /** +* @memberof Phaser.AnimationManager * @return {string} Returns the name of the current frame if it has one. *//** +* @memberof Phaser.AnimationManager * @param {string} value - Sets the current frame on the Sprite and updates the texture cache for display. */ Object.defineProperty(Phaser.AnimationManager.prototype, "frameName", { diff --git a/src/animation/Frame.js b/src/animation/Frame.js index f3f243ea3..bc160d08a 100644 --- a/src/animation/Frame.js +++ b/src/animation/Frame.js @@ -71,7 +71,7 @@ Phaser.Animation.Frame = function (index, x, y, width, height, name, uuid) { this.distance = Phaser.Math.distance(0, 0, width, height); /** - * @property {bool} rotated - Rotated? (not yet implemented) + * @property {boolean} rotated - Rotated? (not yet implemented) * @default */ this.rotated = false; @@ -83,7 +83,7 @@ Phaser.Animation.Frame = function (index, x, y, width, height, name, uuid) { this.rotationDirection = 'cw'; /** - * @property {bool} trimmed - Was it trimmed when packed? + * @property {boolean} trimmed - Was it trimmed when packed? * @default */ this.trimmed = false; @@ -130,7 +130,8 @@ Phaser.Animation.Frame.prototype = { * If the frame was trimmed when added to the Texture Atlas this records the trim and source data. * * @method setTrim - * @param {bool} trimmed - If this frame was trimmed or not. + * @memberof Phaser.Animation.Frame + * @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. * @param {number} destX - The destination X position of the trimmed frame for display. diff --git a/src/animation/FrameData.js b/src/animation/FrameData.js index 96ac86a0f..50551db1e 100644 --- a/src/animation/FrameData.js +++ b/src/animation/FrameData.js @@ -34,6 +34,7 @@ Phaser.Animation.FrameData.prototype = { * Adds a new Frame to this FrameData collection. Typically called by the Animation.Parser and not directly. * * @method addFrame + * @memberof Phaser.Animation.FrameData * @param {Phaser.Animation.Frame} frame - The frame to add to this FrameData set. * @return {Phaser.Animation.Frame} The frame that was just added. */ @@ -56,6 +57,7 @@ Phaser.Animation.FrameData.prototype = { * Get a Frame by its numerical index. * * @method getFrame + * @memberof Phaser.Animation.FrameData * @param {number} index - The index of the frame you want to get. * @return {Phaser.Animation.Frame} The frame, if found. */ @@ -74,6 +76,7 @@ Phaser.Animation.FrameData.prototype = { * Get a Frame by its frame name. * * @method getFrameByName + * @memberof Phaser.Animation.FrameData * @param {string} name - The name of the frame you want to get. * @return {Phaser.Animation.Frame} The frame, if found. */ @@ -92,6 +95,7 @@ Phaser.Animation.FrameData.prototype = { * Check if there is a Frame with the given name. * * @method checkFrameName + * @memberof Phaser.Animation.FrameData * @param {string} name - The name of the frame you want to check. * @return {boolean} True if the frame is found, otherwise false. */ @@ -110,6 +114,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 getFrameRange + * @memberof Phaser.Animation.FrameData * @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. @@ -133,6 +138,7 @@ Phaser.Animation.FrameData.prototype = { * The frames are returned in the output array, or if none is provided in a new Array object. * * @method getFrames + * @memberof Phaser.Animation.FrameData * @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. @@ -180,6 +186,7 @@ Phaser.Animation.FrameData.prototype = { * The frames indexes are returned in the output array, or if none is provided in a new Array object. * * @method getFrameIndexes + * @memberof Phaser.Animation.FrameData * @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. @@ -227,7 +234,8 @@ Object.defineProperty(Phaser.Animation.FrameData.prototype, "total", { * Returns the total number of frames in this FrameData set. * * @method total - * @return {Number} The total number of frames in this FrameData set. + * @memberof Phaser.Animation.FrameData + * @return {number} The total number of frames in this FrameData set. */ get: function () { return this._frames.length; diff --git a/src/animation/Parser.js b/src/animation/Parser.js index ca7c08274..b8e2b8ed9 100644 --- a/src/animation/Parser.js +++ b/src/animation/Parser.js @@ -16,6 +16,7 @@ Phaser.Animation.Parser = { * Parse a Sprite Sheet and extract the animation frame data from it. * * @method spriteSheet + * @memberof Phaser.Animation.Parser * @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. @@ -97,6 +98,7 @@ Phaser.Animation.Parser = { * Parse the JSON data and extract the animation frame data from it. * * @method JSONData + * @memberof Phaser.Animation.Parser * @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. @@ -168,6 +170,7 @@ Phaser.Animation.Parser = { * Parse the JSON data and extract the animation frame data from it. * * @method JSONDataHash + * @memberof Phaser.Animation.Parser * @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. @@ -242,6 +245,7 @@ Phaser.Animation.Parser = { * Parse the XML data and extract the animation frame data from it. * * @method XMLData + * @memberof Phaser.Animation.Parser * @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. diff --git a/src/core/Camera.js b/src/core/Camera.js index c2ee4286c..2ca65f108 100644 --- a/src/core/Camera.js +++ b/src/core/Camera.js @@ -58,13 +58,13 @@ Phaser.Camera = function (game, id, x, y, width, height) { this.deadzone = null; /** - * @property {bool} visible - Whether this camera is visible or not. + * @property {boolean} visible - Whether this camera is visible or not. * @default */ this.visible = true; /** - * @property {bool} atLimit - Whether this camera is flush with the World Bounds or not. + * @property {boolean} atLimit - Whether this camera is flush with the World Bounds or not. */ this.atLimit = { x: false, y: false }; @@ -93,6 +93,7 @@ Phaser.Camera.prototype = { /** * Tells this camera which sprite to follow. * @method follow + * @memberOf Phaser.Camera * @param {Phaser.Sprite} target - The object you want the camera to track. Set to null to not follow anything. * @param {number} [style] Leverage one of the existing "deadzone" presets. If you use a custom deadzone, ignore this parameter and manually specify the deadzone after calling follow(). */ @@ -133,6 +134,7 @@ Phaser.Camera.prototype = { /** * Move the camera focus to a location instantly. * @method focusOnXY + * @memberOf Phaser.Camera * @param {number} x - X position. * @param {number} y - Y position. */ @@ -146,6 +148,7 @@ Phaser.Camera.prototype = { /** * Update focusing and scrolling. * @method update + * @memberOf Phaser.Camera */ update: function () { @@ -196,6 +199,7 @@ Phaser.Camera.prototype = { /** * Method called to ensure the camera doesn't venture outside of the game world. * @method checkWorldBounds + * @memberOf Phaser.Camera */ checkWorldBounds: function () { @@ -236,6 +240,7 @@ Phaser.Camera.prototype = { * without having to use game.camera.x and game.camera.y. * * @method setPosition + * @memberOf Phaser.Camera * @param {number} x - X position. * @param {number} y - Y position. */ @@ -251,6 +256,7 @@ Phaser.Camera.prototype = { * Sets the size of the view rectangle given the width and height in parameters. * * @method setSize + * @memberOf Phaser.Camera * @param {number} width - The desired width. * @param {number} height - The desired height. */ diff --git a/src/core/Game.js b/src/core/Game.js index 6492b9d11..92874a6c8 100644 --- a/src/core/Game.js +++ b/src/core/Game.js @@ -20,8 +20,8 @@ * @param {number} renderer -Which renderer to use (canvas or webgl) * @param {HTMLElement} parent -The Games DOM parent. * @param {Description} state - Description. -* @param {bool} transparent - Use a transparent canvas background or not. -* @param {bool} antialias - Anti-alias graphics. +* @param {boolean} transparent - Use a transparent canvas background or not. +* @param {boolean} antialias - Anti-alias graphics. */ Phaser.Game = function (width, height, renderer, parent, state, transparent, antialias) { @@ -56,12 +56,12 @@ Phaser.Game = function (width, height, renderer, parent, state, transparent, ant this.height = height; /** - * @property {bool} transparent - Use a transparent canvas background or not. + * @property {boolean} transparent - Use a transparent canvas background or not. */ this.transparent = transparent; /** - * @property {bool} antialias - Anti-alias graphics (in WebGL this helps with edges, in Canvas2D it retains pixel-art quality). + * @property {boolean} antialias - Anti-alias graphics (in WebGL this helps with edges, in Canvas2D it retains pixel-art quality). */ this.antialias = antialias; @@ -77,7 +77,7 @@ Phaser.Game = function (width, height, renderer, parent, state, transparent, ant this.state = new Phaser.StateManager(this, state); /** - * @property {bool} _paused - Is game paused? + * @property {boolean} _paused - Is game paused? * @private * @default */ @@ -89,20 +89,20 @@ Phaser.Game = function (width, height, renderer, parent, state, transparent, ant this.renderType = renderer; /** - * @property {bool} _loadComplete - Whether load complete loading or not. + * @property {boolean} _loadComplete - Whether load complete loading or not. * @private * @default */ this._loadComplete = false; /** - * @property {bool} isBooted - Whether the game engine is booted, aka available. + * @property {boolean} isBooted - Whether the game engine is booted, aka available. * @default */ this.isBooted = false; /** - * @property {bool} id -Is game running or paused? + * @property {boolean} id -Is game running or paused? * @default */ this.isRunning = false; @@ -253,6 +253,7 @@ Phaser.Game.prototype = { * Initialize engine sub modules and start the game. * * @method boot + * @memberOf Phaser.Game */ boot: function () { @@ -333,6 +334,7 @@ Phaser.Game.prototype = { * Checks if the device is capable of using the requested renderer and sets it up or an alternative if not. * * @method setUpRenderer + * @memberOf Phaser.Game */ setUpRenderer: function () { @@ -369,6 +371,7 @@ Phaser.Game.prototype = { * Called when the load has finished, after preload was run. * * @method loadComplete + * @memberOf Phaser.Game */ loadComplete: function () { @@ -382,6 +385,7 @@ Phaser.Game.prototype = { * The core game loop. * * @method update + * @memberOf Phaser.Game * @param {number} time - The current time as provided by RequestAnimationFrame. */ update: function (time) { @@ -416,6 +420,7 @@ Phaser.Game.prototype = { * Nuke the entire game from orbit * * @method destroy + * @memberOf Phaser.Game */ destroy: function () { diff --git a/src/core/Group.js b/src/core/Group.js index 4e17ff85f..e7698e8b9 100644 --- a/src/core/Group.js +++ b/src/core/Group.js @@ -8,13 +8,12 @@ /** * Phaser Group constructor. * @class Phaser.Group -* @classdesc An Animation instance contains a single animation and the controls to play it. -* It is created by the AnimationManager, consists of Animation.Frame objects and belongs to a single Game Object such as a Sprite. +* @classdesc A Group is a container for display objects that allows for fast pooling, recycling and collision checks. * @constructor * @param {Phaser.Game} game - A reference to the currently running game. * @param {Description} parent - Description. * @param {string} name - The unique name for this animation, used in playback commands. -* @param {bool} useStage - Description. +* @param {boolean} useStage - Description. */ Phaser.Group = function (game, parent, name, useStage) { @@ -67,7 +66,7 @@ Phaser.Group = function (game, parent, name, useStage) { this.type = Phaser.GROUP; /** - * @property {bool} exists - Description. + * @property {boolean} exists - Description. * @default */ this.exists = true; @@ -87,6 +86,7 @@ Phaser.Group.prototype = { * Description. * * @method add + * @memberOf Phaser.Group * @param {Description} child - Description. * @return {Description} Description. */ @@ -112,6 +112,7 @@ Phaser.Group.prototype = { * Description. * * @method addAt + * @memberOf Phaser.Group * @param {Description} child - Description. * @param {Description} index - Description. * @return {Description} Description. @@ -138,6 +139,7 @@ Phaser.Group.prototype = { * Description. * * @method getAt + * @memberOf Phaser.Group * @param {Description} index - Description. * @return {Description} Description. */ @@ -151,6 +153,7 @@ Phaser.Group.prototype = { * Description. * * @method create + * @memberOf Phaser.Group * @param {number} x - Description. * @param {number} y - Description. * @param {string} key - Description. @@ -182,9 +185,10 @@ Phaser.Group.prototype = { * Description. * * @method swap + * @memberOf Phaser.Group * @param {Description} child1 - Description. * @param {Description} child2 - Description. - * @return {bool} Description. + * @return {boolean} Description. */ swap: function (child1, child2) { @@ -310,6 +314,7 @@ Phaser.Group.prototype = { * Description. * * @method bringToTop + * @memberOf Phaser.Group * @param {Description} child - Description. * @return {Description} Description. */ @@ -329,6 +334,7 @@ Phaser.Group.prototype = { * Description. * * @method getIndex + * @memberOf Phaser.Group * @param {Description} child - Description. * @return {Description} Description. */ @@ -342,6 +348,7 @@ Phaser.Group.prototype = { * Description. * * @method replace + * @memberOf Phaser.Group * @param {Description} oldChild - Description. * @param {Description} newChild - Description. */ @@ -373,6 +380,7 @@ Phaser.Group.prototype = { * Description. * * @method setProperty + * @memberOf Phaser.Group * @param {Description} child - Description. * @param {array} key - An array of values that will be set. * @param {Description} value - Description. @@ -436,6 +444,7 @@ Phaser.Group.prototype = { * Description. * * @method setAll + * @memberOf Phaser.Group * @param {Description} key - Description. * @param {Description} value - Description. * @param {Description} checkAlive - Description. @@ -474,6 +483,7 @@ Phaser.Group.prototype = { * Group.addAll('x', 10) will add 10 to the child.x value. * * @method addAll + * @memberOf Phaser.Group * @param {string} property - The property to increment, for example 'body.velocity.x' or 'angle'. * @param {number} amount - The amount to increment the property by. If child.x = 10 then addAll('x', 40) would make child.x = 50. * @param {boolean} checkAlive - If true the property will only be changed if the child is alive. @@ -490,6 +500,7 @@ Phaser.Group.prototype = { * Group.subAll('x', 10) will minus 10 from the child.x value. * * @method subAll + * @memberOf Phaser.Group * @param {string} property - The property to decrement, for example 'body.velocity.x' or 'angle'. * @param {number} amount - The amount to subtract from the property. If child.x = 50 then subAll('x', 40) would make child.x = 10. * @param {boolean} checkAlive - If true the property will only be changed if the child is alive. @@ -506,6 +517,7 @@ Phaser.Group.prototype = { * Group.multiplyAll('x', 2) will x2 the child.x value. * * @method multiplyAll + * @memberOf Phaser.Group * @param {string} property - The property to multiply, for example 'body.velocity.x' or 'angle'. * @param {number} amount - The amount to multiply the property by. If child.x = 10 then multiplyAll('x', 2) would make child.x = 20. * @param {boolean} checkAlive - If true the property will only be changed if the child is alive. @@ -522,6 +534,7 @@ Phaser.Group.prototype = { * Group.divideAll('x', 2) will half the child.x value. * * @method divideAll + * @memberOf Phaser.Group * @param {string} property - The property to divide, for example 'body.velocity.x' or 'angle'. * @param {number} amount - The amount to divide the property by. If child.x = 100 then divideAll('x', 2) would make child.x = 50. * @param {boolean} checkAlive - If true the property will only be changed if the child is alive. @@ -538,6 +551,7 @@ Phaser.Group.prototype = { * After the existsValue parameter you can add as many parameters as you like, which will all be passed to the child callback. * * @method callAllExists + * @memberOf Phaser.Group * @param {function} callback - The function that exists on the children that will be called. * @param {boolean} existsValue - Only children with exists=existsValue will be called. * @param {...*} parameter - Additional parameters that will be passed to the callback. @@ -570,6 +584,7 @@ Phaser.Group.prototype = { * After the callback parameter you can add as many extra parameters as you like, which will all be passed to the child. * * @method callAll + * @memberOf Phaser.Group * @param {function} callback - The function that exists on the children that will be called. * @param {...*} parameter - Additional parameters that will be passed to the callback. */ @@ -601,9 +616,10 @@ Phaser.Group.prototype = { * After the checkExists parameter you can add as many parameters as you like, which will all be passed to the callback along with the child. * * @method forEach + * @memberOf Phaser.Group * @param {Description} callback - Description. * @param {Description} callbackContext - Description. - * @param {bool} checkExists - Description. + * @param {boolean} checkExists - Description. */ forEach: function (callback, callbackContext, checkExists) { @@ -639,6 +655,7 @@ Phaser.Group.prototype = { * Description. * * @method forEachAlive + * @memberOf Phaser.Group * @param {Description} callback - Description. * @param {Description} callbackContext - Description. */ @@ -671,6 +688,7 @@ Phaser.Group.prototype = { * Description. * * @method forEachDead + * @memberOf Phaser.Group * @param {Description} callback - Description. * @param {Description} callbackContext - Description. */ @@ -702,6 +720,7 @@ Phaser.Group.prototype = { * Call this function to retrieve the first object with exists == (the given state) in the group. * * @method getFirstExists + * @memberOf Phaser.Group * @param {Description} state - Description. * @return {Any} The first child, or null if none found. */ @@ -737,6 +756,7 @@ Phaser.Group.prototype = { * This is handy for checking if everything's wiped out, or choosing a squad leader, etc. * * @method getFirstAlive + * @memberOf Phaser.Group * @return {Any} The first alive child, or null if none found. */ getFirstAlive: function () { @@ -766,6 +786,7 @@ Phaser.Group.prototype = { * This is handy for checking if everything's wiped out, or choosing a squad leader, etc. * * @method getFirstDead + * @memberOf Phaser.Group * @return {Any} The first dead child, or null if none found. */ getFirstDead: function () { @@ -794,6 +815,7 @@ Phaser.Group.prototype = { * Call this function to find out how many members of the group are alive. * * @method countLiving + * @memberOf Phaser.Group * @return {number} The number of children flagged as alive. Returns -1 if Group is empty. */ countLiving: function () { @@ -824,6 +846,7 @@ Phaser.Group.prototype = { * Call this function to find out how many members of the group are dead. * * @method countDead + * @memberOf Phaser.Group * @return {number} The number of children flagged as dead. Returns -1 if Group is empty. */ countDead: function () { @@ -853,6 +876,8 @@ Phaser.Group.prototype = { /** * Returns a member at random from the group. * + * @method getRandom + * @memberOf Phaser.Group * @param {number} startIndex - Optional offset off the front of the array. Default value is 0, or the beginning of the array. * @param {number} length - Optional restriction on the number of values you want to randomly select from. * @return {Any} A random child of this Group. @@ -875,6 +900,7 @@ Phaser.Group.prototype = { * Description. * * @method remove + * @memberOf Phaser.Group * @param {Description} child - Description. */ remove: function (child) { @@ -889,6 +915,7 @@ Phaser.Group.prototype = { * Description. * * @method removeAll + * @memberOf Phaser.Group */ removeAll: function () { @@ -913,6 +940,7 @@ Phaser.Group.prototype = { * Description. * * @method removeBetween + * @memberOf Phaser.Group * @param {Description} startIndex - Description. * @param {Description} endIndex - Description. */ @@ -941,6 +969,7 @@ Phaser.Group.prototype = { * Description. * * @method destroy + * @memberOf Phaser.Group */ destroy: function () { @@ -960,6 +989,7 @@ Phaser.Group.prototype = { * Description. * * @method dump + * @memberOf Phaser.Group */ dump: function (full) { diff --git a/src/core/Plugin.js b/src/core/Plugin.js index 4b5374d34..00f247f9c 100644 --- a/src/core/Plugin.js +++ b/src/core/Plugin.js @@ -29,37 +29,37 @@ Phaser.Plugin = function (game, parent) { this.parent = parent; /** - * @property {bool} active - Description. + * @property {boolean} active - Description. * @default */ this.active = false; /** - * @property {bool} visible - Description. + * @property {boolean} visible - Description. * @default */ this.visible = false; /** - * @property {bool} hasPreUpdate - Description. + * @property {boolean} hasPreUpdate - Description. * @default */ this.hasPreUpdate = false; /** - * @property {bool} hasUpdate - Description. + * @property {boolean} hasUpdate - Description. * @default */ this.hasUpdate = false; /** - * @property {bool} hasRender - Description. + * @property {boolean} hasRender - Description. * @default */ this.hasRender = false; /** - * @property {bool} hasPostRender - Description. + * @property {boolean} hasPostRender - Description. * @default */ this.hasPostRender = false; diff --git a/src/core/Signal.js b/src/core/Signal.js index 5502d0ec7..f517427e1 100644 --- a/src/core/Signal.js +++ b/src/core/Signal.js @@ -47,13 +47,13 @@ Phaser.Signal.prototype = { * If Signal should keep record of previously dispatched parameters and * automatically execute listener during `add()`/`addOnce()` if Signal was * already dispatched before. - * @property {bool} memorize + * @property {boolean} memorize */ memorize: false, /** * Description. - * @property {bool} _shouldPropagate + * @property {boolean} _shouldPropagate * @private */ _shouldPropagate: true, @@ -61,7 +61,7 @@ Phaser.Signal.prototype = { /** * If Signal is active and should broadcast events. *

IMPORTANT: Setting this property during a dispatch will only affect the next dispatch, if you want to stop the propagation of a signal use `halt()` instead.

- * @property {bool} active + * @property {boolean} active * @default */ active: true, @@ -84,7 +84,7 @@ Phaser.Signal.prototype = { * * @method _registerListener * @param {function} listener - Signal handler function. - * @param {bool} isOnce - Description. + * @param {boolean} isOnce - Description. * @param {object} [listenerContext] - Description. * @param {number} [priority] - The priority level of the event listener. Listeners with higher priority will be executed before listeners with lower priority. Listeners with same priority level will be executed at the same order as they were added. (default = 0). * @return {Phaser.SignalBinding} An Object representing the binding between the Signal and listener. @@ -152,7 +152,7 @@ Phaser.Signal.prototype = { * @method has * @param {Function} listener - Signal handler function. * @param {Object} [context] - Context on which listener will be executed (object that should represent the `this` variable inside listener function). - * @return {bool} If Signal has the specified listener. + * @return {boolean} If Signal has the specified listener. */ has: function (listener, context) { return this._indexOfListener(listener, context) !== -1; diff --git a/src/core/SignalBinding.js b/src/core/SignalBinding.js index e61b31a27..6864a3020 100644 --- a/src/core/SignalBinding.js +++ b/src/core/SignalBinding.js @@ -20,7 +20,7 @@ * @inner * @param {Signal} signal - Reference to Signal object that listener is currently bound to. * @param {function} listener - Handler function bound to the signal. -* @param {bool} isOnce - If binding should be executed just once. +* @param {boolean} isOnce - If binding should be executed just once. * @param {object} [listenerContext] - Context on which listener will be executed (object that should represent the `this` variable inside listener function). * @param {number} [priority] - The priority level of the event listener. (default = 0). */ @@ -33,7 +33,7 @@ Phaser.SignalBinding = function (signal, listener, isOnce, listenerContext, prio this._listener = listener; /** - * @property {bool} _isOnce - If binding should be executed just once. + * @property {boolean} _isOnce - If binding should be executed just once. * @private */ this._isOnce = isOnce; @@ -62,7 +62,7 @@ Phaser.SignalBinding.prototype = { /** * If binding is active and should be executed. - * @property {bool} active + * @property {boolean} active * @default */ active: true, @@ -112,7 +112,7 @@ Phaser.SignalBinding.prototype = { /** * @method isBound - * @return {bool} True if binding is still bound to the signal and has a listener. + * @return {boolean} True if binding is still bound to the signal and has a listener. */ isBound: function () { return (!!this._signal && !!this._listener); @@ -120,7 +120,7 @@ Phaser.SignalBinding.prototype = { /** * @method isOnce - * @return {bool} If SignalBinding will only be executed once. + * @return {boolean} If SignalBinding will only be executed once. */ isOnce: function () { return this._isOnce; diff --git a/src/core/StateManager.js b/src/core/StateManager.js index 3bbf58d20..bacadd3b3 100644 --- a/src/core/StateManager.js +++ b/src/core/StateManager.js @@ -51,7 +51,7 @@ Phaser.StateManager.prototype = { /** * Flag that sets if the State has been created or not. - * @property {bool}_created + * @property {boolean}_created * @private */ _created: false, @@ -160,7 +160,7 @@ Phaser.StateManager.prototype = { * @method add * @param key {string} - A unique key you use to reference this state, i.e. "MainMenu", "Level1". * @param state {State} - The state you want to switch to. - * @param autoStart {bool} - Start the state immediately after creating it? (default true) + * @param autoStart {boolean} - Start the state immediately after creating it? (default true) */ add: function (key, state, autoStart) { @@ -241,8 +241,8 @@ Phaser.StateManager.prototype = { * Start the given state * @method start * @param {string} key - The key of the state you want to start. - * @param {bool} [clearWorld] - clear everything in the world? (Default to true) - * @param {bool} [clearCache] - clear asset cache? (Default to false and ONLY available when clearWorld=true) + * @param {boolean} [clearWorld] - clear everything in the world? (Default to true) + * @param {boolean} [clearCache] - clear asset cache? (Default to false and ONLY available when clearWorld=true) */ start: function (key, clearWorld, clearCache) { @@ -327,7 +327,7 @@ Phaser.StateManager.prototype = { * Description. * @method checkState * @param {string} key - The key of the state you want to check. - * @return {bool} Description. + * @return {boolean} Description. */ checkState: function (key) { diff --git a/src/core/World.js b/src/core/World.js index 585be20d0..efa8d25a0 100644 --- a/src/core/World.js +++ b/src/core/World.js @@ -170,7 +170,7 @@ Object.defineProperty(Phaser.World.prototype, "width", { /** * @method width - * @return {Number} The current width of the game world + * @return {number} The current width of the game world */ get: function () { return this.bounds.width; @@ -178,7 +178,7 @@ Object.defineProperty(Phaser.World.prototype, "width", { /** * @method width - * @return {Number} Sets the width of the game world + * @return {number} Sets the width of the game world */ set: function (value) { this.bounds.width = value; diff --git a/src/gameobjects/BitmapText.js b/src/gameobjects/BitmapText.js index 0f5ec0a44..b58c1b322 100644 --- a/src/gameobjects/BitmapText.js +++ b/src/gameobjects/BitmapText.js @@ -26,13 +26,13 @@ Phaser.BitmapText = function (game, x, y, text, style) { style = style || ''; /** - * @property {bool} exists - If exists = false then the Sprite isn't updated by the core game loop or physics subsystem at all. + * @property {boolean} exists - If exists = false then the Sprite isn't updated by the core game loop or physics subsystem at all. * @default */ this.exists = true; /** - * @property {bool} alive - This is a handy little var your game can use to determine if a sprite is alive or not, it doesn't effect rendering. + * @property {boolean} alive - This is a handy little var your game can use to determine if a sprite is alive or not, it doesn't effect rendering. * @default */ this.alive = true; @@ -112,7 +112,7 @@ Phaser.BitmapText = function (game, x, y, text, style) { this._cache.y = this.y - (this.game.world.camera.y * this.scrollFactor.y); /** - * @property {bool} renderable - Description. + * @property {boolean} renderable - Description. * @private */ this.renderable = true; diff --git a/src/gameobjects/GameObjectFactory.js b/src/gameobjects/GameObjectFactory.js index b5d671c95..00d8406a2 100644 --- a/src/gameobjects/GameObjectFactory.js +++ b/src/gameobjects/GameObjectFactory.js @@ -44,7 +44,7 @@ Phaser.GameObjectFactory.prototype = { * Description. * @method existing. * @param {object} - Description. - * @return {bool} Description. + * @return {boolean} Description. */ existing: function (object) { diff --git a/src/gameobjects/Sprite.js b/src/gameobjects/Sprite.js index 4f2ec955f..afd024a59 100644 --- a/src/gameobjects/Sprite.js +++ b/src/gameobjects/Sprite.js @@ -29,13 +29,13 @@ Phaser.Sprite = function (game, x, y, key, frame) { this.game = game; /** - * @property {bool} exists - If exists = false then the Sprite isn't updated by the core game loop or physics subsystem at all. + * @property {boolean} exists - If exists = false then the Sprite isn't updated by the core game loop or physics subsystem at all. * @default */ this.exists = true; /** - * @property {bool} alive - This is a handy little var your game can use to determine if a sprite is alive or not, it doesn't effect rendering. + * @property {boolean} alive - This is a handy little var your game can use to determine if a sprite is alive or not, it doesn't effect rendering. * @default */ this.alive = true; @@ -174,7 +174,7 @@ Phaser.Sprite = function (game, x, y, key, frame) { * Note that this check doesn't look at this Sprites children, which may still be in camera range. * So you should set autoCull to false if the Sprite will have children likely to still be in camera range. * - * @property {bool} autoCull + * @property {boolean} autoCull * @default */ this.autoCull = false; @@ -290,7 +290,7 @@ Phaser.Sprite = function (game, x, y, key, frame) { this.inWorldThreshold = 0; /** - * @property {bool} _outOfBoundsFired - Description. + * @property {boolean} _outOfBoundsFired - Description. * @private * @default */ @@ -649,7 +649,7 @@ Phaser.Sprite.prototype.getBounds = function(rect) { * * @method play * @param {String} name The name of the animation to be played, e.g. "fire", "walk", "jump". -* @param {Number} [frameRate=null] The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used. +* @param {number} [frameRate=null] The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used. * @param {Boolean} [loop=null] Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used. * @return {Phaser.Animation} A reference to playing Animation instance. */ @@ -714,7 +714,7 @@ Object.defineProperty(Phaser.Sprite.prototype, "frameName", { /** * Is this sprite visible to the camera or not? -* @returns {bool} +* @returns {boolean} */ Object.defineProperty(Phaser.Sprite.prototype, "inCamera", { diff --git a/src/gameobjects/Text.js b/src/gameobjects/Text.js index 41bbd9f36..632e54ede 100644 --- a/src/gameobjects/Text.js +++ b/src/gameobjects/Text.js @@ -25,14 +25,14 @@ Phaser.Text = function (game, x, y, text, style) { // If exists = false then the Sprite isn't updated by the core game loop or physics subsystem at all /** - * @property {bool} exists - Description. + * @property {boolean} exists - Description. * @default */ this.exists = true; // This is a handy little var your game can use to determine if a sprite is alive or not, it doesn't effect rendering /** - * @property {bool} alive - Description. + * @property {boolean} alive - Description. * @default */ this.alive = true; @@ -111,7 +111,7 @@ Phaser.Text = function (game, x, y, text, style) { this._cache.y = this.y - (this.game.world.camera.y * this.scrollFactor.y); /** - * @property {bool} renderable - Description. + * @property {boolean} renderable - Description. */ this.renderable = true; diff --git a/src/geom/Circle.js b/src/geom/Circle.js index e8e93b0b5..9e4752ccf 100644 --- a/src/geom/Circle.js +++ b/src/geom/Circle.js @@ -107,7 +107,7 @@ Phaser.Circle.prototype = { * (can be Circle, Point or anything with x/y properties) * @method distance * @param {object} dest - The target object. Must have visible x and y properties that represent the center of the object. - * @param {bool} [round] - Round the distance to the nearest integer (default false). + * @param {boolean} [round] - Round the distance to the nearest integer (default false). * @return {number} The distance between this Point object and the destination Point object. */ distance: function (dest, round) { @@ -144,7 +144,7 @@ Phaser.Circle.prototype = { * @method contains * @param {number} x - The X value of the coordinate to test. * @param {number} y - The Y value of the coordinate to test. - * @return {bool} True if the coordinates are within this circle, otherwise false. + * @return {boolean} True if the coordinates are within this circle, otherwise false. */ contains: function (x, y) { return Phaser.Circle.contains(this, x, y); @@ -154,7 +154,7 @@ Phaser.Circle.prototype = { * Returns a Point object containing the coordinates of a point on the circumference of the Circle based on the given angle. * @method circumferencePoint * @param {number} angle - The angle in radians (unless asDegrees is true) to return the point from. - * @param {bool} asDegrees - Is the given angle in radians (false) or degrees (true)? + * @param {boolean} asDegrees - Is the given angle in radians (false) or degrees (true)? * @param {Phaser.Point} [out] - An optional Point object to put the result in to. If none specified a new Point object will be created. * @return {Phaser.Point} The Point object holding the result. */ @@ -214,7 +214,7 @@ Object.defineProperty(Phaser.Circle.prototype, "diameter", { /** * The diameter of the circle. The largest distance between any two points on the circle. The same as the radius * 2. * @method diameter - * @param {Number} The diameter of the circle. + * @param {number} The diameter of the circle. **/ set: function (value) { if (value > 0) { @@ -362,7 +362,7 @@ Object.defineProperty(Phaser.Circle.prototype, "area", { /** * Determines whether or not this Circle object is empty. -* @return {bool} A value of true if the Circle objects diameter is less than or equal to 0; otherwise false. +* @return {boolean} A value of true if the Circle objects diameter is less than or equal to 0; otherwise false. *//** * Sets all of the Circle objects properties to 0. A Circle object is empty if its diameter is less than or equal to 0. * @param {Description} value - Description. @@ -392,7 +392,7 @@ Object.defineProperty(Phaser.Circle.prototype, "empty", { * @param {Phaser.Circle} a - The Circle to be checked. * @param {number} x - The X value of the coordinate to test. * @param {number} y - The Y value of the coordinate to test. -* @return {bool} True if the coordinates are within this circle, otherwise false. +* @return {boolean} True if the coordinates are within this circle, otherwise false. */ Phaser.Circle.contains = function (a, x, y) { @@ -415,7 +415,7 @@ Phaser.Circle.contains = function (a, x, y) { * @method equals * @param {Phaser.Circle} a - The first Circle object. * @param {Phaser.Circle} b - The second Circle object. -* @return {bool} A value of true if the object has exactly the same values for the x, y and diameter properties as this Circle object; otherwise false. +* @return {boolean} A value of true if the object has exactly the same values for the x, y and diameter properties as this Circle object; otherwise false. */ Phaser.Circle.equals = function (a, b) { return (a.x == b.x && a.y == b.y && a.diameter == b.diameter); @@ -427,7 +427,7 @@ Phaser.Circle.equals = function (a, b) { * @method intersects * @param {Phaser.Circle} a - The first Circle object. * @param {Phaser.Circle} b - The second Circle object. -* @return {bool} A value of true if the specified object intersects with this Circle object; otherwise false. +* @return {boolean} A value of true if the specified object intersects with this Circle object; otherwise false. */ Phaser.Circle.intersects = function (a, b) { return (Phaser.Math.distance(a.x, a.y, b.x, b.y) <= (a.radius + b.radius)); @@ -438,7 +438,7 @@ Phaser.Circle.intersects = function (a, b) { * @method circumferencePoint * @param {Phaser.Circle} a - The first Circle object. * @param {number} angle - The angle in radians (unless asDegrees is true) to return the point from. -* @param {bool} asDegrees - Is the given angle in radians (false) or degrees (true)? +* @param {boolean} asDegrees - Is the given angle in radians (false) or degrees (true)? * @param {Phaser.Point} [out] - An optional Point object to put the result in to. If none specified a new Point object will be created. * @return {Phaser.Point} The Point object holding the result. */ @@ -463,7 +463,7 @@ Phaser.Circle.circumferencePoint = function (a, angle, asDegrees, out) { * @method intersectsRectangle * @param {Phaser.Circle} c - The Circle object to test. * @param {Phaser.Rectangle} r - The Rectangle object to test. -* @return {bool} True if the two objects intersect, otherwise false. +* @return {boolean} True if the two objects intersect, otherwise false. */ Phaser.Circle.intersectsRectangle = function (c, r) { diff --git a/src/geom/Point.js b/src/geom/Point.js index 4133584ae..79384f99d 100644 --- a/src/geom/Point.js +++ b/src/geom/Point.js @@ -10,8 +10,8 @@ * @class Point * @classdesc The Point object represents a location in a two-dimensional coordinate system, where x represents the horizontal axis and y represents the vertical axis. * @constructor -* @param {Number} x The horizontal position of this Point (default 0) -* @param {Number} y The vertical position of this Point (default 0) +* @param {number} x The horizontal position of this Point (default 0) +* @param {number} y The vertical position of this Point (default 0) **/ Phaser.Point = function (x, y) { @@ -182,7 +182,7 @@ Phaser.Point.prototype = { * Returns the distance of this Point object to the given object (can be a Circle, Point or anything with x/y properties) * @method distance * @param {object} dest - The target object. Must have visible x and y properties that represent the center of the object. - * @param {bool} [round] - Round the distance to the nearest integer (default false). + * @param {boolean} [round] - Round the distance to the nearest integer (default false). * @return {number} The distance between this Point object and the destination Point object. */ distance: function (dest, round) { @@ -195,7 +195,7 @@ Phaser.Point.prototype = { * Determines whether the given objects x/y values are equal to this Point object. * @method equals * @param {Phaser.Point} a - The first object to compare. - * @return {bool} A value of true if the Points are equal, otherwise false. + * @return {boolean} A value of true if the Points are equal, otherwise false. */ equals: function (a) { return (a.x == this.x && a.y == this.y); @@ -207,7 +207,7 @@ Phaser.Point.prototype = { * @param {number} x - The x coordinate of the anchor point * @param {number} y - The y coordinate of the anchor point * @param {number} angle - The angle in radians (unless asDegrees is true) to rotate the Point to. - * @param {bool} asDegrees - Is the given rotation in radians (false) or degrees (true)? + * @param {boolean} asDegrees - Is the given rotation in radians (false) or degrees (true)? * @param {number} [distance] - An optional distance constraint between the Point and the anchor. * @return {Phaser.Point} The modified point object. */ @@ -309,7 +309,7 @@ Phaser.Point.divide = function (a, b, out) { * @method equals * @param {Phaser.Point} a - The first Point object. * @param {Phaser.Point} b - The second Point object. -* @return {bool} A value of true if the Points are equal, otherwise false. +* @return {boolean} A value of true if the Points are equal, otherwise false. */ Phaser.Point.equals = function (a, b) { return (a.x == b.x && a.y == b.y); @@ -320,8 +320,8 @@ Phaser.Point.equals = function (a, b) { * @method distance * @param {object} a - The target object. Must have visible x and y properties that represent the center of the object. * @param {object} b - The target object. Must have visible x and y properties that represent the center of the object. -* @param {bool} [round] - Round the distance to the nearest integer (default false). -* @return {Number} The distance between this Point object and the destination Point object. +* @param {boolean} [round] - Round the distance to the nearest integer (default false). +* @return {number} The distance between this Point object and the destination Point object. */ Phaser.Point.distance = function (a, b, round) { @@ -345,7 +345,7 @@ Phaser.Point.distance = function (a, b, round) { * @param {number} x - The x coordinate of the anchor point * @param {number} y - The y coordinate of the anchor point * @param {number} angle - The angle in radians (unless asDegrees is true) to rotate the Point to. -* @param {bool} asDegrees - Is the given rotation in radians (false) or degrees (true)? +* @param {boolean} asDegrees - Is the given rotation in radians (false) or degrees (true)? * @param {number} distance - An optional distance constraint between the Point and the anchor. * @return {Phaser.Point} The modified point object. */ diff --git a/src/geom/Rectangle.js b/src/geom/Rectangle.js index 1a7894c58..fe499fb63 100644 --- a/src/geom/Rectangle.js +++ b/src/geom/Rectangle.js @@ -168,7 +168,7 @@ Phaser.Rectangle.prototype = { * @method contains * @param {number} x - The x coordinate of the point to test. * @param {number} y - The y coordinate of the point to test. - * @return {bool} A value of true if the Rectangle object contains the specified point; otherwise false. + * @return {boolean} A value of true if the Rectangle object contains the specified point; otherwise false. */ contains: function (x, y) { return Phaser.Rectangle.contains(this, x, y); @@ -179,7 +179,7 @@ Phaser.Rectangle.prototype = { * A Rectangle object is said to contain another if the second Rectangle object falls entirely within the boundaries of the first. * @method containsRect * @param {Phaser.Rectangle} b - The second Rectangle object. - * @return {bool} A value of true if the Rectangle object contains the specified point; otherwise false. + * @return {boolean} A value of true if the Rectangle object contains the specified point; otherwise false. */ containsRect: function (b) { return Phaser.Rectangle.containsRect(this, b); @@ -190,7 +190,7 @@ Phaser.Rectangle.prototype = { * This method compares the x, y, width and height properties of each Rectangle. * @method equals * @param {Phaser.Rectangle} b - The second Rectangle object. - * @return {bool} A value of true if the two Rectangles have exactly the same values for the x, y, width and height properties; otherwise false. + * @return {boolean} A value of true if the two Rectangles have exactly the same values for the x, y, width and height properties; otherwise false. */ equals: function (b) { return Phaser.Rectangle.equals(this, b); @@ -213,7 +213,7 @@ Phaser.Rectangle.prototype = { * @method intersects * @param {Phaser.Rectangle} b - The second Rectangle object. * @param {number} tolerance - A tolerance value to allow for an intersection test with padding, default to 0. - * @return {bool} A value of true if the specified object intersects with this Rectangle object; otherwise false. + * @return {boolean} A value of true if the specified object intersects with this Rectangle object; otherwise false. */ intersects: function (b, tolerance) { return Phaser.Rectangle.intersects(this, b, tolerance); @@ -227,7 +227,7 @@ Phaser.Rectangle.prototype = { * @param {number} top - Description. * @param {number} bottomt - Description. * @param {number} tolerance - A tolerance value to allow for an intersection test with padding, default to 0 - * @return {bool} A value of true if the specified object intersects with the Rectangle; otherwise false. + * @return {boolean} A value of true if the specified object intersects with the Rectangle; otherwise false. */ intersectsRaw: function (left, right, top, bottom, tolerance) { return Phaser.Rectangle.intersectsRaw(this, left, right, top, bottom, tolerance); @@ -483,7 +483,7 @@ Object.defineProperty(Phaser.Rectangle.prototype, "topLeft", { /** * Determines whether or not this Rectangle object is empty. -* @return {bool} +* @return {boolean} *//** * Sets all of the Rectangle object's properties to 0. A Rectangle object is empty if its width or height is less than or equal to 0. * @param {Description} value @@ -506,8 +506,8 @@ Object.defineProperty(Phaser.Rectangle.prototype, "empty", { * Increases the size of the Rectangle object by the specified amounts. The center point of the Rectangle object stays the same, and its size increases to the left and right by the dx value, and to the top and the bottom by the dy value. * @method inflate * @param {Phaser.Rectangle} a - The Rectangle object. -* @param {Number} dx - The amount to be added to the left side of the Rectangle. -* @param {Number} dy - The amount to be added to the bottom side of the Rectangle. +* @param {number} dx - The amount to be added to the left side of the Rectangle. +* @param {number} dy - The amount to be added to the bottom side of the Rectangle. * @return {Phaser.Rectangle} This Rectangle object. */ Phaser.Rectangle.inflate = function (a, dx, dy) { @@ -559,7 +559,7 @@ Phaser.Rectangle.clone = function (a, output) { * @param {Phaser.Rectangle} a - The Rectangle object. * @param {number} x - The x coordinate of the point to test. * @param {number} y - The y coordinate of the point to test. -* @return {bool} A value of true if the Rectangle object contains the specified point; otherwise false. +* @return {boolean} A value of true if the Rectangle object contains the specified point; otherwise false. */ Phaser.Rectangle.contains = function (a, x, y) { return (x >= a.x && x <= a.right && y >= a.y && y <= a.bottom); @@ -570,7 +570,7 @@ Phaser.Rectangle.contains = function (a, x, y) { * @method containsPoint * @param {Phaser.Rectangle} a - The Rectangle object. * @param {Phaser.Point} point - The point object being checked. Can be Point or any object with .x and .y values. -* @return {bool} A value of true if the Rectangle object contains the specified point; otherwise false. +* @return {boolean} A value of true if the Rectangle object contains the specified point; otherwise false. */ Phaser.Rectangle.containsPoint = function (a, point) { return Phaser.Phaser.Rectangle.contains(a, point.x, point.y); @@ -582,7 +582,7 @@ Phaser.Rectangle.containsPoint = function (a, point) { * @method containsRect * @param {Phaser.Rectangle} a - The first Rectangle object. * @param {Phaser.Rectangle} b - The second Rectangle object. -* @return {bool} A value of true if the Rectangle object contains the specified point; otherwise false. +* @return {boolean} A value of true if the Rectangle object contains the specified point; otherwise false. */ Phaser.Rectangle.containsRect = function (a, b) { @@ -602,7 +602,7 @@ Phaser.Rectangle.containsRect = function (a, b) { * @method equals * @param {Phaser.Rectangle} a - The first Rectangle object. * @param {Phaser.Rectangle} b - The second Rectangle object. -* @return {bool} A value of true if the two Rectangles have exactly the same values for the x, y, width and height properties; otherwise false. +* @return {boolean} A value of true if the two Rectangles have exactly the same values for the x, y, width and height properties; otherwise false. */ Phaser.Rectangle.equals = function (a, b) { return (a.x == b.x && a.y == b.y && a.width == b.width && a.height == b.height); @@ -639,7 +639,7 @@ Phaser.Rectangle.intersection = function (a, b, out) { * @param {Phaser.Rectangle} a - The first Rectangle object. * @param {Phaser.Rectangle} b - The second Rectangle object. * @param {number} tolerance - A tolerance value to allow for an intersection test with padding, default to 0 -* @return {bool} A value of true if the specified object intersects with this Rectangle object; otherwise false. +* @return {boolean} A value of true if the specified object intersects with this Rectangle object; otherwise false. */ Phaser.Rectangle.intersects = function (a, b, tolerance) { @@ -657,7 +657,7 @@ Phaser.Rectangle.intersects = function (a, b, tolerance) { * @param {number} top - Description. * @param {number} bottom - Description. * @param {number} tolerance - A tolerance value to allow for an intersection test with padding, default to 0 -* @return {bool} A value of true if the specified object intersects with the Rectangle; otherwise false. +* @return {boolean} A value of true if the specified object intersects with the Rectangle; otherwise false. */ Phaser.Rectangle.intersectsRaw = function (a, left, right, top, bottom, tolerance) { diff --git a/src/input/Input.js b/src/input/Input.js index 9a1ec1ef8..4ac153f30 100644 --- a/src/input/Input.js +++ b/src/input/Input.js @@ -86,7 +86,7 @@ Phaser.Input.prototype = { /** * You can disable all Input by setting Input.disabled: true. While set all new input related events will be ignored. * If you need to disable just one type of input, for example mouse, use Input.mouse.disabled: true instead - * @property {bool} disabled + * @property {boolean} disabled * @default */ disabled: false, @@ -182,7 +182,7 @@ Phaser.Input.prototype = { * Sets if the Pointer objects should record a history of x/y coordinates they have passed through. * The history is cleared each time the Pointer is pressed down. * The history is updated at the rate specified in Input.pollRate - * @property {bool} recordPointerHistory + * @property {boolean} recordPointerHistory * @default **/ recordPointerHistory: false, @@ -446,7 +446,7 @@ Phaser.Input.prototype = { /** * Reset all of the Pointers and Input states * @method reset - * @param {bool} hard - A soft reset (hard = false) won't reset any signals that might be bound. A hard reset will. + * @param {boolean} hard - A soft reset (hard = false) won't reset any signals that might be bound. A hard reset will. **/ reset: function (hard) { @@ -597,7 +597,7 @@ Phaser.Input.prototype = { /** * Get the next Pointer object whos active property matches the given state * @method getPointer - * @param {bool} state - The state the Pointer should be in (false for inactive, true for active). + * @param {boolean} state - The state the Pointer should be in (false for inactive, true for active). * @return {Pointer} A Pointer object or null if no Pointer object matches the requested state. **/ getPointer: function (state) { diff --git a/src/input/InputHandler.js b/src/input/InputHandler.js index 4a55dc606..28cb6f034 100644 --- a/src/input/InputHandler.js +++ b/src/input/InputHandler.js @@ -25,7 +25,7 @@ Phaser.InputHandler = function (sprite) { this.sprite = sprite; /** - * @property {bool} enabled - Description. + * @property {boolean} enabled - Description. * @default */ this.enabled = false; @@ -68,31 +68,31 @@ Phaser.InputHandler = function (sprite) { this.priorityID = 0; /** - * @property {bool} useHandCursor - Description. + * @property {boolean} useHandCursor - Description. * @default */ this.useHandCursor = false; /** - * @property {bool} isDragged - Description. + * @property {boolean} isDragged - Description. * @default */ this.isDragged = false; /** - * @property {bool} allowHorizontalDrag - Description. + * @property {boolean} allowHorizontalDrag - Description. * @default */ this.allowHorizontalDrag = true; /** - * @property {bool} allowVerticalDrag - Description. + * @property {boolean} allowVerticalDrag - Description. * @default */ this.allowVerticalDrag = true; /** - * @property {bool} bringToTop - Description. + * @property {boolean} bringToTop - Description. * @default */ this.bringToTop = false; @@ -104,13 +104,13 @@ Phaser.InputHandler = function (sprite) { this.snapOffset = null; /** - * @property {bool} snapOnDrag - Description. + * @property {boolean} snapOnDrag - Description. * @default */ this.snapOnDrag = false; /** - * @property {bool} snapOnRelease - Description. + * @property {boolean} snapOnRelease - Description. * @default */ this.snapOnRelease = false; @@ -140,7 +140,7 @@ Phaser.InputHandler = function (sprite) { this.pixelPerfectAlpha = 255; /** - * @property {bool} draggable - Is this sprite allowed to be dragged by the mouse? true = yes, false = no + * @property {boolean} draggable - Is this sprite allowed to be dragged by the mouse? true = yes, false = no * @default */ this.draggable = false; @@ -160,7 +160,7 @@ Phaser.InputHandler = function (sprite) { /** * If this object is set to consume the pointer event then it will stop all propogation from this object on. * For example if you had a stack of 6 sprites with the same priority IDs and one consumed the event, none of the others would receive it. - * @property {bool} consumePointerEvent + * @property {boolean} consumePointerEvent * @default */ this.consumePointerEvent = false; @@ -197,7 +197,7 @@ Phaser.InputHandler.prototype = { * Description. * @method start * @param {number} priority - Description. - * @param {bool} useHandCursor - Description. + * @param {boolean} useHandCursor - Description. * @return {Phaser.Sprite} Description. */ start: function (priority, useHandCursor) { @@ -348,7 +348,7 @@ Phaser.InputHandler.prototype = { * If the Pointer is touching the touchscreen, or the mouse button is held down, isDown is set to true. * @method pointerDown * @param {Pointer} pointer - * @return {bool} + * @return {boolean} */ pointerDown: function (pointer) { @@ -362,7 +362,7 @@ Phaser.InputHandler.prototype = { * If the Pointer is not touching the touchscreen, or the mouse button is up, isUp is set to true * @method pointerUp * @param {Pointer} pointer - * @return {bool} + * @return {boolean} */ pointerUp: function (pointer) { @@ -418,7 +418,7 @@ Phaser.InputHandler.prototype = { * Is the Pointer outside of this Sprite? * @method pointerOut * @param {Pointer} pointer - * @return {bool} + * @return {boolean} */ pointerOut: function (pointer) { @@ -474,7 +474,7 @@ Phaser.InputHandler.prototype = { * Checks if the given pointer is over this Sprite. * @method checkPointerOver * @param {Pointer} pointer - * @return {bool} + * @return {boolean} */ checkPointerOver: function (pointer) { @@ -513,7 +513,7 @@ Phaser.InputHandler.prototype = { * @method checkPixel * @param {Description} x - Description. * @param {Description} y - Description. - * @return {bool} + * @return {boolean} */ checkPixel: function (x, y) { @@ -696,7 +696,7 @@ Phaser.InputHandler.prototype = { * Updates the Pointer drag on this Sprite. * @method updateDrag * @param {Pointer} pointer - * @return {bool} + * @return {boolean} */ updateDrag: function (pointer) { @@ -741,7 +741,7 @@ Phaser.InputHandler.prototype = { * @method justOver * @param {Pointer} pointer * @param {number} delay - The time below which the pointer is considered as just over. - * @return {bool} + * @return {boolean} */ justOver: function (pointer, delay) { @@ -757,7 +757,7 @@ Phaser.InputHandler.prototype = { * @method justOut * @param {Pointer} pointer * @param {number} delay - The time below which the pointer is considered as just out. - * @return {bool} + * @return {boolean} */ justOut: function (pointer, delay) { @@ -773,7 +773,7 @@ Phaser.InputHandler.prototype = { * @method justPressed * @param {Pointer} pointer * @param {number} delay - The time below which the pointer is considered as just over. - * @return {bool} + * @return {boolean} */ justPressed: function (pointer, delay) { @@ -789,7 +789,7 @@ Phaser.InputHandler.prototype = { * @method justReleased * @param {Pointer} pointer * @param {number} delay - The time below which the pointer is considered as just out. - * @return {bool} + * @return {boolean} */ justReleased: function (pointer, delay) { diff --git a/src/input/Key.js b/src/input/Key.js index 519b4e239..a94bf7d58 100644 --- a/src/input/Key.js +++ b/src/input/Key.js @@ -116,8 +116,8 @@ Phaser.Key.prototype = { }, /** - * @param {Number} [duration] - * @return {bool} + * @param {number} [duration] + * @return {boolean} */ justPressed: function (duration) { @@ -128,8 +128,8 @@ Phaser.Key.prototype = { }, /** - * @param {Number} [duration] - * @return {bool} + * @param {number} [duration] + * @return {boolean} */ justReleased: function (duration) { diff --git a/src/input/Keyboard.js b/src/input/Keyboard.js index e4ee231ef..a2c1289cc 100644 --- a/src/input/Keyboard.js +++ b/src/input/Keyboard.js @@ -58,7 +58,7 @@ Phaser.Keyboard.prototype = { /** * You can disable all Input by setting disabled = true. While set all new input related events will be ignored. * @default - * @property {bool} disabled + * @property {boolean} disabled */ disabled: false, @@ -284,7 +284,7 @@ Phaser.Keyboard.prototype = { * @method justPressed * @param {number} keycode * @param {number} [duration] - * @return {bool} + * @return {boolean} */ justPressed: function (keycode, duration) { @@ -304,7 +304,7 @@ Phaser.Keyboard.prototype = { * @method justReleased * @param {number} keycode * @param {number} [duration] - * @return {bool} + * @return {boolean} */ justReleased: function (keycode, duration) { @@ -323,7 +323,7 @@ Phaser.Keyboard.prototype = { * Description. * @method isDown * @param {number} keycode - * @return {bool} + * @return {boolean} */ isDown: function (keycode) { diff --git a/src/input/MSPointer.js b/src/input/MSPointer.js index 1016a098f..17f43d737 100644 --- a/src/input/MSPointer.js +++ b/src/input/MSPointer.js @@ -57,7 +57,7 @@ Phaser.MSPointer.prototype = { /** * You can disable all Input by setting disabled = true. While set all new input related events will be ignored. - * @property {bool} disabled + * @property {boolean} disabled */ disabled: false, diff --git a/src/input/Mouse.js b/src/input/Mouse.js index bf78e3c8a..f10080919 100644 --- a/src/input/Mouse.js +++ b/src/input/Mouse.js @@ -59,14 +59,14 @@ Phaser.Mouse.prototype = { /** * You can disable all Input by setting disabled = true. While set all new input related events will be ignored. - * @property {bool} disabled + * @property {boolean} disabled * @default */ disabled: false, /** * If the mouse has been Pointer Locked successfully this will be set to true. - * @property {bool} locked + * @property {boolean} locked * @default */ locked: false, diff --git a/src/input/Pointer.js b/src/input/Pointer.js index dc0b4785d..f753af483 100644 --- a/src/input/Pointer.js +++ b/src/input/Pointer.js @@ -18,7 +18,7 @@ Phaser.Pointer = function (game, id) { /** * Local private variable to store the status of dispatching a hold event. - * @property {bool} _holdSent + * @property {boolean} _holdSent * @private * @default */ @@ -41,7 +41,7 @@ Phaser.Pointer = function (game, id) { /** * Monitor events outside of a state reset loop. - * @property {bool} _stateReset + * @property {boolean} _stateReset * @private * @default */ @@ -71,7 +71,7 @@ Phaser.Pointer = function (game, id) { /** * Description. - * @property {bool} withinGame + * @property {boolean} withinGame */ this.withinGame = false; @@ -133,21 +133,21 @@ Phaser.Pointer = function (game, id) { /** * If the Pointer is a mouse this is true, otherwise false. - * @property {bool} isMouse - * @type {bool} + * @property {boolean} isMouse + * @type {boolean} */ this.isMouse = false; /** * If the Pointer is touching the touchscreen, or the mouse button is held down, isDown is set to true. - * @property {bool} isDown + * @property {boolean} isDown * @default */ this.isDown = false; /** * If the Pointer is not touching the touchscreen, or the mouse button is up, isUp is set to true. - * @property {bool} isUp + * @property {boolean} isUp * @default */ this.isUp = true; @@ -206,7 +206,7 @@ Phaser.Pointer = function (game, id) { /** * Description. - * @property {bool} isDown - Description. + * @property {boolean} isDown - Description. * @default */ this.active = false; @@ -575,7 +575,7 @@ Phaser.Pointer.prototype = { * The Pointer is considered justPressed if the time it was pressed onto the touchscreen or clicked is less than justPressedRate. * @method justPressed * @param {number} [duration] - * @return {bool} + * @return {boolean} */ justPressed: function (duration) { @@ -589,7 +589,7 @@ Phaser.Pointer.prototype = { * The Pointer is considered justReleased if the time it left the touchscreen is less than justReleasedRate. * @method justReleased * @param {number} [duration] - * @return {bool} + * @return {boolean} */ justReleased: function (duration) { diff --git a/src/input/Touch.js b/src/input/Touch.js index b680fc890..6d4e6c272 100644 --- a/src/input/Touch.js +++ b/src/input/Touch.js @@ -67,7 +67,7 @@ Phaser.Touch = function (game) { this.touchCancelCallback = null; /** - * @property {bool} preventDefault - Description. + * @property {boolean} preventDefault - Description. * @default */ this.preventDefault = true; @@ -81,7 +81,7 @@ Phaser.Touch.prototype = { /** * You can disable all Input by setting disabled = true. While set all new input related events will be ignored. * @method disabled - * @return {bool} + * @return {boolean} */ disabled: false, diff --git a/src/loader/Cache.js b/src/loader/Cache.js index 5998b59d2..6e736c406 100644 --- a/src/loader/Cache.js +++ b/src/loader/Cache.js @@ -336,7 +336,7 @@ Phaser.Cache.prototype = { /** * Checks if an image key exists. * @param {string} key - Asset key of the image you want. - * @return {bool} True if the key exists, otherwise false. + * @return {boolean} True if the key exists, otherwise false. */ checkImageKey: function (key) { diff --git a/src/loader/Loader.js b/src/loader/Loader.js index b4364d0e2..630ef4843 100644 --- a/src/loader/Loader.js +++ b/src/loader/Loader.js @@ -54,13 +54,13 @@ Phaser.Loader = function (game) { this.queueSize = 0; /** - * @property {bool} isLoading - True if the Loader is in the process of loading the queue. + * @property {boolean} isLoading - True if the Loader is in the process of loading the queue. * @default */ this.isLoading = false; /** - * @property {bool} hasLoaded - True if all assets in the queue have finished loading. + * @property {boolean} hasLoaded - True if all assets in the queue have finished loading. * @default */ this.hasLoaded = false; @@ -155,7 +155,7 @@ Phaser.Loader.prototype = { * Check whether asset exists with a specific key. * @method checkKeyExists * @param {string} key - Key of the asset you want to check. - * @return {bool} Return true if exists, otherwise return false. + * @return {boolean} Return true if exists, otherwise return false. */ checkKeyExists: function (key) { @@ -240,7 +240,7 @@ Phaser.Loader.prototype = { * @method text * @param {string} key - Unique asset key of the text file. * @param {string} url - URL of the text file. - * @param {bool} overwrite - True if Description. + * @param {boolean} overwrite - True if Description. */ text: function (key, url, overwrite) { @@ -278,7 +278,7 @@ Phaser.Loader.prototype = { * @method audio * @param {string} key - Unique asset key of the audio file. * @param {Array} urls - An array containing the URLs of the audio files, i.e.: [ 'jump.mp3', 'jump.ogg', 'jump.m4a' ]. - * @param {bool} autoDecode - When using Web Audio the audio files can either be decoded at load time or run-time. They can't be played until they are decoded, but this let's you control when that happens. Decoding is a non-blocking async process. + * @param {boolean} autoDecode - When using Web Audio the audio files can either be decoded at load time or run-time. They can't be played until they are decoded, but this let's you control when that happens. Decoding is a non-blocking async process. */ audio: function (key, urls, autoDecode) { @@ -978,7 +978,7 @@ Phaser.Loader.prototype = { /** * Handle loading next file. * @param previousKey {string} Key of previous loaded asset. - * @param success {bool} Whether the previous asset loaded successfully or not. + * @param success {boolean} Whether the previous asset loaded successfully or not. */ nextFile: function (previousKey, success) { diff --git a/src/math/Math.js b/src/math/Math.js index 209131915..f9b3298aa 100644 --- a/src/math/Math.js +++ b/src/math/Math.js @@ -25,7 +25,7 @@ Phaser.Math = { * @param {number} a * @param {number} b * @param {number} epsilon - * @return {bool} True if |a-b|<ε + * @return {boolean} True if |a-b|<ε */ fuzzyEqual: function (a, b, epsilon) { if (typeof epsilon === "undefined") { epsilon = 0.0001; } @@ -38,7 +38,7 @@ Phaser.Math = { * @param {number} a * @param {number} b * @param {number} epsilon - * @return {bool} True if ab+ε + * @return {boolean} True if a>b+ε */ fuzzyGreaterThan: function (a, b, epsilon) { if (typeof epsilon === "undefined") { epsilon = 0.0001; } @@ -62,7 +62,7 @@ Phaser.Math = { * @method fuzzyCeil * @param {number} val * @param {number} epsilon - * @return {bool} ceiling(val-ε) + * @return {boolean} ceiling(val-ε) */ fuzzyCeil: function (val, epsilon) { if (typeof epsilon === "undefined") { epsilon = 0.0001; } @@ -73,7 +73,7 @@ Phaser.Math = { * @method fuzzyFloor * @param {number} val * @param {number} epsilon - * @return {bool} floor(val-ε) + * @return {boolean} floor(val-ε) */ fuzzyFloor: function (val, epsilon) { if (typeof epsilon === "undefined") { epsilon = 0.0001; } @@ -198,7 +198,7 @@ Phaser.Math = { * @method * @param {number} input * @param {array} arr - * @param {bool} sort - True if the array needs to be sorted. + * @param {boolean} sort - True if the array needs to be sorted. */ snapToInArray: function (input, arr, sort) { @@ -332,7 +332,7 @@ Phaser.Math = { * Set an angle within the bounds of -π toπ. * @method normalizeAngle * @param {number} angle - * @param {bool} radians - True if angle size is expressed in radians. + * @param {boolean} radians - True if angle size is expressed in radians. */ normalizeAngle: function (angle, radians) { @@ -349,7 +349,7 @@ Phaser.Math = { * @method nearestAngleBetween * @param {number} a1 * @param {number} a2 - * @param {bool} radians - True if angle sizes are expressed in radians. + * @param {boolean} radians - True if angle sizes are expressed in radians. */ nearestAngleBetween: function (a1, a2, radians) { @@ -379,7 +379,7 @@ Phaser.Math = { * @param {number} a1 - Description. * @param {number} a2 - Description. * @param {number} weight - Description. - * @param {bool} radians - True if angle sizes are expressed in radians. + * @param {boolean} radians - True if angle sizes are expressed in radians. * @param {Description} ease - Description. */ interpolateAngles: function (a1, a2, weight, radians, ease) { @@ -402,7 +402,7 @@ Phaser.Math = { *

* @method chanceRoll * @param {number} chance - The chance of receiving the value. A number between 0 and 100 (effectively 0% to 100%). - * @return {bool} True if the roll passed, or false otherwise. + * @return {boolean} True if the roll passed, or false otherwise. */ chanceRoll: function (chance) { @@ -557,7 +557,7 @@ Phaser.Math = { * * @method isOdd * @param {number} n - The number to check. - * @return {bool} True if the given number is odd. False if the given number is even. + * @return {boolean} True if the given number is odd. False if the given number is even. */ isOdd: function (n) { @@ -570,7 +570,7 @@ Phaser.Math = { * * @method isEven * @param {number} n - The number to check. - * @return {bool} True if the given number is even. False if the given number is odd. + * @return {boolean} True if the given number is even. False if the given number is odd. */ isEven: function (n) { diff --git a/src/particles/arcade/Emitter.js b/src/particles/arcade/Emitter.js index 207c56c30..8dbbeb4e8 100644 --- a/src/particles/arcade/Emitter.js +++ b/src/particles/arcade/Emitter.js @@ -136,7 +136,7 @@ Phaser.Particles.Arcade.Emitter = function (game, x, y, maxParticles) { /** * How often a particle is emitted in ms (if emitter is started with Explode == false). - * @property {bool} frequency + * @property {boolean} frequency * @default */ this.frequency = 100; @@ -187,7 +187,7 @@ Phaser.Particles.Arcade.Emitter = function (game, x, y, maxParticles) { /** * Internal helper for the style of particle emission (all at once, or one at a time). - * @property {bool} _explode + * @property {boolean} _explode * @private * @default */ @@ -196,14 +196,14 @@ Phaser.Particles.Arcade.Emitter = function (game, x, y, maxParticles) { /** * Determines whether the emitter is currently emitting particles. * It is totally safe to directly toggle this. - * @property {bool} on + * @property {boolean} on * @default */ this.on = false; /** * Determines whether the emitter is being updated by the core game loop. - * @property {bool} exists + * @property {boolean} exists * @default */ this.exists = true; @@ -212,7 +212,7 @@ Phaser.Particles.Arcade.Emitter = function (game, x, y, maxParticles) { * The point the particles are emitted from. * Emitter.x and Emitter.y control the containers location, which updates all current particles * Emitter.emitX and Emitter.emitY control the emission location relative to the x/y position. - * @property {bool} emitX + * @property {boolean} emitX */ this.emitX = x; @@ -220,7 +220,7 @@ Phaser.Particles.Arcade.Emitter = function (game, x, y, maxParticles) { * The point the particles are emitted from. * Emitter.x and Emitter.y control the containers location, which updates all current particles * Emitter.emitX and Emitter.emitY control the emission location relative to the x/y position. - * @property {bool} emitY + * @property {boolean} emitY */ this.emitY = y; @@ -281,7 +281,7 @@ Phaser.Particles.Arcade.Emitter.prototype.update = function () { * @param {number} frames - Description. * @param {number} quantity - The number of particles to generate when using the "create from image" option. * @param {number} collide - Description. - * @param {bool} collideWorldBounds - Description. + * @param {boolean} collideWorldBounds - Description. * @return This Emitter instance (nice for chaining stuff together, if you're into that). */ Phaser.Particles.Arcade.Emitter.prototype.makeParticles = function (keys, frames, quantity, collide, collideWorldBounds) { @@ -582,10 +582,10 @@ Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype, "alpha", { /** * Get the emitter visible state. -* @return {bool} +* @return {boolean} *//** * Set the emitter visible state. -* @param {bool} value - Description +* @param {boolean} value - Description */ Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype, "visible", { @@ -601,10 +601,10 @@ Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype, "visible", { /** * Get -* @return {bool} +* @return {boolean} *//** * Set -* @param {bool} value - Description +* @param {boolean} value - Description */ Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype, "x", { @@ -620,10 +620,10 @@ Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype, "x", { /** * Get -* @return {bool} +* @return {boolean} *//** * Set -* @param {bool} value - Description +* @param {boolean} value - Description */ Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype, "y", { diff --git a/src/physics/arcade/Body.js b/src/physics/arcade/Body.js index 06ae389eb..dbd6b8196 100644 --- a/src/physics/arcade/Body.js +++ b/src/physics/arcade/Body.js @@ -255,7 +255,7 @@ Object.defineProperty(Phaser.Physics.Arcade.Body.prototype, "bottom", { /** * The sum of the y and height properties. Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property. * @method bottom - * @return {Number} + * @return {number} **/ get: function () { return this.y + this.height; @@ -264,7 +264,7 @@ Object.defineProperty(Phaser.Physics.Arcade.Body.prototype, "bottom", { /** * The sum of the y and height properties. Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property. * @method bottom - * @param {Number} value + * @param {number} value **/ set: function (value) { @@ -287,7 +287,7 @@ Object.defineProperty(Phaser.Physics.Arcade.Body.prototype, "right", { * The sum of the x and width properties. Changing the right property of a Rectangle object has no effect on the x, y and height properties. * However it does affect the width property. * @method right - * @return {Number} + * @return {number} **/ get: function () { return this.x + this.width; @@ -297,7 +297,7 @@ Object.defineProperty(Phaser.Physics.Arcade.Body.prototype, "right", { * The sum of the x and width properties. Changing the right property of a Rectangle object has no effect on the x, y and height properties. * However it does affect the width property. * @method right - * @param {Number} value + * @param {number} value **/ set: function (value) { diff --git a/src/pixi/core/Circle.js b/src/pixi/core/Circle.js index a9ceed021..e36abe743 100644 --- a/src/pixi/core/Circle.js +++ b/src/pixi/core/Circle.js @@ -7,9 +7,9 @@ * * @class Circle * @constructor - * @param x {Number} The X coord of the upper-left corner of the framing rectangle of this circle - * @param y {Number} The Y coord of the upper-left corner of the framing rectangle of this circle - * @param radius {Number} The radius of the circle + * @param x {number} The X coord of the upper-left corner of the framing rectangle of this circle + * @param y {number} The Y coord of the upper-left corner of the framing rectangle of this circle + * @param radius {number} The radius of the circle */ PIXI.Circle = function(x, y, radius) { @@ -50,8 +50,8 @@ PIXI.Circle.prototype.clone = function() * Checks if the x, and y coords passed to this function are contained within this circle * * @method contains - * @param x {Number} The X coord of the point to test - * @param y {Number} The Y coord of the point to test + * @param x {number} The X coord of the point to test + * @param y {number} The Y coord of the point to test * @return {Boolean} if the x/y coords are within this polygon */ PIXI.Circle.prototype.contains = function(x, y) diff --git a/src/pixi/core/Ellipse.js b/src/pixi/core/Ellipse.js index dd369daad..27428d399 100644 --- a/src/pixi/core/Ellipse.js +++ b/src/pixi/core/Ellipse.js @@ -7,10 +7,10 @@ * * @class Ellipse * @constructor - * @param x {Number} The X coord of the upper-left corner of the framing rectangle of this ellipse - * @param y {Number} The Y coord of the upper-left corner of the framing rectangle of this ellipse - * @param width {Number} The overall height of this ellipse - * @param height {Number} The overall width of this ellipse + * @param x {number} The X coord of the upper-left corner of the framing rectangle of this ellipse + * @param y {number} The Y coord of the upper-left corner of the framing rectangle of this ellipse + * @param width {number} The overall height of this ellipse + * @param height {number} The overall width of this ellipse */ PIXI.Ellipse = function(x, y, width, height) { @@ -58,8 +58,8 @@ PIXI.Ellipse.prototype.clone = function() * Checks if the x, and y coords passed to this function are contained within this ellipse * * @method contains - * @param x {Number} The X coord of the point to test - * @param y {Number} The Y coord of the point to test + * @param x {number} The X coord of the point to test + * @param y {number} The Y coord of the point to test * @return {Boolean} if the x/y coords are within this ellipse */ PIXI.Ellipse.prototype.contains = function(x, y) diff --git a/src/pixi/core/Point.js b/src/pixi/core/Point.js index 85208615f..d68175aa7 100644 --- a/src/pixi/core/Point.js +++ b/src/pixi/core/Point.js @@ -7,8 +7,8 @@ * * @class Point * @constructor - * @param x {Number} position of the point - * @param y {Number} position of the point + * @param x {number} position of the point + * @param y {number} position of the point */ PIXI.Point = function(x, y) { diff --git a/src/pixi/core/Polygon.js b/src/pixi/core/Polygon.js index 47cf17bcd..e40f13aa4 100644 --- a/src/pixi/core/Polygon.js +++ b/src/pixi/core/Polygon.js @@ -52,8 +52,8 @@ PIXI.Polygon.prototype.clone = function() * Checks if the x, and y coords passed to this function are contained within this polygon * * @method contains - * @param x {Number} The X coord of the point to test - * @param y {Number} The Y coord of the point to test + * @param x {number} The X coord of the point to test + * @param y {number} The Y coord of the point to test * @return {Boolean} if the x/y coords are within this polygon */ PIXI.Polygon.prototype.contains = function(x, y) diff --git a/src/pixi/core/Rectangle.js b/src/pixi/core/Rectangle.js index 57484175b..7a7ba0862 100644 --- a/src/pixi/core/Rectangle.js +++ b/src/pixi/core/Rectangle.js @@ -7,10 +7,10 @@ * * @class Rectangle * @constructor - * @param x {Number} The X coord of the upper-left corner of the rectangle - * @param y {Number} The Y coord of the upper-left corner of the rectangle - * @param width {Number} The overall wisth of this rectangle - * @param height {Number} The overall height of this rectangle + * @param x {number} The X coord of the upper-left corner of the rectangle + * @param y {number} The Y coord of the upper-left corner of the rectangle + * @param width {number} The overall wisth of this rectangle + * @param height {number} The overall height of this rectangle */ PIXI.Rectangle = function(x, y, width, height) { @@ -58,8 +58,8 @@ PIXI.Rectangle.prototype.clone = function() * Checks if the x, and y coords passed to this function are contained within this Rectangle * * @method contains - * @param x {Number} The X coord of the point to test - * @param y {Number} The Y coord of the point to test + * @param x {number} The X coord of the point to test + * @param y {number} The Y coord of the point to test * @return {Boolean} if the x/y coords are within this Rectangle */ PIXI.Rectangle.prototype.contains = function(x, y) diff --git a/src/pixi/display/DisplayObjectContainer.js b/src/pixi/display/DisplayObjectContainer.js index 01b566d24..438912966 100644 --- a/src/pixi/display/DisplayObjectContainer.js +++ b/src/pixi/display/DisplayObjectContainer.js @@ -134,7 +134,7 @@ PIXI.DisplayObjectContainer.prototype.addChild = function(child) * * @method addChildAt * @param child {DisplayObject} The child to add - * @param index {Number} The index to place the child in + * @param index {number} The index to place the child in */ PIXI.DisplayObjectContainer.prototype.addChildAt = function(child, index) { @@ -269,7 +269,7 @@ PIXI.DisplayObjectContainer.prototype.swapChildren = function(child, child2) * Returns the Child at the specified index * * @method getChildAt - * @param index {Number} The index to get the child from + * @param index {number} The index to get the child from */ PIXI.DisplayObjectContainer.prototype.getChildAt = function(index) { diff --git a/src/pixi/display/MovieClip.js b/src/pixi/display/MovieClip.js index 40a0a182f..5f9840783 100644 --- a/src/pixi/display/MovieClip.js +++ b/src/pixi/display/MovieClip.js @@ -96,7 +96,7 @@ PIXI.MovieClip.prototype.play = function() * Stops the MovieClip and goes to a specific frame * * @method gotoAndStop - * @param frameNumber {Number} frame index to stop at + * @param frameNumber {number} frame index to stop at */ PIXI.MovieClip.prototype.gotoAndStop = function(frameNumber) { @@ -110,7 +110,7 @@ PIXI.MovieClip.prototype.gotoAndStop = function(frameNumber) * Goes to a specific frame and begins playing the MovieClip * * @method gotoAndPlay - * @param frameNumber {Number} frame index to start at + * @param frameNumber {number} frame index to start at */ PIXI.MovieClip.prototype.gotoAndPlay = function(frameNumber) { diff --git a/src/pixi/display/Stage.js b/src/pixi/display/Stage.js index ca76d9e36..02830cfe3 100644 --- a/src/pixi/display/Stage.js +++ b/src/pixi/display/Stage.js @@ -8,7 +8,7 @@ * @class Stage * @extends DisplayObjectContainer * @constructor - * @param backgroundColor {Number} the background color of the stage, easiest way to pass this in is in hex format + * @param backgroundColor {number} the background color of the stage, easiest way to pass this in is in hex format * like: 0xFFFFFF for white * @param interactive {Boolean} enable / disable interaction (default is false) */ @@ -99,7 +99,7 @@ PIXI.Stage.prototype.updateTransform = function() * Sets the background color for the stage * * @method setBackgroundColor - * @param backgroundColor {Number} the color of the background, easiest way to pass this in is in hex format + * @param backgroundColor {number} the color of the background, easiest way to pass this in is in hex format * like: 0xFFFFFF for white */ PIXI.Stage.prototype.setBackgroundColor = function(backgroundColor) diff --git a/src/pixi/extras/TilingSprite.js b/src/pixi/extras/TilingSprite.js index 2cb17faec..f52465c7d 100644 --- a/src/pixi/extras/TilingSprite.js +++ b/src/pixi/extras/TilingSprite.js @@ -9,8 +9,8 @@ * @extends DisplayObjectContainer * @constructor * @param texture {Texture} the texture of the tiling sprite - * @param width {Number} the width of the tiling sprite - * @param height {Number} the height of the tiling sprite + * @param width {number} the width of the tiling sprite + * @param height {number} the height of the tiling sprite */ PIXI.TilingSprite = function(texture, width, height) { diff --git a/src/pixi/primitives/Graphics.js b/src/pixi/primitives/Graphics.js index cd599fa87..a73838c23 100644 --- a/src/pixi/primitives/Graphics.js +++ b/src/pixi/primitives/Graphics.js @@ -69,9 +69,9 @@ PIXI.Graphics.prototype.constructor = PIXI.Graphics; * Specifies a line style used for subsequent calls to Graphics methods such as the lineTo() method or the drawCircle() method. * * @method lineStyle - * @param lineWidth {Number} width of the line to draw, will update the object's stored style - * @param color {Number} color of the line to draw, will update the object's stored style - * @param alpha {Number} alpha of the line to draw, will update the object's stored style + * @param lineWidth {number} width of the line to draw, will update the object's stored style + * @param color {number} color of the line to draw, will update the object's stored style + * @param alpha {number} alpha of the line to draw, will update the object's stored style */ PIXI.Graphics.prototype.lineStyle = function(lineWidth, color, alpha) { @@ -91,8 +91,8 @@ PIXI.Graphics.prototype.lineStyle = function(lineWidth, color, alpha) * Moves the current drawing position to (x, y). * * @method moveTo - * @param x {Number} the X coord to move to - * @param y {Number} the Y coord to move to + * @param x {number} the X coord to move to + * @param y {number} the Y coord to move to */ PIXI.Graphics.prototype.moveTo = function(x, y) { @@ -111,8 +111,8 @@ PIXI.Graphics.prototype.moveTo = function(x, y) * the current drawing position is then set to (x, y). * * @method lineTo - * @param x {Number} the X coord to draw to - * @param y {Number} the Y coord to draw to + * @param x {number} the X coord to draw to + * @param y {number} the Y coord to draw to */ PIXI.Graphics.prototype.lineTo = function(x, y) { @@ -126,7 +126,7 @@ PIXI.Graphics.prototype.lineTo = function(x, y) * * @method beginFill * @param color {uint} the color of the fill - * @param alpha {Number} the alpha + * @param alpha {number} the alpha */ PIXI.Graphics.prototype.beginFill = function(color, alpha) { @@ -150,10 +150,10 @@ PIXI.Graphics.prototype.endFill = function() /** * @method drawRect * - * @param x {Number} The X coord of the top-left of the rectangle - * @param y {Number} The Y coord of the top-left of the rectangle - * @param width {Number} The width of the rectangle - * @param height {Number} The height of the rectangle + * @param x {number} The X coord of the top-left of the rectangle + * @param y {number} The Y coord of the top-left of the rectangle + * @param width {number} The width of the rectangle + * @param height {number} The height of the rectangle */ PIXI.Graphics.prototype.drawRect = function( x, y, width, height ) { @@ -171,9 +171,9 @@ PIXI.Graphics.prototype.drawRect = function( x, y, width, height ) * Draws a circle. * * @method drawCircle - * @param x {Number} The X coord of the center of the circle - * @param y {Number} The Y coord of the center of the circle - * @param radius {Number} The radius of the circle + * @param x {number} The X coord of the center of the circle + * @param y {number} The Y coord of the center of the circle + * @param radius {number} The radius of the circle */ PIXI.Graphics.prototype.drawCircle = function( x, y, radius) { @@ -191,10 +191,10 @@ PIXI.Graphics.prototype.drawCircle = function( x, y, radius) * Draws an elipse. * * @method drawElipse - * @param x {Number} - * @param y {Number} - * @param width {Number} - * @param height {Number} + * @param x {number} + * @param y {number} + * @param width {number} + * @param height {number} */ PIXI.Graphics.prototype.drawElipse = function( x, y, width, height) { diff --git a/src/pixi/renderers/canvas/CanvasRenderer.js b/src/pixi/renderers/canvas/CanvasRenderer.js index 45cc80dfa..8dbb62568 100644 --- a/src/pixi/renderers/canvas/CanvasRenderer.js +++ b/src/pixi/renderers/canvas/CanvasRenderer.js @@ -9,8 +9,8 @@ * * @class CanvasRenderer * @constructor - * @param width=0 {Number} the width of the canvas view - * @param height=0 {Number} the height of the canvas view + * @param width=0 {number} the width of the canvas view + * @param height=0 {number} the height of the canvas view * @param view {Canvas} the canvas to use as a view, optional * @param transparent=false {Boolean} the transparency of the render view, default false */ @@ -114,8 +114,8 @@ PIXI.CanvasRenderer.prototype.render = function(stage) * resizes the canvas view to the specified width and height * * @method resize - * @param width {Number} the new width of the canvas view - * @param height {Number} the new height of the canvas view + * @param width {number} the new width of the canvas view + * @param height {number} the new height of the canvas view */ PIXI.CanvasRenderer.prototype.resize = function(width, height) { diff --git a/src/pixi/renderers/webgl/WebGLRenderer.js b/src/pixi/renderers/webgl/WebGLRenderer.js index f05c162ea..e192cfb7a 100644 --- a/src/pixi/renderers/webgl/WebGLRenderer.js +++ b/src/pixi/renderers/webgl/WebGLRenderer.js @@ -16,8 +16,8 @@ PIXI.gl; * * @class WebGLRenderer * @constructor - * @param width=0 {Number} the width of the canvas view - * @param height=0 {Number} the height of the canvas view + * @param width=0 {number} the width of the canvas view + * @param height=0 {number} the height of the canvas view * @param view {Canvas} the canvas to use as a view, optional * @param transparent=false {Boolean} the transparency of the render view, default false * @param antialias=false {Boolean} sets antialias (only applicable in chrome at the moment) @@ -277,8 +277,8 @@ PIXI.WebGLRenderer.destroyTexture = function(texture) * resizes the webGL view to the specified width and height * * @method resize - * @param width {Number} the new width of the webGL view - * @param height {Number} the new height of the webGL view + * @param width {number} the new width of the webGL view + * @param height {number} the new height of the webGL view */ PIXI.WebGLRenderer.prototype.resize = function(width, height) { diff --git a/src/pixi/text/Text.js b/src/pixi/text/Text.js index 0b1362186..aaf6a4319 100644 --- a/src/pixi/text/Text.js +++ b/src/pixi/text/Text.js @@ -14,9 +14,9 @@ * @param [style.fill="black"] {Object} A canvas fillstyle that will be used on the text eg "red", "#00FF00" * @param [style.align="left"] {String} An alignment of the multiline text ("left", "center" or "right") * @param [style.stroke] {String} A canvas fillstyle that will be used on the text stroke eg "blue", "#FCFF00" - * @param [style.strokeThickness=0] {Number} A number that represents the thickness of the stroke. Default is 0 (no stroke) + * @param [style.strokeThickness=0] {number} A number that represents the thickness of the stroke. Default is 0 (no stroke) * @param [style.wordWrap=false] {Boolean} Indicates if word wrap should be used - * @param [style.wordWrapWidth=100] {Number} The width at which text will wrap + * @param [style.wordWrapWidth=100] {number} The width at which text will wrap */ PIXI.Text = function(text, style) { @@ -44,9 +44,9 @@ PIXI.Text.prototype.constructor = PIXI.Text; * @param [style.fill="black"] {Object} A canvas fillstyle that will be used on the text eg "red", "#00FF00" * @param [style.align="left"] {String} An alignment of the multiline text ("left", "center" or "right") * @param [style.stroke="black"] {String} A canvas fillstyle that will be used on the text stroke eg "blue", "#FCFF00" - * @param [style.strokeThickness=0] {Number} A number that represents the thickness of the stroke. Default is 0 (no stroke) + * @param [style.strokeThickness=0] {number} A number that represents the thickness of the stroke. Default is 0 (no stroke) * @param [style.wordWrap=false] {Boolean} Indicates if word wrap should be used - * @param [style.wordWrapWidth=100] {Number} The width at which text will wrap + * @param [style.wordWrapWidth=100] {number} The width at which text will wrap */ PIXI.Text.prototype.setStyle = function(style) { diff --git a/src/pixi/textures/RenderTexture.js b/src/pixi/textures/RenderTexture.js index 25b2cfe14..788fc8efe 100644 --- a/src/pixi/textures/RenderTexture.js +++ b/src/pixi/textures/RenderTexture.js @@ -27,8 +27,8 @@ @class RenderTexture @extends Texture @constructor - @param width {Number} The width of the render texture - @param height {Number} The height of the render texture + @param width {number} The width of the render texture + @param height {number} The height of the render texture */ PIXI.RenderTexture = function(width, height) { diff --git a/src/pixi/utils/Detector.js b/src/pixi/utils/Detector.js index d04a5687b..f32562565 100644 --- a/src/pixi/utils/Detector.js +++ b/src/pixi/utils/Detector.js @@ -9,8 +9,8 @@ * * @method autoDetectRenderer * @static - * @param width {Number} the width of the renderers view - * @param height {Number} the height of the renderers view + * @param width {number} the width of the renderers view + * @param height {number} the height of the renderers view * @param view {Canvas} the canvas to use as a view, optional * @param transparent=false {Boolean} the transparency of the render view, default false * @param antialias=false {Boolean} sets antialias (only applicable in webGL chrome at the moment) diff --git a/src/pixi/utils/Utils.js b/src/pixi/utils/Utils.js index 9534c8393..4299583de 100644 --- a/src/pixi/utils/Utils.js +++ b/src/pixi/utils/Utils.js @@ -44,7 +44,7 @@ window.requestAnimFrame = window.requestAnimationFrame; * Converts a hex color number to an [R, G, B] array * * @method HEXtoRGB - * @param hex {Number} + * @param hex {number} */ function HEXtoRGB(hex) { return [(hex >> 16 & 0xFF) / 255, ( hex >> 8 & 0xFF) / 255, (hex & 0xFF)/ 255]; diff --git a/src/sound/Sound.js b/src/sound/Sound.js index 11c0998f0..aa8a59334 100644 --- a/src/sound/Sound.js +++ b/src/sound/Sound.js @@ -15,7 +15,7 @@ * @param {Phaser.Game} game - Reference to the current game instance. * @param {string} key - Asset key for the sound. * @param {number} volume - Default value for the volume. -* @param {bool} loop - Whether or not the sound will loop. +* @param {boolean} loop - Whether or not the sound will loop. */ Phaser.Sound = function (game, key, volume, loop) { @@ -43,7 +43,7 @@ Phaser.Sound = function (game, key, volume, loop) { /** * Whether or not the sound will loop. - * @property {bool} loop + * @property {boolean} loop */ this.loop = loop; @@ -77,7 +77,7 @@ Phaser.Sound = function (game, key, volume, loop) { /** * Boolean indicating whether the game is on "mute". - * @property {bool} _muted + * @property {boolean} _muted * @private * @default */ @@ -85,7 +85,7 @@ Phaser.Sound = function (game, key, volume, loop) { /** * Boolean indicating whether the sound should start automatically. - * @property {bool} autoplay + * @property {boolean} autoplay * @private */ this.autoplay = false; @@ -127,14 +127,14 @@ Phaser.Sound = function (game, key, volume, loop) { /** * Description. - * @property {bool} paused + * @property {boolean} paused * @default */ this.paused = false; /** * Description. - * @property {bool} isPlaying + * @property {boolean} isPlaying * @default */ this.isPlaying = false; @@ -148,21 +148,21 @@ Phaser.Sound = function (game, key, volume, loop) { /** * Description. - * @property {bool} pendingPlayback + * @property {boolean} pendingPlayback * @default */ this.pendingPlayback = false; /** * Description. - * @property {bool} override + * @property {boolean} override * @default */ this.override = false; /** * Description. - * @property {bool} usingWebAudio + * @property {boolean} usingWebAudio */ this.usingWebAudio = this.game.sound.usingWebAudio; @@ -396,7 +396,7 @@ Phaser.Sound.prototype = { * @param {string} marker - Assets key of the sound you want to play. * @param {number} position - The starting position. * @param {number} [volume] - Volume of the sound you want to play. - * @param {bool} [loop] - Loop when it finished playing? (Default to false) + * @param {boolean} [loop] - Loop when it finished playing? (Default to false) * @param {Description} forceRestart - Description. * @return {Sound} The playing sound object. */ @@ -593,7 +593,7 @@ Phaser.Sound.prototype = { * @param {string} marker - Assets key of the sound you want to play. * @param {number} position - The starting position. * @param {number} [volume] - Volume of the sound you want to play. - * @param {bool} [loop] - Loop when it finished playing? (Default to false) + * @param {boolean} [loop] - Loop when it finished playing? (Default to false) */ restart: function (marker, position, volume, loop) { @@ -691,7 +691,7 @@ Phaser.Sound.prototype = { /** * Get -* @return {bool} Description. +* @return {boolean} Description. */ Object.defineProperty(Phaser.Sound.prototype, "isDecoding", { @@ -703,7 +703,7 @@ Object.defineProperty(Phaser.Sound.prototype, "isDecoding", { /** * Get -* @return {bool} Description. +* @return {boolean} Description. */ Object.defineProperty(Phaser.Sound.prototype, "isDecoded", { @@ -715,10 +715,10 @@ Object.defineProperty(Phaser.Sound.prototype, "isDecoded", { /** * Get -* @return {bool} Whether or not the sound is muted. +* @return {boolean} Whether or not the sound is muted. *//** * Mutes sound. -* @param {bool} value - Whether or not the sound is muted. +* @param {boolean} value - Whether or not the sound is muted. */ Object.defineProperty(Phaser.Sound.prototype, "mute", { diff --git a/src/sound/SoundManager.js b/src/sound/SoundManager.js index 8bd8c3759..a1c0bc362 100644 --- a/src/sound/SoundManager.js +++ b/src/sound/SoundManager.js @@ -27,7 +27,7 @@ Phaser.SoundManager = function (game) { this.onSoundDecode = new Phaser.Signal; /** - * @property {bool} _muted - Description. + * @property {boolean} _muted - Description. * @private * @default */ @@ -61,25 +61,25 @@ Phaser.SoundManager = function (game) { this.context = null; /** - * @property {bool} usingWebAudio - Description. + * @property {boolean} usingWebAudio - Description. * @default */ this.usingWebAudio = true; /** - * @property {bool} usingAudioTag - Description. + * @property {boolean} usingAudioTag - Description. * @default */ this.usingAudioTag = false; /** - * @property {bool} noAudio - Description. + * @property {boolean} noAudio - Description. * @default */ this.noAudio = false; /** - * @property {bool} touchLocked - Description. + * @property {boolean} touchLocked - Description. * @default */ this.touchLocked = false; @@ -323,7 +323,7 @@ Phaser.SoundManager.prototype = { * @method add * @param {string} key - Asset key for the sound. * @param {number} volume - Default value for the volume. - * @param {bool} loop - Whether or not the sound will loop. + * @param {boolean} loop - Whether or not the sound will loop. */ add: function (key, volume, loop) { @@ -344,10 +344,10 @@ Phaser.SoundManager.prototype = { /** * A global audio mute toggle. -* @return {bool} Whether or not the game is on "mute". +* @return {boolean} Whether or not the game is on "mute". *//** * Mute sounds. -* @param {bool} value - Whether or not the game is on "mute" +* @param {boolean} value - Whether or not the game is on "mute" */ Object.defineProperty(Phaser.SoundManager.prototype, "mute", { diff --git a/src/system/Canvas.js b/src/system/Canvas.js index 4b1fd255e..80b887790 100644 --- a/src/system/Canvas.js +++ b/src/system/Canvas.js @@ -127,7 +127,7 @@ Phaser.Canvas = { * @method addToDOM * @param {HTMLCanvasElement} canvas - The canvas to set the touch action on. * @param {string} parent - The DOM element to add the canvas to. Defaults to ''. - * @param {bool} overflowHidden - If set to true it will add the overflow='hidden' style to the parent DOM element. + * @param {boolean} overflowHidden - If set to true it will add the overflow='hidden' style to the parent DOM element. * @return {HTMLCanvasElement} Returns the source canvas. */ addToDOM: function (canvas, parent, overflowHidden) { @@ -191,7 +191,7 @@ Phaser.Canvas = { * * @method setSmoothingEnabled * @param {CanvasRenderingContext2D} context - The context to enable or disable the image smoothing on. - * @param {bool} value - If set to true it will enable image smoothing, false will disable it. + * @param {boolean} value - If set to true it will enable image smoothing, false will disable it. * @return {CanvasRenderingContext2D} Returns the source context. */ setSmoothingEnabled: function (context, value) { diff --git a/src/system/Device.js b/src/system/Device.js index 4b4a6341b..dfee32d89 100644 --- a/src/system/Device.js +++ b/src/system/Device.js @@ -19,7 +19,7 @@ Phaser.Device = function () { /** * An optional 'fix' for the horrendous Android stock browser bug * {@link https://code.google.com/p/android/issues/detail?id=39247} - * @property {bool} patchAndroidClearRectBug - Description. + * @property {boolean} patchAndroidClearRectBug - Description. * @default */ this.patchAndroidClearRectBug = false; @@ -27,43 +27,43 @@ Phaser.Device = function () { // Operating System /** - * @property {bool} desktop - Is running desktop? + * @property {boolean} desktop - Is running desktop? * @default */ this.desktop = false; /** - * @property {bool} iOS - Is running on iOS? + * @property {boolean} iOS - Is running on iOS? * @default */ this.iOS = false; /** - * @property {bool} android - Is running on android? + * @property {boolean} android - Is running on android? * @default */ this.android = false; /** - * @property {bool} chromeOS - Is running on chromeOS? + * @property {boolean} chromeOS - Is running on chromeOS? * @default */ this.chromeOS = false; /** - * @property {bool} linux - Is running on linux? + * @property {boolean} linux - Is running on linux? * @default */ this.linux = false; /** - * @property {bool} maxOS - Is running on maxOS? + * @property {boolean} maxOS - Is running on maxOS? * @default */ this.macOS = false; /** - * @property {bool} windows - Is running on windows? + * @property {boolean} windows - Is running on windows? * @default */ this.windows = false; @@ -71,61 +71,61 @@ Phaser.Device = function () { // Features /** - * @property {bool} canvas - Is canvas available? + * @property {boolean} canvas - Is canvas available? * @default */ this.canvas = false; /** - * @property {bool} file - Is file available? + * @property {boolean} file - Is file available? * @default */ this.file = false; /** - * @property {bool} fileSystem - Is fileSystem available? + * @property {boolean} fileSystem - Is fileSystem available? * @default */ this.fileSystem = false; /** - * @property {bool} localStorage - Is localStorage available? + * @property {boolean} localStorage - Is localStorage available? * @default */ this.localStorage = false; /** - * @property {bool} webGL - Is webGL available? + * @property {boolean} webGL - Is webGL available? * @default */ this.webGL = false; /** - * @property {bool} worker - Is worker available? + * @property {boolean} worker - Is worker available? * @default */ this.worker = false; /** - * @property {bool} touch - Is touch available? + * @property {boolean} touch - Is touch available? * @default */ this.touch = false; /** - * @property {bool} mspointer - Is mspointer available? + * @property {boolean} mspointer - Is mspointer available? * @default */ this.mspointer = false; /** - * @property {bool} css3D - Is css3D available? + * @property {boolean} css3D - Is css3D available? * @default */ this.css3D = false; /** - * @property {bool} pointerLock - Is Pointer Lock available? + * @property {boolean} pointerLock - Is Pointer Lock available? * @default */ this.pointerLock = false; @@ -133,31 +133,31 @@ Phaser.Device = function () { // Browser /** - * @property {bool} arora - Is running in arora? + * @property {boolean} arora - Is running in arora? * @default */ this.arora = false; /** - * @property {bool} chrome - Is running in chrome? + * @property {boolean} chrome - Is running in chrome? * @default */ this.chrome = false; /** - * @property {bool} epiphany - Is running in epiphany? + * @property {boolean} epiphany - Is running in epiphany? * @default */ this.epiphany = false; /** - * @property {bool} firefox - Is running in firefox? + * @property {boolean} firefox - Is running in firefox? * @default */ this.firefox = false; /** - * @property {bool} ie - Is running in ie? + * @property {boolean} ie - Is running in ie? * @default */ this.ie = false; @@ -169,25 +169,25 @@ Phaser.Device = function () { this.ieVersion = 0; /** - * @property {bool} mobileSafari - Is running in mobileSafari? + * @property {boolean} mobileSafari - Is running in mobileSafari? * @default */ this.mobileSafari = false; /** - * @property {bool} midori - Is running in midori? + * @property {boolean} midori - Is running in midori? * @default */ this.midori = false; /** - * @property {bool} opera - Is running in opera? + * @property {boolean} opera - Is running in opera? * @default */ this.opera = false; /** - * @property {bool} safari - Is running in safari? + * @property {boolean} safari - Is running in safari? * @default */ this.safari = false; @@ -196,49 +196,49 @@ Phaser.Device = function () { // Audio /** - * @property {bool} audioData - Are Audio tags available? + * @property {boolean} audioData - Are Audio tags available? * @default */ this.audioData = false; /** - * @property {bool} webAudio - Is the WebAudio API available? + * @property {boolean} webAudio - Is the WebAudio API available? * @default */ this.webAudio = false; /** - * @property {bool} ogg - Can this device play ogg files? + * @property {boolean} ogg - Can this device play ogg files? * @default */ this.ogg = false; /** - * @property {bool} opus - Can this device play opus files? + * @property {boolean} opus - Can this device play opus files? * @default */ this.opus = false; /** - * @property {bool} mp3 - Can this device play mp3 files? + * @property {boolean} mp3 - Can this device play mp3 files? * @default */ this.mp3 = false; /** - * @property {bool} wav - Can this device play wav files? + * @property {boolean} wav - Can this device play wav files? * @default */ this.wav = false; /** * Can this device play m4a files? - * @property {bool} m4a - True if this device can play m4a files. + * @property {boolean} m4a - True if this device can play m4a files. * @default */ this.m4a = false; /** - * @property {bool} webm - Can this device play webm files? + * @property {boolean} webm - Can this device play webm files? * @default */ this.webm = false; @@ -246,19 +246,19 @@ Phaser.Device = function () { // Device /** - * @property {bool} iPhone - Is running on iPhone? + * @property {boolean} iPhone - Is running on iPhone? * @default */ this.iPhone = false; /** - * @property {bool} iPhone4 - Is running on iPhone4? + * @property {boolean} iPhone4 - Is running on iPhone4? * @default */ this.iPhone4 = false; /** - * @property {bool} iPad - Is running on iPad? + * @property {boolean} iPad - Is running on iPad? * @default */ this.iPad = false; @@ -496,7 +496,7 @@ Phaser.Device.prototype = { /** * Check whether the console is open. * @method isConsoleOpen - * @return {bool} True if console is open. + * @return {boolean} True if console is open. */ isConsoleOpen: function () { diff --git a/src/system/RequestAnimationFrame.js b/src/system/RequestAnimationFrame.js index 7243e7e12..816c14ec0 100644 --- a/src/system/RequestAnimationFrame.js +++ b/src/system/RequestAnimationFrame.js @@ -21,13 +21,13 @@ Phaser.RequestAnimationFrame = function(game) { this.game = game; /** - * @property {bool} _isSetTimeOut - Description. + * @property {boolean} _isSetTimeOut - Description. * @private */ this._isSetTimeOut = false; /** - * @property {bool} isRunning - Description. + * @property {boolean} isRunning - Description. * @default */ this.isRunning = false; @@ -135,7 +135,7 @@ Phaser.RequestAnimationFrame.prototype = { /** * Is the browser using setTimeout? * @method isSetTimeOut - * @return {bool} + * @return {boolean} **/ isSetTimeOut: function () { return this._isSetTimeOut; @@ -144,7 +144,7 @@ Phaser.RequestAnimationFrame.prototype = { /** * Is the browser using requestAnimationFrame? * @method isRAF - * @return {bool} + * @return {boolean} **/ isRAF: function () { return (this._isSetTimeOut === false); diff --git a/src/system/StageScaleMode.js b/src/system/StageScaleMode.js index b581395f0..8fc6155c6 100644 --- a/src/system/StageScaleMode.js +++ b/src/system/StageScaleMode.js @@ -25,25 +25,25 @@ Phaser.StageScaleMode = function (game, width, height) { this._startHeight = 0; /** - * @property {bool} forceLandscape - If the game should be forced to use Landscape mode, this is set to true by Game.Stage + * @property {boolean} forceLandscape - If the game should be forced to use Landscape mode, this is set to true by Game.Stage * @default */ this.forceLandscape = false; /** - * @property {bool} forcePortrait - If the game should be forced to use Portrait mode, this is set to true by Game.Stage + * @property {boolean} forcePortrait - If the game should be forced to use Portrait mode, this is set to true by Game.Stage * @default */ this.forcePortrait = false; /** - * @property {bool} incorrectOrientation - If the game should be forced to use a specific orientation and the device currently isn't in that orientation this is set to true. + * @property {boolean} incorrectOrientation - If the game should be forced to use a specific orientation and the device currently isn't in that orientation this is set to true. * @default */ this.incorrectOrientation = false; /** - * @property {bool} pageAlignHorizontally - If you wish to align your game in the middle of the page then you can set this value to true. + * @property {boolean} pageAlignHorizontally - If you wish to align your game in the middle of the page then you can set this value to true.
  • It will place a re-calculated margin-left pixel value onto the canvas element which is updated on orientation/resizing.
  • It doesn't care about any other DOM element that may be on the page, it literally just sets the margin.
* @default @@ -51,7 +51,7 @@ Phaser.StageScaleMode = function (game, width, height) { this.pageAlignHorizontally = false; /** - * @property {bool} pageAlignVeritcally - If you wish to align your game in the middle of the page then you can set this value to true. + * @property {boolean} pageAlignVeritcally - If you wish to align your game in the middle of the page then you can set this value to true.
  • It will place a re-calculated margin-left pixel value onto the canvas element which is updated on orientation/resizing.
  • It doesn't care about any other DOM element that may be on the page, it literally just sets the margin.
* @default @@ -511,7 +511,7 @@ Phaser.StageScaleMode.prototype = { /** * Get -* @return {bool} +* @return {boolean} */ Object.defineProperty(Phaser.StageScaleMode.prototype, "isFullScreen", { diff --git a/src/tilemap/Tile.js b/src/tilemap/Tile.js index 29f776f33..069f1b46e 100644 --- a/src/tilemap/Tile.js +++ b/src/tilemap/Tile.js @@ -27,43 +27,43 @@ Phaser.Tile = function (game, tilemap, index, width, height) { this.mass = 1.0; /** - * @property {bool} collideNone - Indicating this Tile doesn't collide at all. + * @property {boolean} collideNone - Indicating this Tile doesn't collide at all. * @default */ this.collideNone = true; /** - * @property {bool} collideLeft - Indicating collide with any object on the left. + * @property {boolean} collideLeft - Indicating collide with any object on the left. * @default */ this.collideLeft = false; /** - * @property {bool} collideRight - Indicating collide with any object on the right. + * @property {boolean} collideRight - Indicating collide with any object on the right. * @default */ this.collideRight = false; /** - * @property {bool} collideUp - Indicating collide with any object on the top. + * @property {boolean} collideUp - Indicating collide with any object on the top. * @default */ this.collideUp = false; /** - * @property {bool} collideDown - Indicating collide with any object on the bottom. + * @property {boolean} collideDown - Indicating collide with any object on the bottom. * @default */ this.collideDown = false; /** - * @property {bool} separateX - Enable separation at x-axis. + * @property {boolean} separateX - Enable separation at x-axis. * @default */ this.separateX = true; /** - * @property {bool} separateY - Enable separation at y-axis. + * @property {boolean} separateY - Enable separation at y-axis. * @default */ this.separateY = true; @@ -74,7 +74,7 @@ Phaser.Tile = function (game, tilemap, index, width, height) { this.game = game; /** - * @property {bool} tilemap - The tilemap this tile belongs to. + * @property {boolean} tilemap - The tilemap this tile belongs to. */ this.tilemap = tilemap; @@ -108,13 +108,13 @@ Phaser.Tile.prototype = { /** * Set collision configs. * @method setCollision - * @param {bool} left - Indicating collide with any object on the left. - * @param {bool} right - Indicating collide with any object on the right. - * @param {bool} up - Indicating collide with any object on the top. - * @param {bool} down - Indicating collide with any object on the bottom. - * @param {bool} reset - Description. - * @param {bool} separateX - Separate at x-axis. - * @param {bool} separateY - Separate at y-axis. + * @param {boolean} left - Indicating collide with any object on the left. + * @param {boolean} right - Indicating collide with any object on the right. + * @param {boolean} up - Indicating collide with any object on the top. + * @param {boolean} down - Indicating collide with any object on the bottom. + * @param {boolean} reset - Description. + * @param {boolean} separateX - Separate at x-axis. + * @param {boolean} separateY - Separate at y-axis. */ setCollision: function (left, right, up, down, reset, separateX, separateY) { @@ -160,7 +160,7 @@ Object.defineProperty(Phaser.Tile.prototype, "bottom", { /** * The sum of the y and height properties. Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property. * @method bottom - * @return {Number} + * @return {number} **/ get: function () { return this.y + this.height; @@ -174,7 +174,7 @@ Object.defineProperty(Phaser.Tile.prototype, "right", { * The sum of the x and width properties. Changing the right property of a Rectangle object has no effect on the x, y and height properties. * However it does affect the width property. * @method right - * @return {Number} + * @return {number} **/ get: function () { return this.x + this.width; diff --git a/src/tilemap/Tilemap.js b/src/tilemap/Tilemap.js index dfbc677cf..203d4495c 100644 --- a/src/tilemap/Tilemap.js +++ b/src/tilemap/Tilemap.js @@ -16,7 +16,7 @@ * @param {string} key - Asset key for this map. * @param {object} x - Description. * @param {object} y - Description. -* @param {bool} resizeWorld - Resize the world bound automatically based on this tilemap? +* @param {boolean} resizeWorld - Resize the world bound automatically based on this tilemap? * @param {number} tileWidth - Width of tiles in this map (used for CSV maps). * @param {number} tileHeight - Height of tiles in this map (used for CSV maps). */ @@ -54,31 +54,31 @@ Phaser.Tilemap = function (game, key, x, y, resizeWorld, tileWidth, tileHeight) this.renderOrderID = 0; /** - * @property {bool} collisionCallback - Tilemap collision callback. + * @property {boolean} collisionCallback - Tilemap collision callback. * @default */ this.collisionCallback = null; /** - * @property {bool} exists - Description. + * @property {boolean} exists - Description. * @default */ this.exists = true; /** - * @property {bool} visible - Description. + * @property {boolean} visible - Description. * @default */ this.visible = true; /** - * @property {bool} tiles - Description. + * @property {boolean} tiles - Description. * @default */ this.tiles = []; /** - * @property {bool} layers - Description. + * @property {boolean} layers - Description. * @default */ this.layers = []; @@ -268,9 +268,9 @@ Phaser.Tilemap.prototype.setCollisionCallback = function (context, callback) { * @param {number} start - First index of tiles. * @param {number} end - Last index of tiles. * @param {number} collision - Bit field of flags. (see Tile.allowCollision) -* @param {bool} resetCollisions - Reset collision flags before set. -* @param {bool} separateX - Enable separate at x-axis. -* @param {bool} separateY - Enable separate at y-axis. +* @param {boolean} resetCollisions - Reset collision flags before set. +* @param {boolean} separateX - Enable separate at x-axis. +* @param {boolean} separateY - Enable separate at y-axis. */ Phaser.Tilemap.prototype.setCollisionRange = function (start, end, left, right, up, down, resetCollisions, separateX, separateY) { @@ -289,13 +289,13 @@ Phaser.Tilemap.prototype.setCollisionRange = function (start, end, left, right, * Set collision configs of tiles with given index. * @param {number[]} values - Index array which contains all tile indexes. The tiles with those indexes will be setup with rest parameters. * @param {number} collision - Bit field of flags (see Tile.allowCollision). -* @param {bool} resetCollisions - Reset collision flags before set. -* @param {bool} left - Indicating collide with any object on the left. -* @param {bool} right - Indicating collide with any object on the right. -* @param {bool} up - Indicating collide with any object on the top. -* @param {bool} down - Indicating collide with any object on the bottom. -* @param {bool} separateX - Enable separate at x-axis. -* @param {bool} separateY - Enable separate at y-axis. +* @param {boolean} resetCollisions - Reset collision flags before set. +* @param {boolean} left - Indicating collide with any object on the left. +* @param {boolean} right - Indicating collide with any object on the right. +* @param {boolean} up - Indicating collide with any object on the top. +* @param {boolean} down - Indicating collide with any object on the bottom. +* @param {boolean} separateX - Enable separate at x-axis. +* @param {boolean} separateY - Enable separate at y-axis. */ Phaser.Tilemap.prototype.setCollisionByIndex = function (values, left, right, up, down, resetCollisions, separateX, separateY) { @@ -389,7 +389,7 @@ Phaser.Tilemap.prototype.getTileOverlaps = function (object) { * @param {Function} objectOrGroup - Target object of group you want to check. * @param {Function} callback - This is called if objectOrGroup collides the tilemap. * @param {object} context - Callback will be called with this context. -* @return {bool} Return true if this collides with given object, otherwise return false. +* @return {boolean} Return true if this collides with given object, otherwise return false. */ Phaser.Tilemap.prototype.collide = function (objectOrGroup, callback, context) { @@ -417,7 +417,7 @@ Phaser.Tilemap.prototype.collide = function (objectOrGroup, callback, context) { /** * Check whether this tilemap collides with the given game object. * @param {GameObject} object - Target object you want to check. -* @return {bool} Return true if this collides with given object, otherwise return false. +* @return {boolean} Return true if this collides with given object, otherwise return false. */ Phaser.Tilemap.prototype.collideGameObject = function (object) { diff --git a/src/tilemap/TilemapLayer.js b/src/tilemap/TilemapLayer.js index 510d32f6f..80fd7516f 100644 --- a/src/tilemap/TilemapLayer.js +++ b/src/tilemap/TilemapLayer.js @@ -21,13 +21,13 @@ Phaser.TilemapLayer = function (parent, id, key, mapFormat, name, tileWidth, tileHeight) { /** - * @property {bool} exists - Controls whether update() and draw() are automatically called. + * @property {boolean} exists - Controls whether update() and draw() are automatically called. * @default */ this.exists = true; /** - * @property {bool} visible - Controls whether draw() are automatically called. + * @property {boolean} visible - Controls whether draw() are automatically called. * @default */ this.visible = true; @@ -444,7 +444,7 @@ Phaser.TilemapLayer.prototype = { * @param {number} [y] - Y position (in tiles) of block's left-top corner. * @param {number} [width] - width of block. * @param {number} [height] - height of block. - * @param {bool} collisionOnly - Whethor or not ONLY return tiles which will collide (its allowCollisions value is not Collision.NONE). + * @param {boolean} collisionOnly - Whethor or not ONLY return tiles which will collide (its allowCollisions value is not Collision.NONE). */ getTempBlock: function (x, y, width, height, collisionOnly) { diff --git a/src/tilemap/TilemapRenderer.js b/src/tilemap/TilemapRenderer.js index 85ff33284..b37dfbc4e 100644 --- a/src/tilemap/TilemapRenderer.js +++ b/src/tilemap/TilemapRenderer.js @@ -111,7 +111,7 @@ Phaser.TilemapRenderer.prototype = { * Render a tilemap to a canvas. * @method render * @param tilemap {Tilemap} The tilemap data to render. - * @return {bool} Description. + * @return {boolean} Description. */ render: function (tilemap) { diff --git a/src/time/Time.js b/src/time/Time.js index 219a42bc8..7faa926aa 100644 --- a/src/time/Time.js +++ b/src/time/Time.js @@ -149,7 +149,7 @@ Phaser.Time = function (game) { /** * Description. - * @property {bool} _justResumed + * @property {boolean} _justResumed * @default */ this._justResumed = false; diff --git a/src/tween/Tween.js b/src/tween/Tween.js index 4abbad870..9bdfec3cc 100644 --- a/src/tween/Tween.js +++ b/src/tween/Tween.js @@ -67,14 +67,14 @@ Phaser.Tween = function (object, game) { this._repeat = 0; /** - * @property {bool} _yoyo - Description. + * @property {boolean} _yoyo - Description. * @private * @default */ this._yoyo = false; /** - * @property {bool} _reversed - Description. + * @property {boolean} _reversed - Description. * @private * @default */ @@ -120,7 +120,7 @@ Phaser.Tween = function (object, game) { this._onStartCallback = null; /** - * @property {bool} _onStartCallbackFired - Description. + * @property {boolean} _onStartCallbackFired - Description. * @private * @default */ @@ -148,7 +148,7 @@ Phaser.Tween = function (object, game) { this._pausedTime = 0; /** - * @property {bool} pendingDelete - Description. + * @property {boolean} pendingDelete - Description. * @default */ this.pendingDelete = false; @@ -169,7 +169,7 @@ Phaser.Tween = function (object, game) { this.onComplete = new Phaser.Signal(); /** - * @property {bool} isRunning - Description. + * @property {boolean} isRunning - Description. * @default */ this.isRunning = false; @@ -185,9 +185,9 @@ Phaser.Tween.prototype = { * @param {object} properties - Properties you want to tween. * @param {number} duration - Duration of this tween. * @param {function} ease - Easing function. - * @param {bool} autoStart - Whether this tween will start automatically or not. + * @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 {bool} repeat - Should the tween automatically restart once complete? (ignores any chained tweens). + * @param {boolean} repeat - Should the tween automatically restart once complete? (ignores any chained tweens). * @param {Phaser.Tween} yoyo - Description. * @return {Phaser.Tween} Itself. */ @@ -471,7 +471,7 @@ Phaser.Tween.prototype = { * * @method update * @param {number} time - Description. - * @return {bool} Description. + * @return {boolean} Description. */ update: function ( time ) { diff --git a/src/tween/TweenManager.js b/src/tween/TweenManager.js index 23cc4b2c8..b22270650 100644 --- a/src/tween/TweenManager.js +++ b/src/tween/TweenManager.js @@ -124,7 +124,7 @@ Phaser.TweenManager.prototype = { * Update all the tween objects you added to this manager. * * @method update - * @returns {bool} Return false if there's no tween to update, otherwise return true. + * @returns {boolean} Return false if there's no tween to update, otherwise return true. */ update: function () { diff --git a/src/utils/Debug.js b/src/utils/Debug.js index 8e5baea4f..8e73a009d 100644 --- a/src/utils/Debug.js +++ b/src/utils/Debug.js @@ -36,7 +36,7 @@ Phaser.Utils.Debug = function (game) { this.lineHeight = 16; /** - * @property {bool} renderShadow - Description. + * @property {boolean} renderShadow - Description. */ this.renderShadow = true; @@ -185,8 +185,8 @@ Phaser.Utils.Debug.prototype = { * Description. * @method renderSpriteCorners * @param {Phaser.Sprite} sprite - The sprite to be rendered. - * @param {bool} showText - Description. - * @param {bool} showBounds - Description. + * @param {boolean} showText - Description. + * @param {boolean} showBounds - Description. * @param {string} color - Description. */ renderSpriteCorners: function (sprite, showText, showBounds, color) { @@ -302,7 +302,7 @@ Phaser.Utils.Debug.prototype = { * Renders the Pointer.circle object onto the stage in green if down or red if up. * @method renderDebug * @param {Description} pointer - Description. - * @param {bool} hideIfUp - Description. + * @param {boolean} hideIfUp - Description. * @param {string} downColor - Description. * @param {string} upColor - Description. * @param {string} color - Description. diff --git a/src/utils/Utils.js b/src/utils/Utils.js index 8fc83814f..f47441efe 100644 --- a/src/utils/Utils.js +++ b/src/utils/Utils.js @@ -57,7 +57,7 @@ Phaser.Utils = { * This is a slightly modified version of jQuery.isPlainObject. * @method isPlainObject * @param {object} obj - Description. - * @return {bool} - Description. + * @return {boolean} - Description. */ isPlainObject: function (obj) {