Added phaser build and hellophaser sample
This commit is contained in:
1595
docs/AABB.js.html
Normal file
1595
docs/AABB.js.html
Normal file
File diff suppressed because it is too large
Load Diff
1226
docs/Animation.js.html
Normal file
1226
docs/Animation.js.html
Normal file
File diff suppressed because it is too large
Load Diff
1067
docs/AnimationManager.js.html
Normal file
1067
docs/AnimationManager.js.html
Normal file
File diff suppressed because it is too large
Load Diff
902
docs/AnimationParser.js.html
Normal file
902
docs/AnimationParser.js.html
Normal file
@@ -0,0 +1,902 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Phaser Source: animation/AnimationParser.js</title>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
|
||||
|
||||
|
||||
<link type="text/css" rel="stylesheet" href="styles/site.cerulean.css">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="navbar navbar-fixed-top navbar-inverse">
|
||||
<div class="navbar-inner">
|
||||
<a class="brand" href="index.html">Phaser</a>
|
||||
<ul class="nav">
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-0">
|
||||
<a href="Phaser.html">Phaser</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Animation.html">Animation</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationManager.html">AnimationManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationParser.html">AnimationParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ArrayList.html">ArrayList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapData.html">BitmapData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapText.html">BitmapText</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Button.html">Button</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Cache.html">Cache</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Camera.html">Camera</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Canvas.html">Canvas</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Color.html">Color</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Device.html">Device</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Easing.html">Easing</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Back.html">Back</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Bounce.html">Bounce</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Circular.html">Circular</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Cubic.html">Cubic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Elastic.html">Elastic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Exponential.html">Exponential</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Linear.html">Linear</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quadratic.html">Quadratic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quartic.html">Quartic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quintic.html">Quintic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Sinusoidal.html">Sinusoidal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Ellipse.html">Ellipse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Events.html">Events</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Filter.html">Filter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Frame.html">Frame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.FrameData.html">FrameData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Game.html">Game</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectCreator.html">GameObjectCreator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Gamepad.html">Gamepad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GamepadButton.html">GamepadButton</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Graphics.html">Graphics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Group.html">Group</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Image.html">Image</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Input.html">Input</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.InputHandler.html">InputHandler</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Key.html">Key</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Keyboard.html">Keyboard</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Line.html">Line</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LinkedList.html">LinkedList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Loader.html">Loader</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LoaderParser.html">LoaderParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Math.html">Math</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Mouse.html">Mouse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.MSPointer.html">MSPointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Net.html">Net</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particle.html">Particle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particles.html">Particles</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Particles.Arcade.Emitter.html">Emitter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Physics.html">Physics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Arcade.html">Arcade</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Arcade.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Ninja.html">Ninja</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.AABB.html">AABB</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.P2.html">P2</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.BodyDebug.html">BodyDebug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.CollisionGroup.html">CollisionGroup</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.ContactMaterial.html">ContactMaterial</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.DistanceConstraint.html">DistanceConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.FixtureList.html">FixtureList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.GearConstraint.html">GearConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.InversePointProxy.html">InversePointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.LockConstraint.html">LockConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Material.html">Material</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PointProxy.html">PointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PrismaticConstraint.html">PrismaticConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.RevoluteConstraint.html">RevoluteConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Spring.html">Spring</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Plugin.html">Plugin</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.PluginManager.html">PluginManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Point.html">Point</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Pointer.html">Pointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Polygon.html">Polygon</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.QuadTree.html">QuadTree</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RandomDataGenerator.html">RandomDataGenerator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Rectangle.html">Rectangle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RenderTexture.html">RenderTexture</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RequestAnimationFrame.html">RequestAnimationFrame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RetroFont.html">RetroFont</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ScaleManager.html">ScaleManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Signal.html">Signal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SignalBinding.html">SignalBinding</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SinglePad.html">SinglePad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sound.html">Sound</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SoundManager.html">SoundManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sprite.html">Sprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SpriteBatch.html">SpriteBatch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Stage.html">Stage</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.State.html">State</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.StateManager.html">StateManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Text.html">Text</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tilemap.html">Tilemap</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapLayer.html">TilemapLayer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapParser.html">TilemapParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tileset.html">Tileset</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TileSprite.html">TileSprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Time.html">Time</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Timer.html">Timer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TimerEvent.html">TimerEvent</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Touch.html">Touch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tween.html">Tween</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TweenManager.html">TweenManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Utils.html">Utils</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Utils.Debug.html">Debug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.World.html">World</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row-fluid">
|
||||
|
||||
|
||||
<div class="span12">
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
|
||||
<h1 class="page-title">Source: animation/AnimationParser.js</h1>
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <rich@photonstorm.com>
|
||||
* @copyright 2014 Photon Storm Ltd.
|
||||
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Responsible for parsing sprite sheet and JSON data into the internal FrameData format that Phaser uses for animations.
|
||||
*
|
||||
* @class Phaser.AnimationParser
|
||||
*/
|
||||
Phaser.AnimationParser = {
|
||||
|
||||
/**
|
||||
* Parse a Sprite Sheet and extract the animation frame data from it.
|
||||
*
|
||||
* @method Phaser.AnimationParser.spriteSheet
|
||||
* @param {Phaser.Game} game - A reference to the currently running game.
|
||||
* @param {string} key - The Game.Cache asset key of the Sprite Sheet image.
|
||||
* @param {number} frameWidth - The fixed width of each frame of the animation.
|
||||
* @param {number} frameHeight - The fixed height of each frame of the animation.
|
||||
* @param {number} [frameMax=-1] - The total number of animation frames to extact from the Sprite Sheet. The default value of -1 means "extract all frames".
|
||||
* @param {number} [margin=0] - If the frames have been drawn with a margin, specify the amount here.
|
||||
* @param {number} [spacing=0] - If the frames have been drawn with spacing between them, specify the amount here.
|
||||
* @return {Phaser.FrameData} A FrameData object containing the parsed frames.
|
||||
*/
|
||||
spriteSheet: function (game, key, frameWidth, frameHeight, frameMax, margin, spacing) {
|
||||
|
||||
// How big is our image?
|
||||
var img = game.cache.getImage(key);
|
||||
|
||||
if (img == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var width = img.width;
|
||||
var height = img.height;
|
||||
|
||||
if (frameWidth <= 0)
|
||||
{
|
||||
frameWidth = Math.floor(-width / Math.min(-1, frameWidth));
|
||||
}
|
||||
|
||||
if (frameHeight <= 0)
|
||||
{
|
||||
frameHeight = Math.floor(-height / Math.min(-1, frameHeight));
|
||||
}
|
||||
|
||||
var row = Math.floor((width - margin) / (frameWidth + spacing));
|
||||
var column = Math.floor((height - margin) / (frameHeight + spacing));
|
||||
var total = row * column;
|
||||
|
||||
if (frameMax !== -1)
|
||||
{
|
||||
total = frameMax;
|
||||
}
|
||||
|
||||
// Zero or smaller than frame sizes?
|
||||
if (width === 0 || height === 0 || width < frameWidth || height < frameHeight || total === 0)
|
||||
{
|
||||
console.warn("Phaser.AnimationParser.spriteSheet: width/height zero or width/height < given frameWidth/frameHeight");
|
||||
return null;
|
||||
}
|
||||
|
||||
// Let's create some frames then
|
||||
var data = new Phaser.FrameData();
|
||||
var x = margin;
|
||||
var y = margin;
|
||||
|
||||
for (var i = 0; i < total; i++)
|
||||
{
|
||||
var uuid = game.rnd.uuid();
|
||||
|
||||
data.addFrame(new Phaser.Frame(i, x, y, frameWidth, frameHeight, '', uuid));
|
||||
|
||||
PIXI.TextureCache[uuid] = new PIXI.Texture(PIXI.BaseTextureCache[key], {
|
||||
x: x,
|
||||
y: y,
|
||||
width: frameWidth,
|
||||
height: frameHeight
|
||||
});
|
||||
|
||||
x += frameWidth + spacing;
|
||||
|
||||
if (x + frameWidth > width)
|
||||
{
|
||||
x = margin;
|
||||
y += frameHeight + spacing;
|
||||
}
|
||||
}
|
||||
|
||||
return data;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Parse the JSON data and extract the animation frame data from it.
|
||||
*
|
||||
* @method Phaser.AnimationParser.JSONData
|
||||
* @param {Phaser.Game} game - A reference to the currently running game.
|
||||
* @param {Object} json - The JSON data from the Texture Atlas. Must be in Array format.
|
||||
* @param {string} cacheKey - The Game.Cache asset key of the texture image.
|
||||
* @return {Phaser.FrameData} A FrameData object containing the parsed frames.
|
||||
*/
|
||||
JSONData: function (game, json, cacheKey) {
|
||||
|
||||
// Malformed?
|
||||
if (!json['frames'])
|
||||
{
|
||||
console.warn("Phaser.AnimationParser.JSONData: Invalid Texture Atlas JSON given, missing 'frames' array");
|
||||
console.log(json);
|
||||
return;
|
||||
}
|
||||
|
||||
// Let's create some frames then
|
||||
var data = new Phaser.FrameData();
|
||||
|
||||
// By this stage frames is a fully parsed array
|
||||
var frames = json['frames'];
|
||||
var newFrame;
|
||||
|
||||
for (var i = 0; i < frames.length; i++)
|
||||
{
|
||||
var uuid = game.rnd.uuid();
|
||||
|
||||
newFrame = data.addFrame(new Phaser.Frame(
|
||||
i,
|
||||
frames[i].frame.x,
|
||||
frames[i].frame.y,
|
||||
frames[i].frame.w,
|
||||
frames[i].frame.h,
|
||||
frames[i].filename,
|
||||
uuid
|
||||
));
|
||||
|
||||
PIXI.TextureCache[uuid] = new PIXI.Texture(PIXI.BaseTextureCache[cacheKey], {
|
||||
x: frames[i].frame.x,
|
||||
y: frames[i].frame.y,
|
||||
width: frames[i].frame.w,
|
||||
height: frames[i].frame.h
|
||||
});
|
||||
|
||||
if (frames[i].trimmed)
|
||||
{
|
||||
newFrame.setTrim(
|
||||
frames[i].trimmed,
|
||||
frames[i].sourceSize.w,
|
||||
frames[i].sourceSize.h,
|
||||
frames[i].spriteSourceSize.x,
|
||||
frames[i].spriteSourceSize.y,
|
||||
frames[i].spriteSourceSize.w,
|
||||
frames[i].spriteSourceSize.h
|
||||
);
|
||||
|
||||
PIXI.TextureCache[uuid].trim = new Phaser.Rectangle(frames[i].spriteSourceSize.x, frames[i].spriteSourceSize.y, frames[i].sourceSize.w, frames[i].sourceSize.h);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return data;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Parse the JSON data and extract the animation frame data from it.
|
||||
*
|
||||
* @method Phaser.AnimationParser.JSONDataHash
|
||||
* @param {Phaser.Game} game - A reference to the currently running game.
|
||||
* @param {Object} json - The JSON data from the Texture Atlas. Must be in JSON Hash format.
|
||||
* @param {string} cacheKey - The Game.Cache asset key of the texture image.
|
||||
* @return {Phaser.FrameData} A FrameData object containing the parsed frames.
|
||||
*/
|
||||
JSONDataHash: function (game, json, cacheKey) {
|
||||
|
||||
// Malformed?
|
||||
if (!json['frames'])
|
||||
{
|
||||
console.warn("Phaser.AnimationParser.JSONDataHash: Invalid Texture Atlas JSON given, missing 'frames' object");
|
||||
console.log(json);
|
||||
return;
|
||||
}
|
||||
|
||||
// Let's create some frames then
|
||||
var data = new Phaser.FrameData();
|
||||
|
||||
// By this stage frames is a fully parsed array
|
||||
var frames = json['frames'];
|
||||
var newFrame;
|
||||
var i = 0;
|
||||
|
||||
for (var key in frames)
|
||||
{
|
||||
var uuid = game.rnd.uuid();
|
||||
|
||||
newFrame = data.addFrame(new Phaser.Frame(
|
||||
i,
|
||||
frames[key].frame.x,
|
||||
frames[key].frame.y,
|
||||
frames[key].frame.w,
|
||||
frames[key].frame.h,
|
||||
key,
|
||||
uuid
|
||||
));
|
||||
|
||||
PIXI.TextureCache[uuid] = new PIXI.Texture(PIXI.BaseTextureCache[cacheKey], {
|
||||
x: frames[key].frame.x,
|
||||
y: frames[key].frame.y,
|
||||
width: frames[key].frame.w,
|
||||
height: frames[key].frame.h
|
||||
});
|
||||
|
||||
if (frames[key].trimmed)
|
||||
{
|
||||
newFrame.setTrim(
|
||||
frames[key].trimmed,
|
||||
frames[key].sourceSize.w,
|
||||
frames[key].sourceSize.h,
|
||||
frames[key].spriteSourceSize.x,
|
||||
frames[key].spriteSourceSize.y,
|
||||
frames[key].spriteSourceSize.w,
|
||||
frames[key].spriteSourceSize.h
|
||||
);
|
||||
|
||||
PIXI.TextureCache[uuid].trim = new Phaser.Rectangle(frames[key].spriteSourceSize.x, frames[key].spriteSourceSize.y, frames[key].sourceSize.w, frames[key].sourceSize.h);
|
||||
}
|
||||
|
||||
i++;
|
||||
}
|
||||
|
||||
return data;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Parse the XML data and extract the animation frame data from it.
|
||||
*
|
||||
* @method Phaser.AnimationParser.XMLData
|
||||
* @param {Phaser.Game} game - A reference to the currently running game.
|
||||
* @param {Object} xml - The XML data from the Texture Atlas. Must be in Starling XML format.
|
||||
* @param {string} cacheKey - The Game.Cache asset key of the texture image.
|
||||
* @return {Phaser.FrameData} A FrameData object containing the parsed frames.
|
||||
*/
|
||||
XMLData: function (game, xml, cacheKey) {
|
||||
|
||||
// Malformed?
|
||||
if (!xml.getElementsByTagName('TextureAtlas'))
|
||||
{
|
||||
console.warn("Phaser.AnimationParser.XMLData: Invalid Texture Atlas XML given, missing <TextureAtlas> tag");
|
||||
return;
|
||||
}
|
||||
|
||||
// Let's create some frames then
|
||||
var data = new Phaser.FrameData();
|
||||
var frames = xml.getElementsByTagName('SubTexture');
|
||||
var newFrame;
|
||||
|
||||
var uuid;
|
||||
var name;
|
||||
var frame;
|
||||
var x;
|
||||
var y;
|
||||
var width;
|
||||
var height;
|
||||
var frameX;
|
||||
var frameY;
|
||||
var frameWidth;
|
||||
var frameHeight;
|
||||
|
||||
for (var i = 0; i < frames.length; i++)
|
||||
{
|
||||
uuid = game.rnd.uuid();
|
||||
|
||||
frame = frames[i].attributes;
|
||||
|
||||
name = frame.name.nodeValue;
|
||||
x = parseInt(frame.x.nodeValue, 10);
|
||||
y = parseInt(frame.y.nodeValue, 10);
|
||||
width = parseInt(frame.width.nodeValue, 10);
|
||||
height = parseInt(frame.height.nodeValue, 10);
|
||||
|
||||
frameX = null;
|
||||
frameY = null;
|
||||
|
||||
if (frame.frameX)
|
||||
{
|
||||
frameX = Math.abs(parseInt(frame.frameX.nodeValue, 10));
|
||||
frameY = Math.abs(parseInt(frame.frameY.nodeValue, 10));
|
||||
frameWidth = parseInt(frame.frameWidth.nodeValue, 10);
|
||||
frameHeight = parseInt(frame.frameHeight.nodeValue, 10);
|
||||
}
|
||||
|
||||
newFrame = data.addFrame(new Phaser.Frame(i, x, y, width, height, name, uuid));
|
||||
|
||||
PIXI.TextureCache[uuid] = new PIXI.Texture(PIXI.BaseTextureCache[cacheKey], {
|
||||
x: x,
|
||||
y: y,
|
||||
width: width,
|
||||
height: height
|
||||
});
|
||||
|
||||
// Trimmed?
|
||||
if (frameX !== null || frameY !== null)
|
||||
{
|
||||
newFrame.setTrim(true, width, height, frameX, frameY, frameWidth, frameHeight);
|
||||
|
||||
PIXI.TextureCache[uuid].trim = new Phaser.Rectangle(frameX, frameY, width, height);
|
||||
}
|
||||
}
|
||||
|
||||
return data;
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
</pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<footer>
|
||||
|
||||
|
||||
<span class="copyright">
|
||||
Phaser Copyright © 2012-2014 Photon Storm Ltd.
|
||||
</span>
|
||||
<br />
|
||||
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
|
||||
on Tue May 20 2014 10:05:49 GMT+0100 (BST) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
<br clear="both">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script src="scripts/sunlight.js"></script>
|
||||
<script src="scripts/sunlight.javascript.js"></script>
|
||||
<script src="scripts/sunlight-plugin.doclinks.js"></script>
|
||||
<script src="scripts/sunlight-plugin.linenumbers.js"></script>
|
||||
<script src="scripts/sunlight-plugin.menu.js"></script>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/jquery.scrollTo.js"></script>
|
||||
<script src="scripts/jquery.localScroll.js"></script>
|
||||
<script src="scripts/bootstrap-dropdown.js"></script>
|
||||
<script src="scripts/toc.js"></script>
|
||||
|
||||
|
||||
<script> Sunlight.highlightAll({lineNumbers:true, showMenu: true, enableDoclinks :true}); </script>
|
||||
|
||||
<script>
|
||||
$( function () {
|
||||
$( "#toc" ).toc( {
|
||||
anchorName : function(i, heading, prefix) {
|
||||
return $(heading).attr("id") || ( prefix + i );
|
||||
},
|
||||
selectors : "h1,h2,h3,h4",
|
||||
showAndHide : false,
|
||||
scrollTo : 60
|
||||
} );
|
||||
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
|
||||
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
|
||||
|
||||
} );
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
776
docs/ArrayList.js.html
Normal file
776
docs/ArrayList.js.html
Normal file
@@ -0,0 +1,776 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Phaser Source: core/ArrayList.js</title>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
|
||||
|
||||
|
||||
<link type="text/css" rel="stylesheet" href="styles/site.cerulean.css">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="navbar navbar-fixed-top navbar-inverse">
|
||||
<div class="navbar-inner">
|
||||
<a class="brand" href="index.html">Phaser</a>
|
||||
<ul class="nav">
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-0">
|
||||
<a href="Phaser.html">Phaser</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Animation.html">Animation</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationManager.html">AnimationManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationParser.html">AnimationParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ArrayList.html">ArrayList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapData.html">BitmapData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapText.html">BitmapText</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Button.html">Button</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Cache.html">Cache</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Camera.html">Camera</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Canvas.html">Canvas</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Color.html">Color</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Device.html">Device</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Easing.html">Easing</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Back.html">Back</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Bounce.html">Bounce</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Circular.html">Circular</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Cubic.html">Cubic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Elastic.html">Elastic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Exponential.html">Exponential</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Linear.html">Linear</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quadratic.html">Quadratic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quartic.html">Quartic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quintic.html">Quintic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Sinusoidal.html">Sinusoidal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Ellipse.html">Ellipse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Events.html">Events</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Filter.html">Filter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Frame.html">Frame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.FrameData.html">FrameData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Game.html">Game</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectCreator.html">GameObjectCreator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Gamepad.html">Gamepad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GamepadButton.html">GamepadButton</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Graphics.html">Graphics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Group.html">Group</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Image.html">Image</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Input.html">Input</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.InputHandler.html">InputHandler</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Key.html">Key</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Keyboard.html">Keyboard</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Line.html">Line</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LinkedList.html">LinkedList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Loader.html">Loader</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LoaderParser.html">LoaderParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Math.html">Math</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Mouse.html">Mouse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.MSPointer.html">MSPointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Net.html">Net</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particle.html">Particle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particles.html">Particles</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Particles.Arcade.Emitter.html">Emitter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Physics.html">Physics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Arcade.html">Arcade</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Arcade.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Ninja.html">Ninja</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.AABB.html">AABB</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.P2.html">P2</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.BodyDebug.html">BodyDebug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.CollisionGroup.html">CollisionGroup</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.ContactMaterial.html">ContactMaterial</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.DistanceConstraint.html">DistanceConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.FixtureList.html">FixtureList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.GearConstraint.html">GearConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.InversePointProxy.html">InversePointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.LockConstraint.html">LockConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Material.html">Material</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PointProxy.html">PointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PrismaticConstraint.html">PrismaticConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.RevoluteConstraint.html">RevoluteConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Spring.html">Spring</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Plugin.html">Plugin</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.PluginManager.html">PluginManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Point.html">Point</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Pointer.html">Pointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Polygon.html">Polygon</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.QuadTree.html">QuadTree</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RandomDataGenerator.html">RandomDataGenerator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Rectangle.html">Rectangle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RenderTexture.html">RenderTexture</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RequestAnimationFrame.html">RequestAnimationFrame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RetroFont.html">RetroFont</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ScaleManager.html">ScaleManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Signal.html">Signal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SignalBinding.html">SignalBinding</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SinglePad.html">SinglePad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sound.html">Sound</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SoundManager.html">SoundManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sprite.html">Sprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SpriteBatch.html">SpriteBatch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Stage.html">Stage</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.State.html">State</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.StateManager.html">StateManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Text.html">Text</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tilemap.html">Tilemap</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapLayer.html">TilemapLayer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapParser.html">TilemapParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tileset.html">Tileset</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TileSprite.html">TileSprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Time.html">Time</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Timer.html">Timer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TimerEvent.html">TimerEvent</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Touch.html">Touch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tween.html">Tween</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TweenManager.html">TweenManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Utils.html">Utils</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Utils.Debug.html">Debug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.World.html">World</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row-fluid">
|
||||
|
||||
|
||||
<div class="span12">
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
|
||||
<h1 class="page-title">Source: core/ArrayList.js</h1>
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <rich@photonstorm.com>
|
||||
* @copyright 2014 Photon Storm Ltd.
|
||||
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
||||
*/
|
||||
|
||||
/**
|
||||
* A set data structure. Allows items to add themselves to and remove themselves from the set. Items can only exist once in the set.
|
||||
*
|
||||
* @class Phaser.ArrayList
|
||||
* @constructor
|
||||
*/
|
||||
Phaser.ArrayList = function () {
|
||||
|
||||
/**
|
||||
* @property {number} total - Number of objects in the list.
|
||||
* @default
|
||||
*/
|
||||
this.total = 0;
|
||||
|
||||
/**
|
||||
* @property {number} position - Current cursor position.
|
||||
* @default
|
||||
*/
|
||||
this.position = 0;
|
||||
|
||||
/**
|
||||
* @property {array} list - The list.
|
||||
*/
|
||||
this.list = [];
|
||||
|
||||
};
|
||||
|
||||
Phaser.ArrayList.prototype = {
|
||||
|
||||
/**
|
||||
* Adds a new element to this list. The item can only exist in the list once.
|
||||
*
|
||||
* @method Phaser.ArrayList#add
|
||||
* @param {object} child - The element to add to this list. Can be a Phaser.Sprite or any other object you need to quickly iterate through.
|
||||
* @return {object} The child that was added.
|
||||
*/
|
||||
add: function (child) {
|
||||
|
||||
if (!this.exists(child))
|
||||
{
|
||||
this.list.push(child);
|
||||
this.total++;
|
||||
}
|
||||
|
||||
return child;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Gets the index of the child in the list, or -1 if it isn't in the list.
|
||||
*
|
||||
* @method Phaser.ArrayList#getIndex
|
||||
* @param {object} child - The element to get the list index for.
|
||||
* @return {number} The index of the child or -1 if not found.
|
||||
*/
|
||||
getIndex: function (child) {
|
||||
|
||||
return this.list.indexOf(child);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Checks for the child within this list.
|
||||
*
|
||||
* @method Phaser.ArrayList#exists
|
||||
* @param {object} child - The element to get the list index for.
|
||||
* @return {boolean} True if the child is found in the list, otherwise false.
|
||||
*/
|
||||
exists: function (child) {
|
||||
|
||||
return (this.list.indexOf(child) > -1);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Resets the list length and drops all items in the list.
|
||||
*
|
||||
* @method Phaser.ArrayList#reset
|
||||
*/
|
||||
reset: function () {
|
||||
|
||||
this.list.length = 0;
|
||||
this.total = 0;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Removes the given element from this list if it exists.
|
||||
*
|
||||
* @method Phaser.ArrayList#remove
|
||||
* @param {object} child - The child to be removed from the list.
|
||||
* @return {object} child - The child that was removed.
|
||||
*/
|
||||
remove: function (child) {
|
||||
|
||||
var idx = this.list.indexOf(child);
|
||||
|
||||
if (idx > -1)
|
||||
{
|
||||
this.list.splice(idx, 1);
|
||||
this.total--;
|
||||
return child;
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Calls a function on all members of this list, using the member as the context for the callback.
|
||||
* The function must exist on the member.
|
||||
*
|
||||
* @method Phaser.ArrayList#callAll
|
||||
* @param {function} callback - The function to call.
|
||||
* @param {...*} parameter - Additional parameters that will be passed to the callback.
|
||||
*/
|
||||
callAll: function (callback) {
|
||||
|
||||
var args = Array.prototype.splice.call(arguments, 1);
|
||||
|
||||
var i = this.list.length;
|
||||
|
||||
while (i--)
|
||||
{
|
||||
if (this.list[i] && this.list[i][callback])
|
||||
{
|
||||
this.list[i][callback].apply(this.list[i], args);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Resets the cursor to the first item in the list and returns it.
|
||||
*
|
||||
* @name Phaser.ArrayList#first
|
||||
* @property {object} first - The first item in the list.
|
||||
*/
|
||||
Object.defineProperty(Phaser.ArrayList.prototype, "first", {
|
||||
|
||||
get: function () {
|
||||
|
||||
this.position = 0;
|
||||
|
||||
if (this.total > 0)
|
||||
{
|
||||
return this.list[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* Gets the next item in the list and returns it, advancing the cursor.
|
||||
*
|
||||
* @name Phaser.ArrayList#next
|
||||
* @property {object} next - Advanced the cursor and return.
|
||||
*/
|
||||
Object.defineProperty(Phaser.ArrayList.prototype, "next", {
|
||||
|
||||
get: function () {
|
||||
|
||||
if (this.position < this.total)
|
||||
{
|
||||
this.position++;
|
||||
|
||||
return this.list[this.position];
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
Phaser.ArrayList.prototype.constructor = Phaser.ArrayList;
|
||||
</pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<footer>
|
||||
|
||||
|
||||
<span class="copyright">
|
||||
Phaser Copyright © 2012-2014 Photon Storm Ltd.
|
||||
</span>
|
||||
<br />
|
||||
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
|
||||
on Tue May 20 2014 10:05:49 GMT+0100 (BST) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
<br clear="both">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script src="scripts/sunlight.js"></script>
|
||||
<script src="scripts/sunlight.javascript.js"></script>
|
||||
<script src="scripts/sunlight-plugin.doclinks.js"></script>
|
||||
<script src="scripts/sunlight-plugin.linenumbers.js"></script>
|
||||
<script src="scripts/sunlight-plugin.menu.js"></script>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/jquery.scrollTo.js"></script>
|
||||
<script src="scripts/jquery.localScroll.js"></script>
|
||||
<script src="scripts/bootstrap-dropdown.js"></script>
|
||||
<script src="scripts/toc.js"></script>
|
||||
|
||||
|
||||
<script> Sunlight.highlightAll({lineNumbers:true, showMenu: true, enableDoclinks :true}); </script>
|
||||
|
||||
<script>
|
||||
$( function () {
|
||||
$( "#toc" ).toc( {
|
||||
anchorName : function(i, heading, prefix) {
|
||||
return $(heading).attr("id") || ( prefix + i );
|
||||
},
|
||||
selectors : "h1,h2,h3,h4",
|
||||
showAndHide : false,
|
||||
scrollTo : 60
|
||||
} );
|
||||
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
|
||||
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
|
||||
|
||||
} );
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
1512
docs/BitmapData.js.html
Normal file
1512
docs/BitmapData.js.html
Normal file
File diff suppressed because it is too large
Load Diff
1072
docs/BitmapText.js.html
Normal file
1072
docs/BitmapText.js.html
Normal file
File diff suppressed because it is too large
Load Diff
1396
docs/Body.js.html
Normal file
1396
docs/Body.js.html
Normal file
File diff suppressed because it is too large
Load Diff
1135
docs/Body.js_.html
Normal file
1135
docs/Body.js_.html
Normal file
File diff suppressed because it is too large
Load Diff
2365
docs/Body.js__.html
Normal file
2365
docs/Body.js__.html
Normal file
File diff suppressed because it is too large
Load Diff
1014
docs/BodyDebug.js.html
Normal file
1014
docs/BodyDebug.js.html
Normal file
File diff suppressed because it is too large
Load Diff
1236
docs/Button.js.html
Normal file
1236
docs/Button.js.html
Normal file
File diff suppressed because it is too large
Load Diff
1955
docs/Cache.js.html
Normal file
1955
docs/Cache.js.html
Normal file
File diff suppressed because it is too large
Load Diff
1033
docs/Camera.js.html
Normal file
1033
docs/Camera.js.html
Normal file
File diff suppressed because it is too large
Load Diff
883
docs/Canvas.js.html
Normal file
883
docs/Canvas.js.html
Normal file
@@ -0,0 +1,883 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Phaser Source: system/Canvas.js</title>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
|
||||
|
||||
|
||||
<link type="text/css" rel="stylesheet" href="styles/site.cerulean.css">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="navbar navbar-fixed-top navbar-inverse">
|
||||
<div class="navbar-inner">
|
||||
<a class="brand" href="index.html">Phaser</a>
|
||||
<ul class="nav">
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-0">
|
||||
<a href="Phaser.html">Phaser</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Animation.html">Animation</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationManager.html">AnimationManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationParser.html">AnimationParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ArrayList.html">ArrayList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapData.html">BitmapData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapText.html">BitmapText</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Button.html">Button</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Cache.html">Cache</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Camera.html">Camera</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Canvas.html">Canvas</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Color.html">Color</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Device.html">Device</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Easing.html">Easing</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Back.html">Back</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Bounce.html">Bounce</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Circular.html">Circular</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Cubic.html">Cubic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Elastic.html">Elastic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Exponential.html">Exponential</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Linear.html">Linear</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quadratic.html">Quadratic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quartic.html">Quartic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quintic.html">Quintic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Sinusoidal.html">Sinusoidal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Ellipse.html">Ellipse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Events.html">Events</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Filter.html">Filter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Frame.html">Frame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.FrameData.html">FrameData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Game.html">Game</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectCreator.html">GameObjectCreator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Gamepad.html">Gamepad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GamepadButton.html">GamepadButton</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Graphics.html">Graphics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Group.html">Group</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Image.html">Image</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Input.html">Input</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.InputHandler.html">InputHandler</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Key.html">Key</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Keyboard.html">Keyboard</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Line.html">Line</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LinkedList.html">LinkedList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Loader.html">Loader</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LoaderParser.html">LoaderParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Math.html">Math</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Mouse.html">Mouse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.MSPointer.html">MSPointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Net.html">Net</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particle.html">Particle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particles.html">Particles</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Particles.Arcade.Emitter.html">Emitter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Physics.html">Physics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Arcade.html">Arcade</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Arcade.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Ninja.html">Ninja</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.AABB.html">AABB</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.P2.html">P2</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.BodyDebug.html">BodyDebug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.CollisionGroup.html">CollisionGroup</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.ContactMaterial.html">ContactMaterial</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.DistanceConstraint.html">DistanceConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.FixtureList.html">FixtureList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.GearConstraint.html">GearConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.InversePointProxy.html">InversePointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.LockConstraint.html">LockConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Material.html">Material</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PointProxy.html">PointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PrismaticConstraint.html">PrismaticConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.RevoluteConstraint.html">RevoluteConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Spring.html">Spring</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Plugin.html">Plugin</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.PluginManager.html">PluginManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Point.html">Point</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Pointer.html">Pointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Polygon.html">Polygon</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.QuadTree.html">QuadTree</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RandomDataGenerator.html">RandomDataGenerator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Rectangle.html">Rectangle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RenderTexture.html">RenderTexture</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RequestAnimationFrame.html">RequestAnimationFrame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RetroFont.html">RetroFont</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ScaleManager.html">ScaleManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Signal.html">Signal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SignalBinding.html">SignalBinding</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SinglePad.html">SinglePad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sound.html">Sound</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SoundManager.html">SoundManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sprite.html">Sprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SpriteBatch.html">SpriteBatch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Stage.html">Stage</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.State.html">State</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.StateManager.html">StateManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Text.html">Text</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tilemap.html">Tilemap</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapLayer.html">TilemapLayer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapParser.html">TilemapParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tileset.html">Tileset</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TileSprite.html">TileSprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Time.html">Time</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Timer.html">Timer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TimerEvent.html">TimerEvent</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Touch.html">Touch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tween.html">Tween</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TweenManager.html">TweenManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Utils.html">Utils</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Utils.Debug.html">Debug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.World.html">World</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row-fluid">
|
||||
|
||||
|
||||
<div class="span12">
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
|
||||
<h1 class="page-title">Source: system/Canvas.js</h1>
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <rich@photonstorm.com>
|
||||
* @copyright 2014 Photon Storm Ltd.
|
||||
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
||||
*/
|
||||
|
||||
/**
|
||||
* The Canvas class handles everything related to creating the `canvas` DOM tag that Phaser will use, including styles, offset and aspect ratio.
|
||||
*
|
||||
* @class Phaser.Canvas
|
||||
* @static
|
||||
*/
|
||||
Phaser.Canvas = {
|
||||
|
||||
/**
|
||||
* Creates a `canvas` DOM element. The element is not automatically added to the document.
|
||||
*
|
||||
* @method Phaser.Canvas.create
|
||||
* @param {number} [width=256] - The width of the canvas element.
|
||||
* @param {number} [height=256] - The height of the canvas element..
|
||||
* @param {string} [id=''] - If given this will be set as the ID of the canvas element, otherwise no ID will be set.
|
||||
* @param {boolean} [noCocoon=false] - CocoonJS only allows 1 screencanvas object, which should be your game. If you need to create another canvas (i.e. for a texture) set this to 'true'.
|
||||
* @return {HTMLCanvasElement} The newly created canvas element.
|
||||
*/
|
||||
create: function (width, height, id, noCocoon) {
|
||||
|
||||
if (typeof noCocoon === 'undefined') { noCocoon = false; }
|
||||
|
||||
width = width || 256;
|
||||
height = height || 256;
|
||||
|
||||
if (noCocoon)
|
||||
{
|
||||
var canvas = document.createElement('canvas');
|
||||
}
|
||||
else
|
||||
{
|
||||
var canvas = document.createElement(navigator.isCocoonJS ? 'screencanvas' : 'canvas');
|
||||
}
|
||||
|
||||
if (typeof id === 'string' && id !== '')
|
||||
{
|
||||
canvas.id = id;
|
||||
}
|
||||
|
||||
canvas.width = width;
|
||||
canvas.height = height;
|
||||
|
||||
canvas.style.display = 'block';
|
||||
|
||||
return canvas;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Get the DOM offset values of any given element
|
||||
* @method Phaser.Canvas.getOffset
|
||||
* @param {HTMLElement} element - The targeted element that we want to retrieve the offset.
|
||||
* @param {Phaser.Point} [point] - The point we want to take the x/y values of the offset.
|
||||
* @return {Phaser.Point} - A point objet with the offsetX and Y as its properties.
|
||||
*/
|
||||
getOffset: function (element, point) {
|
||||
|
||||
point = point || new Phaser.Point();
|
||||
|
||||
var box = element.getBoundingClientRect();
|
||||
var clientTop = element.clientTop || document.body.clientTop || 0;
|
||||
var clientLeft = element.clientLeft || document.body.clientLeft || 0;
|
||||
|
||||
// Without this check Chrome is now throwing console warnings about strict vs. quirks :(
|
||||
|
||||
var scrollTop = 0;
|
||||
var scrollLeft = 0;
|
||||
|
||||
if (document.compatMode === 'CSS1Compat')
|
||||
{
|
||||
scrollTop = window.pageYOffset || document.documentElement.scrollTop || element.scrollTop || 0;
|
||||
scrollLeft = window.pageXOffset || document.documentElement.scrollLeft || element.scrollLeft || 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
scrollTop = window.pageYOffset || document.body.scrollTop || element.scrollTop || 0;
|
||||
scrollLeft = window.pageXOffset || document.body.scrollLeft || element.scrollLeft || 0;
|
||||
}
|
||||
|
||||
point.x = box.left + scrollLeft - clientLeft;
|
||||
point.y = box.top + scrollTop - clientTop;
|
||||
|
||||
return point;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns the aspect ratio of the given canvas.
|
||||
*
|
||||
* @method Phaser.Canvas.getAspectRatio
|
||||
* @param {HTMLCanvasElement} canvas - The canvas to get the aspect ratio from.
|
||||
* @return {number} The ratio between canvas' width and height.
|
||||
*/
|
||||
getAspectRatio: function (canvas) {
|
||||
return canvas.width / canvas.height;
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the background color behind the canvas. This changes the canvas style property.
|
||||
*
|
||||
* @method Phaser.Canvas.setBackgroundColor
|
||||
* @param {HTMLCanvasElement} canvas - The canvas to set the background color on.
|
||||
* @param {string} [color] - The color to set. Can be in the format 'rgb(r,g,b)', or '#RRGGBB' or any valid CSS color.
|
||||
* @return {HTMLCanvasElement} Returns the source canvas.
|
||||
*/
|
||||
setBackgroundColor: function (canvas, color) {
|
||||
|
||||
color = color || 'rgb(0,0,0)';
|
||||
|
||||
canvas.style.backgroundColor = color;
|
||||
|
||||
return canvas;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the touch-action property on the canvas style. Can be used to disable default browser touch actions.
|
||||
*
|
||||
* @method Phaser.Canvas.setTouchAction
|
||||
* @param {HTMLCanvasElement} canvas - The canvas to set the touch action on.
|
||||
* @param {String} [value] - The touch action to set. Defaults to 'none'.
|
||||
* @return {HTMLCanvasElement} The source canvas.
|
||||
*/
|
||||
setTouchAction: function (canvas, value) {
|
||||
|
||||
value = value || 'none';
|
||||
|
||||
canvas.style.msTouchAction = value;
|
||||
canvas.style['ms-touch-action'] = value;
|
||||
canvas.style['touch-action'] = value;
|
||||
|
||||
return canvas;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the user-select property on the canvas style. Can be used to disable default browser selection actions.
|
||||
*
|
||||
* @method Phaser.Canvas.setUserSelect
|
||||
* @param {HTMLCanvasElement} canvas - The canvas to set the touch action on.
|
||||
* @param {String} [value] - The touch action to set. Defaults to 'none'.
|
||||
* @return {HTMLCanvasElement} The source canvas.
|
||||
*/
|
||||
setUserSelect: function (canvas, value) {
|
||||
|
||||
value = value || 'none';
|
||||
|
||||
canvas.style['-webkit-touch-callout'] = value;
|
||||
canvas.style['-webkit-user-select'] = value;
|
||||
canvas.style['-khtml-user-select'] = value;
|
||||
canvas.style['-moz-user-select'] = value;
|
||||
canvas.style['-ms-user-select'] = value;
|
||||
canvas.style['user-select'] = value;
|
||||
canvas.style['-webkit-tap-highlight-color'] = 'rgba(0, 0, 0, 0)';
|
||||
|
||||
return canvas;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Adds the given canvas element to the DOM. The canvas will be added as a child of the given parent.
|
||||
* If no parent is given it will be added as a child of the document.body.
|
||||
*
|
||||
* @method Phaser.Canvas.addToDOM
|
||||
* @param {HTMLCanvasElement} canvas - The canvas to set the touch action on.
|
||||
* @param {string|HTMLElement} parent - The DOM element to add the canvas to.
|
||||
* @param {boolean} [overflowHidden=true] - 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) {
|
||||
|
||||
var target;
|
||||
|
||||
if (typeof overflowHidden === 'undefined') { overflowHidden = true; }
|
||||
|
||||
if (parent)
|
||||
{
|
||||
if (typeof parent === 'string')
|
||||
{
|
||||
// hopefully an element ID
|
||||
target = document.getElementById(parent);
|
||||
}
|
||||
else if (typeof parent === 'object' && parent.nodeType === 1)
|
||||
{
|
||||
// quick test for a HTMLelement
|
||||
target = parent;
|
||||
}
|
||||
}
|
||||
|
||||
// Fallback, covers an invalid ID and a non HTMLelement object
|
||||
if (!target)
|
||||
{
|
||||
target = document.body;
|
||||
}
|
||||
|
||||
if (overflowHidden && target.style)
|
||||
{
|
||||
target.style.overflow = 'hidden';
|
||||
}
|
||||
|
||||
target.appendChild(canvas);
|
||||
|
||||
return canvas;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the transform of the given canvas to the matrix values provided.
|
||||
*
|
||||
* @method Phaser.Canvas.setTransform
|
||||
* @param {CanvasRenderingContext2D} context - The context to set the transform on.
|
||||
* @param {number} translateX - The value to translate horizontally by.
|
||||
* @param {number} translateY - The value to translate vertically by.
|
||||
* @param {number} scaleX - The value to scale horizontally by.
|
||||
* @param {number} scaleY - The value to scale vertically by.
|
||||
* @param {number} skewX - The value to skew horizontaly by.
|
||||
* @param {number} skewY - The value to skew vertically by.
|
||||
* @return {CanvasRenderingContext2D} Returns the source context.
|
||||
*/
|
||||
setTransform: function (context, translateX, translateY, scaleX, scaleY, skewX, skewY) {
|
||||
|
||||
context.setTransform(scaleX, skewX, skewY, scaleY, translateX, translateY);
|
||||
|
||||
return context;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the Image Smoothing property on the given context. Set to false to disable image smoothing.
|
||||
* By default browsers have image smoothing enabled, which isn't always what you visually want, especially
|
||||
* when using pixel art in a game. Note that this sets the property on the context itself, so that any image
|
||||
* drawn to the context will be affected. This sets the property across all current browsers but support is
|
||||
* patchy on earlier browsers, especially on mobile.
|
||||
*
|
||||
* @method Phaser.Canvas.setSmoothingEnabled
|
||||
* @param {CanvasRenderingContext2D} context - The context to enable or disable the image smoothing on.
|
||||
* @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) {
|
||||
|
||||
context['imageSmoothingEnabled'] = value;
|
||||
context['mozImageSmoothingEnabled'] = value;
|
||||
context['oImageSmoothingEnabled'] = value;
|
||||
context['webkitImageSmoothingEnabled'] = value;
|
||||
context['msImageSmoothingEnabled'] = value;
|
||||
|
||||
return context;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the CSS image-rendering property on the given canvas to be 'crisp' (aka 'optimize contrast on webkit').
|
||||
* Note that if this doesn't given the desired result then see the setSmoothingEnabled.
|
||||
*
|
||||
* @method Phaser.Canvas.setImageRenderingCrisp
|
||||
* @param {HTMLCanvasElement} canvas - The canvas to set image-rendering crisp on.
|
||||
* @return {HTMLCanvasElement} Returns the source canvas.
|
||||
*/
|
||||
setImageRenderingCrisp: function (canvas) {
|
||||
|
||||
canvas.style['image-rendering'] = 'optimizeSpeed';
|
||||
canvas.style['image-rendering'] = 'crisp-edges';
|
||||
canvas.style['image-rendering'] = '-moz-crisp-edges';
|
||||
canvas.style['image-rendering'] = '-webkit-optimize-contrast';
|
||||
canvas.style['image-rendering'] = 'optimize-contrast';
|
||||
canvas.style.msInterpolationMode = 'nearest-neighbor';
|
||||
|
||||
return canvas;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the CSS image-rendering property on the given canvas to be 'bicubic' (aka 'auto').
|
||||
* Note that if this doesn't given the desired result then see the CanvasUtils.setSmoothingEnabled method.
|
||||
*
|
||||
* @method Phaser.Canvas.setImageRenderingBicubic
|
||||
* @param {HTMLCanvasElement} canvas The canvas to set image-rendering bicubic on.
|
||||
* @return {HTMLCanvasElement} Returns the source canvas.
|
||||
*/
|
||||
setImageRenderingBicubic: function (canvas) {
|
||||
|
||||
canvas.style['image-rendering'] = 'auto';
|
||||
canvas.style.msInterpolationMode = 'bicubic';
|
||||
|
||||
return canvas;
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
</pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<footer>
|
||||
|
||||
|
||||
<span class="copyright">
|
||||
Phaser Copyright © 2012-2014 Photon Storm Ltd.
|
||||
</span>
|
||||
<br />
|
||||
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
|
||||
on Tue May 20 2014 10:05:49 GMT+0100 (BST) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
<br clear="both">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script src="scripts/sunlight.js"></script>
|
||||
<script src="scripts/sunlight.javascript.js"></script>
|
||||
<script src="scripts/sunlight-plugin.doclinks.js"></script>
|
||||
<script src="scripts/sunlight-plugin.linenumbers.js"></script>
|
||||
<script src="scripts/sunlight-plugin.menu.js"></script>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/jquery.scrollTo.js"></script>
|
||||
<script src="scripts/jquery.localScroll.js"></script>
|
||||
<script src="scripts/bootstrap-dropdown.js"></script>
|
||||
<script src="scripts/toc.js"></script>
|
||||
|
||||
|
||||
<script> Sunlight.highlightAll({lineNumbers:true, showMenu: true, enableDoclinks :true}); </script>
|
||||
|
||||
<script>
|
||||
$( function () {
|
||||
$( "#toc" ).toc( {
|
||||
anchorName : function(i, heading, prefix) {
|
||||
return $(heading).attr("id") || ( prefix + i );
|
||||
},
|
||||
selectors : "h1,h2,h3,h4",
|
||||
showAndHide : false,
|
||||
scrollTo : 60
|
||||
} );
|
||||
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
|
||||
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
|
||||
|
||||
} );
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
1123
docs/Circle.js.html
Normal file
1123
docs/Circle.js.html
Normal file
File diff suppressed because it is too large
Load Diff
3211
docs/Circle.js_.html
Normal file
3211
docs/Circle.js_.html
Normal file
File diff suppressed because it is too large
Load Diff
608
docs/CollisionGroup.js.html
Normal file
608
docs/CollisionGroup.js.html
Normal file
@@ -0,0 +1,608 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Phaser Source: physics/p2/CollisionGroup.js</title>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
|
||||
|
||||
|
||||
<link type="text/css" rel="stylesheet" href="styles/site.cerulean.css">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="navbar navbar-fixed-top navbar-inverse">
|
||||
<div class="navbar-inner">
|
||||
<a class="brand" href="index.html">Phaser</a>
|
||||
<ul class="nav">
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-0">
|
||||
<a href="Phaser.html">Phaser</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Animation.html">Animation</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationManager.html">AnimationManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationParser.html">AnimationParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ArrayList.html">ArrayList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapData.html">BitmapData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapText.html">BitmapText</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Button.html">Button</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Cache.html">Cache</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Camera.html">Camera</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Canvas.html">Canvas</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Color.html">Color</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Device.html">Device</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Easing.html">Easing</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Back.html">Back</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Bounce.html">Bounce</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Circular.html">Circular</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Cubic.html">Cubic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Elastic.html">Elastic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Exponential.html">Exponential</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Linear.html">Linear</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quadratic.html">Quadratic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quartic.html">Quartic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quintic.html">Quintic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Sinusoidal.html">Sinusoidal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Ellipse.html">Ellipse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Events.html">Events</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Filter.html">Filter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Frame.html">Frame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.FrameData.html">FrameData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Game.html">Game</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectCreator.html">GameObjectCreator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Gamepad.html">Gamepad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GamepadButton.html">GamepadButton</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Graphics.html">Graphics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Group.html">Group</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Image.html">Image</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Input.html">Input</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.InputHandler.html">InputHandler</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Key.html">Key</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Keyboard.html">Keyboard</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Line.html">Line</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LinkedList.html">LinkedList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Loader.html">Loader</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LoaderParser.html">LoaderParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Math.html">Math</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Mouse.html">Mouse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.MSPointer.html">MSPointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Net.html">Net</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particle.html">Particle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particles.html">Particles</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Particles.Arcade.Emitter.html">Emitter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Physics.html">Physics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Arcade.html">Arcade</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Arcade.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Ninja.html">Ninja</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.AABB.html">AABB</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.P2.html">P2</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.BodyDebug.html">BodyDebug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.CollisionGroup.html">CollisionGroup</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.ContactMaterial.html">ContactMaterial</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.DistanceConstraint.html">DistanceConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.FixtureList.html">FixtureList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.GearConstraint.html">GearConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.InversePointProxy.html">InversePointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.LockConstraint.html">LockConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Material.html">Material</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PointProxy.html">PointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PrismaticConstraint.html">PrismaticConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.RevoluteConstraint.html">RevoluteConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Spring.html">Spring</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Plugin.html">Plugin</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.PluginManager.html">PluginManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Point.html">Point</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Pointer.html">Pointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Polygon.html">Polygon</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.QuadTree.html">QuadTree</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RandomDataGenerator.html">RandomDataGenerator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Rectangle.html">Rectangle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RenderTexture.html">RenderTexture</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RequestAnimationFrame.html">RequestAnimationFrame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RetroFont.html">RetroFont</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ScaleManager.html">ScaleManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Signal.html">Signal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SignalBinding.html">SignalBinding</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SinglePad.html">SinglePad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sound.html">Sound</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SoundManager.html">SoundManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sprite.html">Sprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SpriteBatch.html">SpriteBatch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Stage.html">Stage</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.State.html">State</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.StateManager.html">StateManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Text.html">Text</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tilemap.html">Tilemap</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapLayer.html">TilemapLayer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapParser.html">TilemapParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tileset.html">Tileset</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TileSprite.html">TileSprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Time.html">Time</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Timer.html">Timer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TimerEvent.html">TimerEvent</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Touch.html">Touch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tween.html">Tween</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TweenManager.html">TweenManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Utils.html">Utils</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Utils.Debug.html">Debug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.World.html">World</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row-fluid">
|
||||
|
||||
|
||||
<div class="span12">
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
|
||||
<h1 class="page-title">Source: physics/p2/CollisionGroup.js</h1>
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <rich@photonstorm.com>
|
||||
* @copyright 2014 Photon Storm Ltd.
|
||||
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Collision Group
|
||||
*
|
||||
* @class Phaser.Physics.P2.CollisionGroup
|
||||
* @classdesc Physics Collision Group Constructor
|
||||
* @constructor
|
||||
*/
|
||||
Phaser.Physics.P2.CollisionGroup = function (bitmask) {
|
||||
|
||||
/**
|
||||
* @property {number} mask - The CollisionGroup bitmask.
|
||||
*/
|
||||
this.mask = bitmask;
|
||||
|
||||
};
|
||||
</pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<footer>
|
||||
|
||||
|
||||
<span class="copyright">
|
||||
Phaser Copyright © 2012-2014 Photon Storm Ltd.
|
||||
</span>
|
||||
<br />
|
||||
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
|
||||
on Tue May 20 2014 10:05:49 GMT+0100 (BST) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
<br clear="both">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script src="scripts/sunlight.js"></script>
|
||||
<script src="scripts/sunlight.javascript.js"></script>
|
||||
<script src="scripts/sunlight-plugin.doclinks.js"></script>
|
||||
<script src="scripts/sunlight-plugin.linenumbers.js"></script>
|
||||
<script src="scripts/sunlight-plugin.menu.js"></script>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/jquery.scrollTo.js"></script>
|
||||
<script src="scripts/jquery.localScroll.js"></script>
|
||||
<script src="scripts/bootstrap-dropdown.js"></script>
|
||||
<script src="scripts/toc.js"></script>
|
||||
|
||||
|
||||
<script> Sunlight.highlightAll({lineNumbers:true, showMenu: true, enableDoclinks :true}); </script>
|
||||
|
||||
<script>
|
||||
$( function () {
|
||||
$( "#toc" ).toc( {
|
||||
anchorName : function(i, heading, prefix) {
|
||||
return $(heading).attr("id") || ( prefix + i );
|
||||
},
|
||||
selectors : "h1,h2,h3,h4",
|
||||
showAndHide : false,
|
||||
scrollTo : 60
|
||||
} );
|
||||
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
|
||||
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
|
||||
|
||||
} );
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
1537
docs/Color.js.html
Normal file
1537
docs/Color.js.html
Normal file
File diff suppressed because it is too large
Load Diff
651
docs/ContactMaterial.js.html
Normal file
651
docs/ContactMaterial.js.html
Normal file
@@ -0,0 +1,651 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Phaser Source: physics/p2/ContactMaterial.js</title>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
|
||||
|
||||
|
||||
<link type="text/css" rel="stylesheet" href="styles/site.cerulean.css">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="navbar navbar-fixed-top navbar-inverse">
|
||||
<div class="navbar-inner">
|
||||
<a class="brand" href="index.html">Phaser</a>
|
||||
<ul class="nav">
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-0">
|
||||
<a href="Phaser.html">Phaser</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Animation.html">Animation</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationManager.html">AnimationManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationParser.html">AnimationParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ArrayList.html">ArrayList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapData.html">BitmapData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapText.html">BitmapText</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Button.html">Button</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Cache.html">Cache</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Camera.html">Camera</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Canvas.html">Canvas</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Color.html">Color</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Device.html">Device</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Easing.html">Easing</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Back.html">Back</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Bounce.html">Bounce</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Circular.html">Circular</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Cubic.html">Cubic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Elastic.html">Elastic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Exponential.html">Exponential</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Linear.html">Linear</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quadratic.html">Quadratic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quartic.html">Quartic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quintic.html">Quintic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Sinusoidal.html">Sinusoidal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Ellipse.html">Ellipse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Events.html">Events</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Filter.html">Filter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Frame.html">Frame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.FrameData.html">FrameData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Game.html">Game</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectCreator.html">GameObjectCreator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Gamepad.html">Gamepad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GamepadButton.html">GamepadButton</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Graphics.html">Graphics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Group.html">Group</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Image.html">Image</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Input.html">Input</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.InputHandler.html">InputHandler</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Key.html">Key</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Keyboard.html">Keyboard</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Line.html">Line</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LinkedList.html">LinkedList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Loader.html">Loader</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LoaderParser.html">LoaderParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Math.html">Math</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Mouse.html">Mouse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.MSPointer.html">MSPointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Net.html">Net</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particle.html">Particle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particles.html">Particles</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Particles.Arcade.Emitter.html">Emitter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Physics.html">Physics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Arcade.html">Arcade</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Arcade.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Ninja.html">Ninja</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.AABB.html">AABB</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.P2.html">P2</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.BodyDebug.html">BodyDebug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.CollisionGroup.html">CollisionGroup</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.ContactMaterial.html">ContactMaterial</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.DistanceConstraint.html">DistanceConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.FixtureList.html">FixtureList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.GearConstraint.html">GearConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.InversePointProxy.html">InversePointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.LockConstraint.html">LockConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Material.html">Material</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PointProxy.html">PointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PrismaticConstraint.html">PrismaticConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.RevoluteConstraint.html">RevoluteConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Spring.html">Spring</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Plugin.html">Plugin</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.PluginManager.html">PluginManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Point.html">Point</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Pointer.html">Pointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Polygon.html">Polygon</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.QuadTree.html">QuadTree</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RandomDataGenerator.html">RandomDataGenerator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Rectangle.html">Rectangle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RenderTexture.html">RenderTexture</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RequestAnimationFrame.html">RequestAnimationFrame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RetroFont.html">RetroFont</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ScaleManager.html">ScaleManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Signal.html">Signal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SignalBinding.html">SignalBinding</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SinglePad.html">SinglePad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sound.html">Sound</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SoundManager.html">SoundManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sprite.html">Sprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SpriteBatch.html">SpriteBatch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Stage.html">Stage</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.State.html">State</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.StateManager.html">StateManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Text.html">Text</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tilemap.html">Tilemap</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapLayer.html">TilemapLayer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapParser.html">TilemapParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tileset.html">Tileset</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TileSprite.html">TileSprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Time.html">Time</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Timer.html">Timer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TimerEvent.html">TimerEvent</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Touch.html">Touch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tween.html">Tween</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TweenManager.html">TweenManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Utils.html">Utils</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Utils.Debug.html">Debug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.World.html">World</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row-fluid">
|
||||
|
||||
|
||||
<div class="span12">
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
|
||||
<h1 class="page-title">Source: physics/p2/ContactMaterial.js</h1>
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <rich@photonstorm.com>
|
||||
* @copyright 2014 Photon Storm Ltd.
|
||||
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Defines a physics material
|
||||
*
|
||||
* @class Phaser.Physics.P2.ContactMaterial
|
||||
* @classdesc Physics ContactMaterial Constructor
|
||||
* @constructor
|
||||
* @param {Phaser.Physics.P2.Material} materialA
|
||||
* @param {Phaser.Physics.P2.Material} materialB
|
||||
* @param {object} [options]
|
||||
*/
|
||||
Phaser.Physics.P2.ContactMaterial = function (materialA, materialB, options) {
|
||||
|
||||
/**
|
||||
* @property {number} id - The contact material identifier.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @property {Phaser.Physics.P2.Material} materialA - First material participating in the contact material.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @property {Phaser.Physics.P2.Material} materialB - First second participating in the contact material.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @property {number} [friction=0.3] - Friction to use in the contact of these two materials.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @property {number} [restitution=0.0] - Restitution to use in the contact of these two materials.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @property {number} [stiffness=1e7] - Stiffness of the resulting ContactEquation that this ContactMaterial generate.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @property {number} [relaxation=3] - Relaxation of the resulting ContactEquation that this ContactMaterial generate.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @property {number} [frictionStiffness=1e7] - Stiffness of the resulting FrictionEquation that this ContactMaterial generate.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @property {number} [frictionRelaxation=3] - Relaxation of the resulting FrictionEquation that this ContactMaterial generate.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @property {number} [surfaceVelocity=0] - Will add surface velocity to this material. If bodyA rests on top if bodyB, and the surface velocity is positive, bodyA will slide to the right.
|
||||
*/
|
||||
|
||||
p2.ContactMaterial.call(this, materialA, materialB, options);
|
||||
|
||||
};
|
||||
|
||||
Phaser.Physics.P2.ContactMaterial.prototype = Object.create(p2.ContactMaterial.prototype);
|
||||
Phaser.Physics.P2.ContactMaterial.prototype.constructor = Phaser.Physics.P2.ContactMaterial;
|
||||
</pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<footer>
|
||||
|
||||
|
||||
<span class="copyright">
|
||||
Phaser Copyright © 2012-2014 Photon Storm Ltd.
|
||||
</span>
|
||||
<br />
|
||||
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
|
||||
on Tue May 20 2014 10:05:49 GMT+0100 (BST) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
<br clear="both">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script src="scripts/sunlight.js"></script>
|
||||
<script src="scripts/sunlight.javascript.js"></script>
|
||||
<script src="scripts/sunlight-plugin.doclinks.js"></script>
|
||||
<script src="scripts/sunlight-plugin.linenumbers.js"></script>
|
||||
<script src="scripts/sunlight-plugin.menu.js"></script>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/jquery.scrollTo.js"></script>
|
||||
<script src="scripts/jquery.localScroll.js"></script>
|
||||
<script src="scripts/bootstrap-dropdown.js"></script>
|
||||
<script src="scripts/toc.js"></script>
|
||||
|
||||
|
||||
<script> Sunlight.highlightAll({lineNumbers:true, showMenu: true, enableDoclinks :true}); </script>
|
||||
|
||||
<script>
|
||||
$( function () {
|
||||
$( "#toc" ).toc( {
|
||||
anchorName : function(i, heading, prefix) {
|
||||
return $(heading).attr("id") || ( prefix + i );
|
||||
},
|
||||
selectors : "h1,h2,h3,h4",
|
||||
showAndHide : false,
|
||||
scrollTo : 60
|
||||
} );
|
||||
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
|
||||
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
|
||||
|
||||
} );
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
1325
docs/Debug.js.html
Normal file
1325
docs/Debug.js.html
Normal file
File diff suppressed because it is too large
Load Diff
1465
docs/Device.js.html
Normal file
1465
docs/Device.js.html
Normal file
File diff suppressed because it is too large
Load Diff
627
docs/DistanceConstraint.js.html
Normal file
627
docs/DistanceConstraint.js.html
Normal file
@@ -0,0 +1,627 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Phaser Source: physics/p2/DistanceConstraint.js</title>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
|
||||
|
||||
|
||||
<link type="text/css" rel="stylesheet" href="styles/site.cerulean.css">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="navbar navbar-fixed-top navbar-inverse">
|
||||
<div class="navbar-inner">
|
||||
<a class="brand" href="index.html">Phaser</a>
|
||||
<ul class="nav">
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-0">
|
||||
<a href="Phaser.html">Phaser</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Animation.html">Animation</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationManager.html">AnimationManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationParser.html">AnimationParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ArrayList.html">ArrayList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapData.html">BitmapData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapText.html">BitmapText</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Button.html">Button</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Cache.html">Cache</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Camera.html">Camera</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Canvas.html">Canvas</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Color.html">Color</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Device.html">Device</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Easing.html">Easing</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Back.html">Back</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Bounce.html">Bounce</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Circular.html">Circular</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Cubic.html">Cubic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Elastic.html">Elastic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Exponential.html">Exponential</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Linear.html">Linear</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quadratic.html">Quadratic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quartic.html">Quartic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quintic.html">Quintic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Sinusoidal.html">Sinusoidal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Ellipse.html">Ellipse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Events.html">Events</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Filter.html">Filter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Frame.html">Frame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.FrameData.html">FrameData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Game.html">Game</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectCreator.html">GameObjectCreator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Gamepad.html">Gamepad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GamepadButton.html">GamepadButton</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Graphics.html">Graphics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Group.html">Group</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Image.html">Image</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Input.html">Input</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.InputHandler.html">InputHandler</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Key.html">Key</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Keyboard.html">Keyboard</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Line.html">Line</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LinkedList.html">LinkedList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Loader.html">Loader</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LoaderParser.html">LoaderParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Math.html">Math</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Mouse.html">Mouse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.MSPointer.html">MSPointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Net.html">Net</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particle.html">Particle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particles.html">Particles</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Particles.Arcade.Emitter.html">Emitter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Physics.html">Physics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Arcade.html">Arcade</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Arcade.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Ninja.html">Ninja</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.AABB.html">AABB</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.P2.html">P2</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.BodyDebug.html">BodyDebug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.CollisionGroup.html">CollisionGroup</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.ContactMaterial.html">ContactMaterial</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.DistanceConstraint.html">DistanceConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.FixtureList.html">FixtureList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.GearConstraint.html">GearConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.InversePointProxy.html">InversePointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.LockConstraint.html">LockConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Material.html">Material</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PointProxy.html">PointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PrismaticConstraint.html">PrismaticConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.RevoluteConstraint.html">RevoluteConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Spring.html">Spring</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Plugin.html">Plugin</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.PluginManager.html">PluginManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Point.html">Point</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Pointer.html">Pointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Polygon.html">Polygon</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.QuadTree.html">QuadTree</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RandomDataGenerator.html">RandomDataGenerator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Rectangle.html">Rectangle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RenderTexture.html">RenderTexture</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RequestAnimationFrame.html">RequestAnimationFrame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RetroFont.html">RetroFont</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ScaleManager.html">ScaleManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Signal.html">Signal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SignalBinding.html">SignalBinding</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SinglePad.html">SinglePad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sound.html">Sound</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SoundManager.html">SoundManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sprite.html">Sprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SpriteBatch.html">SpriteBatch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Stage.html">Stage</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.State.html">State</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.StateManager.html">StateManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Text.html">Text</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tilemap.html">Tilemap</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapLayer.html">TilemapLayer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapParser.html">TilemapParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tileset.html">Tileset</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TileSprite.html">TileSprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Time.html">Time</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Timer.html">Timer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TimerEvent.html">TimerEvent</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Touch.html">Touch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tween.html">Tween</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TweenManager.html">TweenManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Utils.html">Utils</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Utils.Debug.html">Debug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.World.html">World</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row-fluid">
|
||||
|
||||
|
||||
<div class="span12">
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
|
||||
<h1 class="page-title">Source: physics/p2/DistanceConstraint.js</h1>
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <rich@photonstorm.com>
|
||||
* @copyright 2014 Photon Storm Ltd.
|
||||
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
||||
*/
|
||||
|
||||
/**
|
||||
* A constraint that tries to keep the distance between two bodies constant.
|
||||
*
|
||||
* @class Phaser.Physics.P2.DistanceConstraint
|
||||
* @classdesc Physics DistanceConstraint Constructor
|
||||
* @constructor
|
||||
* @param {Phaser.Physics.P2} world - A reference to the P2 World.
|
||||
* @param {p2.Body} bodyA - First connected body.
|
||||
* @param {p2.Body} bodyB - Second connected body.
|
||||
* @param {number} distance - The distance to keep between the bodies.
|
||||
* @param {number} [maxForce] - The maximum force that should be applied to constrain the bodies.
|
||||
*/
|
||||
Phaser.Physics.P2.DistanceConstraint = function (world, bodyA, bodyB, distance, maxForce) {
|
||||
|
||||
if (typeof distance === 'undefined') { distance = 100; }
|
||||
|
||||
/**
|
||||
* @property {Phaser.Game} game - Local reference to game.
|
||||
*/
|
||||
this.game = world.game;
|
||||
|
||||
/**
|
||||
* @property {Phaser.Physics.P2} world - Local reference to P2 World.
|
||||
*/
|
||||
this.world = world;
|
||||
|
||||
distance = world.pxm(distance);
|
||||
|
||||
p2.DistanceConstraint.call(this, bodyA, bodyB, distance, {maxForce: maxForce});
|
||||
|
||||
};
|
||||
|
||||
Phaser.Physics.P2.DistanceConstraint.prototype = Object.create(p2.DistanceConstraint.prototype);
|
||||
Phaser.Physics.P2.DistanceConstraint.prototype.constructor = Phaser.Physics.P2.DistanceConstraint;
|
||||
</pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<footer>
|
||||
|
||||
|
||||
<span class="copyright">
|
||||
Phaser Copyright © 2012-2014 Photon Storm Ltd.
|
||||
</span>
|
||||
<br />
|
||||
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
|
||||
on Tue May 20 2014 10:05:49 GMT+0100 (BST) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
<br clear="both">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script src="scripts/sunlight.js"></script>
|
||||
<script src="scripts/sunlight.javascript.js"></script>
|
||||
<script src="scripts/sunlight-plugin.doclinks.js"></script>
|
||||
<script src="scripts/sunlight-plugin.linenumbers.js"></script>
|
||||
<script src="scripts/sunlight-plugin.menu.js"></script>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/jquery.scrollTo.js"></script>
|
||||
<script src="scripts/jquery.localScroll.js"></script>
|
||||
<script src="scripts/bootstrap-dropdown.js"></script>
|
||||
<script src="scripts/toc.js"></script>
|
||||
|
||||
|
||||
<script> Sunlight.highlightAll({lineNumbers:true, showMenu: true, enableDoclinks :true}); </script>
|
||||
|
||||
<script>
|
||||
$( function () {
|
||||
$( "#toc" ).toc( {
|
||||
anchorName : function(i, heading, prefix) {
|
||||
return $(heading).attr("id") || ( prefix + i );
|
||||
},
|
||||
selectors : "h1,h2,h3,h4",
|
||||
showAndHide : false,
|
||||
scrollTo : 60
|
||||
} );
|
||||
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
|
||||
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
|
||||
|
||||
} );
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
1150
docs/Easing.js.html
Normal file
1150
docs/Easing.js.html
Normal file
File diff suppressed because it is too large
Load Diff
883
docs/Ellipse.js.html
Normal file
883
docs/Ellipse.js.html
Normal file
@@ -0,0 +1,883 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Phaser Source: geom/Ellipse.js</title>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
|
||||
|
||||
|
||||
<link type="text/css" rel="stylesheet" href="styles/site.cerulean.css">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="navbar navbar-fixed-top navbar-inverse">
|
||||
<div class="navbar-inner">
|
||||
<a class="brand" href="index.html">Phaser</a>
|
||||
<ul class="nav">
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-0">
|
||||
<a href="Phaser.html">Phaser</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Animation.html">Animation</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationManager.html">AnimationManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationParser.html">AnimationParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ArrayList.html">ArrayList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapData.html">BitmapData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapText.html">BitmapText</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Button.html">Button</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Cache.html">Cache</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Camera.html">Camera</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Canvas.html">Canvas</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Color.html">Color</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Device.html">Device</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Easing.html">Easing</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Back.html">Back</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Bounce.html">Bounce</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Circular.html">Circular</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Cubic.html">Cubic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Elastic.html">Elastic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Exponential.html">Exponential</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Linear.html">Linear</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quadratic.html">Quadratic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quartic.html">Quartic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quintic.html">Quintic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Sinusoidal.html">Sinusoidal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Ellipse.html">Ellipse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Events.html">Events</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Filter.html">Filter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Frame.html">Frame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.FrameData.html">FrameData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Game.html">Game</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectCreator.html">GameObjectCreator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Gamepad.html">Gamepad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GamepadButton.html">GamepadButton</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Graphics.html">Graphics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Group.html">Group</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Image.html">Image</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Input.html">Input</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.InputHandler.html">InputHandler</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Key.html">Key</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Keyboard.html">Keyboard</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Line.html">Line</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LinkedList.html">LinkedList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Loader.html">Loader</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LoaderParser.html">LoaderParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Math.html">Math</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Mouse.html">Mouse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.MSPointer.html">MSPointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Net.html">Net</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particle.html">Particle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particles.html">Particles</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Particles.Arcade.Emitter.html">Emitter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Physics.html">Physics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Arcade.html">Arcade</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Arcade.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Ninja.html">Ninja</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.AABB.html">AABB</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.P2.html">P2</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.BodyDebug.html">BodyDebug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.CollisionGroup.html">CollisionGroup</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.ContactMaterial.html">ContactMaterial</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.DistanceConstraint.html">DistanceConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.FixtureList.html">FixtureList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.GearConstraint.html">GearConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.InversePointProxy.html">InversePointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.LockConstraint.html">LockConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Material.html">Material</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PointProxy.html">PointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PrismaticConstraint.html">PrismaticConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.RevoluteConstraint.html">RevoluteConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Spring.html">Spring</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Plugin.html">Plugin</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.PluginManager.html">PluginManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Point.html">Point</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Pointer.html">Pointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Polygon.html">Polygon</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.QuadTree.html">QuadTree</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RandomDataGenerator.html">RandomDataGenerator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Rectangle.html">Rectangle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RenderTexture.html">RenderTexture</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RequestAnimationFrame.html">RequestAnimationFrame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RetroFont.html">RetroFont</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ScaleManager.html">ScaleManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Signal.html">Signal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SignalBinding.html">SignalBinding</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SinglePad.html">SinglePad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sound.html">Sound</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SoundManager.html">SoundManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sprite.html">Sprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SpriteBatch.html">SpriteBatch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Stage.html">Stage</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.State.html">State</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.StateManager.html">StateManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Text.html">Text</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tilemap.html">Tilemap</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapLayer.html">TilemapLayer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapParser.html">TilemapParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tileset.html">Tileset</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TileSprite.html">TileSprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Time.html">Time</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Timer.html">Timer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TimerEvent.html">TimerEvent</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Touch.html">Touch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tween.html">Tween</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TweenManager.html">TweenManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Utils.html">Utils</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Utils.Debug.html">Debug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.World.html">World</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row-fluid">
|
||||
|
||||
|
||||
<div class="span12">
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
|
||||
<h1 class="page-title">Source: geom/Ellipse.js</h1>
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <rich@photonstorm.com>
|
||||
* @author Chad Engler <chad@pantherdev.com>
|
||||
* @copyright 2014 Photon Storm Ltd.
|
||||
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Creates a Ellipse object. A curve on a plane surrounding two focal points.
|
||||
* @class Ellipse
|
||||
* @classdesc Phaser - Ellipse
|
||||
* @constructor
|
||||
* @param {number} [x=0] - The X coordinate of the upper-left corner of the framing rectangle of this ellipse.
|
||||
* @param {number} [y=0] - The Y coordinate of the upper-left corner of the framing rectangle of this ellipse.
|
||||
* @param {number} [width=0] - The overall width of this ellipse.
|
||||
* @param {number} [height=0] - The overall height of this ellipse.
|
||||
* @return {Phaser.Ellipse} This Ellipse object
|
||||
*/
|
||||
Phaser.Ellipse = function (x, y, width, height) {
|
||||
|
||||
this.type = Phaser.ELLIPSE;
|
||||
|
||||
x = x || 0;
|
||||
y = y || 0;
|
||||
width = width || 0;
|
||||
height = height || 0;
|
||||
|
||||
/**
|
||||
* @property {number} x - The X coordinate of the upper-left corner of the framing rectangle of this ellipse.
|
||||
*/
|
||||
this.x = x;
|
||||
|
||||
/**
|
||||
* @property {number} y - The Y coordinate of the upper-left corner of the framing rectangle of this ellipse.
|
||||
*/
|
||||
this.y = y;
|
||||
|
||||
/**
|
||||
* @property {number} width - The overall width of this ellipse.
|
||||
*/
|
||||
this.width = width;
|
||||
|
||||
/**
|
||||
* @property {number} height - The overall height of this ellipse.
|
||||
*/
|
||||
this.height = height;
|
||||
|
||||
};
|
||||
|
||||
Phaser.Ellipse.prototype = {
|
||||
|
||||
/**
|
||||
* Sets the members of the Ellipse to the specified values.
|
||||
* @method Phaser.Ellipse#setTo
|
||||
* @param {number} x - The X coordinate of the upper-left corner of the framing rectangle of this ellipse.
|
||||
* @param {number} y - The Y coordinate of the upper-left corner of the framing rectangle of this ellipse.
|
||||
* @param {number} width - The overall width of this ellipse.
|
||||
* @param {number} height - The overall height of this ellipse.
|
||||
* @return {Phaser.Ellipse} This Ellipse object.
|
||||
*/
|
||||
setTo: function (x, y, width, height) {
|
||||
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
|
||||
return this;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Copies the x, y, width and height properties from any given object to this Ellipse.
|
||||
* @method Phaser.Ellipse#copyFrom
|
||||
* @param {any} source - The object to copy from.
|
||||
* @return {Phaser.Ellipse} This Ellipse object.
|
||||
*/
|
||||
copyFrom: function (source) {
|
||||
|
||||
return this.setTo(source.x, source.y, source.width, source.height);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Copies the x, y and diameter properties from this Circle to any given object.
|
||||
* @method Phaser.Ellipse#copyTo
|
||||
* @param {any} dest - The object to copy to.
|
||||
* @return {Object} This dest object.
|
||||
*/
|
||||
copyTo: function(dest) {
|
||||
|
||||
dest.x = this.x;
|
||||
dest.y = this.y;
|
||||
dest.width = this.width;
|
||||
dest.height = this.height;
|
||||
|
||||
return dest;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns a new Ellipse object with the same values for the x, y, width, and height properties as this Ellipse object.
|
||||
* @method Phaser.Ellipse#clone
|
||||
* @param {Phaser.Ellipse} out - Optional Ellipse object. If given the values will be set into the object, otherwise a brand new Ellipse object will be created and returned.
|
||||
* @return {Phaser.Ellipse} The cloned Ellipse object.
|
||||
*/
|
||||
clone: function(out) {
|
||||
|
||||
if (typeof out === "undefined")
|
||||
{
|
||||
out = new Phaser.Ellipse(this.x, this.y, this.width, this.height);
|
||||
}
|
||||
else
|
||||
{
|
||||
out.setTo(this.x, this.y, this.width, this.height);
|
||||
}
|
||||
|
||||
return out;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Return true if the given x/y coordinates are within this Ellipse object.
|
||||
* @method Phaser.Ellipse#contains
|
||||
* @param {number} x - The X value of the coordinate to test.
|
||||
* @param {number} y - The Y value of the coordinate to test.
|
||||
* @return {boolean} True if the coordinates are within this ellipse, otherwise false.
|
||||
*/
|
||||
contains: function (x, y) {
|
||||
|
||||
return Phaser.Ellipse.contains(this, x, y);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns a string representation of this object.
|
||||
* @method Phaser.Ellipse#toString
|
||||
* @return {string} A string representation of the instance.
|
||||
*/
|
||||
toString: function () {
|
||||
return "[{Phaser.Ellipse (x=" + this.x + " y=" + this.y + " width=" + this.width + " height=" + this.height + ")}]";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Phaser.Ellipse.prototype.constructor = Phaser.Ellipse;
|
||||
|
||||
/**
|
||||
* The left coordinate of the Ellipse. The same as the X coordinate.
|
||||
* @name Phaser.Ellipse#left
|
||||
* @propety {number} left - Gets or sets the value of the leftmost point of the ellipse.
|
||||
*/
|
||||
Object.defineProperty(Phaser.Ellipse.prototype, "left", {
|
||||
|
||||
get: function () {
|
||||
return this.x;
|
||||
},
|
||||
|
||||
set: function (value) {
|
||||
|
||||
this.x = value;
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* The x coordinate of the rightmost point of the Ellipse. Changing the right property of an Ellipse object has no effect on the x property, but does adjust the width.
|
||||
* @name Phaser.Ellipse#right
|
||||
* @property {number} right - Gets or sets the value of the rightmost point of the ellipse.
|
||||
*/
|
||||
Object.defineProperty(Phaser.Ellipse.prototype, "right", {
|
||||
|
||||
get: function () {
|
||||
return this.x + this.width;
|
||||
},
|
||||
|
||||
set: function (value) {
|
||||
|
||||
if (value < this.x)
|
||||
{
|
||||
this.width = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.width = this.x + value;
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* The top of the Ellipse. The same as its y property.
|
||||
* @name Phaser.Ellipse#top
|
||||
* @property {number} top - Gets or sets the top of the ellipse.
|
||||
*/
|
||||
Object.defineProperty(Phaser.Ellipse.prototype, "top", {
|
||||
|
||||
get: function () {
|
||||
return this.y;
|
||||
},
|
||||
|
||||
set: function (value) {
|
||||
this.y = value;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* The sum of the y and height properties. Changing the bottom property of an Ellipse doesn't adjust the y property, but does change the height.
|
||||
* @name Phaser.Ellipse#bottom
|
||||
* @property {number} bottom - Gets or sets the bottom of the ellipse.
|
||||
*/
|
||||
Object.defineProperty(Phaser.Ellipse.prototype, "bottom", {
|
||||
|
||||
get: function () {
|
||||
return this.y + this.height;
|
||||
},
|
||||
|
||||
set: function (value) {
|
||||
|
||||
if (value < this.y)
|
||||
{
|
||||
this.height = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.height = this.y + value;
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* Determines whether or not this Ellipse object is empty. Will return a value of true if the Ellipse objects dimensions are less than or equal to 0; otherwise false.
|
||||
* If set to true it will reset all of the Ellipse objects properties to 0. An Ellipse object is empty if its width or height is less than or equal to 0.
|
||||
* @name Phaser.Ellipse#empty
|
||||
* @property {boolean} empty - Gets or sets the empty state of the ellipse.
|
||||
*/
|
||||
Object.defineProperty(Phaser.Ellipse.prototype, "empty", {
|
||||
|
||||
get: function () {
|
||||
return (this.width === 0 || this.height === 0);
|
||||
},
|
||||
|
||||
set: function (value) {
|
||||
|
||||
if (value === true)
|
||||
{
|
||||
this.setTo(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* Return true if the given x/y coordinates are within the Ellipse object.
|
||||
* @method Phaser.Ellipse.contains
|
||||
* @param {Phaser.Ellipse} a - The Ellipse 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 {boolean} True if the coordinates are within this ellipse, otherwise false.
|
||||
*/
|
||||
Phaser.Ellipse.contains = function (a, x, y) {
|
||||
|
||||
if (a.width <= 0 || a.height <= 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Normalize the coords to an ellipse with center 0,0 and a radius of 0.5
|
||||
var normx = ((x - a.x) / a.width) - 0.5;
|
||||
var normy = ((y - a.y) / a.height) - 0.5;
|
||||
|
||||
normx *= normx;
|
||||
normy *= normy;
|
||||
|
||||
return (normx + normy < 0.25);
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the framing rectangle of the ellipse as a Phaser.Rectangle object.
|
||||
*
|
||||
* @method Phaser.Ellipse.getBounds
|
||||
* @return {Phaser.Rectangle} The framing rectangle
|
||||
*/
|
||||
Phaser.Ellipse.prototype.getBounds = function() {
|
||||
|
||||
return new Phaser.Rectangle(this.x, this.y, this.width, this.height);
|
||||
|
||||
};
|
||||
|
||||
// Because PIXI uses its own Ellipse, we'll replace it with ours to avoid duplicating code or confusion.
|
||||
PIXI.Ellipse = Phaser.Ellipse;
|
||||
</pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<footer>
|
||||
|
||||
|
||||
<span class="copyright">
|
||||
Phaser Copyright © 2012-2014 Photon Storm Ltd.
|
||||
</span>
|
||||
<br />
|
||||
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
|
||||
on Tue May 20 2014 10:05:49 GMT+0100 (BST) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
<br clear="both">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script src="scripts/sunlight.js"></script>
|
||||
<script src="scripts/sunlight.javascript.js"></script>
|
||||
<script src="scripts/sunlight-plugin.doclinks.js"></script>
|
||||
<script src="scripts/sunlight-plugin.linenumbers.js"></script>
|
||||
<script src="scripts/sunlight-plugin.menu.js"></script>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/jquery.scrollTo.js"></script>
|
||||
<script src="scripts/jquery.localScroll.js"></script>
|
||||
<script src="scripts/bootstrap-dropdown.js"></script>
|
||||
<script src="scripts/toc.js"></script>
|
||||
|
||||
|
||||
<script> Sunlight.highlightAll({lineNumbers:true, showMenu: true, enableDoclinks :true}); </script>
|
||||
|
||||
<script>
|
||||
$( function () {
|
||||
$( "#toc" ).toc( {
|
||||
anchorName : function(i, heading, prefix) {
|
||||
return $(heading).attr("id") || ( prefix + i );
|
||||
},
|
||||
selectors : "h1,h2,h3,h4",
|
||||
showAndHide : false,
|
||||
scrollTo : 60
|
||||
} );
|
||||
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
|
||||
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
|
||||
|
||||
} );
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
1366
docs/Emitter.js.html
Normal file
1366
docs/Emitter.js.html
Normal file
File diff suppressed because it is too large
Load Diff
667
docs/Events.js.html
Normal file
667
docs/Events.js.html
Normal file
@@ -0,0 +1,667 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Phaser Source: gameobjects/Events.js</title>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
|
||||
|
||||
|
||||
<link type="text/css" rel="stylesheet" href="styles/site.cerulean.css">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="navbar navbar-fixed-top navbar-inverse">
|
||||
<div class="navbar-inner">
|
||||
<a class="brand" href="index.html">Phaser</a>
|
||||
<ul class="nav">
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-0">
|
||||
<a href="Phaser.html">Phaser</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Animation.html">Animation</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationManager.html">AnimationManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationParser.html">AnimationParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ArrayList.html">ArrayList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapData.html">BitmapData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapText.html">BitmapText</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Button.html">Button</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Cache.html">Cache</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Camera.html">Camera</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Canvas.html">Canvas</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Color.html">Color</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Device.html">Device</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Easing.html">Easing</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Back.html">Back</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Bounce.html">Bounce</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Circular.html">Circular</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Cubic.html">Cubic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Elastic.html">Elastic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Exponential.html">Exponential</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Linear.html">Linear</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quadratic.html">Quadratic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quartic.html">Quartic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quintic.html">Quintic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Sinusoidal.html">Sinusoidal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Ellipse.html">Ellipse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Events.html">Events</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Filter.html">Filter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Frame.html">Frame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.FrameData.html">FrameData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Game.html">Game</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectCreator.html">GameObjectCreator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Gamepad.html">Gamepad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GamepadButton.html">GamepadButton</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Graphics.html">Graphics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Group.html">Group</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Image.html">Image</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Input.html">Input</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.InputHandler.html">InputHandler</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Key.html">Key</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Keyboard.html">Keyboard</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Line.html">Line</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LinkedList.html">LinkedList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Loader.html">Loader</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LoaderParser.html">LoaderParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Math.html">Math</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Mouse.html">Mouse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.MSPointer.html">MSPointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Net.html">Net</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particle.html">Particle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particles.html">Particles</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Particles.Arcade.Emitter.html">Emitter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Physics.html">Physics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Arcade.html">Arcade</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Arcade.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Ninja.html">Ninja</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.AABB.html">AABB</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.P2.html">P2</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.BodyDebug.html">BodyDebug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.CollisionGroup.html">CollisionGroup</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.ContactMaterial.html">ContactMaterial</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.DistanceConstraint.html">DistanceConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.FixtureList.html">FixtureList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.GearConstraint.html">GearConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.InversePointProxy.html">InversePointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.LockConstraint.html">LockConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Material.html">Material</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PointProxy.html">PointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PrismaticConstraint.html">PrismaticConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.RevoluteConstraint.html">RevoluteConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Spring.html">Spring</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Plugin.html">Plugin</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.PluginManager.html">PluginManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Point.html">Point</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Pointer.html">Pointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Polygon.html">Polygon</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.QuadTree.html">QuadTree</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RandomDataGenerator.html">RandomDataGenerator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Rectangle.html">Rectangle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RenderTexture.html">RenderTexture</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RequestAnimationFrame.html">RequestAnimationFrame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RetroFont.html">RetroFont</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ScaleManager.html">ScaleManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Signal.html">Signal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SignalBinding.html">SignalBinding</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SinglePad.html">SinglePad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sound.html">Sound</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SoundManager.html">SoundManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sprite.html">Sprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SpriteBatch.html">SpriteBatch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Stage.html">Stage</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.State.html">State</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.StateManager.html">StateManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Text.html">Text</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tilemap.html">Tilemap</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapLayer.html">TilemapLayer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapParser.html">TilemapParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tileset.html">Tileset</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TileSprite.html">TileSprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Time.html">Time</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Timer.html">Timer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TimerEvent.html">TimerEvent</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Touch.html">Touch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tween.html">Tween</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TweenManager.html">TweenManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Utils.html">Utils</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Utils.Debug.html">Debug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.World.html">World</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row-fluid">
|
||||
|
||||
|
||||
<div class="span12">
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
|
||||
<h1 class="page-title">Source: gameobjects/Events.js</h1>
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <rich@photonstorm.com>
|
||||
* @copyright 2014 Photon Storm Ltd.
|
||||
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @class Phaser.Events
|
||||
*
|
||||
* @classdesc The Events component is a collection of events fired by the parent game object.
|
||||
*
|
||||
* For example to tell when a Sprite has been added to a new group:
|
||||
*
|
||||
* `sprite.events.onAddedToGroup.add(yourFunction, this);`
|
||||
*
|
||||
* Where `yourFunction` is the function you want called when this event occurs.
|
||||
*
|
||||
* Note that the Input related events only exist if the Sprite has had `inputEnabled` set to `true`.
|
||||
*
|
||||
* @constructor
|
||||
*
|
||||
* @param {Phaser.Sprite} sprite - A reference to Description.
|
||||
*/
|
||||
Phaser.Events = function (sprite) {
|
||||
|
||||
this.parent = sprite;
|
||||
|
||||
this.onAddedToGroup = new Phaser.Signal();
|
||||
this.onRemovedFromGroup = new Phaser.Signal();
|
||||
this.onKilled = new Phaser.Signal();
|
||||
this.onRevived = new Phaser.Signal();
|
||||
this.onOutOfBounds = new Phaser.Signal();
|
||||
this.onEnterBounds = new Phaser.Signal();
|
||||
|
||||
this.onInputOver = null;
|
||||
this.onInputOut = null;
|
||||
this.onInputDown = null;
|
||||
this.onInputUp = null;
|
||||
this.onDragStart = null;
|
||||
this.onDragStop = null;
|
||||
|
||||
this.onAnimationStart = null;
|
||||
this.onAnimationComplete = null;
|
||||
this.onAnimationLoop = null;
|
||||
|
||||
};
|
||||
|
||||
Phaser.Events.prototype = {
|
||||
|
||||
destroy: function () {
|
||||
|
||||
this.parent = null;
|
||||
this.onAddedToGroup.dispose();
|
||||
this.onRemovedFromGroup.dispose();
|
||||
this.onKilled.dispose();
|
||||
this.onRevived.dispose();
|
||||
this.onOutOfBounds.dispose();
|
||||
|
||||
if (this.onInputOver)
|
||||
{
|
||||
this.onInputOver.dispose();
|
||||
this.onInputOut.dispose();
|
||||
this.onInputDown.dispose();
|
||||
this.onInputUp.dispose();
|
||||
this.onDragStart.dispose();
|
||||
this.onDragStop.dispose();
|
||||
}
|
||||
|
||||
if (this.onAnimationStart)
|
||||
{
|
||||
this.onAnimationStart.dispose();
|
||||
this.onAnimationComplete.dispose();
|
||||
this.onAnimationLoop.dispose();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Phaser.Events.prototype.constructor = Phaser.Events;
|
||||
</pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<footer>
|
||||
|
||||
|
||||
<span class="copyright">
|
||||
Phaser Copyright © 2012-2014 Photon Storm Ltd.
|
||||
</span>
|
||||
<br />
|
||||
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
|
||||
on Tue May 20 2014 10:05:49 GMT+0100 (BST) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
<br clear="both">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script src="scripts/sunlight.js"></script>
|
||||
<script src="scripts/sunlight.javascript.js"></script>
|
||||
<script src="scripts/sunlight-plugin.doclinks.js"></script>
|
||||
<script src="scripts/sunlight-plugin.linenumbers.js"></script>
|
||||
<script src="scripts/sunlight-plugin.menu.js"></script>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/jquery.scrollTo.js"></script>
|
||||
<script src="scripts/jquery.localScroll.js"></script>
|
||||
<script src="scripts/bootstrap-dropdown.js"></script>
|
||||
<script src="scripts/toc.js"></script>
|
||||
|
||||
|
||||
<script> Sunlight.highlightAll({lineNumbers:true, showMenu: true, enableDoclinks :true}); </script>
|
||||
|
||||
<script>
|
||||
$( function () {
|
||||
$( "#toc" ).toc( {
|
||||
anchorName : function(i, heading, prefix) {
|
||||
return $(heading).attr("id") || ( prefix + i );
|
||||
},
|
||||
selectors : "h1,h2,h3,h4",
|
||||
showAndHide : false,
|
||||
scrollTo : 60
|
||||
} );
|
||||
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
|
||||
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
|
||||
|
||||
} );
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
752
docs/Filter.js.html
Normal file
752
docs/Filter.js.html
Normal file
@@ -0,0 +1,752 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Phaser Source: core/Filter.js</title>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
|
||||
|
||||
|
||||
<link type="text/css" rel="stylesheet" href="styles/site.cerulean.css">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="navbar navbar-fixed-top navbar-inverse">
|
||||
<div class="navbar-inner">
|
||||
<a class="brand" href="index.html">Phaser</a>
|
||||
<ul class="nav">
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-0">
|
||||
<a href="Phaser.html">Phaser</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Animation.html">Animation</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationManager.html">AnimationManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationParser.html">AnimationParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ArrayList.html">ArrayList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapData.html">BitmapData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapText.html">BitmapText</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Button.html">Button</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Cache.html">Cache</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Camera.html">Camera</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Canvas.html">Canvas</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Color.html">Color</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Device.html">Device</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Easing.html">Easing</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Back.html">Back</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Bounce.html">Bounce</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Circular.html">Circular</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Cubic.html">Cubic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Elastic.html">Elastic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Exponential.html">Exponential</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Linear.html">Linear</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quadratic.html">Quadratic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quartic.html">Quartic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quintic.html">Quintic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Sinusoidal.html">Sinusoidal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Ellipse.html">Ellipse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Events.html">Events</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Filter.html">Filter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Frame.html">Frame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.FrameData.html">FrameData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Game.html">Game</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectCreator.html">GameObjectCreator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Gamepad.html">Gamepad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GamepadButton.html">GamepadButton</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Graphics.html">Graphics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Group.html">Group</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Image.html">Image</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Input.html">Input</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.InputHandler.html">InputHandler</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Key.html">Key</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Keyboard.html">Keyboard</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Line.html">Line</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LinkedList.html">LinkedList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Loader.html">Loader</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LoaderParser.html">LoaderParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Math.html">Math</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Mouse.html">Mouse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.MSPointer.html">MSPointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Net.html">Net</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particle.html">Particle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particles.html">Particles</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Particles.Arcade.Emitter.html">Emitter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Physics.html">Physics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Arcade.html">Arcade</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Arcade.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Ninja.html">Ninja</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.AABB.html">AABB</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.P2.html">P2</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.BodyDebug.html">BodyDebug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.CollisionGroup.html">CollisionGroup</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.ContactMaterial.html">ContactMaterial</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.DistanceConstraint.html">DistanceConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.FixtureList.html">FixtureList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.GearConstraint.html">GearConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.InversePointProxy.html">InversePointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.LockConstraint.html">LockConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Material.html">Material</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PointProxy.html">PointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PrismaticConstraint.html">PrismaticConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.RevoluteConstraint.html">RevoluteConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Spring.html">Spring</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Plugin.html">Plugin</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.PluginManager.html">PluginManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Point.html">Point</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Pointer.html">Pointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Polygon.html">Polygon</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.QuadTree.html">QuadTree</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RandomDataGenerator.html">RandomDataGenerator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Rectangle.html">Rectangle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RenderTexture.html">RenderTexture</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RequestAnimationFrame.html">RequestAnimationFrame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RetroFont.html">RetroFont</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ScaleManager.html">ScaleManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Signal.html">Signal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SignalBinding.html">SignalBinding</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SinglePad.html">SinglePad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sound.html">Sound</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SoundManager.html">SoundManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sprite.html">Sprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SpriteBatch.html">SpriteBatch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Stage.html">Stage</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.State.html">State</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.StateManager.html">StateManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Text.html">Text</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tilemap.html">Tilemap</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapLayer.html">TilemapLayer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapParser.html">TilemapParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tileset.html">Tileset</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TileSprite.html">TileSprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Time.html">Time</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Timer.html">Timer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TimerEvent.html">TimerEvent</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Touch.html">Touch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tween.html">Tween</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TweenManager.html">TweenManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Utils.html">Utils</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Utils.Debug.html">Debug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.World.html">World</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row-fluid">
|
||||
|
||||
|
||||
<div class="span12">
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
|
||||
<h1 class="page-title">Source: core/Filter.js</h1>
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <rich@photonstorm.com>
|
||||
* @copyright 2014 Photon Storm Ltd.
|
||||
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
||||
*/
|
||||
|
||||
/**
|
||||
* This is a base Filter template to use for any Phaser filter development.
|
||||
*
|
||||
* @class Phaser.Filter
|
||||
* @classdesc Phaser - Filter
|
||||
* @constructor
|
||||
* @param {Phaser.Game} game - A reference to the currently running game.
|
||||
* @param {Object} uniforms - Uniform mappings object
|
||||
* @param {Array} fragmentSrc - The fragment shader code.
|
||||
*/
|
||||
Phaser.Filter = function (game, uniforms, fragmentSrc) {
|
||||
|
||||
/**
|
||||
* @property {Phaser.Game} game - A reference to the currently running game.
|
||||
*/
|
||||
this.game = game;
|
||||
|
||||
/**
|
||||
* @property {number} type - The const type of this object, either Phaser.WEBGL_FILTER or Phaser.CANVAS_FILTER.
|
||||
* @default
|
||||
*/
|
||||
this.type = Phaser.WEBGL_FILTER;
|
||||
|
||||
/**
|
||||
* An array of passes - some filters contain a few steps this array simply stores the steps in a linear fashion.
|
||||
* For example the blur filter has two passes blurX and blurY.
|
||||
* @property {array} passes - An array of filter objects.
|
||||
* @private
|
||||
*/
|
||||
this.passes = [this];
|
||||
|
||||
/**
|
||||
* @property {array} shaders - Array an array of shaders.
|
||||
* @private
|
||||
*/
|
||||
this.shaders = [];
|
||||
|
||||
/**
|
||||
* @property {boolean} dirty - Internal PIXI var.
|
||||
* @default
|
||||
*/
|
||||
this.dirty = true;
|
||||
|
||||
/**
|
||||
* @property {number} padding - Internal PIXI var.
|
||||
* @default
|
||||
*/
|
||||
this.padding = 0;
|
||||
|
||||
/**
|
||||
* @property {object} uniforms - Default uniform mappings.
|
||||
*/
|
||||
this.uniforms = {
|
||||
|
||||
time: { type: '1f', value: 0 },
|
||||
resolution: { type: '2f', value: { x: 256, y: 256 }},
|
||||
mouse: { type: '2f', value: { x: 0.0, y: 0.0 }}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* @property {array} fragmentSrc - The fragment shader code.
|
||||
*/
|
||||
this.fragmentSrc = fragmentSrc || [];
|
||||
|
||||
};
|
||||
|
||||
Phaser.Filter.prototype = {
|
||||
|
||||
/**
|
||||
* Should be over-ridden.
|
||||
* @method Phaser.Filter#init
|
||||
*/
|
||||
init: function () {
|
||||
// This should be over-ridden. Will receive a variable number of arguments.
|
||||
},
|
||||
|
||||
/**
|
||||
* Set the resolution uniforms on the filter.
|
||||
* @method Phaser.Filter#setResolution
|
||||
* @param {number} width - The width of the display.
|
||||
* @param {number} height - The height of the display.
|
||||
*/
|
||||
setResolution: function (width, height) {
|
||||
|
||||
this.uniforms.resolution.value.x = width;
|
||||
this.uniforms.resolution.value.y = height;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Updates the filter.
|
||||
* @method Phaser.Filter#update
|
||||
* @param {Phaser.Pointer} [pointer] - A Pointer object to use for the filter. The coordinates are mapped to the mouse uniform.
|
||||
*/
|
||||
update: function (pointer) {
|
||||
|
||||
if (typeof pointer !== 'undefined')
|
||||
{
|
||||
if (pointer.x > 0)
|
||||
{
|
||||
this.uniforms.mouse.x = pointer.x.toFixed(2);
|
||||
}
|
||||
|
||||
if (pointer.y > 0)
|
||||
{
|
||||
this.uniforms.mouse.y = pointer.y.toFixed(2);
|
||||
}
|
||||
}
|
||||
|
||||
this.uniforms.time.value = this.game.time.totalElapsedSeconds();
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Clear down this Filter and null out references
|
||||
* @method Phaser.Filter#destroy
|
||||
*/
|
||||
destroy: function () {
|
||||
|
||||
this.game = null;
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Phaser.Filter.prototype.constructor = Phaser.Filter;
|
||||
|
||||
/**
|
||||
* @name Phaser.Filter#width
|
||||
* @property {number} width - The width (resolution uniform)
|
||||
*/
|
||||
Object.defineProperty(Phaser.Filter.prototype, 'width', {
|
||||
|
||||
get: function() {
|
||||
return this.uniforms.resolution.value.x;
|
||||
},
|
||||
|
||||
set: function(value) {
|
||||
this.uniforms.resolution.value.x = value;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* @name Phaser.Filter#height
|
||||
* @property {number} height - The height (resolution uniform)
|
||||
*/
|
||||
Object.defineProperty(Phaser.Filter.prototype, 'height', {
|
||||
|
||||
get: function() {
|
||||
return this.uniforms.resolution.value.y;
|
||||
},
|
||||
|
||||
set: function(value) {
|
||||
this.uniforms.resolution.value.y = value;
|
||||
}
|
||||
|
||||
});
|
||||
</pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<footer>
|
||||
|
||||
|
||||
<span class="copyright">
|
||||
Phaser Copyright © 2012-2014 Photon Storm Ltd.
|
||||
</span>
|
||||
<br />
|
||||
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
|
||||
on Tue May 20 2014 10:05:49 GMT+0100 (BST) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
<br clear="both">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script src="scripts/sunlight.js"></script>
|
||||
<script src="scripts/sunlight.javascript.js"></script>
|
||||
<script src="scripts/sunlight-plugin.doclinks.js"></script>
|
||||
<script src="scripts/sunlight-plugin.linenumbers.js"></script>
|
||||
<script src="scripts/sunlight-plugin.menu.js"></script>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/jquery.scrollTo.js"></script>
|
||||
<script src="scripts/jquery.localScroll.js"></script>
|
||||
<script src="scripts/bootstrap-dropdown.js"></script>
|
||||
<script src="scripts/toc.js"></script>
|
||||
|
||||
|
||||
<script> Sunlight.highlightAll({lineNumbers:true, showMenu: true, enableDoclinks :true}); </script>
|
||||
|
||||
<script>
|
||||
$( function () {
|
||||
$( "#toc" ).toc( {
|
||||
anchorName : function(i, heading, prefix) {
|
||||
return $(heading).attr("id") || ( prefix + i );
|
||||
},
|
||||
selectors : "h1,h2,h3,h4",
|
||||
showAndHide : false,
|
||||
scrollTo : 60
|
||||
} );
|
||||
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
|
||||
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
|
||||
|
||||
} );
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
819
docs/FixtureList.js.html
Normal file
819
docs/FixtureList.js.html
Normal file
@@ -0,0 +1,819 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Phaser Source: physics/p2/FixtureList.js</title>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
|
||||
|
||||
|
||||
<link type="text/css" rel="stylesheet" href="styles/site.cerulean.css">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="navbar navbar-fixed-top navbar-inverse">
|
||||
<div class="navbar-inner">
|
||||
<a class="brand" href="index.html">Phaser</a>
|
||||
<ul class="nav">
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-0">
|
||||
<a href="Phaser.html">Phaser</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Animation.html">Animation</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationManager.html">AnimationManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationParser.html">AnimationParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ArrayList.html">ArrayList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapData.html">BitmapData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapText.html">BitmapText</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Button.html">Button</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Cache.html">Cache</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Camera.html">Camera</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Canvas.html">Canvas</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Color.html">Color</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Device.html">Device</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Easing.html">Easing</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Back.html">Back</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Bounce.html">Bounce</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Circular.html">Circular</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Cubic.html">Cubic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Elastic.html">Elastic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Exponential.html">Exponential</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Linear.html">Linear</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quadratic.html">Quadratic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quartic.html">Quartic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quintic.html">Quintic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Sinusoidal.html">Sinusoidal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Ellipse.html">Ellipse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Events.html">Events</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Filter.html">Filter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Frame.html">Frame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.FrameData.html">FrameData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Game.html">Game</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectCreator.html">GameObjectCreator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Gamepad.html">Gamepad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GamepadButton.html">GamepadButton</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Graphics.html">Graphics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Group.html">Group</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Image.html">Image</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Input.html">Input</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.InputHandler.html">InputHandler</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Key.html">Key</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Keyboard.html">Keyboard</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Line.html">Line</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LinkedList.html">LinkedList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Loader.html">Loader</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LoaderParser.html">LoaderParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Math.html">Math</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Mouse.html">Mouse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.MSPointer.html">MSPointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Net.html">Net</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particle.html">Particle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particles.html">Particles</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Particles.Arcade.Emitter.html">Emitter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Physics.html">Physics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Arcade.html">Arcade</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Arcade.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Ninja.html">Ninja</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.AABB.html">AABB</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.P2.html">P2</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.BodyDebug.html">BodyDebug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.CollisionGroup.html">CollisionGroup</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.ContactMaterial.html">ContactMaterial</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.DistanceConstraint.html">DistanceConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.FixtureList.html">FixtureList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.GearConstraint.html">GearConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.InversePointProxy.html">InversePointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.LockConstraint.html">LockConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Material.html">Material</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PointProxy.html">PointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PrismaticConstraint.html">PrismaticConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.RevoluteConstraint.html">RevoluteConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Spring.html">Spring</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Plugin.html">Plugin</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.PluginManager.html">PluginManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Point.html">Point</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Pointer.html">Pointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Polygon.html">Polygon</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.QuadTree.html">QuadTree</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RandomDataGenerator.html">RandomDataGenerator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Rectangle.html">Rectangle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RenderTexture.html">RenderTexture</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RequestAnimationFrame.html">RequestAnimationFrame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RetroFont.html">RetroFont</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ScaleManager.html">ScaleManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Signal.html">Signal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SignalBinding.html">SignalBinding</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SinglePad.html">SinglePad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sound.html">Sound</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SoundManager.html">SoundManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sprite.html">Sprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SpriteBatch.html">SpriteBatch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Stage.html">Stage</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.State.html">State</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.StateManager.html">StateManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Text.html">Text</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tilemap.html">Tilemap</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapLayer.html">TilemapLayer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapParser.html">TilemapParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tileset.html">Tileset</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TileSprite.html">TileSprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Time.html">Time</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Timer.html">Timer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TimerEvent.html">TimerEvent</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Touch.html">Touch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tween.html">Tween</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TweenManager.html">TweenManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Utils.html">Utils</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Utils.Debug.html">Debug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.World.html">World</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row-fluid">
|
||||
|
||||
|
||||
<div class="span12">
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
|
||||
<h1 class="page-title">Source: physics/p2/FixtureList.js</h1>
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/* jshint noarg: false */
|
||||
|
||||
/**
|
||||
* @author Georgios Kaleadis https://github.com/georgiee
|
||||
* @author Richard Davey <rich@photonstorm.com>
|
||||
* @copyright 2014 Photon Storm Ltd.
|
||||
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Allow to access a list of created fixture (coming from Body#addPhaserPolygon)
|
||||
* which itself parse the input from PhysicsEditor with the custom phaser exporter.
|
||||
* You can access fixtures of a Body by a group index or even by providing a fixture Key.
|
||||
|
||||
* You can set the fixture key and also the group index for a fixture in PhysicsEditor.
|
||||
* This gives you the power to create a complex body built of many fixtures and modify them
|
||||
* during runtime (to remove parts, set masks, categories & sensor properties)
|
||||
*
|
||||
* @class Phaser.Physics.P2.FixtureList
|
||||
* @classdesc Collection for generated P2 fixtures
|
||||
* @constructor
|
||||
* @param {Array} list - A list of fixtures (from Phaser.Physics.P2.Body#addPhaserPolygon)
|
||||
*/
|
||||
Phaser.Physics.P2.FixtureList = function (list) {
|
||||
|
||||
if (!Array.isArray(list))
|
||||
{
|
||||
list = [list];
|
||||
}
|
||||
|
||||
this.rawList = list;
|
||||
this.init();
|
||||
this.parse(this.rawList);
|
||||
|
||||
};
|
||||
|
||||
Phaser.Physics.P2.FixtureList.prototype = {
|
||||
|
||||
/**
|
||||
* @method Phaser.Physics.P2.FixtureList#init
|
||||
*/
|
||||
init: function () {
|
||||
|
||||
/**
|
||||
* @property {object} namedFixtures - Collect all fixtures with a key
|
||||
* @private
|
||||
*/
|
||||
this.namedFixtures = {};
|
||||
|
||||
/**
|
||||
* @property {Array} groupedFixtures - Collect all given fixtures per group index. Notice: Every fixture with a key also belongs to a group
|
||||
* @private
|
||||
*/
|
||||
this.groupedFixtures = [];
|
||||
|
||||
/**
|
||||
* @property {Array} allFixtures - This is a list of everything in this collection
|
||||
* @private
|
||||
*/
|
||||
this.allFixtures = [];
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* @method Phaser.Physics.P2.FixtureList#setCategory
|
||||
* @param {number} bit - The bit to set as the collision group.
|
||||
* @param {string} fixtureKey - Only apply to the fixture with the given key.
|
||||
*/
|
||||
setCategory: function (bit, fixtureKey) {
|
||||
|
||||
var setter = function(fixture) {
|
||||
fixture.collisionGroup = bit;
|
||||
};
|
||||
|
||||
this.getFixtures(fixtureKey).forEach(setter);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* @method Phaser.Physics.P2.FixtureList#setMask
|
||||
* @param {number} bit - The bit to set as the collision mask
|
||||
* @param {string} fixtureKey - Only apply to the fixture with the given key
|
||||
*/
|
||||
setMask: function (bit, fixtureKey) {
|
||||
|
||||
var setter = function(fixture) {
|
||||
fixture.collisionMask = bit;
|
||||
};
|
||||
|
||||
this.getFixtures(fixtureKey).forEach(setter);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* @method Phaser.Physics.P2.FixtureList#setSensor
|
||||
* @param {boolean} value - sensor true or false
|
||||
* @param {string} fixtureKey - Only apply to the fixture with the given key
|
||||
*/
|
||||
setSensor: function (value, fixtureKey) {
|
||||
|
||||
var setter = function(fixture) {
|
||||
fixture.sensor = value;
|
||||
};
|
||||
|
||||
this.getFixtures(fixtureKey).forEach(setter);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* @method Phaser.Physics.P2.FixtureList#setMaterial
|
||||
* @param {Object} material - The contact material for a fixture
|
||||
* @param {string} fixtureKey - Only apply to the fixture with the given key
|
||||
*/
|
||||
setMaterial: function (material, fixtureKey) {
|
||||
|
||||
var setter = function(fixture) {
|
||||
fixture.material = material;
|
||||
};
|
||||
|
||||
this.getFixtures(fixtureKey).forEach(setter);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Accessor to get either a list of specified fixtures by key or the whole fixture list
|
||||
*
|
||||
* @method Phaser.Physics.P2.FixtureList#getFixtures
|
||||
* @param {array} keys - A list of fixture keys
|
||||
*/
|
||||
getFixtures: function (keys) {
|
||||
|
||||
var fixtures = [];
|
||||
|
||||
if (keys)
|
||||
{
|
||||
if (!(keys instanceof Array))
|
||||
{
|
||||
keys = [keys];
|
||||
}
|
||||
|
||||
var self = this;
|
||||
keys.forEach(function(key) {
|
||||
if (self.namedFixtures[key])
|
||||
{
|
||||
fixtures.push(self.namedFixtures[key]);
|
||||
}
|
||||
});
|
||||
|
||||
return this.flatten(fixtures);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
return this.allFixtures;
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Accessor to get either a single fixture by its key.
|
||||
*
|
||||
* @method Phaser.Physics.P2.FixtureList#getFixtureByKey
|
||||
* @param {string} key - The key of the fixture.
|
||||
*/
|
||||
getFixtureByKey: function (key) {
|
||||
|
||||
return this.namedFixtures[key];
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Accessor to get a group of fixtures by its group index.
|
||||
*
|
||||
* @method Phaser.Physics.P2.FixtureList#getGroup
|
||||
* @param {number} groupID - The group index.
|
||||
*/
|
||||
getGroup: function (groupID) {
|
||||
|
||||
return this.groupedFixtures[groupID];
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Parser for the output of Phaser.Physics.P2.Body#addPhaserPolygon
|
||||
*
|
||||
* @method Phaser.Physics.P2.FixtureList#parse
|
||||
*/
|
||||
parse: function () {
|
||||
|
||||
var key, value, _ref, _results;
|
||||
_ref = this.rawList;
|
||||
_results = [];
|
||||
|
||||
for (key in _ref)
|
||||
{
|
||||
value = _ref[key];
|
||||
|
||||
if (!isNaN(key - 0))
|
||||
{
|
||||
this.groupedFixtures[key] = this.groupedFixtures[key] || [];
|
||||
this.groupedFixtures[key] = this.groupedFixtures[key].concat(value);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.namedFixtures[key] = this.flatten(value);
|
||||
}
|
||||
|
||||
_results.push(this.allFixtures = this.flatten(this.groupedFixtures));
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* A helper to flatten arrays. This is very useful as the fixtures are nested from time to time due to the way P2 creates and splits polygons.
|
||||
*
|
||||
* @method Phaser.Physics.P2.FixtureList#flatten
|
||||
* @param {array} array - The array to flatten. Notice: This will happen recursive not shallow.
|
||||
*/
|
||||
flatten: function (array) {
|
||||
|
||||
var result, self;
|
||||
result = [];
|
||||
self = arguments.callee;
|
||||
|
||||
array.forEach(function(item) {
|
||||
return Array.prototype.push.apply(result, (Array.isArray(item) ? self(item) : [item]));
|
||||
});
|
||||
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
};</pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<footer>
|
||||
|
||||
|
||||
<span class="copyright">
|
||||
Phaser Copyright © 2012-2014 Photon Storm Ltd.
|
||||
</span>
|
||||
<br />
|
||||
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
|
||||
on Tue May 20 2014 10:05:49 GMT+0100 (BST) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
<br clear="both">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script src="scripts/sunlight.js"></script>
|
||||
<script src="scripts/sunlight.javascript.js"></script>
|
||||
<script src="scripts/sunlight-plugin.doclinks.js"></script>
|
||||
<script src="scripts/sunlight-plugin.linenumbers.js"></script>
|
||||
<script src="scripts/sunlight-plugin.menu.js"></script>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/jquery.scrollTo.js"></script>
|
||||
<script src="scripts/jquery.localScroll.js"></script>
|
||||
<script src="scripts/bootstrap-dropdown.js"></script>
|
||||
<script src="scripts/toc.js"></script>
|
||||
|
||||
|
||||
<script> Sunlight.highlightAll({lineNumbers:true, showMenu: true, enableDoclinks :true}); </script>
|
||||
|
||||
<script>
|
||||
$( function () {
|
||||
$( "#toc" ).toc( {
|
||||
anchorName : function(i, heading, prefix) {
|
||||
return $(heading).attr("id") || ( prefix + i );
|
||||
},
|
||||
selectors : "h1,h2,h3,h4",
|
||||
showAndHide : false,
|
||||
scrollTo : 60
|
||||
} );
|
||||
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
|
||||
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
|
||||
|
||||
} );
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
771
docs/Frame.js.html
Normal file
771
docs/Frame.js.html
Normal file
@@ -0,0 +1,771 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Phaser Source: animation/Frame.js</title>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
|
||||
|
||||
|
||||
<link type="text/css" rel="stylesheet" href="styles/site.cerulean.css">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="navbar navbar-fixed-top navbar-inverse">
|
||||
<div class="navbar-inner">
|
||||
<a class="brand" href="index.html">Phaser</a>
|
||||
<ul class="nav">
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-0">
|
||||
<a href="Phaser.html">Phaser</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Animation.html">Animation</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationManager.html">AnimationManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationParser.html">AnimationParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ArrayList.html">ArrayList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapData.html">BitmapData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapText.html">BitmapText</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Button.html">Button</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Cache.html">Cache</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Camera.html">Camera</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Canvas.html">Canvas</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Color.html">Color</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Device.html">Device</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Easing.html">Easing</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Back.html">Back</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Bounce.html">Bounce</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Circular.html">Circular</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Cubic.html">Cubic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Elastic.html">Elastic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Exponential.html">Exponential</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Linear.html">Linear</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quadratic.html">Quadratic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quartic.html">Quartic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quintic.html">Quintic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Sinusoidal.html">Sinusoidal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Ellipse.html">Ellipse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Events.html">Events</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Filter.html">Filter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Frame.html">Frame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.FrameData.html">FrameData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Game.html">Game</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectCreator.html">GameObjectCreator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Gamepad.html">Gamepad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GamepadButton.html">GamepadButton</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Graphics.html">Graphics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Group.html">Group</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Image.html">Image</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Input.html">Input</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.InputHandler.html">InputHandler</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Key.html">Key</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Keyboard.html">Keyboard</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Line.html">Line</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LinkedList.html">LinkedList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Loader.html">Loader</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LoaderParser.html">LoaderParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Math.html">Math</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Mouse.html">Mouse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.MSPointer.html">MSPointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Net.html">Net</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particle.html">Particle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particles.html">Particles</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Particles.Arcade.Emitter.html">Emitter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Physics.html">Physics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Arcade.html">Arcade</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Arcade.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Ninja.html">Ninja</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.AABB.html">AABB</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.P2.html">P2</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.BodyDebug.html">BodyDebug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.CollisionGroup.html">CollisionGroup</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.ContactMaterial.html">ContactMaterial</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.DistanceConstraint.html">DistanceConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.FixtureList.html">FixtureList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.GearConstraint.html">GearConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.InversePointProxy.html">InversePointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.LockConstraint.html">LockConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Material.html">Material</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PointProxy.html">PointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PrismaticConstraint.html">PrismaticConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.RevoluteConstraint.html">RevoluteConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Spring.html">Spring</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Plugin.html">Plugin</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.PluginManager.html">PluginManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Point.html">Point</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Pointer.html">Pointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Polygon.html">Polygon</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.QuadTree.html">QuadTree</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RandomDataGenerator.html">RandomDataGenerator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Rectangle.html">Rectangle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RenderTexture.html">RenderTexture</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RequestAnimationFrame.html">RequestAnimationFrame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RetroFont.html">RetroFont</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ScaleManager.html">ScaleManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Signal.html">Signal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SignalBinding.html">SignalBinding</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SinglePad.html">SinglePad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sound.html">Sound</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SoundManager.html">SoundManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sprite.html">Sprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SpriteBatch.html">SpriteBatch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Stage.html">Stage</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.State.html">State</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.StateManager.html">StateManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Text.html">Text</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tilemap.html">Tilemap</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapLayer.html">TilemapLayer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapParser.html">TilemapParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tileset.html">Tileset</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TileSprite.html">TileSprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Time.html">Time</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Timer.html">Timer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TimerEvent.html">TimerEvent</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Touch.html">Touch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tween.html">Tween</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TweenManager.html">TweenManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Utils.html">Utils</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Utils.Debug.html">Debug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.World.html">World</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row-fluid">
|
||||
|
||||
|
||||
<div class="span12">
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
|
||||
<h1 class="page-title">Source: animation/Frame.js</h1>
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <rich@photonstorm.com>
|
||||
* @copyright 2014 Photon Storm Ltd.
|
||||
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
||||
*/
|
||||
|
||||
/**
|
||||
* A Frame is a single frame of an animation and is part of a FrameData collection.
|
||||
*
|
||||
* @class Phaser.Frame
|
||||
* @constructor
|
||||
* @param {number} index - The index of this Frame within the FrameData set it is being added to.
|
||||
* @param {number} x - X position of the frame within the texture image.
|
||||
* @param {number} y - Y position of the frame within the texture image.
|
||||
* @param {number} width - Width of the frame within the texture image.
|
||||
* @param {number} height - Height of the frame within the texture image.
|
||||
* @param {string} name - The name of the frame. In Texture Atlas data this is usually set to the filename.
|
||||
* @param {string} uuid - Internal UUID key.
|
||||
*/
|
||||
Phaser.Frame = function (index, x, y, width, height, name, uuid) {
|
||||
|
||||
/**
|
||||
* @property {number} index - The index of this Frame within the FrameData set it is being added to.
|
||||
*/
|
||||
this.index = index;
|
||||
|
||||
/**
|
||||
* @property {number} x - X position within the image to cut from.
|
||||
*/
|
||||
this.x = x;
|
||||
|
||||
/**
|
||||
* @property {number} y - Y position within the image to cut from.
|
||||
*/
|
||||
this.y = y;
|
||||
|
||||
/**
|
||||
* @property {number} width - Width of the frame.
|
||||
*/
|
||||
this.width = width;
|
||||
|
||||
/**
|
||||
* @property {number} height - Height of the frame.
|
||||
*/
|
||||
this.height = height;
|
||||
|
||||
/**
|
||||
* @property {string} name - Useful for Texture Atlas files (is set to the filename value).
|
||||
*/
|
||||
this.name = name;
|
||||
|
||||
/**
|
||||
* @property {string} uuid - A link to the PIXI.TextureCache entry.
|
||||
*/
|
||||
this.uuid = uuid;
|
||||
|
||||
/**
|
||||
* @property {number} centerX - Center X position within the image to cut from.
|
||||
*/
|
||||
this.centerX = Math.floor(width / 2);
|
||||
|
||||
/**
|
||||
* @property {number} centerY - Center Y position within the image to cut from.
|
||||
*/
|
||||
this.centerY = Math.floor(height / 2);
|
||||
|
||||
/**
|
||||
* @property {number} distance - The distance from the top left to the bottom-right of this Frame.
|
||||
*/
|
||||
this.distance = Phaser.Math.distance(0, 0, width, height);
|
||||
|
||||
/**
|
||||
* @property {boolean} rotated - Rotated? (not yet implemented)
|
||||
* @default
|
||||
*/
|
||||
this.rotated = false;
|
||||
|
||||
/**
|
||||
* @property {string} rotationDirection - Either 'cw' or 'ccw', rotation is always 90 degrees.
|
||||
* @default 'cw'
|
||||
*/
|
||||
this.rotationDirection = 'cw';
|
||||
|
||||
/**
|
||||
* @property {boolean} trimmed - Was it trimmed when packed?
|
||||
* @default
|
||||
*/
|
||||
this.trimmed = false;
|
||||
|
||||
/**
|
||||
* @property {number} sourceSizeW - Width of the original sprite.
|
||||
*/
|
||||
this.sourceSizeW = width;
|
||||
|
||||
/**
|
||||
* @property {number} sourceSizeH - Height of the original sprite.
|
||||
*/
|
||||
this.sourceSizeH = height;
|
||||
|
||||
/**
|
||||
* @property {number} spriteSourceSizeX - X position of the trimmed sprite inside original sprite.
|
||||
* @default
|
||||
*/
|
||||
this.spriteSourceSizeX = 0;
|
||||
|
||||
/**
|
||||
* @property {number} spriteSourceSizeY - Y position of the trimmed sprite inside original sprite.
|
||||
* @default
|
||||
*/
|
||||
this.spriteSourceSizeY = 0;
|
||||
|
||||
/**
|
||||
* @property {number} spriteSourceSizeW - Width of the trimmed sprite.
|
||||
* @default
|
||||
*/
|
||||
this.spriteSourceSizeW = 0;
|
||||
|
||||
/**
|
||||
* @property {number} spriteSourceSizeH - Height of the trimmed sprite.
|
||||
* @default
|
||||
*/
|
||||
this.spriteSourceSizeH = 0;
|
||||
|
||||
};
|
||||
|
||||
Phaser.Frame.prototype = {
|
||||
|
||||
/**
|
||||
* If the frame was trimmed when added to the Texture Atlas this records the trim and source data.
|
||||
*
|
||||
* @method Phaser.Frame#setTrim
|
||||
* @param {boolean} trimmed - If this frame was trimmed or not.
|
||||
* @param {number} actualWidth - The width of the frame before being trimmed.
|
||||
* @param {number} actualHeight - The height of the frame before being trimmed.
|
||||
* @param {number} destX - The destination X position of the trimmed frame for display.
|
||||
* @param {number} destY - The destination Y position of the trimmed frame for display.
|
||||
* @param {number} destWidth - The destination width of the trimmed frame for display.
|
||||
* @param {number} destHeight - The destination height of the trimmed frame for display.
|
||||
*/
|
||||
setTrim: function (trimmed, actualWidth, actualHeight, destX, destY, destWidth, destHeight) {
|
||||
|
||||
this.trimmed = trimmed;
|
||||
|
||||
if (trimmed)
|
||||
{
|
||||
this.width = actualWidth;
|
||||
this.height = actualHeight;
|
||||
this.sourceSizeW = actualWidth;
|
||||
this.sourceSizeH = actualHeight;
|
||||
this.centerX = Math.floor(actualWidth / 2);
|
||||
this.centerY = Math.floor(actualHeight / 2);
|
||||
this.spriteSourceSizeX = destX;
|
||||
this.spriteSourceSizeY = destY;
|
||||
this.spriteSourceSizeW = destWidth;
|
||||
this.spriteSourceSizeH = destHeight;
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns a Rectangle set to the dimensions of this Frame.
|
||||
*
|
||||
* @method Phaser.Frame#getRect
|
||||
* @param {Phaser.Rectangle} [out] - A rectangle to copy the frame dimensions to.
|
||||
* @return {Phaser.Rectangle} A rectangle.
|
||||
*/
|
||||
getRect: function (out) {
|
||||
|
||||
if (typeof out === 'undefined')
|
||||
{
|
||||
out = new Phaser.Rectangle(this.x, this.y, this.width, this.height);
|
||||
}
|
||||
else
|
||||
{
|
||||
out.setTo(this.x, this.y, this.width, this.height);
|
||||
}
|
||||
|
||||
return out;
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Phaser.Frame.prototype.constructor = Phaser.Frame;
|
||||
</pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<footer>
|
||||
|
||||
|
||||
<span class="copyright">
|
||||
Phaser Copyright © 2012-2014 Photon Storm Ltd.
|
||||
</span>
|
||||
<br />
|
||||
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
|
||||
on Tue May 20 2014 10:05:49 GMT+0100 (BST) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
<br clear="both">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script src="scripts/sunlight.js"></script>
|
||||
<script src="scripts/sunlight.javascript.js"></script>
|
||||
<script src="scripts/sunlight-plugin.doclinks.js"></script>
|
||||
<script src="scripts/sunlight-plugin.linenumbers.js"></script>
|
||||
<script src="scripts/sunlight-plugin.menu.js"></script>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/jquery.scrollTo.js"></script>
|
||||
<script src="scripts/jquery.localScroll.js"></script>
|
||||
<script src="scripts/bootstrap-dropdown.js"></script>
|
||||
<script src="scripts/toc.js"></script>
|
||||
|
||||
|
||||
<script> Sunlight.highlightAll({lineNumbers:true, showMenu: true, enableDoclinks :true}); </script>
|
||||
|
||||
<script>
|
||||
$( function () {
|
||||
$( "#toc" ).toc( {
|
||||
anchorName : function(i, heading, prefix) {
|
||||
return $(heading).attr("id") || ( prefix + i );
|
||||
},
|
||||
selectors : "h1,h2,h3,h4",
|
||||
showAndHide : false,
|
||||
scrollTo : 60
|
||||
} );
|
||||
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
|
||||
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
|
||||
|
||||
} );
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
826
docs/FrameData.js.html
Normal file
826
docs/FrameData.js.html
Normal file
@@ -0,0 +1,826 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Phaser Source: animation/FrameData.js</title>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
|
||||
|
||||
|
||||
<link type="text/css" rel="stylesheet" href="styles/site.cerulean.css">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="navbar navbar-fixed-top navbar-inverse">
|
||||
<div class="navbar-inner">
|
||||
<a class="brand" href="index.html">Phaser</a>
|
||||
<ul class="nav">
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-0">
|
||||
<a href="Phaser.html">Phaser</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Animation.html">Animation</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationManager.html">AnimationManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationParser.html">AnimationParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ArrayList.html">ArrayList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapData.html">BitmapData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapText.html">BitmapText</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Button.html">Button</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Cache.html">Cache</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Camera.html">Camera</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Canvas.html">Canvas</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Color.html">Color</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Device.html">Device</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Easing.html">Easing</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Back.html">Back</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Bounce.html">Bounce</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Circular.html">Circular</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Cubic.html">Cubic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Elastic.html">Elastic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Exponential.html">Exponential</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Linear.html">Linear</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quadratic.html">Quadratic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quartic.html">Quartic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quintic.html">Quintic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Sinusoidal.html">Sinusoidal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Ellipse.html">Ellipse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Events.html">Events</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Filter.html">Filter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Frame.html">Frame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.FrameData.html">FrameData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Game.html">Game</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectCreator.html">GameObjectCreator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Gamepad.html">Gamepad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GamepadButton.html">GamepadButton</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Graphics.html">Graphics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Group.html">Group</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Image.html">Image</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Input.html">Input</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.InputHandler.html">InputHandler</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Key.html">Key</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Keyboard.html">Keyboard</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Line.html">Line</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LinkedList.html">LinkedList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Loader.html">Loader</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LoaderParser.html">LoaderParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Math.html">Math</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Mouse.html">Mouse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.MSPointer.html">MSPointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Net.html">Net</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particle.html">Particle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particles.html">Particles</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Particles.Arcade.Emitter.html">Emitter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Physics.html">Physics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Arcade.html">Arcade</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Arcade.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Ninja.html">Ninja</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.AABB.html">AABB</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.P2.html">P2</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.BodyDebug.html">BodyDebug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.CollisionGroup.html">CollisionGroup</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.ContactMaterial.html">ContactMaterial</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.DistanceConstraint.html">DistanceConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.FixtureList.html">FixtureList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.GearConstraint.html">GearConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.InversePointProxy.html">InversePointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.LockConstraint.html">LockConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Material.html">Material</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PointProxy.html">PointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PrismaticConstraint.html">PrismaticConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.RevoluteConstraint.html">RevoluteConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Spring.html">Spring</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Plugin.html">Plugin</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.PluginManager.html">PluginManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Point.html">Point</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Pointer.html">Pointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Polygon.html">Polygon</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.QuadTree.html">QuadTree</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RandomDataGenerator.html">RandomDataGenerator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Rectangle.html">Rectangle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RenderTexture.html">RenderTexture</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RequestAnimationFrame.html">RequestAnimationFrame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RetroFont.html">RetroFont</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ScaleManager.html">ScaleManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Signal.html">Signal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SignalBinding.html">SignalBinding</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SinglePad.html">SinglePad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sound.html">Sound</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SoundManager.html">SoundManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sprite.html">Sprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SpriteBatch.html">SpriteBatch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Stage.html">Stage</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.State.html">State</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.StateManager.html">StateManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Text.html">Text</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tilemap.html">Tilemap</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapLayer.html">TilemapLayer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapParser.html">TilemapParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tileset.html">Tileset</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TileSprite.html">TileSprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Time.html">Time</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Timer.html">Timer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TimerEvent.html">TimerEvent</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Touch.html">Touch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tween.html">Tween</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TweenManager.html">TweenManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Utils.html">Utils</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Utils.Debug.html">Debug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.World.html">World</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row-fluid">
|
||||
|
||||
|
||||
<div class="span12">
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
|
||||
<h1 class="page-title">Source: animation/FrameData.js</h1>
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <rich@photonstorm.com>
|
||||
* @copyright 2014 Photon Storm Ltd.
|
||||
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
||||
*/
|
||||
|
||||
/**
|
||||
* FrameData is a container for Frame objects, which are the internal representation of animation data in Phaser.
|
||||
*
|
||||
* @class Phaser.FrameData
|
||||
* @constructor
|
||||
*/
|
||||
Phaser.FrameData = function () {
|
||||
|
||||
/**
|
||||
* @property {Array} _frames - Local array of frames.
|
||||
* @private
|
||||
*/
|
||||
this._frames = [];
|
||||
|
||||
|
||||
/**
|
||||
* @property {Array} _frameNames - Local array of frame names for name to index conversions.
|
||||
* @private
|
||||
*/
|
||||
this._frameNames = [];
|
||||
|
||||
};
|
||||
|
||||
Phaser.FrameData.prototype = {
|
||||
|
||||
/**
|
||||
* Adds a new Frame to this FrameData collection. Typically called by the Animation.Parser and not directly.
|
||||
*
|
||||
* @method Phaser.FrameData#addFrame
|
||||
* @param {Phaser.Frame} frame - The frame to add to this FrameData set.
|
||||
* @return {Phaser.Frame} The frame that was just added.
|
||||
*/
|
||||
addFrame: function (frame) {
|
||||
|
||||
frame.index = this._frames.length;
|
||||
|
||||
this._frames.push(frame);
|
||||
|
||||
if (frame.name !== '')
|
||||
{
|
||||
this._frameNames[frame.name] = frame.index;
|
||||
}
|
||||
|
||||
return frame;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Get a Frame by its numerical index.
|
||||
*
|
||||
* @method Phaser.FrameData#getFrame
|
||||
* @param {number} index - The index of the frame you want to get.
|
||||
* @return {Phaser.Frame} The frame, if found.
|
||||
*/
|
||||
getFrame: function (index) {
|
||||
|
||||
if (index > this._frames.length)
|
||||
{
|
||||
index = 0;
|
||||
}
|
||||
|
||||
return this._frames[index];
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Get a Frame by its frame name.
|
||||
*
|
||||
* @method Phaser.FrameData#getFrameByName
|
||||
* @param {string} name - The name of the frame you want to get.
|
||||
* @return {Phaser.Frame} The frame, if found.
|
||||
*/
|
||||
getFrameByName: function (name) {
|
||||
|
||||
if (typeof this._frameNames[name] === 'number')
|
||||
{
|
||||
return this._frames[this._frameNames[name]];
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Check if there is a Frame with the given name.
|
||||
*
|
||||
* @method Phaser.FrameData#checkFrameName
|
||||
* @param {string} name - The name of the frame you want to check.
|
||||
* @return {boolean} True if the frame is found, otherwise false.
|
||||
*/
|
||||
checkFrameName: function (name) {
|
||||
|
||||
if (this._frameNames[name] == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns a range of frames based on the given start and end frame indexes and returns them in an Array.
|
||||
*
|
||||
* @method Phaser.FrameData#getFrameRange
|
||||
* @param {number} start - The starting frame index.
|
||||
* @param {number} end - The ending frame index.
|
||||
* @param {Array} [output] - If given the results will be appended to the end of this array otherwise a new array will be created.
|
||||
* @return {Array} An array of Frames between the start and end index values, or an empty array if none were found.
|
||||
*/
|
||||
getFrameRange: function (start, end, output) {
|
||||
|
||||
if (typeof output === "undefined") { output = []; }
|
||||
|
||||
for (var i = start; i <= end; i++)
|
||||
{
|
||||
output.push(this._frames[i]);
|
||||
}
|
||||
|
||||
return output;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns all of the Frames in this FrameData set where the frame index is found in the input array.
|
||||
* The frames are returned in the output array, or if none is provided in a new Array object.
|
||||
*
|
||||
* @method Phaser.FrameData#getFrames
|
||||
* @param {Array} frames - An Array containing the indexes of the frames to retrieve. If the array is empty then all frames in the FrameData are returned.
|
||||
* @param {boolean} [useNumericIndex=true] - Are the given frames using numeric indexes (default) or strings? (false)
|
||||
* @param {Array} [output] - If given the results will be appended to the end of this array otherwise a new array will be created.
|
||||
* @return {Array} An array of all Frames in this FrameData set matching the given names or IDs.
|
||||
*/
|
||||
getFrames: function (frames, useNumericIndex, output) {
|
||||
|
||||
if (typeof useNumericIndex === "undefined") { useNumericIndex = true; }
|
||||
if (typeof output === "undefined") { output = []; }
|
||||
|
||||
if (typeof frames === "undefined" || frames.length === 0)
|
||||
{
|
||||
// No input array, so we loop through all frames
|
||||
for (var i = 0; i < this._frames.length; i++)
|
||||
{
|
||||
// We only need the indexes
|
||||
output.push(this._frames[i]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Input array given, loop through that instead
|
||||
for (var i = 0, len = frames.length; i < len; i++)
|
||||
{
|
||||
// Does the input array contain names or indexes?
|
||||
if (useNumericIndex)
|
||||
{
|
||||
// The actual frame
|
||||
output.push(this.getFrame(frames[i]));
|
||||
}
|
||||
else
|
||||
{
|
||||
// The actual frame
|
||||
output.push(this.getFrameByName(frames[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return output;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns all of the Frame indexes in this FrameData set.
|
||||
* The frames indexes are returned in the output array, or if none is provided in a new Array object.
|
||||
*
|
||||
* @method Phaser.FrameData#getFrameIndexes
|
||||
* @param {Array} frames - An Array containing the indexes of the frames to retrieve. If the array is empty then all frames in the FrameData are returned.
|
||||
* @param {boolean} [useNumericIndex=true] - Are the given frames using numeric indexes (default) or strings? (false)
|
||||
* @param {Array} [output] - If given the results will be appended to the end of this array otherwise a new array will be created.
|
||||
* @return {Array} An array of all Frame indexes matching the given names or IDs.
|
||||
*/
|
||||
getFrameIndexes: function (frames, useNumericIndex, output) {
|
||||
|
||||
if (typeof useNumericIndex === "undefined") { useNumericIndex = true; }
|
||||
if (typeof output === "undefined") { output = []; }
|
||||
|
||||
if (typeof frames === "undefined" || frames.length === 0)
|
||||
{
|
||||
// No frames array, so we loop through all frames
|
||||
for (var i = 0, len = this._frames.length; i < len; i++)
|
||||
{
|
||||
output.push(this._frames[i].index);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Input array given, loop through that instead
|
||||
for (var i = 0, len = frames.length; i < len; i++)
|
||||
{
|
||||
// Does the frames array contain names or indexes?
|
||||
if (useNumericIndex)
|
||||
{
|
||||
output.push(frames[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.getFrameByName(frames[i]))
|
||||
{
|
||||
output.push(this.getFrameByName(frames[i]).index);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return output;
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Phaser.FrameData.prototype.constructor = Phaser.FrameData;
|
||||
|
||||
/**
|
||||
* @name Phaser.FrameData#total
|
||||
* @property {number} total - The total number of frames in this FrameData set.
|
||||
* @readonly
|
||||
*/
|
||||
Object.defineProperty(Phaser.FrameData.prototype, "total", {
|
||||
|
||||
get: function () {
|
||||
return this._frames.length;
|
||||
}
|
||||
|
||||
});
|
||||
</pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<footer>
|
||||
|
||||
|
||||
<span class="copyright">
|
||||
Phaser Copyright © 2012-2014 Photon Storm Ltd.
|
||||
</span>
|
||||
<br />
|
||||
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
|
||||
on Tue May 20 2014 10:05:49 GMT+0100 (BST) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
<br clear="both">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script src="scripts/sunlight.js"></script>
|
||||
<script src="scripts/sunlight.javascript.js"></script>
|
||||
<script src="scripts/sunlight-plugin.doclinks.js"></script>
|
||||
<script src="scripts/sunlight-plugin.linenumbers.js"></script>
|
||||
<script src="scripts/sunlight-plugin.menu.js"></script>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/jquery.scrollTo.js"></script>
|
||||
<script src="scripts/jquery.localScroll.js"></script>
|
||||
<script src="scripts/bootstrap-dropdown.js"></script>
|
||||
<script src="scripts/toc.js"></script>
|
||||
|
||||
|
||||
<script> Sunlight.highlightAll({lineNumbers:true, showMenu: true, enableDoclinks :true}); </script>
|
||||
|
||||
<script>
|
||||
$( function () {
|
||||
$( "#toc" ).toc( {
|
||||
anchorName : function(i, heading, prefix) {
|
||||
return $(heading).attr("id") || ( prefix + i );
|
||||
},
|
||||
selectors : "h1,h2,h3,h4",
|
||||
showAndHide : false,
|
||||
scrollTo : 60
|
||||
} );
|
||||
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
|
||||
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
|
||||
|
||||
} );
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
1411
docs/Game.js.html
Normal file
1411
docs/Game.js.html
Normal file
File diff suppressed because it is too large
Load Diff
953
docs/GameObjectCreator.js.html
Normal file
953
docs/GameObjectCreator.js.html
Normal file
@@ -0,0 +1,953 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Phaser Source: gameobjects/GameObjectCreator.js</title>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
|
||||
|
||||
|
||||
<link type="text/css" rel="stylesheet" href="styles/site.cerulean.css">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="navbar navbar-fixed-top navbar-inverse">
|
||||
<div class="navbar-inner">
|
||||
<a class="brand" href="index.html">Phaser</a>
|
||||
<ul class="nav">
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-0">
|
||||
<a href="Phaser.html">Phaser</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Animation.html">Animation</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationManager.html">AnimationManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationParser.html">AnimationParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ArrayList.html">ArrayList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapData.html">BitmapData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapText.html">BitmapText</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Button.html">Button</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Cache.html">Cache</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Camera.html">Camera</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Canvas.html">Canvas</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Color.html">Color</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Device.html">Device</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Easing.html">Easing</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Back.html">Back</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Bounce.html">Bounce</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Circular.html">Circular</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Cubic.html">Cubic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Elastic.html">Elastic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Exponential.html">Exponential</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Linear.html">Linear</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quadratic.html">Quadratic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quartic.html">Quartic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quintic.html">Quintic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Sinusoidal.html">Sinusoidal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Ellipse.html">Ellipse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Events.html">Events</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Filter.html">Filter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Frame.html">Frame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.FrameData.html">FrameData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Game.html">Game</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectCreator.html">GameObjectCreator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Gamepad.html">Gamepad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GamepadButton.html">GamepadButton</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Graphics.html">Graphics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Group.html">Group</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Image.html">Image</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Input.html">Input</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.InputHandler.html">InputHandler</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Key.html">Key</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Keyboard.html">Keyboard</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Line.html">Line</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LinkedList.html">LinkedList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Loader.html">Loader</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LoaderParser.html">LoaderParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Math.html">Math</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Mouse.html">Mouse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.MSPointer.html">MSPointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Net.html">Net</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particle.html">Particle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particles.html">Particles</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Particles.Arcade.Emitter.html">Emitter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Physics.html">Physics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Arcade.html">Arcade</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Arcade.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Ninja.html">Ninja</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.AABB.html">AABB</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.P2.html">P2</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.BodyDebug.html">BodyDebug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.CollisionGroup.html">CollisionGroup</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.ContactMaterial.html">ContactMaterial</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.DistanceConstraint.html">DistanceConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.FixtureList.html">FixtureList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.GearConstraint.html">GearConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.InversePointProxy.html">InversePointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.LockConstraint.html">LockConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Material.html">Material</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PointProxy.html">PointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PrismaticConstraint.html">PrismaticConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.RevoluteConstraint.html">RevoluteConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Spring.html">Spring</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Plugin.html">Plugin</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.PluginManager.html">PluginManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Point.html">Point</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Pointer.html">Pointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Polygon.html">Polygon</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.QuadTree.html">QuadTree</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RandomDataGenerator.html">RandomDataGenerator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Rectangle.html">Rectangle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RenderTexture.html">RenderTexture</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RequestAnimationFrame.html">RequestAnimationFrame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RetroFont.html">RetroFont</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ScaleManager.html">ScaleManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Signal.html">Signal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SignalBinding.html">SignalBinding</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SinglePad.html">SinglePad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sound.html">Sound</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SoundManager.html">SoundManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sprite.html">Sprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SpriteBatch.html">SpriteBatch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Stage.html">Stage</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.State.html">State</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.StateManager.html">StateManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Text.html">Text</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tilemap.html">Tilemap</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapLayer.html">TilemapLayer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapParser.html">TilemapParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tileset.html">Tileset</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TileSprite.html">TileSprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Time.html">Time</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Timer.html">Timer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TimerEvent.html">TimerEvent</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Touch.html">Touch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tween.html">Tween</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TweenManager.html">TweenManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Utils.html">Utils</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Utils.Debug.html">Debug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.World.html">World</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row-fluid">
|
||||
|
||||
|
||||
<div class="span12">
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
|
||||
<h1 class="page-title">Source: gameobjects/GameObjectCreator.js</h1>
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <rich@photonstorm.com>
|
||||
* @copyright 2014 Photon Storm Ltd.
|
||||
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
||||
*/
|
||||
|
||||
/**
|
||||
* The Game Object Creator is a quick way to create all of the different sorts of core objects that Phaser uses, but not add them to the game world.
|
||||
* Use the GameObjectFactory to create and add the objects into the world.
|
||||
*
|
||||
* @class Phaser.GameObjectCreator
|
||||
* @constructor
|
||||
* @param {Phaser.Game} game - A reference to the currently running game.
|
||||
*/
|
||||
Phaser.GameObjectCreator = function (game) {
|
||||
|
||||
/**
|
||||
* @property {Phaser.Game} game - A reference to the currently running Game.
|
||||
*/
|
||||
this.game = game;
|
||||
|
||||
/**
|
||||
* @property {Phaser.World} world - A reference to the game world.
|
||||
*/
|
||||
this.world = this.game.world;
|
||||
|
||||
};
|
||||
|
||||
Phaser.GameObjectCreator.prototype = {
|
||||
|
||||
/**
|
||||
* Create a new `Image` object. An Image is a light-weight object you can use to display anything that doesn't need physics or animation.
|
||||
* It can still rotate, scale, crop and receive input events. This makes it perfect for logos, backgrounds, simple buttons and other non-Sprite graphics.
|
||||
*
|
||||
* @method Phaser.GameObjectCreator#image
|
||||
* @param {number} x - X position of the image.
|
||||
* @param {number} y - Y position of the image.
|
||||
* @param {string|Phaser.RenderTexture|PIXI.Texture} key - This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture.
|
||||
* @param {string|number} [frame] - If the sprite uses an image from a texture atlas or sprite sheet you can pass the frame here. Either a number for a frame ID or a string for a frame name.
|
||||
* @returns {Phaser.Sprite} the newly created sprite object.
|
||||
*/
|
||||
image: function (x, y, key, frame) {
|
||||
|
||||
return new Phaser.Image(this.game, x, y, key, frame);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Create a new Sprite with specific position and sprite sheet key.
|
||||
*
|
||||
* @method Phaser.GameObjectCreator#sprite
|
||||
* @param {number} x - X position of the new sprite.
|
||||
* @param {number} y - Y position of the new sprite.
|
||||
* @param {string|Phaser.RenderTexture|PIXI.Texture} key - This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture.
|
||||
* @param {string|number} [frame] - If the sprite uses an image from a texture atlas or sprite sheet you can pass the frame here. Either a number for a frame ID or a string for a frame name.
|
||||
* @returns {Phaser.Sprite} the newly created sprite object.
|
||||
*/
|
||||
sprite: function (x, y, key, frame) {
|
||||
|
||||
return new Phaser.Sprite(this.game, x, y, key, frame);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Create a tween object for a specific object. The object can be any JavaScript object or Phaser object such as Sprite.
|
||||
*
|
||||
* @method Phaser.GameObjectCreator#tween
|
||||
* @param {object} obj - Object the tween will be run on.
|
||||
* @return {Phaser.Tween} The Tween object.
|
||||
*/
|
||||
tween: function (obj) {
|
||||
|
||||
return new Phaser.Tween(obj, this.game);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* A Group is a container for display objects that allows for fast pooling, recycling and collision checks.
|
||||
*
|
||||
* @method Phaser.GameObjectCreator#group
|
||||
* @param {string} [name='group'] - A name for this Group. Not used internally but useful for debugging.
|
||||
* @param {boolean} [addToStage=false] - If set to true this Group will be added directly to the Game.Stage instead of Game.World.
|
||||
* @param {boolean} [enableBody=false] - If true all Sprites created with `Group.create` or `Group.createMulitple` will have a physics body created on them. Change the body type with physicsBodyType.
|
||||
* @param {number} [physicsBodyType=0] - If enableBody is true this is the type of physics body that is created on new Sprites. Phaser.Physics.ARCADE, Phaser.Physics.P2, Phaser.Physics.NINJA, etc.
|
||||
* @return {Phaser.Group} The newly created group.
|
||||
*/
|
||||
group: function (parent, name, addToStage, enableBody, physicsBodyType) {
|
||||
|
||||
return new Phaser.Group(this.game, null, name, addToStage, enableBody, physicsBodyType);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* A Group is a container for display objects that allows for fast pooling, recycling and collision checks.
|
||||
*
|
||||
* @method Phaser.GameObjectCreator#spriteBatch
|
||||
* @param {any} parent - The parent Group or DisplayObjectContainer that will hold this group, if any.
|
||||
* @param {string} [name='group'] - A name for this Group. Not used internally but useful for debugging.
|
||||
* @param {boolean} [addToStage=false] - If set to true this Group will be added directly to the Game.Stage instead of Game.World.
|
||||
* @return {Phaser.Group} The newly created group.
|
||||
*/
|
||||
spriteBatch: function (parent, name, addToStage) {
|
||||
|
||||
if (typeof name === 'undefined') { name = 'group'; }
|
||||
if (typeof addToStage === 'undefined') { addToStage = false; }
|
||||
|
||||
return new Phaser.SpriteBatch(this.game, parent, name, addToStage);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Creates a new Sound object.
|
||||
*
|
||||
* @method Phaser.GameObjectCreator#audio
|
||||
* @param {string} key - The Game.cache key of the sound that this object will use.
|
||||
* @param {number} [volume=1] - The volume at which the sound will be played.
|
||||
* @param {boolean} [loop=false] - Whether or not the sound will loop.
|
||||
* @param {boolean} [connect=true] - Controls if the created Sound object will connect to the master gainNode of the SoundManager when running under WebAudio.
|
||||
* @return {Phaser.Sound} The newly created text object.
|
||||
*/
|
||||
audio: function (key, volume, loop, connect) {
|
||||
|
||||
return this.game.sound.add(key, volume, loop, connect);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Creates a new Sound object.
|
||||
*
|
||||
* @method Phaser.GameObjectCreator#sound
|
||||
* @param {string} key - The Game.cache key of the sound that this object will use.
|
||||
* @param {number} [volume=1] - The volume at which the sound will be played.
|
||||
* @param {boolean} [loop=false] - Whether or not the sound will loop.
|
||||
* @param {boolean} [connect=true] - Controls if the created Sound object will connect to the master gainNode of the SoundManager when running under WebAudio.
|
||||
* @return {Phaser.Sound} The newly created text object.
|
||||
*/
|
||||
sound: function (key, volume, loop, connect) {
|
||||
|
||||
return this.game.sound.add(key, volume, loop, connect);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Creates a new TileSprite object.
|
||||
*
|
||||
* @method Phaser.GameObjectCreator#tileSprite
|
||||
* @param {number} x - The x coordinate (in world space) to position the TileSprite at.
|
||||
* @param {number} y - The y coordinate (in world space) to position the TileSprite at.
|
||||
* @param {number} width - The width of the TileSprite.
|
||||
* @param {number} height - The height of the TileSprite.
|
||||
* @param {string|Phaser.RenderTexture|Phaser.BitmapData|PIXI.Texture} key - This is the image or texture used by the TileSprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture.
|
||||
* @param {string|number} frame - If this TileSprite is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index.
|
||||
* @return {Phaser.TileSprite} The newly created tileSprite object.
|
||||
*/
|
||||
tileSprite: function (x, y, width, height, key, frame) {
|
||||
|
||||
return new Phaser.TileSprite(this.game, x, y, width, height, key, frame);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Creates a new Text object.
|
||||
*
|
||||
* @method Phaser.GameObjectCreator#text
|
||||
* @param {number} x - X position of the new text object.
|
||||
* @param {number} y - Y position of the new text object.
|
||||
* @param {string} text - The actual text that will be written.
|
||||
* @param {object} style - The style object containing style attributes like font, font size , etc.
|
||||
* @return {Phaser.Text} The newly created text object.
|
||||
*/
|
||||
text: function (x, y, text, style) {
|
||||
|
||||
return new Phaser.Text(this.game, x, y, text, style);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Creates a new Button object.
|
||||
*
|
||||
* @method Phaser.GameObjectCreator#button
|
||||
* @param {number} [x] X position of the new button object.
|
||||
* @param {number} [y] Y position of the new button object.
|
||||
* @param {string} [key] The image key as defined in the Game.Cache to use as the texture for this button.
|
||||
* @param {function} [callback] The function to call when this button is pressed
|
||||
* @param {object} [callbackContext] The context in which the callback will be called (usually 'this')
|
||||
* @param {string|number} [overFrame] This is the frame or frameName that will be set when this button is in an over state. Give either a number to use a frame ID or a string for a frame name.
|
||||
* @param {string|number} [outFrame] This is the frame or frameName that will be set when this button is in an out state. Give either a number to use a frame ID or a string for a frame name.
|
||||
* @param {string|number} [downFrame] This is the frame or frameName that will be set when this button is in a down state. Give either a number to use a frame ID or a string for a frame name.
|
||||
* @param {string|number} [upFrame] This is the frame or frameName that will be set when this button is in an up state. Give either a number to use a frame ID or a string for a frame name.
|
||||
* @return {Phaser.Button} The newly created button object.
|
||||
*/
|
||||
button: function (x, y, key, callback, callbackContext, overFrame, outFrame, downFrame, upFrame) {
|
||||
|
||||
return new Phaser.Button(this.game, x, y, key, callback, callbackContext, overFrame, outFrame, downFrame, upFrame);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Creates a new Graphics object.
|
||||
*
|
||||
* @method Phaser.GameObjectCreator#graphics
|
||||
* @param {number} x - X position of the new graphics object.
|
||||
* @param {number} y - Y position of the new graphics object.
|
||||
* @return {Phaser.Graphics} The newly created graphics object.
|
||||
*/
|
||||
graphics: function (x, y) {
|
||||
|
||||
return new Phaser.Graphics(this.game, x, y);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Emitter is a lightweight particle emitter. It can be used for one-time explosions or for
|
||||
* continuous effects like rain and fire. All it really does is launch Particle objects out
|
||||
* at set intervals, and fixes their positions and velocities accorindgly.
|
||||
*
|
||||
* @method Phaser.GameObjectCreator#emitter
|
||||
* @param {number} [x=0] - The x coordinate within the Emitter that the particles are emitted from.
|
||||
* @param {number} [y=0] - The y coordinate within the Emitter that the particles are emitted from.
|
||||
* @param {number} [maxParticles=50] - The total number of particles in this emitter.
|
||||
* @return {Phaser.Emitter} The newly created emitter object.
|
||||
*/
|
||||
emitter: function (x, y, maxParticles) {
|
||||
|
||||
return new Phaser.Particles.Arcade.Emitter(this.game, x, y, maxParticles);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Create a new RetroFont object to be used as a texture for an Image or Sprite and optionally add it to the Cache.
|
||||
* A RetroFont uses a bitmap which contains fixed with characters for the font set. You use character spacing to define the set.
|
||||
* If you need variable width character support then use a BitmapText object instead. The main difference between a RetroFont and a BitmapText
|
||||
* is that a RetroFont creates a single texture that you can apply to a game object, where-as a BitmapText creates one Sprite object per letter of text.
|
||||
* The texture can be asssigned or one or multiple images/sprites, but note that the text the RetroFont uses will be shared across them all,
|
||||
* i.e. if you need each Image to have different text in it, then you need to create multiple RetroFont objects.
|
||||
*
|
||||
* @method Phaser.GameObjectCreator#retroFont
|
||||
* @param {string} font - The key of the image in the Game.Cache that the RetroFont will use.
|
||||
* @param {number} characterWidth - The width of each character in the font set.
|
||||
* @param {number} characterHeight - The height of each character in the font set.
|
||||
* @param {string} chars - The characters used in the font set, in display order. You can use the TEXT_SET consts for common font set arrangements.
|
||||
* @param {number} charsPerRow - The number of characters per row in the font set.
|
||||
* @param {number} [xSpacing=0] - If the characters in the font set have horizontal spacing between them set the required amount here.
|
||||
* @param {number} [ySpacing=0] - If the characters in the font set have vertical spacing between them set the required amount here.
|
||||
* @param {number} [xOffset=0] - If the font set doesn't start at the top left of the given image, specify the X coordinate offset here.
|
||||
* @param {number} [yOffset=0] - If the font set doesn't start at the top left of the given image, specify the Y coordinate offset here.
|
||||
* @return {Phaser.RetroFont} The newly created RetroFont texture which can be applied to an Image or Sprite.
|
||||
*/
|
||||
retroFont: function (font, characterWidth, characterHeight, chars, charsPerRow, xSpacing, ySpacing, xOffset, yOffset) {
|
||||
|
||||
return new Phaser.RetroFont(this.game, font, characterWidth, characterHeight, chars, charsPerRow, xSpacing, ySpacing, xOffset, yOffset);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Create a new BitmapText object.
|
||||
*
|
||||
* @method Phaser.GameObjectCreator#bitmapText
|
||||
* @param {number} x - X position of the new bitmapText object.
|
||||
* @param {number} y - Y position of the new bitmapText object.
|
||||
* @param {string} font - The key of the BitmapText font as stored in Game.Cache.
|
||||
* @param {string} [text] - The actual text that will be rendered. Can be set later via BitmapText.text.
|
||||
* @param {number} [size] - The size the font will be rendered in, in pixels.
|
||||
* @return {Phaser.BitmapText} The newly created bitmapText object.
|
||||
*/
|
||||
bitmapText: function (x, y, font, text, size) {
|
||||
|
||||
return new Phaser.BitmapText(this.game, x, y, font, text, size);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Creates a new Phaser.Tilemap object. The map can either be populated with data from a Tiled JSON file or from a CSV file.
|
||||
* To do this pass the Cache key as the first parameter. When using Tiled data you need only provide the key.
|
||||
* When using CSV data you must provide the key and the tileWidth and tileHeight parameters.
|
||||
* If creating a blank tilemap to be populated later, you can either specify no parameters at all and then use `Tilemap.create` or pass the map and tile dimensions here.
|
||||
* Note that all Tilemaps use a base tile size to calculate dimensions from, but that a TilemapLayer may have its own unique tile size that overrides it.
|
||||
*
|
||||
* @method Phaser.GameObjectCreator#tilemap
|
||||
* @param {string} [key] - The key of the tilemap data as stored in the Cache. If you're creating a blank map either leave this parameter out or pass `null`.
|
||||
* @param {number} [tileWidth=32] - The pixel width of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data.
|
||||
* @param {number} [tileHeight=32] - The pixel height of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data.
|
||||
* @param {number} [width=10] - The width of the map in tiles. If this map is created from Tiled or CSV data you don't need to specify this.
|
||||
* @param {number} [height=10] - The height of the map in tiles. If this map is created from Tiled or CSV data you don't need to specify this.
|
||||
*/
|
||||
tilemap: function (key, tileWidth, tileHeight, width, height) {
|
||||
|
||||
return new Phaser.Tilemap(this.game, key, tileWidth, tileHeight, width, height);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* A dynamic initially blank canvas to which images can be drawn.
|
||||
*
|
||||
* @method Phaser.GameObjectCreator#renderTexture
|
||||
* @param {number} [width=100] - the width of the RenderTexture.
|
||||
* @param {number} [height=100] - the height of the RenderTexture.
|
||||
* @param {string} [key=''] - Asset key for the RenderTexture when stored in the Cache (see addToCache parameter).
|
||||
* @param {boolean} [addToCache=false] - Should this RenderTexture be added to the Game.Cache? If so you can retrieve it with Cache.getTexture(key)
|
||||
* @return {Phaser.RenderTexture} The newly created RenderTexture object.
|
||||
*/
|
||||
renderTexture: function (width, height, key, addToCache) {
|
||||
|
||||
if (typeof key === 'undefined' || key === '') { key = this.game.rnd.uuid(); }
|
||||
if (typeof addToCache === 'undefined') { addToCache = false; }
|
||||
|
||||
var texture = new Phaser.RenderTexture(this.game, width, height, key);
|
||||
|
||||
if (addToCache)
|
||||
{
|
||||
this.game.cache.addRenderTexture(key, texture);
|
||||
}
|
||||
|
||||
return texture;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* A BitmapData object which can be manipulated and drawn to like a traditional Canvas object and used to texture Sprites.
|
||||
*
|
||||
* @method Phaser.GameObjectCreator#bitmapData
|
||||
* @param {number} [width=100] - The width of the BitmapData in pixels.
|
||||
* @param {number} [height=100] - The height of the BitmapData in pixels.
|
||||
* @param {string} [key=''] - Asset key for the BitmapData when stored in the Cache (see addToCache parameter).
|
||||
* @param {boolean} [addToCache=false] - Should this BitmapData be added to the Game.Cache? If so you can retrieve it with Cache.getBitmapData(key)
|
||||
* @return {Phaser.BitmapData} The newly created BitmapData object.
|
||||
*/
|
||||
bitmapData: function (width, height, key, addToCache) {
|
||||
|
||||
if (typeof addToCache === 'undefined') { addToCache = false; }
|
||||
if (typeof key === 'undefined' || key === '') { key = this.game.rnd.uuid(); }
|
||||
|
||||
var texture = new Phaser.BitmapData(this.game, key, width, height);
|
||||
|
||||
if (addToCache)
|
||||
{
|
||||
this.game.cache.addBitmapData(key, texture);
|
||||
}
|
||||
|
||||
return texture;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* A WebGL shader/filter that can be applied to Sprites.
|
||||
*
|
||||
* @method Phaser.GameObjectCreator#filter
|
||||
* @param {string} filter - The name of the filter you wish to create, for example HueRotate or SineWave.
|
||||
* @param {any} - Whatever parameters are needed to be passed to the filter init function.
|
||||
* @return {Phaser.Filter} The newly created Phaser.Filter object.
|
||||
*/
|
||||
filter: function (filter) {
|
||||
|
||||
var args = Array.prototype.splice.call(arguments, 1);
|
||||
|
||||
var filter = new Phaser.Filter[filter](this.game);
|
||||
|
||||
filter.init.apply(filter, args);
|
||||
|
||||
return filter;
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Phaser.GameObjectCreator.prototype.constructor = Phaser.GameObjectCreator;
|
||||
</pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<footer>
|
||||
|
||||
|
||||
<span class="copyright">
|
||||
Phaser Copyright © 2012-2014 Photon Storm Ltd.
|
||||
</span>
|
||||
<br />
|
||||
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
|
||||
on Tue May 20 2014 10:05:49 GMT+0100 (BST) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
<br clear="both">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script src="scripts/sunlight.js"></script>
|
||||
<script src="scripts/sunlight.javascript.js"></script>
|
||||
<script src="scripts/sunlight-plugin.doclinks.js"></script>
|
||||
<script src="scripts/sunlight-plugin.linenumbers.js"></script>
|
||||
<script src="scripts/sunlight-plugin.menu.js"></script>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/jquery.scrollTo.js"></script>
|
||||
<script src="scripts/jquery.localScroll.js"></script>
|
||||
<script src="scripts/bootstrap-dropdown.js"></script>
|
||||
<script src="scripts/toc.js"></script>
|
||||
|
||||
|
||||
<script> Sunlight.highlightAll({lineNumbers:true, showMenu: true, enableDoclinks :true}); </script>
|
||||
|
||||
<script>
|
||||
$( function () {
|
||||
$( "#toc" ).toc( {
|
||||
anchorName : function(i, heading, prefix) {
|
||||
return $(heading).attr("id") || ( prefix + i );
|
||||
},
|
||||
selectors : "h1,h2,h3,h4",
|
||||
showAndHide : false,
|
||||
scrollTo : 60
|
||||
} );
|
||||
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
|
||||
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
|
||||
|
||||
} );
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
1005
docs/GameObjectFactory.js.html
Normal file
1005
docs/GameObjectFactory.js.html
Normal file
File diff suppressed because it is too large
Load Diff
1171
docs/Gamepad.js.html
Normal file
1171
docs/Gamepad.js.html
Normal file
File diff suppressed because it is too large
Load Diff
762
docs/GamepadButton.js.html
Normal file
762
docs/GamepadButton.js.html
Normal file
@@ -0,0 +1,762 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Phaser Source: input/GamepadButton.js</title>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
|
||||
|
||||
|
||||
<link type="text/css" rel="stylesheet" href="styles/site.cerulean.css">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="navbar navbar-fixed-top navbar-inverse">
|
||||
<div class="navbar-inner">
|
||||
<a class="brand" href="index.html">Phaser</a>
|
||||
<ul class="nav">
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-0">
|
||||
<a href="Phaser.html">Phaser</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Animation.html">Animation</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationManager.html">AnimationManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationParser.html">AnimationParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ArrayList.html">ArrayList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapData.html">BitmapData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapText.html">BitmapText</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Button.html">Button</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Cache.html">Cache</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Camera.html">Camera</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Canvas.html">Canvas</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Color.html">Color</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Device.html">Device</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Easing.html">Easing</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Back.html">Back</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Bounce.html">Bounce</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Circular.html">Circular</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Cubic.html">Cubic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Elastic.html">Elastic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Exponential.html">Exponential</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Linear.html">Linear</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quadratic.html">Quadratic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quartic.html">Quartic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quintic.html">Quintic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Sinusoidal.html">Sinusoidal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Ellipse.html">Ellipse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Events.html">Events</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Filter.html">Filter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Frame.html">Frame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.FrameData.html">FrameData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Game.html">Game</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectCreator.html">GameObjectCreator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Gamepad.html">Gamepad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GamepadButton.html">GamepadButton</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Graphics.html">Graphics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Group.html">Group</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Image.html">Image</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Input.html">Input</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.InputHandler.html">InputHandler</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Key.html">Key</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Keyboard.html">Keyboard</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Line.html">Line</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LinkedList.html">LinkedList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Loader.html">Loader</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LoaderParser.html">LoaderParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Math.html">Math</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Mouse.html">Mouse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.MSPointer.html">MSPointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Net.html">Net</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particle.html">Particle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particles.html">Particles</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Particles.Arcade.Emitter.html">Emitter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Physics.html">Physics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Arcade.html">Arcade</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Arcade.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Ninja.html">Ninja</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.AABB.html">AABB</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.P2.html">P2</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.BodyDebug.html">BodyDebug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.CollisionGroup.html">CollisionGroup</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.ContactMaterial.html">ContactMaterial</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.DistanceConstraint.html">DistanceConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.FixtureList.html">FixtureList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.GearConstraint.html">GearConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.InversePointProxy.html">InversePointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.LockConstraint.html">LockConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Material.html">Material</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PointProxy.html">PointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PrismaticConstraint.html">PrismaticConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.RevoluteConstraint.html">RevoluteConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Spring.html">Spring</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Plugin.html">Plugin</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.PluginManager.html">PluginManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Point.html">Point</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Pointer.html">Pointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Polygon.html">Polygon</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.QuadTree.html">QuadTree</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RandomDataGenerator.html">RandomDataGenerator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Rectangle.html">Rectangle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RenderTexture.html">RenderTexture</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RequestAnimationFrame.html">RequestAnimationFrame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RetroFont.html">RetroFont</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ScaleManager.html">ScaleManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Signal.html">Signal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SignalBinding.html">SignalBinding</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SinglePad.html">SinglePad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sound.html">Sound</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SoundManager.html">SoundManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sprite.html">Sprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SpriteBatch.html">SpriteBatch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Stage.html">Stage</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.State.html">State</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.StateManager.html">StateManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Text.html">Text</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tilemap.html">Tilemap</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapLayer.html">TilemapLayer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapParser.html">TilemapParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tileset.html">Tileset</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TileSprite.html">TileSprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Time.html">Time</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Timer.html">Timer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TimerEvent.html">TimerEvent</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Touch.html">Touch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tween.html">Tween</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TweenManager.html">TweenManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Utils.html">Utils</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Utils.Debug.html">Debug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.World.html">World</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row-fluid">
|
||||
|
||||
|
||||
<div class="span12">
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
|
||||
<h1 class="page-title">Source: input/GamepadButton.js</h1>
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author @karlmacklin <tacklemcclean@gmail.com>
|
||||
* @copyright 2014 Photon Storm Ltd.
|
||||
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @class Phaser.GamepadButton
|
||||
* @classdesc If you need more fine-grained control over the handling of specific buttons you can create and use Phaser.GamepadButton objects.
|
||||
* @constructor
|
||||
* @param {Phaser.Game} game - Current game instance.
|
||||
* @param {number} buttoncode - The button code this GamepadButton is responsible for.
|
||||
*/
|
||||
Phaser.GamepadButton = function (game, buttoncode) {
|
||||
|
||||
/**
|
||||
* @property {Phaser.Game} game - A reference to the currently running game.
|
||||
*/
|
||||
this.game = game;
|
||||
|
||||
/**
|
||||
* @property {boolean} isDown - The "down" state of the button.
|
||||
* @default
|
||||
*/
|
||||
this.isDown = false;
|
||||
|
||||
/**
|
||||
* @property {boolean} isUp - The "up" state of the button.
|
||||
* @default
|
||||
*/
|
||||
this.isUp = true;
|
||||
|
||||
/**
|
||||
* @property {number} timeDown - The timestamp when the button was last pressed down.
|
||||
* @default
|
||||
*/
|
||||
this.timeDown = 0;
|
||||
|
||||
/**
|
||||
* If the button is down this value holds the duration of that button press and is constantly updated.
|
||||
* If the button is up it holds the duration of the previous down session.
|
||||
* @property {number} duration - The number of milliseconds this button has been held down for.
|
||||
* @default
|
||||
*/
|
||||
this.duration = 0;
|
||||
|
||||
/**
|
||||
* @property {number} timeUp - The timestamp when the button was last released.
|
||||
* @default
|
||||
*/
|
||||
this.timeUp = 0;
|
||||
|
||||
/**
|
||||
* @property {number} repeats - If a button is held down this holds down the number of times the button has 'repeated'.
|
||||
* @default
|
||||
*/
|
||||
this.repeats = 0;
|
||||
|
||||
/**
|
||||
* @property {number} value - Button value. Mainly useful for checking analog buttons (like shoulder triggers)
|
||||
* @default
|
||||
*/
|
||||
this.value = 0;
|
||||
|
||||
/**
|
||||
* @property {number} buttonCode - The buttoncode of this button.
|
||||
*/
|
||||
this.buttonCode = buttoncode;
|
||||
|
||||
/**
|
||||
* @property {Phaser.Signal} onDown - This Signal is dispatched every time this GamepadButton is pressed down. It is only dispatched once (until the button is released again).
|
||||
*/
|
||||
this.onDown = new Phaser.Signal();
|
||||
|
||||
/**
|
||||
* @property {Phaser.Signal} onUp - This Signal is dispatched every time this GamepadButton is pressed down. It is only dispatched once (until the button is released again).
|
||||
*/
|
||||
this.onUp = new Phaser.Signal();
|
||||
|
||||
/**
|
||||
* @property {Phaser.Signal} onFloat - This Signal is dispatched every time this GamepadButton changes floating value (between (but not exactly) 0 and 1)
|
||||
*/
|
||||
this.onFloat = new Phaser.Signal();
|
||||
|
||||
};
|
||||
|
||||
Phaser.GamepadButton.prototype = {
|
||||
|
||||
/**
|
||||
* Called automatically by Phaser.SinglePad.
|
||||
* @method Phaser.GamepadButton#processButtonDown
|
||||
* @param {Object} value - Button value
|
||||
* @protected
|
||||
*/
|
||||
processButtonDown: function (value) {
|
||||
|
||||
if (this.isDown)
|
||||
{
|
||||
this.duration = this.game.time.now - this.timeDown;
|
||||
this.repeats++;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.isDown = true;
|
||||
this.isUp = false;
|
||||
this.timeDown = this.game.time.now;
|
||||
this.duration = 0;
|
||||
this.repeats = 0;
|
||||
this.value = value;
|
||||
|
||||
this.onDown.dispatch(this, value);
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Called automatically by Phaser.SinglePad.
|
||||
* @method Phaser.GamepadButton#processButtonUp
|
||||
* @param {Object} value - Button value
|
||||
* @protected
|
||||
*/
|
||||
processButtonUp: function (value) {
|
||||
|
||||
this.isDown = false;
|
||||
this.isUp = true;
|
||||
this.timeUp = this.game.time.now;
|
||||
this.value = value;
|
||||
|
||||
this.onUp.dispatch(this, value);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Called automatically by Phaser.Gamepad.
|
||||
* @method Phaser.GamepadButton#processButtonFloat
|
||||
* @param {Object} value - Button value
|
||||
* @protected
|
||||
*/
|
||||
processButtonFloat: function (value) {
|
||||
|
||||
this.value = value;
|
||||
this.onFloat.dispatch(this, value);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns the "just pressed" state of this button. Just pressed is considered true if the button was pressed down within the duration given (default 250ms).
|
||||
* @method Phaser.GamepadButton#justPressed
|
||||
* @param {number} [duration=250] - The duration below which the button is considered as being just pressed.
|
||||
* @return {boolean} True if the button is just pressed otherwise false.
|
||||
*/
|
||||
justPressed: function (duration) {
|
||||
|
||||
if (typeof duration === "undefined") { duration = 250; }
|
||||
|
||||
return (this.isDown && this.duration < duration);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns the "just released" state of this button. Just released is considered as being true if the button was released within the duration given (default 250ms).
|
||||
* @method Phaser.GamepadButton#justPressed
|
||||
* @param {number} [duration=250] - The duration below which the button is considered as being just released.
|
||||
* @return {boolean} True if the button is just pressed otherwise false.
|
||||
*/
|
||||
justReleased: function (duration) {
|
||||
|
||||
if (typeof duration === "undefined") { duration = 250; }
|
||||
|
||||
return (this.isDown === false && (this.game.time.now - this.timeUp < duration));
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Phaser.GamepadButton.prototype.constructor = Phaser.GamepadButton;
|
||||
</pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<footer>
|
||||
|
||||
|
||||
<span class="copyright">
|
||||
Phaser Copyright © 2012-2014 Photon Storm Ltd.
|
||||
</span>
|
||||
<br />
|
||||
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
|
||||
on Tue May 20 2014 10:05:49 GMT+0100 (BST) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
<br clear="both">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script src="scripts/sunlight.js"></script>
|
||||
<script src="scripts/sunlight.javascript.js"></script>
|
||||
<script src="scripts/sunlight-plugin.doclinks.js"></script>
|
||||
<script src="scripts/sunlight-plugin.linenumbers.js"></script>
|
||||
<script src="scripts/sunlight-plugin.menu.js"></script>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/jquery.scrollTo.js"></script>
|
||||
<script src="scripts/jquery.localScroll.js"></script>
|
||||
<script src="scripts/bootstrap-dropdown.js"></script>
|
||||
<script src="scripts/toc.js"></script>
|
||||
|
||||
|
||||
<script> Sunlight.highlightAll({lineNumbers:true, showMenu: true, enableDoclinks :true}); </script>
|
||||
|
||||
<script>
|
||||
$( function () {
|
||||
$( "#toc" ).toc( {
|
||||
anchorName : function(i, heading, prefix) {
|
||||
return $(heading).attr("id") || ( prefix + i );
|
||||
},
|
||||
selectors : "h1,h2,h3,h4",
|
||||
showAndHide : false,
|
||||
scrollTo : 60
|
||||
} );
|
||||
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
|
||||
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
|
||||
|
||||
} );
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
628
docs/GearConstraint.js.html
Normal file
628
docs/GearConstraint.js.html
Normal file
@@ -0,0 +1,628 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Phaser Source: physics/p2/GearConstraint.js</title>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
|
||||
|
||||
|
||||
<link type="text/css" rel="stylesheet" href="styles/site.cerulean.css">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="navbar navbar-fixed-top navbar-inverse">
|
||||
<div class="navbar-inner">
|
||||
<a class="brand" href="index.html">Phaser</a>
|
||||
<ul class="nav">
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-0">
|
||||
<a href="Phaser.html">Phaser</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Animation.html">Animation</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationManager.html">AnimationManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationParser.html">AnimationParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ArrayList.html">ArrayList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapData.html">BitmapData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapText.html">BitmapText</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Button.html">Button</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Cache.html">Cache</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Camera.html">Camera</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Canvas.html">Canvas</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Color.html">Color</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Device.html">Device</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Easing.html">Easing</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Back.html">Back</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Bounce.html">Bounce</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Circular.html">Circular</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Cubic.html">Cubic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Elastic.html">Elastic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Exponential.html">Exponential</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Linear.html">Linear</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quadratic.html">Quadratic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quartic.html">Quartic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quintic.html">Quintic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Sinusoidal.html">Sinusoidal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Ellipse.html">Ellipse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Events.html">Events</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Filter.html">Filter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Frame.html">Frame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.FrameData.html">FrameData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Game.html">Game</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectCreator.html">GameObjectCreator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Gamepad.html">Gamepad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GamepadButton.html">GamepadButton</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Graphics.html">Graphics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Group.html">Group</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Image.html">Image</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Input.html">Input</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.InputHandler.html">InputHandler</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Key.html">Key</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Keyboard.html">Keyboard</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Line.html">Line</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LinkedList.html">LinkedList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Loader.html">Loader</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LoaderParser.html">LoaderParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Math.html">Math</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Mouse.html">Mouse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.MSPointer.html">MSPointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Net.html">Net</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particle.html">Particle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particles.html">Particles</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Particles.Arcade.Emitter.html">Emitter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Physics.html">Physics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Arcade.html">Arcade</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Arcade.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Ninja.html">Ninja</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.AABB.html">AABB</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.P2.html">P2</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.BodyDebug.html">BodyDebug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.CollisionGroup.html">CollisionGroup</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.ContactMaterial.html">ContactMaterial</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.DistanceConstraint.html">DistanceConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.FixtureList.html">FixtureList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.GearConstraint.html">GearConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.InversePointProxy.html">InversePointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.LockConstraint.html">LockConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Material.html">Material</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PointProxy.html">PointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PrismaticConstraint.html">PrismaticConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.RevoluteConstraint.html">RevoluteConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Spring.html">Spring</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Plugin.html">Plugin</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.PluginManager.html">PluginManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Point.html">Point</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Pointer.html">Pointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Polygon.html">Polygon</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.QuadTree.html">QuadTree</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RandomDataGenerator.html">RandomDataGenerator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Rectangle.html">Rectangle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RenderTexture.html">RenderTexture</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RequestAnimationFrame.html">RequestAnimationFrame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RetroFont.html">RetroFont</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ScaleManager.html">ScaleManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Signal.html">Signal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SignalBinding.html">SignalBinding</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SinglePad.html">SinglePad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sound.html">Sound</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SoundManager.html">SoundManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sprite.html">Sprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SpriteBatch.html">SpriteBatch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Stage.html">Stage</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.State.html">State</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.StateManager.html">StateManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Text.html">Text</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tilemap.html">Tilemap</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapLayer.html">TilemapLayer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapParser.html">TilemapParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tileset.html">Tileset</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TileSprite.html">TileSprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Time.html">Time</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Timer.html">Timer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TimerEvent.html">TimerEvent</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Touch.html">Touch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tween.html">Tween</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TweenManager.html">TweenManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Utils.html">Utils</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Utils.Debug.html">Debug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.World.html">World</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row-fluid">
|
||||
|
||||
|
||||
<div class="span12">
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
|
||||
<h1 class="page-title">Source: physics/p2/GearConstraint.js</h1>
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <rich@photonstorm.com>
|
||||
* @copyright 2014 Photon Storm Ltd.
|
||||
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Connects two bodies at given offset points, letting them rotate relative to each other around this point.
|
||||
*
|
||||
* @class Phaser.Physics.P2.GearConstraint
|
||||
* @classdesc Physics GearConstraint Constructor
|
||||
* @constructor
|
||||
* @param {Phaser.Physics.P2} world - A reference to the P2 World.
|
||||
* @param {p2.Body} bodyA - First connected body.
|
||||
* @param {p2.Body} bodyB - Second connected body.
|
||||
* @param {number} [angle=0] - The relative angle
|
||||
* @param {number} [ratio=1] - The gear ratio.
|
||||
*/
|
||||
Phaser.Physics.P2.GearConstraint = function (world, bodyA, bodyB, angle, ratio) {
|
||||
|
||||
if (typeof angle === 'undefined') { angle = 0; }
|
||||
if (typeof ratio === 'undefined') { ratio = 1; }
|
||||
|
||||
/**
|
||||
* @property {Phaser.Game} game - Local reference to game.
|
||||
*/
|
||||
this.game = world.game;
|
||||
|
||||
/**
|
||||
* @property {Phaser.Physics.P2} world - Local reference to P2 World.
|
||||
*/
|
||||
this.world = world;
|
||||
|
||||
var options = { angle: angle, ratio: ratio };
|
||||
|
||||
p2.GearConstraint.call(this, bodyA, bodyB, options);
|
||||
|
||||
};
|
||||
|
||||
Phaser.Physics.P2.GearConstraint.prototype = Object.create(p2.GearConstraint.prototype);
|
||||
Phaser.Physics.P2.GearConstraint.prototype.constructor = Phaser.Physics.P2.GearConstraint;
|
||||
</pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<footer>
|
||||
|
||||
|
||||
<span class="copyright">
|
||||
Phaser Copyright © 2012-2014 Photon Storm Ltd.
|
||||
</span>
|
||||
<br />
|
||||
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
|
||||
on Tue May 20 2014 10:05:49 GMT+0100 (BST) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
<br clear="both">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script src="scripts/sunlight.js"></script>
|
||||
<script src="scripts/sunlight.javascript.js"></script>
|
||||
<script src="scripts/sunlight-plugin.doclinks.js"></script>
|
||||
<script src="scripts/sunlight-plugin.linenumbers.js"></script>
|
||||
<script src="scripts/sunlight-plugin.menu.js"></script>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/jquery.scrollTo.js"></script>
|
||||
<script src="scripts/jquery.localScroll.js"></script>
|
||||
<script src="scripts/bootstrap-dropdown.js"></script>
|
||||
<script src="scripts/toc.js"></script>
|
||||
|
||||
|
||||
<script> Sunlight.highlightAll({lineNumbers:true, showMenu: true, enableDoclinks :true}); </script>
|
||||
|
||||
<script>
|
||||
$( function () {
|
||||
$( "#toc" ).toc( {
|
||||
anchorName : function(i, heading, prefix) {
|
||||
return $(heading).attr("id") || ( prefix + i );
|
||||
},
|
||||
selectors : "h1,h2,h3,h4",
|
||||
showAndHide : false,
|
||||
scrollTo : 60
|
||||
} );
|
||||
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
|
||||
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
|
||||
|
||||
} );
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
973
docs/Graphics.js.html
Normal file
973
docs/Graphics.js.html
Normal file
@@ -0,0 +1,973 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Phaser Source: gameobjects/Graphics.js</title>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
|
||||
|
||||
|
||||
<link type="text/css" rel="stylesheet" href="styles/site.cerulean.css">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="navbar navbar-fixed-top navbar-inverse">
|
||||
<div class="navbar-inner">
|
||||
<a class="brand" href="index.html">Phaser</a>
|
||||
<ul class="nav">
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-0">
|
||||
<a href="Phaser.html">Phaser</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Animation.html">Animation</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationManager.html">AnimationManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationParser.html">AnimationParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ArrayList.html">ArrayList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapData.html">BitmapData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapText.html">BitmapText</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Button.html">Button</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Cache.html">Cache</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Camera.html">Camera</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Canvas.html">Canvas</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Color.html">Color</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Device.html">Device</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Easing.html">Easing</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Back.html">Back</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Bounce.html">Bounce</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Circular.html">Circular</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Cubic.html">Cubic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Elastic.html">Elastic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Exponential.html">Exponential</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Linear.html">Linear</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quadratic.html">Quadratic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quartic.html">Quartic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quintic.html">Quintic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Sinusoidal.html">Sinusoidal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Ellipse.html">Ellipse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Events.html">Events</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Filter.html">Filter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Frame.html">Frame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.FrameData.html">FrameData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Game.html">Game</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectCreator.html">GameObjectCreator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Gamepad.html">Gamepad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GamepadButton.html">GamepadButton</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Graphics.html">Graphics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Group.html">Group</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Image.html">Image</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Input.html">Input</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.InputHandler.html">InputHandler</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Key.html">Key</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Keyboard.html">Keyboard</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Line.html">Line</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LinkedList.html">LinkedList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Loader.html">Loader</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LoaderParser.html">LoaderParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Math.html">Math</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Mouse.html">Mouse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.MSPointer.html">MSPointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Net.html">Net</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particle.html">Particle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particles.html">Particles</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Particles.Arcade.Emitter.html">Emitter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Physics.html">Physics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Arcade.html">Arcade</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Arcade.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Ninja.html">Ninja</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.AABB.html">AABB</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.P2.html">P2</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.BodyDebug.html">BodyDebug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.CollisionGroup.html">CollisionGroup</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.ContactMaterial.html">ContactMaterial</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.DistanceConstraint.html">DistanceConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.FixtureList.html">FixtureList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.GearConstraint.html">GearConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.InversePointProxy.html">InversePointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.LockConstraint.html">LockConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Material.html">Material</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PointProxy.html">PointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PrismaticConstraint.html">PrismaticConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.RevoluteConstraint.html">RevoluteConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Spring.html">Spring</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Plugin.html">Plugin</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.PluginManager.html">PluginManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Point.html">Point</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Pointer.html">Pointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Polygon.html">Polygon</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.QuadTree.html">QuadTree</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RandomDataGenerator.html">RandomDataGenerator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Rectangle.html">Rectangle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RenderTexture.html">RenderTexture</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RequestAnimationFrame.html">RequestAnimationFrame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RetroFont.html">RetroFont</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ScaleManager.html">ScaleManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Signal.html">Signal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SignalBinding.html">SignalBinding</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SinglePad.html">SinglePad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sound.html">Sound</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SoundManager.html">SoundManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sprite.html">Sprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SpriteBatch.html">SpriteBatch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Stage.html">Stage</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.State.html">State</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.StateManager.html">StateManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Text.html">Text</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tilemap.html">Tilemap</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapLayer.html">TilemapLayer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapParser.html">TilemapParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tileset.html">Tileset</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TileSprite.html">TileSprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Time.html">Time</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Timer.html">Timer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TimerEvent.html">TimerEvent</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Touch.html">Touch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tween.html">Tween</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TweenManager.html">TweenManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Utils.html">Utils</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Utils.Debug.html">Debug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.World.html">World</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row-fluid">
|
||||
|
||||
|
||||
<div class="span12">
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
|
||||
<h1 class="page-title">Source: gameobjects/Graphics.js</h1>
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <rich@photonstorm.com>
|
||||
* @copyright 2014 Photon Storm Ltd.
|
||||
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Creates a new `Graphics` object.
|
||||
*
|
||||
* @class Phaser.Graphics
|
||||
* @constructor
|
||||
*
|
||||
* @param {Phaser.Game} game Current game instance.
|
||||
* @param {number} x - X position of the new graphics object.
|
||||
* @param {number} y - Y position of the new graphics object.
|
||||
*/
|
||||
Phaser.Graphics = function (game, x, y) {
|
||||
|
||||
x = x || 0;
|
||||
y = y || 0;
|
||||
|
||||
/**
|
||||
* @property {Phaser.Game} game - A reference to the currently running Game.
|
||||
*/
|
||||
this.game = game;
|
||||
|
||||
/**
|
||||
* @property {boolean} exists - If exists = false then the Text isn't updated by the core game loop.
|
||||
* @default
|
||||
*/
|
||||
this.exists = true;
|
||||
|
||||
/**
|
||||
* @property {string} name - The user defined name given to this object.
|
||||
* @default
|
||||
*/
|
||||
this.name = '';
|
||||
|
||||
/**
|
||||
* @property {number} type - The const type of this object.
|
||||
* @default
|
||||
*/
|
||||
this.type = Phaser.GRAPHICS;
|
||||
|
||||
/**
|
||||
* @property {number} z - The z-depth value of this object within its Group (remember the World is a Group as well). No two objects in a Group can have the same z value.
|
||||
*/
|
||||
this.z = 0;
|
||||
|
||||
/**
|
||||
* @property {Phaser.Point} world - The world coordinates of this Sprite. This differs from the x/y coordinates which are relative to the Sprites container.
|
||||
*/
|
||||
this.world = new Phaser.Point(x, y);
|
||||
|
||||
/**
|
||||
* @property {Phaser.Point} cameraOffset - If this object is fixedToCamera then this stores the x/y offset that its drawn at, from the top-left of the camera view.
|
||||
*/
|
||||
this.cameraOffset = new Phaser.Point();
|
||||
|
||||
PIXI.Graphics.call(this);
|
||||
|
||||
this.position.set(x, y);
|
||||
|
||||
/**
|
||||
* A small internal cache:
|
||||
* 0 = previous position.x
|
||||
* 1 = previous position.y
|
||||
* 2 = previous rotation
|
||||
* 3 = renderID
|
||||
* 4 = fresh? (0 = no, 1 = yes)
|
||||
* 5 = outOfBoundsFired (0 = no, 1 = yes)
|
||||
* 6 = exists (0 = no, 1 = yes)
|
||||
* 7 = fixed to camera (0 = no, 1 = yes)
|
||||
* 8 = destroy phase? (0 = no, 1 = yes)
|
||||
* @property {Array} _cache
|
||||
* @private
|
||||
*/
|
||||
this._cache = [ 0, 0, 0, 0, 1, 0, 1, 0, 0 ];
|
||||
|
||||
};
|
||||
|
||||
Phaser.Graphics.prototype = Object.create(PIXI.Graphics.prototype);
|
||||
Phaser.Graphics.prototype.constructor = Phaser.Graphics;
|
||||
|
||||
/**
|
||||
* Automatically called by World.preUpdate.
|
||||
* @method Phaser.Graphics.prototype.preUpdate
|
||||
*/
|
||||
Phaser.Graphics.prototype.preUpdate = function () {
|
||||
|
||||
this._cache[0] = this.world.x;
|
||||
this._cache[1] = this.world.y;
|
||||
this._cache[2] = this.rotation;
|
||||
|
||||
if (!this.exists || !this.parent.exists)
|
||||
{
|
||||
this.renderOrderID = -1;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.autoCull)
|
||||
{
|
||||
// Won't get rendered but will still get its transform updated
|
||||
this.renderable = this.game.world.camera.screenView.intersects(this.getBounds());
|
||||
}
|
||||
|
||||
this.world.setTo(this.game.camera.x + this.worldTransform[2], this.game.camera.y + this.worldTransform[5]);
|
||||
|
||||
if (this.visible)
|
||||
{
|
||||
this._cache[3] = this.game.stage.currentRenderOrderID++;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Override and use this function in your own custom objects to handle any update requirements you may have.
|
||||
*
|
||||
* @method Phaser.Graphics#update
|
||||
* @memberof Phaser.Graphics
|
||||
*/
|
||||
Phaser.Graphics.prototype.update = function() {
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Automatically called by World.postUpdate.
|
||||
* @method Phaser.Graphics.prototype.postUpdate
|
||||
*/
|
||||
Phaser.Graphics.prototype.postUpdate = function () {
|
||||
|
||||
// Fixed to Camera?
|
||||
if (this._cache[7] === 1)
|
||||
{
|
||||
this.position.x = (this.game.camera.view.x + this.cameraOffset.x) / this.game.camera.scale.x;
|
||||
this.position.y = (this.game.camera.view.y + this.cameraOffset.y) / this.game.camera.scale.y;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Destroy this Graphics instance.
|
||||
*
|
||||
* @method Phaser.Graphics.prototype.destroy
|
||||
* @param {boolean} [destroyChildren=true] - Should every child of this object have its destroy method called?
|
||||
*/
|
||||
Phaser.Graphics.prototype.destroy = function(destroyChildren) {
|
||||
|
||||
if (this.game === null || this.destroyPhase) { return; }
|
||||
|
||||
if (typeof destroyChildren === 'undefined') { destroyChildren = true; }
|
||||
|
||||
this._cache[8] = 1;
|
||||
|
||||
this.clear();
|
||||
|
||||
if (this.parent)
|
||||
{
|
||||
if (this.parent instanceof Phaser.Group)
|
||||
{
|
||||
this.parent.remove(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.parent.removeChild(this);
|
||||
}
|
||||
}
|
||||
|
||||
var i = this.children.length;
|
||||
|
||||
if (destroyChildren)
|
||||
{
|
||||
while (i--)
|
||||
{
|
||||
this.children[i].destroy(destroyChildren);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
while (i--)
|
||||
{
|
||||
this.removeChild(this.children[i]);
|
||||
}
|
||||
}
|
||||
|
||||
this.exists = false;
|
||||
this.visible = false;
|
||||
|
||||
this.game = null;
|
||||
|
||||
this._cache[8] = 0;
|
||||
|
||||
};
|
||||
|
||||
/*
|
||||
* Draws a {Phaser.Polygon} or a {PIXI.Polygon} filled
|
||||
*
|
||||
* @method Phaser.Graphics.prototype.drawPolygon
|
||||
*/
|
||||
Phaser.Graphics.prototype.drawPolygon = function (poly) {
|
||||
|
||||
this.moveTo(poly.points[0].x, poly.points[0].y);
|
||||
|
||||
for (var i = 1; i < poly.points.length; i += 1)
|
||||
{
|
||||
this.lineTo(poly.points[i].x, poly.points[i].y);
|
||||
}
|
||||
|
||||
this.lineTo(poly.points[0].x, poly.points[0].y);
|
||||
|
||||
};
|
||||
|
||||
/*
|
||||
* Draws a single {Phaser.Polygon} triangle from a {Phaser.Point} array
|
||||
*
|
||||
* @method Phaser.Graphics.prototype.drawTriangle
|
||||
* @param {Array<Phaser.Point>} points - An array of Phaser.Points that make up the three vertices of this triangle
|
||||
* @param {boolean} [cull=false] - Should we check if the triangle is back-facing
|
||||
*/
|
||||
Phaser.Graphics.prototype.drawTriangle = function(points, cull) {
|
||||
|
||||
if (typeof cull === 'undefined') { cull = false; }
|
||||
|
||||
var triangle = new Phaser.Polygon(points);
|
||||
|
||||
if (cull)
|
||||
{
|
||||
var cameraToFace = new Phaser.Point(this.game.camera.x - points[0].x, this.game.camera.y - points[0].y);
|
||||
var ab = new Phaser.Point(points[1].x - points[0].x, points[1].y - points[0].y);
|
||||
var cb = new Phaser.Point(points[1].x - points[2].x, points[1].y - points[2].y);
|
||||
var faceNormal = cb.cross(ab);
|
||||
|
||||
if (cameraToFace.dot(faceNormal) > 0)
|
||||
{
|
||||
this.drawPolygon(triangle);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.drawPolygon(triangle);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/*
|
||||
* Draws {Phaser.Polygon} triangles
|
||||
*
|
||||
* @method Phaser.Graphics.prototype.drawTriangles
|
||||
* @param {Array<Phaser.Point>|Array<number>} vertices - An array of Phaser.Points or numbers that make up the vertices of the triangles
|
||||
* @param {Array<number>} {indices=null} - An array of numbers that describe what order to draw the vertices in
|
||||
* @param {boolean} [cull=false] - Should we check if the triangle is back-facing
|
||||
*/
|
||||
Phaser.Graphics.prototype.drawTriangles = function(vertices, indices, cull) {
|
||||
|
||||
if (typeof cull === 'undefined') { cull = false; }
|
||||
|
||||
var point1 = new Phaser.Point();
|
||||
var point2 = new Phaser.Point();
|
||||
var point3 = new Phaser.Point();
|
||||
var points = [];
|
||||
var i;
|
||||
|
||||
if (!indices)
|
||||
{
|
||||
if (vertices[0] instanceof Phaser.Point)
|
||||
{
|
||||
for (i = 0; i < vertices.length / 3; i++)
|
||||
{
|
||||
this.drawTriangle([vertices[i * 3], vertices[i * 3 + 1], vertices[i * 3 + 2]], cull);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < vertices.length / 6; i++)
|
||||
{
|
||||
point1.x = vertices[i * 6 + 0];
|
||||
point1.y = vertices[i * 6 + 1];
|
||||
point2.x = vertices[i * 6 + 2];
|
||||
point2.y = vertices[i * 6 + 3];
|
||||
point3.x = vertices[i * 6 + 4];
|
||||
point3.y = vertices[i * 6 + 5];
|
||||
this.drawTriangle([point1, point2, point3], cull);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (vertices[0] instanceof Phaser.Point)
|
||||
{
|
||||
for (i = 0; i < indices.length /3; i++)
|
||||
{
|
||||
points.push(vertices[indices[i * 3 ]]);
|
||||
points.push(vertices[indices[i * 3 + 1]]);
|
||||
points.push(vertices[indices[i * 3 + 2]]);
|
||||
|
||||
if (points.length === 3)
|
||||
{
|
||||
this.drawTriangle(points, cull);
|
||||
points = [];
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < indices.length; i++)
|
||||
{
|
||||
point1.x = vertices[indices[i] * 2];
|
||||
point1.y = vertices[indices[i] * 2 + 1];
|
||||
points.push(point1.copyTo({}));
|
||||
|
||||
if (points.length === 3)
|
||||
{
|
||||
this.drawTriangle(points, cull);
|
||||
points = [];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Indicates the rotation of the Graphics, in degrees, from its original orientation. Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.
|
||||
* Values outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement player.angle = 450 is the same as player.angle = 90.
|
||||
* If you wish to work in radians instead of degrees use the property Sprite.rotation instead.
|
||||
*
|
||||
* @name Phaser.Graphics#angle
|
||||
* @property {number} angle - Gets or sets the angle of rotation in degrees.
|
||||
*/
|
||||
Object.defineProperty(Phaser.Graphics.prototype, 'angle', {
|
||||
|
||||
get: function() {
|
||||
return Phaser.Math.radToDeg(this.rotation);
|
||||
},
|
||||
|
||||
set: function(value) {
|
||||
this.rotation = Phaser.Math.degToRad(value);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* An Graphics that is fixed to the camera uses its x/y coordinates as offsets from the top left of the camera. These are stored in Graphics.cameraOffset.
|
||||
* Note that the cameraOffset values are in addition to any parent in the display list.
|
||||
* So if this Graphics was in a Group that has x: 200, then this will be added to the cameraOffset.x
|
||||
*
|
||||
* @name Phaser.Graphics#fixedToCamera
|
||||
* @property {boolean} fixedToCamera - Set to true to fix this Graphics to the Camera at its current world coordinates.
|
||||
*/
|
||||
Object.defineProperty(Phaser.Graphics.prototype, "fixedToCamera", {
|
||||
|
||||
get: function () {
|
||||
|
||||
return !!this._cache[7];
|
||||
|
||||
},
|
||||
|
||||
set: function (value) {
|
||||
|
||||
if (value)
|
||||
{
|
||||
this._cache[7] = 1;
|
||||
this.cameraOffset.set(this.x, this.y);
|
||||
}
|
||||
else
|
||||
{
|
||||
this._cache[7] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* @name Phaser.Graphics#destroyPhase
|
||||
* @property {boolean} destroyPhase - True if this object is currently being destroyed.
|
||||
*/
|
||||
Object.defineProperty(Phaser.Graphics.prototype, "destroyPhase", {
|
||||
|
||||
get: function () {
|
||||
|
||||
return !!this._cache[8];
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
</pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<footer>
|
||||
|
||||
|
||||
<span class="copyright">
|
||||
Phaser Copyright © 2012-2014 Photon Storm Ltd.
|
||||
</span>
|
||||
<br />
|
||||
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
|
||||
on Tue May 20 2014 10:05:49 GMT+0100 (BST) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
<br clear="both">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script src="scripts/sunlight.js"></script>
|
||||
<script src="scripts/sunlight.javascript.js"></script>
|
||||
<script src="scripts/sunlight-plugin.doclinks.js"></script>
|
||||
<script src="scripts/sunlight-plugin.linenumbers.js"></script>
|
||||
<script src="scripts/sunlight-plugin.menu.js"></script>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/jquery.scrollTo.js"></script>
|
||||
<script src="scripts/jquery.localScroll.js"></script>
|
||||
<script src="scripts/bootstrap-dropdown.js"></script>
|
||||
<script src="scripts/toc.js"></script>
|
||||
|
||||
|
||||
<script> Sunlight.highlightAll({lineNumbers:true, showMenu: true, enableDoclinks :true}); </script>
|
||||
|
||||
<script>
|
||||
$( function () {
|
||||
$( "#toc" ).toc( {
|
||||
anchorName : function(i, heading, prefix) {
|
||||
return $(heading).attr("id") || ( prefix + i );
|
||||
},
|
||||
selectors : "h1,h2,h3,h4",
|
||||
showAndHide : false,
|
||||
scrollTo : 60
|
||||
} );
|
||||
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
|
||||
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
|
||||
|
||||
} );
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
2338
docs/Group.js.html
Normal file
2338
docs/Group.js.html
Normal file
File diff suppressed because it is too large
Load Diff
1379
docs/Image.js.html
Normal file
1379
docs/Image.js.html
Normal file
File diff suppressed because it is too large
Load Diff
1590
docs/Input.js.html
Normal file
1590
docs/Input.js.html
Normal file
File diff suppressed because it is too large
Load Diff
1997
docs/InputHandler.js.html
Normal file
1997
docs/InputHandler.js.html
Normal file
File diff suppressed because it is too large
Load Diff
650
docs/InversePointProxy.js.html
Normal file
650
docs/InversePointProxy.js.html
Normal file
@@ -0,0 +1,650 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Phaser Source: physics/p2/InversePointProxy.js</title>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
|
||||
|
||||
|
||||
<link type="text/css" rel="stylesheet" href="styles/site.cerulean.css">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="navbar navbar-fixed-top navbar-inverse">
|
||||
<div class="navbar-inner">
|
||||
<a class="brand" href="index.html">Phaser</a>
|
||||
<ul class="nav">
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-0">
|
||||
<a href="Phaser.html">Phaser</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Animation.html">Animation</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationManager.html">AnimationManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationParser.html">AnimationParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ArrayList.html">ArrayList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapData.html">BitmapData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapText.html">BitmapText</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Button.html">Button</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Cache.html">Cache</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Camera.html">Camera</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Canvas.html">Canvas</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Color.html">Color</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Device.html">Device</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Easing.html">Easing</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Back.html">Back</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Bounce.html">Bounce</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Circular.html">Circular</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Cubic.html">Cubic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Elastic.html">Elastic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Exponential.html">Exponential</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Linear.html">Linear</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quadratic.html">Quadratic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quartic.html">Quartic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quintic.html">Quintic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Sinusoidal.html">Sinusoidal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Ellipse.html">Ellipse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Events.html">Events</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Filter.html">Filter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Frame.html">Frame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.FrameData.html">FrameData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Game.html">Game</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectCreator.html">GameObjectCreator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Gamepad.html">Gamepad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GamepadButton.html">GamepadButton</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Graphics.html">Graphics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Group.html">Group</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Image.html">Image</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Input.html">Input</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.InputHandler.html">InputHandler</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Key.html">Key</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Keyboard.html">Keyboard</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Line.html">Line</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LinkedList.html">LinkedList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Loader.html">Loader</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LoaderParser.html">LoaderParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Math.html">Math</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Mouse.html">Mouse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.MSPointer.html">MSPointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Net.html">Net</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particle.html">Particle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particles.html">Particles</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Particles.Arcade.Emitter.html">Emitter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Physics.html">Physics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Arcade.html">Arcade</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Arcade.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Ninja.html">Ninja</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.AABB.html">AABB</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.P2.html">P2</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.BodyDebug.html">BodyDebug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.CollisionGroup.html">CollisionGroup</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.ContactMaterial.html">ContactMaterial</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.DistanceConstraint.html">DistanceConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.FixtureList.html">FixtureList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.GearConstraint.html">GearConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.InversePointProxy.html">InversePointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.LockConstraint.html">LockConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Material.html">Material</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PointProxy.html">PointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PrismaticConstraint.html">PrismaticConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.RevoluteConstraint.html">RevoluteConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Spring.html">Spring</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Plugin.html">Plugin</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.PluginManager.html">PluginManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Point.html">Point</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Pointer.html">Pointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Polygon.html">Polygon</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.QuadTree.html">QuadTree</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RandomDataGenerator.html">RandomDataGenerator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Rectangle.html">Rectangle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RenderTexture.html">RenderTexture</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RequestAnimationFrame.html">RequestAnimationFrame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RetroFont.html">RetroFont</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ScaleManager.html">ScaleManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Signal.html">Signal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SignalBinding.html">SignalBinding</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SinglePad.html">SinglePad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sound.html">Sound</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SoundManager.html">SoundManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sprite.html">Sprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SpriteBatch.html">SpriteBatch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Stage.html">Stage</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.State.html">State</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.StateManager.html">StateManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Text.html">Text</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tilemap.html">Tilemap</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapLayer.html">TilemapLayer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapParser.html">TilemapParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tileset.html">Tileset</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TileSprite.html">TileSprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Time.html">Time</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Timer.html">Timer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TimerEvent.html">TimerEvent</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Touch.html">Touch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tween.html">Tween</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TweenManager.html">TweenManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Utils.html">Utils</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Utils.Debug.html">Debug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.World.html">World</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row-fluid">
|
||||
|
||||
|
||||
<div class="span12">
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
|
||||
<h1 class="page-title">Source: physics/p2/InversePointProxy.js</h1>
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <rich@photonstorm.com>
|
||||
* @copyright 2014 Photon Storm Ltd.
|
||||
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
||||
*/
|
||||
|
||||
/**
|
||||
* A InversePointProxy is an internal class that allows for direct getter/setter style property access to Arrays and TypedArrays but inverses the values on set.
|
||||
*
|
||||
* @class Phaser.Physics.P2.InversePointProxy
|
||||
* @classdesc InversePointProxy
|
||||
* @constructor
|
||||
* @param {Phaser.Physics.P2} world - A reference to the P2 World.
|
||||
* @param {any} destination - The object to bind to.
|
||||
*/
|
||||
Phaser.Physics.P2.InversePointProxy = function (world, destination) {
|
||||
|
||||
this.world = world;
|
||||
this.destination = destination;
|
||||
|
||||
};
|
||||
|
||||
Phaser.Physics.P2.InversePointProxy.prototype.constructor = Phaser.Physics.P2.InversePointProxy;
|
||||
|
||||
/**
|
||||
* @name Phaser.Physics.P2.InversePointProxy#x
|
||||
* @property {number} x - The x property of this InversePointProxy.
|
||||
*/
|
||||
Object.defineProperty(Phaser.Physics.P2.InversePointProxy.prototype, "x", {
|
||||
|
||||
get: function () {
|
||||
|
||||
return this.destination[0];
|
||||
|
||||
},
|
||||
|
||||
set: function (value) {
|
||||
|
||||
this.destination[0] = this.world.pxm(-value);
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* @name Phaser.Physics.P2.InversePointProxy#y
|
||||
* @property {number} y - The y property of this InversePointProxy.
|
||||
*/
|
||||
Object.defineProperty(Phaser.Physics.P2.InversePointProxy.prototype, "y", {
|
||||
|
||||
get: function () {
|
||||
|
||||
return this.destination[1];
|
||||
|
||||
},
|
||||
|
||||
set: function (value) {
|
||||
|
||||
this.destination[1] = this.world.pxm(-value);
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
</pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<footer>
|
||||
|
||||
|
||||
<span class="copyright">
|
||||
Phaser Copyright © 2012-2014 Photon Storm Ltd.
|
||||
</span>
|
||||
<br />
|
||||
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
|
||||
on Tue May 20 2014 10:05:49 GMT+0100 (BST) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
<br clear="both">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script src="scripts/sunlight.js"></script>
|
||||
<script src="scripts/sunlight.javascript.js"></script>
|
||||
<script src="scripts/sunlight-plugin.doclinks.js"></script>
|
||||
<script src="scripts/sunlight-plugin.linenumbers.js"></script>
|
||||
<script src="scripts/sunlight-plugin.menu.js"></script>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/jquery.scrollTo.js"></script>
|
||||
<script src="scripts/jquery.localScroll.js"></script>
|
||||
<script src="scripts/bootstrap-dropdown.js"></script>
|
||||
<script src="scripts/toc.js"></script>
|
||||
|
||||
|
||||
<script> Sunlight.highlightAll({lineNumbers:true, showMenu: true, enableDoclinks :true}); </script>
|
||||
|
||||
<script>
|
||||
$( function () {
|
||||
$( "#toc" ).toc( {
|
||||
anchorName : function(i, heading, prefix) {
|
||||
return $(heading).attr("id") || ( prefix + i );
|
||||
},
|
||||
selectors : "h1,h2,h3,h4",
|
||||
showAndHide : false,
|
||||
scrollTo : 60
|
||||
} );
|
||||
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
|
||||
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
|
||||
|
||||
} );
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
835
docs/Key.js.html
Normal file
835
docs/Key.js.html
Normal file
@@ -0,0 +1,835 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Phaser Source: input/Key.js</title>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
|
||||
|
||||
|
||||
<link type="text/css" rel="stylesheet" href="styles/site.cerulean.css">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="navbar navbar-fixed-top navbar-inverse">
|
||||
<div class="navbar-inner">
|
||||
<a class="brand" href="index.html">Phaser</a>
|
||||
<ul class="nav">
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-0">
|
||||
<a href="Phaser.html">Phaser</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Animation.html">Animation</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationManager.html">AnimationManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationParser.html">AnimationParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ArrayList.html">ArrayList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapData.html">BitmapData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapText.html">BitmapText</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Button.html">Button</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Cache.html">Cache</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Camera.html">Camera</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Canvas.html">Canvas</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Color.html">Color</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Device.html">Device</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Easing.html">Easing</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Back.html">Back</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Bounce.html">Bounce</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Circular.html">Circular</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Cubic.html">Cubic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Elastic.html">Elastic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Exponential.html">Exponential</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Linear.html">Linear</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quadratic.html">Quadratic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quartic.html">Quartic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quintic.html">Quintic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Sinusoidal.html">Sinusoidal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Ellipse.html">Ellipse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Events.html">Events</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Filter.html">Filter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Frame.html">Frame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.FrameData.html">FrameData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Game.html">Game</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectCreator.html">GameObjectCreator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Gamepad.html">Gamepad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GamepadButton.html">GamepadButton</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Graphics.html">Graphics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Group.html">Group</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Image.html">Image</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Input.html">Input</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.InputHandler.html">InputHandler</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Key.html">Key</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Keyboard.html">Keyboard</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Line.html">Line</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LinkedList.html">LinkedList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Loader.html">Loader</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LoaderParser.html">LoaderParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Math.html">Math</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Mouse.html">Mouse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.MSPointer.html">MSPointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Net.html">Net</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particle.html">Particle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particles.html">Particles</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Particles.Arcade.Emitter.html">Emitter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Physics.html">Physics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Arcade.html">Arcade</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Arcade.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Ninja.html">Ninja</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.AABB.html">AABB</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.P2.html">P2</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.BodyDebug.html">BodyDebug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.CollisionGroup.html">CollisionGroup</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.ContactMaterial.html">ContactMaterial</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.DistanceConstraint.html">DistanceConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.FixtureList.html">FixtureList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.GearConstraint.html">GearConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.InversePointProxy.html">InversePointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.LockConstraint.html">LockConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Material.html">Material</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PointProxy.html">PointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PrismaticConstraint.html">PrismaticConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.RevoluteConstraint.html">RevoluteConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Spring.html">Spring</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Plugin.html">Plugin</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.PluginManager.html">PluginManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Point.html">Point</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Pointer.html">Pointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Polygon.html">Polygon</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.QuadTree.html">QuadTree</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RandomDataGenerator.html">RandomDataGenerator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Rectangle.html">Rectangle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RenderTexture.html">RenderTexture</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RequestAnimationFrame.html">RequestAnimationFrame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RetroFont.html">RetroFont</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ScaleManager.html">ScaleManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Signal.html">Signal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SignalBinding.html">SignalBinding</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SinglePad.html">SinglePad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sound.html">Sound</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SoundManager.html">SoundManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sprite.html">Sprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SpriteBatch.html">SpriteBatch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Stage.html">Stage</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.State.html">State</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.StateManager.html">StateManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Text.html">Text</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tilemap.html">Tilemap</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapLayer.html">TilemapLayer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapParser.html">TilemapParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tileset.html">Tileset</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TileSprite.html">TileSprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Time.html">Time</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Timer.html">Timer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TimerEvent.html">TimerEvent</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Touch.html">Touch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tween.html">Tween</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TweenManager.html">TweenManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Utils.html">Utils</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Utils.Debug.html">Debug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.World.html">World</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row-fluid">
|
||||
|
||||
|
||||
<div class="span12">
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
|
||||
<h1 class="page-title">Source: input/Key.js</h1>
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <rich@photonstorm.com>
|
||||
* @copyright 2014 Photon Storm Ltd.
|
||||
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @class Phaser.Key
|
||||
* @classdesc If you need more fine-grained control over the handling of specific keys you can create and use Phaser.Key objects.
|
||||
* @constructor
|
||||
* @param {Phaser.Game} game - Current game instance.
|
||||
* @param {number} keycode - The key code this Key is responsible for.
|
||||
*/
|
||||
Phaser.Key = function (game, keycode) {
|
||||
|
||||
/**
|
||||
* @property {Phaser.Game} game - A reference to the currently running game.
|
||||
*/
|
||||
this.game = game;
|
||||
|
||||
/**
|
||||
* @property {boolean} enabled - An enabled key processes its update and dispatches events. You can toggle this at run-time to disable a key without deleting it.
|
||||
* @default
|
||||
*/
|
||||
this.enabled = true;
|
||||
|
||||
/**
|
||||
* @property {object} event - Stores the most recent DOM event.
|
||||
* @readonly
|
||||
*/
|
||||
this.event = null;
|
||||
|
||||
/**
|
||||
* @property {boolean} isDown - The "down" state of the key.
|
||||
* @default
|
||||
*/
|
||||
this.isDown = false;
|
||||
|
||||
/**
|
||||
* @property {boolean} isUp - The "up" state of the key.
|
||||
* @default
|
||||
*/
|
||||
this.isUp = true;
|
||||
|
||||
/**
|
||||
* @property {boolean} altKey - The down state of the ALT key, if pressed at the same time as this key.
|
||||
* @default
|
||||
*/
|
||||
this.altKey = false;
|
||||
|
||||
/**
|
||||
* @property {boolean} ctrlKey - The down state of the CTRL key, if pressed at the same time as this key.
|
||||
* @default
|
||||
*/
|
||||
this.ctrlKey = false;
|
||||
|
||||
/**
|
||||
* @property {boolean} shiftKey - The down state of the SHIFT key, if pressed at the same time as this key.
|
||||
* @default
|
||||
*/
|
||||
this.shiftKey = false;
|
||||
|
||||
/**
|
||||
* @property {number} timeDown - The timestamp when the key was last pressed down. This is based on Game.time.now.
|
||||
*/
|
||||
this.timeDown = 0;
|
||||
|
||||
/**
|
||||
* If the key is down this value holds the duration of that key press and is constantly updated.
|
||||
* If the key is up it holds the duration of the previous down session.
|
||||
* @property {number} duration - The number of milliseconds this key has been held down for.
|
||||
* @default
|
||||
*/
|
||||
this.duration = 0;
|
||||
|
||||
/**
|
||||
* @property {number} timeUp - The timestamp when the key was last released. This is based on Game.time.now.
|
||||
* @default
|
||||
*/
|
||||
this.timeUp = -2500;
|
||||
|
||||
/**
|
||||
* @property {number} repeats - If a key is held down this holds down the number of times the key has 'repeated'.
|
||||
* @default
|
||||
*/
|
||||
this.repeats = 0;
|
||||
|
||||
/**
|
||||
* @property {number} keyCode - The keycode of this key.
|
||||
*/
|
||||
this.keyCode = keycode;
|
||||
|
||||
/**
|
||||
* @property {Phaser.Signal} onDown - This Signal is dispatched every time this Key is pressed down. It is only dispatched once (until the key is released again).
|
||||
*/
|
||||
this.onDown = new Phaser.Signal();
|
||||
|
||||
/**
|
||||
* @property {function} onHoldCallback - A callback that is called while this Key is held down. Warning: Depending on refresh rate that could be 60+ times per second.
|
||||
*/
|
||||
this.onHoldCallback = null;
|
||||
|
||||
/**
|
||||
* @property {object} onHoldContext - The context under which the onHoldCallback will be called.
|
||||
*/
|
||||
this.onHoldContext = null;
|
||||
|
||||
/**
|
||||
* @property {Phaser.Signal} onUp - This Signal is dispatched every time this Key is pressed down. It is only dispatched once (until the key is released again).
|
||||
*/
|
||||
this.onUp = new Phaser.Signal();
|
||||
|
||||
};
|
||||
|
||||
Phaser.Key.prototype = {
|
||||
|
||||
update: function () {
|
||||
|
||||
if (!this.enabled) { return; }
|
||||
|
||||
if (this.isDown)
|
||||
{
|
||||
this.duration = this.game.time.now - this.timeDown;
|
||||
this.repeats++;
|
||||
|
||||
if (this.onHoldCallback)
|
||||
{
|
||||
this.onHoldCallback.call(this.onHoldContext, this);
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Called automatically by Phaser.Keyboard.
|
||||
* @method Phaser.Key#processKeyDown
|
||||
* @param {KeyboardEvent} event.
|
||||
* @protected
|
||||
*/
|
||||
processKeyDown: function (event) {
|
||||
|
||||
if (!this.enabled) { return; }
|
||||
|
||||
this.event = event;
|
||||
|
||||
if (this.isDown)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
this.altKey = event.altKey;
|
||||
this.ctrlKey = event.ctrlKey;
|
||||
this.shiftKey = event.shiftKey;
|
||||
|
||||
this.isDown = true;
|
||||
this.isUp = false;
|
||||
this.timeDown = this.game.time.now;
|
||||
this.duration = 0;
|
||||
this.repeats = 0;
|
||||
|
||||
this.onDown.dispatch(this);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Called automatically by Phaser.Keyboard.
|
||||
* @method Phaser.Key#processKeyUp
|
||||
* @param {KeyboardEvent} event.
|
||||
* @protected
|
||||
*/
|
||||
processKeyUp: function (event) {
|
||||
|
||||
if (!this.enabled) { return; }
|
||||
|
||||
this.event = event;
|
||||
|
||||
if (this.isUp)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
this.isDown = false;
|
||||
this.isUp = true;
|
||||
this.timeUp = this.game.time.now;
|
||||
this.duration = this.game.time.now - this.timeDown;
|
||||
|
||||
this.onUp.dispatch(this);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Resets the state of this Key. This sets isDown to false, isUp to true, resets the time to be the current time and clears any callbacks
|
||||
* associated with the onDown and onUp events and nulls the onHoldCallback if set.
|
||||
*
|
||||
* @method Phaser.Key#reset
|
||||
* @param {boolean} [hard=true] - A soft reset won't reset any events or callbacks that are bound to this Key. A hard reset will.
|
||||
*/
|
||||
reset: function (hard) {
|
||||
|
||||
if (typeof hard === 'undefined') { hard = true; }
|
||||
|
||||
this.isDown = false;
|
||||
this.isUp = true;
|
||||
this.timeUp = this.game.time.now;
|
||||
this.duration = this.game.time.now - this.timeDown;
|
||||
this.enabled = true;
|
||||
|
||||
if (hard)
|
||||
{
|
||||
this.onDown.removeAll();
|
||||
this.onUp.removeAll();
|
||||
this.onHoldCallback = null;
|
||||
this.onHoldContext = null;
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns the "just pressed" state of the Key. Just pressed is considered true if the key was pressed down within the duration given (default 250ms)
|
||||
* @method Phaser.Key#justPressed
|
||||
* @param {number} [duration=50] - The duration below which the key is considered as being just pressed.
|
||||
* @return {boolean} True if the key is just pressed otherwise false.
|
||||
*/
|
||||
justPressed: function (duration) {
|
||||
|
||||
if (typeof duration === "undefined") { duration = 50; }
|
||||
|
||||
return (this.isDown && this.duration < duration);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns the "just released" state of the Key. Just released is considered as being true if the key was released within the duration given (default 250ms)
|
||||
* @method Phaser.Key#justReleased
|
||||
* @param {number} [duration=50] - The duration below which the key is considered as being just released.
|
||||
* @return {boolean} True if the key is just released otherwise false.
|
||||
*/
|
||||
justReleased: function (duration) {
|
||||
|
||||
if (typeof duration === "undefined") { duration = 50; }
|
||||
|
||||
return (!this.isDown && ((this.game.time.now - this.timeUp) < duration));
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Phaser.Key.prototype.constructor = Phaser.Key;
|
||||
</pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<footer>
|
||||
|
||||
|
||||
<span class="copyright">
|
||||
Phaser Copyright © 2012-2014 Photon Storm Ltd.
|
||||
</span>
|
||||
<br />
|
||||
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
|
||||
on Tue May 20 2014 10:05:49 GMT+0100 (BST) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
<br clear="both">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script src="scripts/sunlight.js"></script>
|
||||
<script src="scripts/sunlight.javascript.js"></script>
|
||||
<script src="scripts/sunlight-plugin.doclinks.js"></script>
|
||||
<script src="scripts/sunlight-plugin.linenumbers.js"></script>
|
||||
<script src="scripts/sunlight-plugin.menu.js"></script>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/jquery.scrollTo.js"></script>
|
||||
<script src="scripts/jquery.localScroll.js"></script>
|
||||
<script src="scripts/bootstrap-dropdown.js"></script>
|
||||
<script src="scripts/toc.js"></script>
|
||||
|
||||
|
||||
<script> Sunlight.highlightAll({lineNumbers:true, showMenu: true, enableDoclinks :true}); </script>
|
||||
|
||||
<script>
|
||||
$( function () {
|
||||
$( "#toc" ).toc( {
|
||||
anchorName : function(i, heading, prefix) {
|
||||
return $(heading).attr("id") || ( prefix + i );
|
||||
},
|
||||
selectors : "h1,h2,h3,h4",
|
||||
showAndHide : false,
|
||||
scrollTo : 60
|
||||
} );
|
||||
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
|
||||
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
|
||||
|
||||
} );
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
1136
docs/Keyboard.js.html
Normal file
1136
docs/Keyboard.js.html
Normal file
File diff suppressed because it is too large
Load Diff
1000
docs/Line.js.html
Normal file
1000
docs/Line.js.html
Normal file
File diff suppressed because it is too large
Load Diff
765
docs/LinkedList.js.html
Normal file
765
docs/LinkedList.js.html
Normal file
@@ -0,0 +1,765 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Phaser Source: core/LinkedList.js</title>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
|
||||
|
||||
|
||||
<link type="text/css" rel="stylesheet" href="styles/site.cerulean.css">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="navbar navbar-fixed-top navbar-inverse">
|
||||
<div class="navbar-inner">
|
||||
<a class="brand" href="index.html">Phaser</a>
|
||||
<ul class="nav">
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-0">
|
||||
<a href="Phaser.html">Phaser</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Animation.html">Animation</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationManager.html">AnimationManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationParser.html">AnimationParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ArrayList.html">ArrayList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapData.html">BitmapData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapText.html">BitmapText</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Button.html">Button</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Cache.html">Cache</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Camera.html">Camera</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Canvas.html">Canvas</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Color.html">Color</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Device.html">Device</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Easing.html">Easing</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Back.html">Back</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Bounce.html">Bounce</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Circular.html">Circular</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Cubic.html">Cubic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Elastic.html">Elastic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Exponential.html">Exponential</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Linear.html">Linear</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quadratic.html">Quadratic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quartic.html">Quartic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quintic.html">Quintic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Sinusoidal.html">Sinusoidal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Ellipse.html">Ellipse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Events.html">Events</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Filter.html">Filter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Frame.html">Frame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.FrameData.html">FrameData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Game.html">Game</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectCreator.html">GameObjectCreator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Gamepad.html">Gamepad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GamepadButton.html">GamepadButton</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Graphics.html">Graphics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Group.html">Group</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Image.html">Image</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Input.html">Input</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.InputHandler.html">InputHandler</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Key.html">Key</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Keyboard.html">Keyboard</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Line.html">Line</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LinkedList.html">LinkedList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Loader.html">Loader</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LoaderParser.html">LoaderParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Math.html">Math</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Mouse.html">Mouse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.MSPointer.html">MSPointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Net.html">Net</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particle.html">Particle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particles.html">Particles</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Particles.Arcade.Emitter.html">Emitter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Physics.html">Physics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Arcade.html">Arcade</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Arcade.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Ninja.html">Ninja</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.AABB.html">AABB</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.P2.html">P2</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.BodyDebug.html">BodyDebug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.CollisionGroup.html">CollisionGroup</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.ContactMaterial.html">ContactMaterial</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.DistanceConstraint.html">DistanceConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.FixtureList.html">FixtureList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.GearConstraint.html">GearConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.InversePointProxy.html">InversePointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.LockConstraint.html">LockConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Material.html">Material</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PointProxy.html">PointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PrismaticConstraint.html">PrismaticConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.RevoluteConstraint.html">RevoluteConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Spring.html">Spring</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Plugin.html">Plugin</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.PluginManager.html">PluginManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Point.html">Point</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Pointer.html">Pointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Polygon.html">Polygon</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.QuadTree.html">QuadTree</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RandomDataGenerator.html">RandomDataGenerator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Rectangle.html">Rectangle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RenderTexture.html">RenderTexture</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RequestAnimationFrame.html">RequestAnimationFrame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RetroFont.html">RetroFont</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ScaleManager.html">ScaleManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Signal.html">Signal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SignalBinding.html">SignalBinding</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SinglePad.html">SinglePad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sound.html">Sound</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SoundManager.html">SoundManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sprite.html">Sprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SpriteBatch.html">SpriteBatch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Stage.html">Stage</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.State.html">State</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.StateManager.html">StateManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Text.html">Text</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tilemap.html">Tilemap</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapLayer.html">TilemapLayer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapParser.html">TilemapParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tileset.html">Tileset</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TileSprite.html">TileSprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Time.html">Time</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Timer.html">Timer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TimerEvent.html">TimerEvent</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Touch.html">Touch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tween.html">Tween</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TweenManager.html">TweenManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Utils.html">Utils</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Utils.Debug.html">Debug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.World.html">World</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row-fluid">
|
||||
|
||||
|
||||
<div class="span12">
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
|
||||
<h1 class="page-title">Source: core/LinkedList.js</h1>
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <rich@photonstorm.com>
|
||||
* @copyright 2014 Photon Storm Ltd.
|
||||
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
||||
*/
|
||||
|
||||
/**
|
||||
* A basic linked list data structure.
|
||||
*
|
||||
* @class Phaser.LinkedList
|
||||
* @constructor
|
||||
*/
|
||||
Phaser.LinkedList = function () {
|
||||
|
||||
/**
|
||||
* @property {object} next - Next element in the list.
|
||||
* @default
|
||||
*/
|
||||
this.next = null;
|
||||
|
||||
/**
|
||||
* @property {object} prev - Previous element in the list.
|
||||
* @default
|
||||
*/
|
||||
this.prev = null;
|
||||
|
||||
/**
|
||||
* @property {object} first - First element in the list.
|
||||
* @default
|
||||
*/
|
||||
this.first = null;
|
||||
|
||||
/**
|
||||
* @property {object} last - Last element in the list.
|
||||
* @default
|
||||
*/
|
||||
this.last = null;
|
||||
|
||||
/**
|
||||
* @property {number} total - Number of elements in the list.
|
||||
* @default
|
||||
*/
|
||||
this.total = 0;
|
||||
|
||||
};
|
||||
|
||||
Phaser.LinkedList.prototype = {
|
||||
|
||||
/**
|
||||
* Adds a new element to this linked list.
|
||||
*
|
||||
* @method Phaser.LinkedList#add
|
||||
* @param {object} child - The element to add to this list. Can be a Phaser.Sprite or any other object you need to quickly iterate through.
|
||||
* @return {object} The child that was added.
|
||||
*/
|
||||
add: function (child) {
|
||||
|
||||
// If the list is empty
|
||||
if (this.total === 0 && this.first === null && this.last === null)
|
||||
{
|
||||
this.first = child;
|
||||
this.last = child;
|
||||
this.next = child;
|
||||
child.prev = this;
|
||||
this.total++;
|
||||
return child;
|
||||
}
|
||||
|
||||
// Gets appended to the end of the list, regardless of anything, and it won't have any children of its own (non-nested list)
|
||||
this.last.next = child;
|
||||
|
||||
child.prev = this.last;
|
||||
|
||||
this.last = child;
|
||||
|
||||
this.total++;
|
||||
|
||||
return child;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Resets the first, last, next and previous node pointers in this list.
|
||||
*
|
||||
* @method Phaser.LinkedList#reset
|
||||
*/
|
||||
reset: function () {
|
||||
|
||||
this.first = null;
|
||||
this.last = null;
|
||||
this.next = null;
|
||||
this.prev = null;
|
||||
this.total = 0;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Removes the given element from this linked list if it exists.
|
||||
*
|
||||
* @method Phaser.LinkedList#remove
|
||||
* @param {object} child - The child to be removed from the list.
|
||||
*/
|
||||
remove: function (child) {
|
||||
|
||||
if (this.total === 1)
|
||||
{
|
||||
this.reset();
|
||||
child.next = child.prev = null;
|
||||
return;
|
||||
}
|
||||
|
||||
if (child === this.first)
|
||||
{
|
||||
// It was 'first', make 'first' point to first.next
|
||||
this.first = this.first.next;
|
||||
}
|
||||
else if (child === this.last)
|
||||
{
|
||||
// It was 'last', make 'last' point to last.prev
|
||||
this.last = this.last.prev;
|
||||
}
|
||||
|
||||
if (child.prev)
|
||||
{
|
||||
// make child.prev.next point to childs.next instead of child
|
||||
child.prev.next = child.next;
|
||||
}
|
||||
|
||||
if (child.next)
|
||||
{
|
||||
// make child.next.prev point to child.prev instead of child
|
||||
child.next.prev = child.prev;
|
||||
}
|
||||
|
||||
child.next = child.prev = null;
|
||||
|
||||
if (this.first === null )
|
||||
{
|
||||
this.last = null;
|
||||
}
|
||||
|
||||
this.total--;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Calls a function on all members of this list, using the member as the context for the callback.
|
||||
* The function must exist on the member.
|
||||
*
|
||||
* @method Phaser.LinkedList#callAll
|
||||
* @param {function} callback - The function to call.
|
||||
*/
|
||||
callAll: function (callback) {
|
||||
|
||||
if (!this.first || !this.last)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var entity = this.first;
|
||||
|
||||
do
|
||||
{
|
||||
if (entity && entity[callback])
|
||||
{
|
||||
entity[callback].call(entity);
|
||||
}
|
||||
|
||||
entity = entity.next;
|
||||
|
||||
}
|
||||
while(entity != this.last.next);
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Phaser.LinkedList.prototype.constructor = Phaser.LinkedList;
|
||||
</pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<footer>
|
||||
|
||||
|
||||
<span class="copyright">
|
||||
Phaser Copyright © 2012-2014 Photon Storm Ltd.
|
||||
</span>
|
||||
<br />
|
||||
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
|
||||
on Tue May 20 2014 10:05:49 GMT+0100 (BST) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
<br clear="both">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script src="scripts/sunlight.js"></script>
|
||||
<script src="scripts/sunlight.javascript.js"></script>
|
||||
<script src="scripts/sunlight-plugin.doclinks.js"></script>
|
||||
<script src="scripts/sunlight-plugin.linenumbers.js"></script>
|
||||
<script src="scripts/sunlight-plugin.menu.js"></script>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/jquery.scrollTo.js"></script>
|
||||
<script src="scripts/jquery.localScroll.js"></script>
|
||||
<script src="scripts/bootstrap-dropdown.js"></script>
|
||||
<script src="scripts/toc.js"></script>
|
||||
|
||||
|
||||
<script> Sunlight.highlightAll({lineNumbers:true, showMenu: true, enableDoclinks :true}); </script>
|
||||
|
||||
<script>
|
||||
$( function () {
|
||||
$( "#toc" ).toc( {
|
||||
anchorName : function(i, heading, prefix) {
|
||||
return $(heading).attr("id") || ( prefix + i );
|
||||
},
|
||||
selectors : "h1,h2,h3,h4",
|
||||
showAndHide : false,
|
||||
scrollTo : 60
|
||||
} );
|
||||
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
|
||||
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
|
||||
|
||||
} );
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
2104
docs/Loader.js.html
Normal file
2104
docs/Loader.js.html
Normal file
File diff suppressed because it is too large
Load Diff
657
docs/LoaderParser.js.html
Normal file
657
docs/LoaderParser.js.html
Normal file
@@ -0,0 +1,657 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Phaser Source: loader/LoaderParser.js</title>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
|
||||
|
||||
|
||||
<link type="text/css" rel="stylesheet" href="styles/site.cerulean.css">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="navbar navbar-fixed-top navbar-inverse">
|
||||
<div class="navbar-inner">
|
||||
<a class="brand" href="index.html">Phaser</a>
|
||||
<ul class="nav">
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-0">
|
||||
<a href="Phaser.html">Phaser</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Animation.html">Animation</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationManager.html">AnimationManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationParser.html">AnimationParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ArrayList.html">ArrayList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapData.html">BitmapData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapText.html">BitmapText</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Button.html">Button</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Cache.html">Cache</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Camera.html">Camera</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Canvas.html">Canvas</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Color.html">Color</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Device.html">Device</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Easing.html">Easing</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Back.html">Back</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Bounce.html">Bounce</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Circular.html">Circular</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Cubic.html">Cubic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Elastic.html">Elastic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Exponential.html">Exponential</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Linear.html">Linear</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quadratic.html">Quadratic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quartic.html">Quartic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quintic.html">Quintic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Sinusoidal.html">Sinusoidal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Ellipse.html">Ellipse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Events.html">Events</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Filter.html">Filter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Frame.html">Frame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.FrameData.html">FrameData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Game.html">Game</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectCreator.html">GameObjectCreator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Gamepad.html">Gamepad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GamepadButton.html">GamepadButton</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Graphics.html">Graphics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Group.html">Group</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Image.html">Image</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Input.html">Input</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.InputHandler.html">InputHandler</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Key.html">Key</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Keyboard.html">Keyboard</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Line.html">Line</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LinkedList.html">LinkedList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Loader.html">Loader</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LoaderParser.html">LoaderParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Math.html">Math</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Mouse.html">Mouse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.MSPointer.html">MSPointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Net.html">Net</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particle.html">Particle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particles.html">Particles</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Particles.Arcade.Emitter.html">Emitter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Physics.html">Physics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Arcade.html">Arcade</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Arcade.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Ninja.html">Ninja</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.AABB.html">AABB</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.P2.html">P2</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.BodyDebug.html">BodyDebug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.CollisionGroup.html">CollisionGroup</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.ContactMaterial.html">ContactMaterial</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.DistanceConstraint.html">DistanceConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.FixtureList.html">FixtureList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.GearConstraint.html">GearConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.InversePointProxy.html">InversePointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.LockConstraint.html">LockConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Material.html">Material</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PointProxy.html">PointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PrismaticConstraint.html">PrismaticConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.RevoluteConstraint.html">RevoluteConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Spring.html">Spring</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Plugin.html">Plugin</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.PluginManager.html">PluginManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Point.html">Point</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Pointer.html">Pointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Polygon.html">Polygon</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.QuadTree.html">QuadTree</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RandomDataGenerator.html">RandomDataGenerator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Rectangle.html">Rectangle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RenderTexture.html">RenderTexture</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RequestAnimationFrame.html">RequestAnimationFrame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RetroFont.html">RetroFont</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ScaleManager.html">ScaleManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Signal.html">Signal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SignalBinding.html">SignalBinding</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SinglePad.html">SinglePad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sound.html">Sound</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SoundManager.html">SoundManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sprite.html">Sprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SpriteBatch.html">SpriteBatch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Stage.html">Stage</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.State.html">State</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.StateManager.html">StateManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Text.html">Text</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tilemap.html">Tilemap</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapLayer.html">TilemapLayer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapParser.html">TilemapParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tileset.html">Tileset</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TileSprite.html">TileSprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Time.html">Time</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Timer.html">Timer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TimerEvent.html">TimerEvent</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Touch.html">Touch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tween.html">Tween</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TweenManager.html">TweenManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Utils.html">Utils</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Utils.Debug.html">Debug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.World.html">World</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row-fluid">
|
||||
|
||||
|
||||
<div class="span12">
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
|
||||
<h1 class="page-title">Source: loader/LoaderParser.js</h1>
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <rich@photonstorm.com>
|
||||
* @copyright 2014 Photon Storm Ltd.
|
||||
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Phaser.LoaderParser parses data objects from Phaser.Loader that need more preparation before they can be inserted into the Cache.
|
||||
*
|
||||
* @class Phaser.LoaderParser
|
||||
*/
|
||||
Phaser.LoaderParser = {
|
||||
|
||||
/**
|
||||
* Parse a Bitmap Font from an XML file.
|
||||
* @method Phaser.LoaderParser.bitmapFont
|
||||
* @param {Phaser.Game} game - A reference to the current game.
|
||||
* @param {object} xml - XML data you want to parse.
|
||||
* @param {string} cacheKey - The key of the texture this font uses in the cache.
|
||||
*/
|
||||
bitmapFont: function (game, xml, cacheKey, xSpacing, ySpacing) {
|
||||
|
||||
var data = {};
|
||||
var info = xml.getElementsByTagName('info')[0];
|
||||
var common = xml.getElementsByTagName('common')[0];
|
||||
|
||||
data.font = info.getAttribute('face');
|
||||
data.size = parseInt(info.getAttribute('size'), 10);
|
||||
data.lineHeight = parseInt(common.getAttribute('lineHeight'), 10) + ySpacing;
|
||||
data.chars = {};
|
||||
|
||||
var letters = xml.getElementsByTagName('char');
|
||||
var texture = PIXI.TextureCache[cacheKey];
|
||||
|
||||
for (var i = 0; i < letters.length; i++)
|
||||
{
|
||||
var charCode = parseInt(letters[i].getAttribute('id'), 10);
|
||||
|
||||
var textureRect = new PIXI.Rectangle(
|
||||
parseInt(letters[i].getAttribute('x'), 10),
|
||||
parseInt(letters[i].getAttribute('y'), 10),
|
||||
parseInt(letters[i].getAttribute('width'), 10),
|
||||
parseInt(letters[i].getAttribute('height'), 10)
|
||||
);
|
||||
|
||||
data.chars[charCode] = {
|
||||
xOffset: parseInt(letters[i].getAttribute('xoffset'), 10),
|
||||
yOffset: parseInt(letters[i].getAttribute('yoffset'), 10),
|
||||
xAdvance: parseInt(letters[i].getAttribute('xadvance'), 10) + xSpacing,
|
||||
kerning: {},
|
||||
texture: PIXI.TextureCache[cacheKey] = new PIXI.Texture(texture, textureRect)
|
||||
};
|
||||
}
|
||||
|
||||
var kernings = xml.getElementsByTagName('kerning');
|
||||
|
||||
for (i = 0; i < kernings.length; i++)
|
||||
{
|
||||
var first = parseInt(kernings[i].getAttribute('first'), 10);
|
||||
var second = parseInt(kernings[i].getAttribute('second'), 10);
|
||||
var amount = parseInt(kernings[i].getAttribute('amount'), 10);
|
||||
|
||||
data.chars[second].kerning[first] = amount;
|
||||
}
|
||||
|
||||
PIXI.BitmapText.fonts[cacheKey] = data;
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
</pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<footer>
|
||||
|
||||
|
||||
<span class="copyright">
|
||||
Phaser Copyright © 2012-2014 Photon Storm Ltd.
|
||||
</span>
|
||||
<br />
|
||||
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
|
||||
on Tue May 20 2014 10:05:49 GMT+0100 (BST) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
<br clear="both">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script src="scripts/sunlight.js"></script>
|
||||
<script src="scripts/sunlight.javascript.js"></script>
|
||||
<script src="scripts/sunlight-plugin.doclinks.js"></script>
|
||||
<script src="scripts/sunlight-plugin.linenumbers.js"></script>
|
||||
<script src="scripts/sunlight-plugin.menu.js"></script>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/jquery.scrollTo.js"></script>
|
||||
<script src="scripts/jquery.localScroll.js"></script>
|
||||
<script src="scripts/bootstrap-dropdown.js"></script>
|
||||
<script src="scripts/toc.js"></script>
|
||||
|
||||
|
||||
<script> Sunlight.highlightAll({lineNumbers:true, showMenu: true, enableDoclinks :true}); </script>
|
||||
|
||||
<script>
|
||||
$( function () {
|
||||
$( "#toc" ).toc( {
|
||||
anchorName : function(i, heading, prefix) {
|
||||
return $(heading).attr("id") || ( prefix + i );
|
||||
},
|
||||
selectors : "h1,h2,h3,h4",
|
||||
showAndHide : false,
|
||||
scrollTo : 60
|
||||
} );
|
||||
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
|
||||
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
|
||||
|
||||
} );
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
632
docs/LockConstraint.js.html
Normal file
632
docs/LockConstraint.js.html
Normal file
@@ -0,0 +1,632 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Phaser Source: physics/p2/LockConstraint.js</title>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
|
||||
|
||||
|
||||
<link type="text/css" rel="stylesheet" href="styles/site.cerulean.css">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="navbar navbar-fixed-top navbar-inverse">
|
||||
<div class="navbar-inner">
|
||||
<a class="brand" href="index.html">Phaser</a>
|
||||
<ul class="nav">
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-0">
|
||||
<a href="Phaser.html">Phaser</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Animation.html">Animation</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationManager.html">AnimationManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationParser.html">AnimationParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ArrayList.html">ArrayList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapData.html">BitmapData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapText.html">BitmapText</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Button.html">Button</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Cache.html">Cache</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Camera.html">Camera</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Canvas.html">Canvas</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Color.html">Color</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Device.html">Device</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Easing.html">Easing</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Back.html">Back</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Bounce.html">Bounce</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Circular.html">Circular</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Cubic.html">Cubic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Elastic.html">Elastic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Exponential.html">Exponential</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Linear.html">Linear</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quadratic.html">Quadratic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quartic.html">Quartic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quintic.html">Quintic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Sinusoidal.html">Sinusoidal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Ellipse.html">Ellipse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Events.html">Events</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Filter.html">Filter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Frame.html">Frame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.FrameData.html">FrameData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Game.html">Game</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectCreator.html">GameObjectCreator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Gamepad.html">Gamepad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GamepadButton.html">GamepadButton</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Graphics.html">Graphics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Group.html">Group</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Image.html">Image</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Input.html">Input</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.InputHandler.html">InputHandler</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Key.html">Key</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Keyboard.html">Keyboard</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Line.html">Line</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LinkedList.html">LinkedList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Loader.html">Loader</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LoaderParser.html">LoaderParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Math.html">Math</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Mouse.html">Mouse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.MSPointer.html">MSPointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Net.html">Net</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particle.html">Particle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particles.html">Particles</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Particles.Arcade.Emitter.html">Emitter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Physics.html">Physics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Arcade.html">Arcade</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Arcade.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Ninja.html">Ninja</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.AABB.html">AABB</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.P2.html">P2</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.BodyDebug.html">BodyDebug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.CollisionGroup.html">CollisionGroup</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.ContactMaterial.html">ContactMaterial</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.DistanceConstraint.html">DistanceConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.FixtureList.html">FixtureList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.GearConstraint.html">GearConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.InversePointProxy.html">InversePointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.LockConstraint.html">LockConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Material.html">Material</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PointProxy.html">PointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PrismaticConstraint.html">PrismaticConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.RevoluteConstraint.html">RevoluteConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Spring.html">Spring</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Plugin.html">Plugin</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.PluginManager.html">PluginManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Point.html">Point</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Pointer.html">Pointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Polygon.html">Polygon</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.QuadTree.html">QuadTree</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RandomDataGenerator.html">RandomDataGenerator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Rectangle.html">Rectangle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RenderTexture.html">RenderTexture</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RequestAnimationFrame.html">RequestAnimationFrame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RetroFont.html">RetroFont</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ScaleManager.html">ScaleManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Signal.html">Signal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SignalBinding.html">SignalBinding</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SinglePad.html">SinglePad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sound.html">Sound</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SoundManager.html">SoundManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sprite.html">Sprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SpriteBatch.html">SpriteBatch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Stage.html">Stage</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.State.html">State</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.StateManager.html">StateManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Text.html">Text</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tilemap.html">Tilemap</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapLayer.html">TilemapLayer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapParser.html">TilemapParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tileset.html">Tileset</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TileSprite.html">TileSprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Time.html">Time</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Timer.html">Timer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TimerEvent.html">TimerEvent</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Touch.html">Touch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tween.html">Tween</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TweenManager.html">TweenManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Utils.html">Utils</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Utils.Debug.html">Debug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.World.html">World</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row-fluid">
|
||||
|
||||
|
||||
<div class="span12">
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
|
||||
<h1 class="page-title">Source: physics/p2/LockConstraint.js</h1>
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <rich@photonstorm.com>
|
||||
* @copyright 2014 Photon Storm Ltd.
|
||||
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Locks the relative position between two bodies.
|
||||
*
|
||||
* @class Phaser.Physics.P2.LockConstraint
|
||||
* @classdesc Physics LockConstraint Constructor
|
||||
* @constructor
|
||||
* @param {Phaser.Physics.P2} world - A reference to the P2 World.
|
||||
* @param {p2.Body} bodyA - First connected body.
|
||||
* @param {p2.Body} bodyB - Second connected body.
|
||||
* @param {Array} [offset] - The offset of bodyB in bodyA's frame. The value is an array with 2 elements matching x and y, i.e: [32, 32].
|
||||
* @param {number} [angle=0] - The angle of bodyB in bodyA's frame.
|
||||
* @param {number} [maxForce] - The maximum force that should be applied to constrain the bodies.
|
||||
*/
|
||||
Phaser.Physics.P2.LockConstraint = function (world, bodyA, bodyB, offset, angle, maxForce) {
|
||||
|
||||
if (typeof offset === 'undefined') { offset = [0, 0]; }
|
||||
if (typeof angle === 'undefined') { angle = 0; }
|
||||
if (typeof maxForce === 'undefined') { maxForce = Number.MAX_VALUE; }
|
||||
|
||||
/**
|
||||
* @property {Phaser.Game} game - Local reference to game.
|
||||
*/
|
||||
this.game = world.game;
|
||||
|
||||
/**
|
||||
* @property {Phaser.Physics.P2} world - Local reference to P2 World.
|
||||
*/
|
||||
this.world = world;
|
||||
|
||||
offset = [ world.pxm(offset[0]), world.pxm(offset[1]) ];
|
||||
|
||||
var options = { localOffsetB: offset, localAngleB: angle, maxForce: maxForce };
|
||||
|
||||
p2.LockConstraint.call(this, bodyA, bodyB, options);
|
||||
|
||||
};
|
||||
|
||||
Phaser.Physics.P2.LockConstraint.prototype = Object.create(p2.LockConstraint.prototype);
|
||||
Phaser.Physics.P2.LockConstraint.prototype.constructor = Phaser.Physics.P2.LockConstraint;
|
||||
</pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<footer>
|
||||
|
||||
|
||||
<span class="copyright">
|
||||
Phaser Copyright © 2012-2014 Photon Storm Ltd.
|
||||
</span>
|
||||
<br />
|
||||
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
|
||||
on Tue May 20 2014 10:05:49 GMT+0100 (BST) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
<br clear="both">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script src="scripts/sunlight.js"></script>
|
||||
<script src="scripts/sunlight.javascript.js"></script>
|
||||
<script src="scripts/sunlight-plugin.doclinks.js"></script>
|
||||
<script src="scripts/sunlight-plugin.linenumbers.js"></script>
|
||||
<script src="scripts/sunlight-plugin.menu.js"></script>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/jquery.scrollTo.js"></script>
|
||||
<script src="scripts/jquery.localScroll.js"></script>
|
||||
<script src="scripts/bootstrap-dropdown.js"></script>
|
||||
<script src="scripts/toc.js"></script>
|
||||
|
||||
|
||||
<script> Sunlight.highlightAll({lineNumbers:true, showMenu: true, enableDoclinks :true}); </script>
|
||||
|
||||
<script>
|
||||
$( function () {
|
||||
$( "#toc" ).toc( {
|
||||
anchorName : function(i, heading, prefix) {
|
||||
return $(heading).attr("id") || ( prefix + i );
|
||||
},
|
||||
selectors : "h1,h2,h3,h4",
|
||||
showAndHide : false,
|
||||
scrollTo : 60
|
||||
} );
|
||||
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
|
||||
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
|
||||
|
||||
} );
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
763
docs/MSPointer.js.html
Normal file
763
docs/MSPointer.js.html
Normal file
@@ -0,0 +1,763 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Phaser Source: input/MSPointer.js</title>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
|
||||
|
||||
|
||||
<link type="text/css" rel="stylesheet" href="styles/site.cerulean.css">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="navbar navbar-fixed-top navbar-inverse">
|
||||
<div class="navbar-inner">
|
||||
<a class="brand" href="index.html">Phaser</a>
|
||||
<ul class="nav">
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-0">
|
||||
<a href="Phaser.html">Phaser</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Animation.html">Animation</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationManager.html">AnimationManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationParser.html">AnimationParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ArrayList.html">ArrayList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapData.html">BitmapData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapText.html">BitmapText</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Button.html">Button</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Cache.html">Cache</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Camera.html">Camera</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Canvas.html">Canvas</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Color.html">Color</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Device.html">Device</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Easing.html">Easing</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Back.html">Back</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Bounce.html">Bounce</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Circular.html">Circular</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Cubic.html">Cubic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Elastic.html">Elastic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Exponential.html">Exponential</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Linear.html">Linear</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quadratic.html">Quadratic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quartic.html">Quartic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quintic.html">Quintic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Sinusoidal.html">Sinusoidal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Ellipse.html">Ellipse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Events.html">Events</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Filter.html">Filter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Frame.html">Frame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.FrameData.html">FrameData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Game.html">Game</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectCreator.html">GameObjectCreator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Gamepad.html">Gamepad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GamepadButton.html">GamepadButton</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Graphics.html">Graphics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Group.html">Group</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Image.html">Image</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Input.html">Input</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.InputHandler.html">InputHandler</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Key.html">Key</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Keyboard.html">Keyboard</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Line.html">Line</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LinkedList.html">LinkedList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Loader.html">Loader</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LoaderParser.html">LoaderParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Math.html">Math</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Mouse.html">Mouse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.MSPointer.html">MSPointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Net.html">Net</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particle.html">Particle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particles.html">Particles</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Particles.Arcade.Emitter.html">Emitter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Physics.html">Physics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Arcade.html">Arcade</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Arcade.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Ninja.html">Ninja</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.AABB.html">AABB</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.P2.html">P2</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.BodyDebug.html">BodyDebug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.CollisionGroup.html">CollisionGroup</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.ContactMaterial.html">ContactMaterial</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.DistanceConstraint.html">DistanceConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.FixtureList.html">FixtureList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.GearConstraint.html">GearConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.InversePointProxy.html">InversePointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.LockConstraint.html">LockConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Material.html">Material</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PointProxy.html">PointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PrismaticConstraint.html">PrismaticConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.RevoluteConstraint.html">RevoluteConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Spring.html">Spring</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Plugin.html">Plugin</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.PluginManager.html">PluginManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Point.html">Point</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Pointer.html">Pointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Polygon.html">Polygon</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.QuadTree.html">QuadTree</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RandomDataGenerator.html">RandomDataGenerator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Rectangle.html">Rectangle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RenderTexture.html">RenderTexture</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RequestAnimationFrame.html">RequestAnimationFrame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RetroFont.html">RetroFont</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ScaleManager.html">ScaleManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Signal.html">Signal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SignalBinding.html">SignalBinding</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SinglePad.html">SinglePad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sound.html">Sound</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SoundManager.html">SoundManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sprite.html">Sprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SpriteBatch.html">SpriteBatch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Stage.html">Stage</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.State.html">State</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.StateManager.html">StateManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Text.html">Text</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tilemap.html">Tilemap</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapLayer.html">TilemapLayer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapParser.html">TilemapParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tileset.html">Tileset</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TileSprite.html">TileSprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Time.html">Time</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Timer.html">Timer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TimerEvent.html">TimerEvent</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Touch.html">Touch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tween.html">Tween</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TweenManager.html">TweenManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Utils.html">Utils</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Utils.Debug.html">Debug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.World.html">World</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row-fluid">
|
||||
|
||||
|
||||
<div class="span12">
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
|
||||
<h1 class="page-title">Source: input/MSPointer.js</h1>
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <rich@photonstorm.com>
|
||||
* @copyright 2014 Photon Storm Ltd.
|
||||
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Phaser - MSPointer constructor.
|
||||
*
|
||||
* @class Phaser.MSPointer
|
||||
* @classdesc The MSPointer class handles touch interactions with the game and the resulting Pointer objects.
|
||||
* It will work only in Internet Explorer 10 and Windows Store or Windows Phone 8 apps using JavaScript.
|
||||
* http://msdn.microsoft.com/en-us/library/ie/hh673557(v=vs.85).aspx
|
||||
* @constructor
|
||||
* @param {Phaser.Game} game - A reference to the currently running game.
|
||||
*/
|
||||
Phaser.MSPointer = function (game) {
|
||||
|
||||
/**
|
||||
* @property {Phaser.Game} game - A reference to the currently running game.
|
||||
*/
|
||||
this.game = game;
|
||||
|
||||
/**
|
||||
* @property {Object} callbackContext - The context under which callbacks are called (defaults to game).
|
||||
*/
|
||||
this.callbackContext = this.game;
|
||||
|
||||
/**
|
||||
* You can disable all Input by setting disabled = true. While set all new input related events will be ignored.
|
||||
* @property {boolean} disabled
|
||||
*/
|
||||
this.disabled = false;
|
||||
|
||||
/**
|
||||
* @property {function} _onMSPointerDown - Internal function to handle MSPointer events.
|
||||
* @private
|
||||
*/
|
||||
this._onMSPointerDown = null;
|
||||
|
||||
/**
|
||||
* @property {function} _onMSPointerMove - Internal function to handle MSPointer events.
|
||||
* @private
|
||||
*/
|
||||
this._onMSPointerMove = null;
|
||||
|
||||
/**
|
||||
* @property {function} _onMSPointerUp - Internal function to handle MSPointer events.
|
||||
* @private
|
||||
*/
|
||||
this._onMSPointerUp = null;
|
||||
|
||||
};
|
||||
|
||||
Phaser.MSPointer.prototype = {
|
||||
|
||||
/**
|
||||
* Starts the event listeners running.
|
||||
* @method Phaser.MSPointer#start
|
||||
*/
|
||||
start: function () {
|
||||
|
||||
if (this._onMSPointerDown !== null)
|
||||
{
|
||||
// Avoid setting multiple listeners
|
||||
return;
|
||||
}
|
||||
|
||||
var _this = this;
|
||||
|
||||
if (this.game.device.mspointer === true)
|
||||
{
|
||||
this._onMSPointerDown = function (event) {
|
||||
return _this.onPointerDown(event);
|
||||
};
|
||||
|
||||
this._onMSPointerMove = function (event) {
|
||||
return _this.onPointerMove(event);
|
||||
};
|
||||
|
||||
this._onMSPointerUp = function (event) {
|
||||
return _this.onPointerUp(event);
|
||||
};
|
||||
|
||||
this.game.renderer.view.addEventListener('MSPointerDown', this._onMSPointerDown, false);
|
||||
this.game.renderer.view.addEventListener('MSPointerMove', this._onMSPointerMove, false);
|
||||
this.game.renderer.view.addEventListener('MSPointerUp', this._onMSPointerUp, false);
|
||||
|
||||
// IE11+ uses non-prefix events
|
||||
this.game.renderer.view.addEventListener('pointerDown', this._onMSPointerDown, false);
|
||||
this.game.renderer.view.addEventListener('pointerMove', this._onMSPointerMove, false);
|
||||
this.game.renderer.view.addEventListener('pointerUp', this._onMSPointerUp, false);
|
||||
|
||||
this.game.renderer.view.style['-ms-content-zooming'] = 'none';
|
||||
this.game.renderer.view.style['-ms-touch-action'] = 'none';
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* The function that handles the PointerDown event.
|
||||
* @method Phaser.MSPointer#onPointerDown
|
||||
* @param {PointerEvent} event
|
||||
*/
|
||||
onPointerDown: function (event) {
|
||||
|
||||
if (this.game.input.disabled || this.disabled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
event.preventDefault();
|
||||
event.identifier = event.pointerId;
|
||||
|
||||
this.game.input.startPointer(event);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* The function that handles the PointerMove event.
|
||||
* @method Phaser.MSPointer#onPointerMove
|
||||
* @param {PointerEvent } event
|
||||
*/
|
||||
onPointerMove: function (event) {
|
||||
|
||||
if (this.game.input.disabled || this.disabled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
event.preventDefault();
|
||||
event.identifier = event.pointerId;
|
||||
|
||||
this.game.input.updatePointer(event);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* The function that handles the PointerUp event.
|
||||
* @method Phaser.MSPointer#onPointerUp
|
||||
* @param {PointerEvent} event
|
||||
*/
|
||||
onPointerUp: function (event) {
|
||||
|
||||
if (this.game.input.disabled || this.disabled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
event.preventDefault();
|
||||
event.identifier = event.pointerId;
|
||||
|
||||
this.game.input.stopPointer(event);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Stop the event listeners.
|
||||
* @method Phaser.MSPointer#stop
|
||||
*/
|
||||
stop: function () {
|
||||
|
||||
this.game.canvas.removeEventListener('MSPointerDown', this._onMSPointerDown);
|
||||
this.game.canvas.removeEventListener('MSPointerMove', this._onMSPointerMove);
|
||||
this.game.canvas.removeEventListener('MSPointerUp', this._onMSPointerUp);
|
||||
|
||||
this.game.canvas.removeEventListener('pointerDown', this._onMSPointerDown);
|
||||
this.game.canvas.removeEventListener('pointerMove', this._onMSPointerMove);
|
||||
this.game.canvas.removeEventListener('pointerUp', this._onMSPointerUp);
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Phaser.MSPointer.prototype.constructor = Phaser.MSPointer;
|
||||
</pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<footer>
|
||||
|
||||
|
||||
<span class="copyright">
|
||||
Phaser Copyright © 2012-2014 Photon Storm Ltd.
|
||||
</span>
|
||||
<br />
|
||||
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
|
||||
on Tue May 20 2014 10:05:49 GMT+0100 (BST) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
<br clear="both">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script src="scripts/sunlight.js"></script>
|
||||
<script src="scripts/sunlight.javascript.js"></script>
|
||||
<script src="scripts/sunlight-plugin.doclinks.js"></script>
|
||||
<script src="scripts/sunlight-plugin.linenumbers.js"></script>
|
||||
<script src="scripts/sunlight-plugin.menu.js"></script>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/jquery.scrollTo.js"></script>
|
||||
<script src="scripts/jquery.localScroll.js"></script>
|
||||
<script src="scripts/bootstrap-dropdown.js"></script>
|
||||
<script src="scripts/toc.js"></script>
|
||||
|
||||
|
||||
<script> Sunlight.highlightAll({lineNumbers:true, showMenu: true, enableDoclinks :true}); </script>
|
||||
|
||||
<script>
|
||||
$( function () {
|
||||
$( "#toc" ).toc( {
|
||||
anchorName : function(i, heading, prefix) {
|
||||
return $(heading).attr("id") || ( prefix + i );
|
||||
},
|
||||
selectors : "h1,h2,h3,h4",
|
||||
showAndHide : false,
|
||||
scrollTo : 60
|
||||
} );
|
||||
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
|
||||
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
|
||||
|
||||
} );
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
614
docs/Material.js.html
Normal file
614
docs/Material.js.html
Normal file
@@ -0,0 +1,614 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Phaser Source: physics/p2/Material.js</title>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
|
||||
|
||||
|
||||
<link type="text/css" rel="stylesheet" href="styles/site.cerulean.css">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="navbar navbar-fixed-top navbar-inverse">
|
||||
<div class="navbar-inner">
|
||||
<a class="brand" href="index.html">Phaser</a>
|
||||
<ul class="nav">
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-0">
|
||||
<a href="Phaser.html">Phaser</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Animation.html">Animation</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationManager.html">AnimationManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationParser.html">AnimationParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ArrayList.html">ArrayList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapData.html">BitmapData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapText.html">BitmapText</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Button.html">Button</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Cache.html">Cache</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Camera.html">Camera</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Canvas.html">Canvas</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Color.html">Color</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Device.html">Device</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Easing.html">Easing</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Back.html">Back</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Bounce.html">Bounce</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Circular.html">Circular</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Cubic.html">Cubic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Elastic.html">Elastic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Exponential.html">Exponential</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Linear.html">Linear</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quadratic.html">Quadratic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quartic.html">Quartic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quintic.html">Quintic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Sinusoidal.html">Sinusoidal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Ellipse.html">Ellipse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Events.html">Events</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Filter.html">Filter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Frame.html">Frame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.FrameData.html">FrameData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Game.html">Game</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectCreator.html">GameObjectCreator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Gamepad.html">Gamepad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GamepadButton.html">GamepadButton</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Graphics.html">Graphics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Group.html">Group</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Image.html">Image</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Input.html">Input</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.InputHandler.html">InputHandler</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Key.html">Key</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Keyboard.html">Keyboard</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Line.html">Line</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LinkedList.html">LinkedList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Loader.html">Loader</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LoaderParser.html">LoaderParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Math.html">Math</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Mouse.html">Mouse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.MSPointer.html">MSPointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Net.html">Net</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particle.html">Particle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particles.html">Particles</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Particles.Arcade.Emitter.html">Emitter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Physics.html">Physics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Arcade.html">Arcade</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Arcade.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Ninja.html">Ninja</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.AABB.html">AABB</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.P2.html">P2</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.BodyDebug.html">BodyDebug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.CollisionGroup.html">CollisionGroup</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.ContactMaterial.html">ContactMaterial</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.DistanceConstraint.html">DistanceConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.FixtureList.html">FixtureList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.GearConstraint.html">GearConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.InversePointProxy.html">InversePointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.LockConstraint.html">LockConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Material.html">Material</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PointProxy.html">PointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PrismaticConstraint.html">PrismaticConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.RevoluteConstraint.html">RevoluteConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Spring.html">Spring</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Plugin.html">Plugin</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.PluginManager.html">PluginManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Point.html">Point</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Pointer.html">Pointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Polygon.html">Polygon</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.QuadTree.html">QuadTree</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RandomDataGenerator.html">RandomDataGenerator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Rectangle.html">Rectangle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RenderTexture.html">RenderTexture</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RequestAnimationFrame.html">RequestAnimationFrame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RetroFont.html">RetroFont</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ScaleManager.html">ScaleManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Signal.html">Signal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SignalBinding.html">SignalBinding</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SinglePad.html">SinglePad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sound.html">Sound</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SoundManager.html">SoundManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sprite.html">Sprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SpriteBatch.html">SpriteBatch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Stage.html">Stage</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.State.html">State</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.StateManager.html">StateManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Text.html">Text</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tilemap.html">Tilemap</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapLayer.html">TilemapLayer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapParser.html">TilemapParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tileset.html">Tileset</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TileSprite.html">TileSprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Time.html">Time</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Timer.html">Timer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TimerEvent.html">TimerEvent</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Touch.html">Touch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tween.html">Tween</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TweenManager.html">TweenManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Utils.html">Utils</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Utils.Debug.html">Debug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.World.html">World</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row-fluid">
|
||||
|
||||
|
||||
<div class="span12">
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
|
||||
<h1 class="page-title">Source: physics/p2/Material.js</h1>
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <rich@photonstorm.com>
|
||||
* @copyright 2014 Photon Storm Ltd.
|
||||
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
||||
*/
|
||||
|
||||
/**
|
||||
* \o/ ~ "Because I'm a Material girl"
|
||||
*
|
||||
* @class Phaser.Physics.P2.Material
|
||||
* @classdesc Physics Material Constructor
|
||||
* @constructor
|
||||
*/
|
||||
Phaser.Physics.P2.Material = function (name) {
|
||||
|
||||
/**
|
||||
* @property {string} name - The user defined name given to this Material.
|
||||
* @default
|
||||
*/
|
||||
this.name = name;
|
||||
|
||||
p2.Material.call(this);
|
||||
|
||||
};
|
||||
|
||||
Phaser.Physics.P2.Material.prototype = Object.create(p2.Material.prototype);
|
||||
Phaser.Physics.P2.Material.prototype.constructor = Phaser.Physics.P2.Material;
|
||||
</pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<footer>
|
||||
|
||||
|
||||
<span class="copyright">
|
||||
Phaser Copyright © 2012-2014 Photon Storm Ltd.
|
||||
</span>
|
||||
<br />
|
||||
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
|
||||
on Tue May 20 2014 10:05:49 GMT+0100 (BST) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
<br clear="both">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script src="scripts/sunlight.js"></script>
|
||||
<script src="scripts/sunlight.javascript.js"></script>
|
||||
<script src="scripts/sunlight-plugin.doclinks.js"></script>
|
||||
<script src="scripts/sunlight-plugin.linenumbers.js"></script>
|
||||
<script src="scripts/sunlight-plugin.menu.js"></script>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/jquery.scrollTo.js"></script>
|
||||
<script src="scripts/jquery.localScroll.js"></script>
|
||||
<script src="scripts/bootstrap-dropdown.js"></script>
|
||||
<script src="scripts/toc.js"></script>
|
||||
|
||||
|
||||
<script> Sunlight.highlightAll({lineNumbers:true, showMenu: true, enableDoclinks :true}); </script>
|
||||
|
||||
<script>
|
||||
$( function () {
|
||||
$( "#toc" ).toc( {
|
||||
anchorName : function(i, heading, prefix) {
|
||||
return $(heading).attr("id") || ( prefix + i );
|
||||
},
|
||||
selectors : "h1,h2,h3,h4",
|
||||
showAndHide : false,
|
||||
scrollTo : 60
|
||||
} );
|
||||
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
|
||||
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
|
||||
|
||||
} );
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
1954
docs/Math.js.html
Normal file
1954
docs/Math.js.html
Normal file
File diff suppressed because it is too large
Load Diff
1029
docs/Mouse.js.html
Normal file
1029
docs/Mouse.js.html
Normal file
File diff suppressed because it is too large
Load Diff
753
docs/Net.js.html
Normal file
753
docs/Net.js.html
Normal file
@@ -0,0 +1,753 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Phaser Source: net/Net.js</title>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
|
||||
|
||||
|
||||
<link type="text/css" rel="stylesheet" href="styles/site.cerulean.css">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="navbar navbar-fixed-top navbar-inverse">
|
||||
<div class="navbar-inner">
|
||||
<a class="brand" href="index.html">Phaser</a>
|
||||
<ul class="nav">
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-0">
|
||||
<a href="Phaser.html">Phaser</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Animation.html">Animation</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationManager.html">AnimationManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationParser.html">AnimationParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ArrayList.html">ArrayList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapData.html">BitmapData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapText.html">BitmapText</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Button.html">Button</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Cache.html">Cache</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Camera.html">Camera</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Canvas.html">Canvas</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Color.html">Color</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Device.html">Device</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Easing.html">Easing</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Back.html">Back</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Bounce.html">Bounce</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Circular.html">Circular</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Cubic.html">Cubic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Elastic.html">Elastic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Exponential.html">Exponential</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Linear.html">Linear</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quadratic.html">Quadratic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quartic.html">Quartic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quintic.html">Quintic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Sinusoidal.html">Sinusoidal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Ellipse.html">Ellipse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Events.html">Events</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Filter.html">Filter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Frame.html">Frame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.FrameData.html">FrameData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Game.html">Game</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectCreator.html">GameObjectCreator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Gamepad.html">Gamepad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GamepadButton.html">GamepadButton</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Graphics.html">Graphics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Group.html">Group</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Image.html">Image</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Input.html">Input</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.InputHandler.html">InputHandler</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Key.html">Key</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Keyboard.html">Keyboard</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Line.html">Line</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LinkedList.html">LinkedList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Loader.html">Loader</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LoaderParser.html">LoaderParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Math.html">Math</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Mouse.html">Mouse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.MSPointer.html">MSPointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Net.html">Net</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particle.html">Particle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particles.html">Particles</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Particles.Arcade.Emitter.html">Emitter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Physics.html">Physics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Arcade.html">Arcade</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Arcade.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Ninja.html">Ninja</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.AABB.html">AABB</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.P2.html">P2</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.BodyDebug.html">BodyDebug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.CollisionGroup.html">CollisionGroup</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.ContactMaterial.html">ContactMaterial</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.DistanceConstraint.html">DistanceConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.FixtureList.html">FixtureList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.GearConstraint.html">GearConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.InversePointProxy.html">InversePointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.LockConstraint.html">LockConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Material.html">Material</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PointProxy.html">PointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PrismaticConstraint.html">PrismaticConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.RevoluteConstraint.html">RevoluteConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Spring.html">Spring</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Plugin.html">Plugin</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.PluginManager.html">PluginManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Point.html">Point</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Pointer.html">Pointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Polygon.html">Polygon</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.QuadTree.html">QuadTree</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RandomDataGenerator.html">RandomDataGenerator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Rectangle.html">Rectangle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RenderTexture.html">RenderTexture</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RequestAnimationFrame.html">RequestAnimationFrame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RetroFont.html">RetroFont</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ScaleManager.html">ScaleManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Signal.html">Signal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SignalBinding.html">SignalBinding</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SinglePad.html">SinglePad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sound.html">Sound</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SoundManager.html">SoundManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sprite.html">Sprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SpriteBatch.html">SpriteBatch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Stage.html">Stage</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.State.html">State</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.StateManager.html">StateManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Text.html">Text</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tilemap.html">Tilemap</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapLayer.html">TilemapLayer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapParser.html">TilemapParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tileset.html">Tileset</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TileSprite.html">TileSprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Time.html">Time</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Timer.html">Timer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TimerEvent.html">TimerEvent</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Touch.html">Touch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tween.html">Tween</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TweenManager.html">TweenManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Utils.html">Utils</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Utils.Debug.html">Debug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.World.html">World</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row-fluid">
|
||||
|
||||
|
||||
<div class="span12">
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
|
||||
<h1 class="page-title">Source: net/Net.js</h1>
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <rich@photonstorm.com>
|
||||
* @copyright 2014 Photon Storm Ltd.
|
||||
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Phaser.Net handles browser URL related tasks such as checking host names, domain names and query string manipulation.
|
||||
*
|
||||
* @class Phaser.Net
|
||||
* @constructor
|
||||
* @param {Phaser.Game} game - A reference to the currently running game.
|
||||
*/
|
||||
Phaser.Net = function (game) {
|
||||
|
||||
this.game = game;
|
||||
|
||||
};
|
||||
|
||||
Phaser.Net.prototype = {
|
||||
|
||||
/**
|
||||
* Returns the hostname given by the browser.
|
||||
*
|
||||
* @method Phaser.Net#getHostName
|
||||
* @return {string}
|
||||
*/
|
||||
getHostName: function () {
|
||||
|
||||
if (window.location && window.location.hostname) {
|
||||
return window.location.hostname;
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Compares the given domain name against the hostname of the browser containing the game.
|
||||
* If the domain name is found it returns true.
|
||||
* You can specify a part of a domain, for example 'google' would match 'google.com', 'google.co.uk', etc.
|
||||
* Do not include 'http://' at the start.
|
||||
*
|
||||
* @method Phaser.Net#checkDomainName
|
||||
* @param {string} domain
|
||||
* @return {boolean} true if the given domain fragment can be found in the window.location.hostname
|
||||
*/
|
||||
checkDomainName: function (domain) {
|
||||
return window.location.hostname.indexOf(domain) !== -1;
|
||||
},
|
||||
|
||||
/**
|
||||
* Updates a value on the Query String and returns it in full.
|
||||
* If the value doesn't already exist it is set.
|
||||
* If the value exists it is replaced with the new value given. If you don't provide a new value it is removed from the query string.
|
||||
* Optionally you can redirect to the new url, or just return it as a string.
|
||||
*
|
||||
* @method Phaser.Net#updateQueryString
|
||||
* @param {string} key - The querystring key to update.
|
||||
* @param {string} value - The new value to be set. If it already exists it will be replaced.
|
||||
* @param {boolean} redirect - If true the browser will issue a redirect to the url with the new querystring.
|
||||
* @param {string} url - The URL to modify. If none is given it uses window.location.href.
|
||||
* @return {string} If redirect is false then the modified url and query string is returned.
|
||||
*/
|
||||
updateQueryString: function (key, value, redirect, url) {
|
||||
|
||||
if (typeof redirect === "undefined") { redirect = false; }
|
||||
if (typeof url === "undefined" || url === '') { url = window.location.href; }
|
||||
|
||||
var output = '';
|
||||
var re = new RegExp("([?|&])" + key + "=.*?(&|#|$)(.*)", "gi");
|
||||
|
||||
if (re.test(url))
|
||||
{
|
||||
if (typeof value !== 'undefined' && value !== null)
|
||||
{
|
||||
output = url.replace(re, '$1' + key + "=" + value + '$2$3');
|
||||
}
|
||||
else
|
||||
{
|
||||
output = url.replace(re, '$1$3').replace(/(&|\?)$/, '');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (typeof value !== 'undefined' && value !== null)
|
||||
{
|
||||
var separator = url.indexOf('?') !== -1 ? '&' : '?';
|
||||
var hash = url.split('#');
|
||||
url = hash[0] + separator + key + '=' + value;
|
||||
|
||||
if (hash[1]) {
|
||||
url += '#' + hash[1];
|
||||
}
|
||||
|
||||
output = url;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
output = url;
|
||||
}
|
||||
}
|
||||
|
||||
if (redirect)
|
||||
{
|
||||
window.location.href = output;
|
||||
}
|
||||
else
|
||||
{
|
||||
return output;
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns the Query String as an object.
|
||||
* If you specify a parameter it will return just the value of that parameter, should it exist.
|
||||
*
|
||||
* @method Phaser.Net#getQueryString
|
||||
* @param {string} [parameter=''] - If specified this will return just the value for that key.
|
||||
* @return {string|object} An object containing the key value pairs found in the query string or just the value if a parameter was given.
|
||||
*/
|
||||
getQueryString: function (parameter) {
|
||||
|
||||
if (typeof parameter === "undefined") { parameter = ''; }
|
||||
|
||||
var output = {};
|
||||
var keyValues = location.search.substring(1).split('&');
|
||||
|
||||
for (var i in keyValues)
|
||||
{
|
||||
var key = keyValues[i].split('=');
|
||||
|
||||
if (key.length > 1)
|
||||
{
|
||||
if (parameter && parameter == this.decodeURI(key[0]))
|
||||
{
|
||||
return this.decodeURI(key[1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
output[this.decodeURI(key[0])] = this.decodeURI(key[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return output;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns the Query String as an object.
|
||||
* If you specify a parameter it will return just the value of that parameter, should it exist.
|
||||
*
|
||||
* @method Phaser.Net#decodeURI
|
||||
* @param {string} value - The URI component to be decoded.
|
||||
* @return {string} The decoded value.
|
||||
*/
|
||||
decodeURI: function (value) {
|
||||
return decodeURIComponent(value.replace(/\+/g, " "));
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Phaser.Net.prototype.constructor = Phaser.Net;
|
||||
</pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<footer>
|
||||
|
||||
|
||||
<span class="copyright">
|
||||
Phaser Copyright © 2012-2014 Photon Storm Ltd.
|
||||
</span>
|
||||
<br />
|
||||
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
|
||||
on Tue May 20 2014 10:05:49 GMT+0100 (BST) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
<br clear="both">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script src="scripts/sunlight.js"></script>
|
||||
<script src="scripts/sunlight.javascript.js"></script>
|
||||
<script src="scripts/sunlight-plugin.doclinks.js"></script>
|
||||
<script src="scripts/sunlight-plugin.linenumbers.js"></script>
|
||||
<script src="scripts/sunlight-plugin.menu.js"></script>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/jquery.scrollTo.js"></script>
|
||||
<script src="scripts/jquery.localScroll.js"></script>
|
||||
<script src="scripts/bootstrap-dropdown.js"></script>
|
||||
<script src="scripts/toc.js"></script>
|
||||
|
||||
|
||||
<script> Sunlight.highlightAll({lineNumbers:true, showMenu: true, enableDoclinks :true}); </script>
|
||||
|
||||
<script>
|
||||
$( function () {
|
||||
$( "#toc" ).toc( {
|
||||
anchorName : function(i, heading, prefix) {
|
||||
return $(heading).attr("id") || ( prefix + i );
|
||||
},
|
||||
selectors : "h1,h2,h3,h4",
|
||||
showAndHide : false,
|
||||
scrollTo : 60
|
||||
} );
|
||||
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
|
||||
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
|
||||
|
||||
} );
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
771
docs/Particle.js.html
Normal file
771
docs/Particle.js.html
Normal file
@@ -0,0 +1,771 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Phaser Source: gameobjects/Particle.js</title>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
|
||||
|
||||
|
||||
<link type="text/css" rel="stylesheet" href="styles/site.cerulean.css">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="navbar navbar-fixed-top navbar-inverse">
|
||||
<div class="navbar-inner">
|
||||
<a class="brand" href="index.html">Phaser</a>
|
||||
<ul class="nav">
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-0">
|
||||
<a href="Phaser.html">Phaser</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Animation.html">Animation</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationManager.html">AnimationManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationParser.html">AnimationParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ArrayList.html">ArrayList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapData.html">BitmapData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapText.html">BitmapText</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Button.html">Button</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Cache.html">Cache</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Camera.html">Camera</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Canvas.html">Canvas</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Color.html">Color</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Device.html">Device</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Easing.html">Easing</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Back.html">Back</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Bounce.html">Bounce</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Circular.html">Circular</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Cubic.html">Cubic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Elastic.html">Elastic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Exponential.html">Exponential</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Linear.html">Linear</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quadratic.html">Quadratic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quartic.html">Quartic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quintic.html">Quintic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Sinusoidal.html">Sinusoidal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Ellipse.html">Ellipse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Events.html">Events</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Filter.html">Filter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Frame.html">Frame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.FrameData.html">FrameData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Game.html">Game</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectCreator.html">GameObjectCreator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Gamepad.html">Gamepad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GamepadButton.html">GamepadButton</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Graphics.html">Graphics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Group.html">Group</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Image.html">Image</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Input.html">Input</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.InputHandler.html">InputHandler</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Key.html">Key</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Keyboard.html">Keyboard</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Line.html">Line</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LinkedList.html">LinkedList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Loader.html">Loader</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LoaderParser.html">LoaderParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Math.html">Math</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Mouse.html">Mouse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.MSPointer.html">MSPointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Net.html">Net</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particle.html">Particle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particles.html">Particles</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Particles.Arcade.Emitter.html">Emitter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Physics.html">Physics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Arcade.html">Arcade</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Arcade.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Ninja.html">Ninja</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.AABB.html">AABB</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.P2.html">P2</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.BodyDebug.html">BodyDebug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.CollisionGroup.html">CollisionGroup</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.ContactMaterial.html">ContactMaterial</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.DistanceConstraint.html">DistanceConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.FixtureList.html">FixtureList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.GearConstraint.html">GearConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.InversePointProxy.html">InversePointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.LockConstraint.html">LockConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Material.html">Material</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PointProxy.html">PointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PrismaticConstraint.html">PrismaticConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.RevoluteConstraint.html">RevoluteConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Spring.html">Spring</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Plugin.html">Plugin</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.PluginManager.html">PluginManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Point.html">Point</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Pointer.html">Pointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Polygon.html">Polygon</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.QuadTree.html">QuadTree</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RandomDataGenerator.html">RandomDataGenerator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Rectangle.html">Rectangle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RenderTexture.html">RenderTexture</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RequestAnimationFrame.html">RequestAnimationFrame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RetroFont.html">RetroFont</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ScaleManager.html">ScaleManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Signal.html">Signal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SignalBinding.html">SignalBinding</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SinglePad.html">SinglePad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sound.html">Sound</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SoundManager.html">SoundManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sprite.html">Sprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SpriteBatch.html">SpriteBatch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Stage.html">Stage</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.State.html">State</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.StateManager.html">StateManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Text.html">Text</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tilemap.html">Tilemap</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapLayer.html">TilemapLayer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapParser.html">TilemapParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tileset.html">Tileset</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TileSprite.html">TileSprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Time.html">Time</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Timer.html">Timer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TimerEvent.html">TimerEvent</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Touch.html">Touch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tween.html">Tween</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TweenManager.html">TweenManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Utils.html">Utils</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Utils.Debug.html">Debug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.World.html">World</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row-fluid">
|
||||
|
||||
|
||||
<div class="span12">
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
|
||||
<h1 class="page-title">Source: gameobjects/Particle.js</h1>
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <rich@photonstorm.com>
|
||||
* @copyright 2014 Photon Storm Ltd.
|
||||
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @class Phaser.Particle
|
||||
*
|
||||
* @classdesc Create a new `Particle` object. Particles are extended Sprites that are emitted by a particle emitter such as Phaser.Particles.Arcade.Emitter.
|
||||
*
|
||||
* @constructor
|
||||
* @extends Phaser.Sprite
|
||||
* @param {Phaser.Game} game - A reference to the currently running game.
|
||||
* @param {number} x - The x coordinate (in world space) to position the Particle at.
|
||||
* @param {number} y - The y coordinate (in world space) to position the Particle at.
|
||||
* @param {string|Phaser.RenderTexture|Phaser.BitmapData|PIXI.Texture} key - This is the image or texture used by the Particle during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture.
|
||||
* @param {string|number} frame - If this Particle is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index.
|
||||
*/
|
||||
Phaser.Particle = function (game, x, y, key, frame) {
|
||||
|
||||
Phaser.Sprite.call(this, game, x, y, key, frame);
|
||||
|
||||
/**
|
||||
* @property {boolean} autoScale - If this Particle automatically scales this is set to true by Particle.setScaleData.
|
||||
* @protected
|
||||
*/
|
||||
this.autoScale = false;
|
||||
|
||||
/**
|
||||
* @property {array} scaleData - A reference to the scaleData array owned by the Emitter that emitted this Particle.
|
||||
* @protected
|
||||
*/
|
||||
this.scaleData = null;
|
||||
|
||||
/**
|
||||
* @property {number} _s - Internal cache var for tracking auto scale.
|
||||
* @private
|
||||
*/
|
||||
this._s = 0;
|
||||
|
||||
/**
|
||||
* @property {boolean} autoAlpha - If this Particle automatically changes alpha this is set to true by Particle.setAlphaData.
|
||||
* @protected
|
||||
*/
|
||||
this.autoAlpha = false;
|
||||
|
||||
/**
|
||||
* @property {array} alphaData - A reference to the alphaData array owned by the Emitter that emitted this Particle.
|
||||
* @protected
|
||||
*/
|
||||
this.alphaData = null;
|
||||
|
||||
/**
|
||||
* @property {number} _a - Internal cache var for tracking auto alpha.
|
||||
* @private
|
||||
*/
|
||||
this._a = 0;
|
||||
|
||||
};
|
||||
|
||||
Phaser.Particle.prototype = Object.create(Phaser.Sprite.prototype);
|
||||
Phaser.Particle.prototype.constructor = Phaser.Particle;
|
||||
|
||||
/**
|
||||
* Updates the Particle scale or alpha if autoScale and autoAlpha are set.
|
||||
*
|
||||
* @method Phaser.Particle#update
|
||||
* @memberof Phaser.Particle
|
||||
*/
|
||||
Phaser.Particle.prototype.update = function() {
|
||||
|
||||
if (this.autoScale)
|
||||
{
|
||||
this._s--;
|
||||
|
||||
if (this._s)
|
||||
{
|
||||
this.scale.set(this.scaleData[this._s].x, this.scaleData[this._s].y);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.autoScale = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (this.autoAlpha)
|
||||
{
|
||||
this._a--;
|
||||
|
||||
if (this._a)
|
||||
{
|
||||
this.alpha = this.alphaData[this._a].v;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.autoAlpha = false;
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Called by the Emitter when this particle is emitted. Left empty for you to over-ride as required.
|
||||
*
|
||||
* @method Phaser.Particle#onEmit
|
||||
* @memberof Phaser.Particle
|
||||
*/
|
||||
Phaser.Particle.prototype.onEmit = function() {
|
||||
};
|
||||
|
||||
/**
|
||||
* Called by the Emitter if autoAlpha has been enabled. Passes over the alpha ease data and resets the alpha counter.
|
||||
*
|
||||
* @method Phaser.Particle#setAlphaData
|
||||
* @memberof Phaser.Particle
|
||||
*/
|
||||
Phaser.Particle.prototype.setAlphaData = function(data) {
|
||||
|
||||
this.alphaData = data;
|
||||
this._a = data.length - 1;
|
||||
this.alpha = this.alphaData[this._a].v;
|
||||
this.autoAlpha = true;
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Called by the Emitter if autoScale has been enabled. Passes over the scale ease data and resets the scale counter.
|
||||
*
|
||||
* @method Phaser.Particle#setScaleData
|
||||
* @memberof Phaser.Particle
|
||||
*/
|
||||
Phaser.Particle.prototype.setScaleData = function(data) {
|
||||
|
||||
this.scaleData = data;
|
||||
this._s = data.length - 1;
|
||||
this.scale.set(this.scaleData[this._s].x, this.scaleData[this._s].y);
|
||||
this.autoScale = true;
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Resets the Particle. This places the Particle at the given x/y world coordinates and then
|
||||
* sets alive, exists, visible and renderable all to true. Also resets the outOfBounds state and health values.
|
||||
* If the Particle has a physics body that too is reset.
|
||||
*
|
||||
* @method Phaser.Particle#reset
|
||||
* @memberof Phaser.Particle
|
||||
* @param {number} x - The x coordinate (in world space) to position the Particle at.
|
||||
* @param {number} y - The y coordinate (in world space) to position the Particle at.
|
||||
* @param {number} [health=1] - The health to give the Particle.
|
||||
* @return (Phaser.Particle) This instance.
|
||||
*/
|
||||
Phaser.Particle.prototype.reset = function(x, y, health) {
|
||||
|
||||
if (typeof health === 'undefined') { health = 1; }
|
||||
|
||||
this.world.setTo(x, y);
|
||||
this.position.x = x;
|
||||
this.position.y = y;
|
||||
this.alive = true;
|
||||
this.exists = true;
|
||||
this.visible = true;
|
||||
this.renderable = true;
|
||||
this._outOfBoundsFired = false;
|
||||
|
||||
this.health = health;
|
||||
|
||||
if (this.body)
|
||||
{
|
||||
this.body.reset(x, y, false, false);
|
||||
}
|
||||
|
||||
this._cache[4] = 1;
|
||||
|
||||
this.alpha = 1;
|
||||
this.scale.set(1);
|
||||
|
||||
this.autoScale = false;
|
||||
this.autoAlpha = false;
|
||||
|
||||
return this;
|
||||
|
||||
};
|
||||
</pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<footer>
|
||||
|
||||
|
||||
<span class="copyright">
|
||||
Phaser Copyright © 2012-2014 Photon Storm Ltd.
|
||||
</span>
|
||||
<br />
|
||||
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
|
||||
on Tue May 20 2014 10:05:49 GMT+0100 (BST) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
<br clear="both">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script src="scripts/sunlight.js"></script>
|
||||
<script src="scripts/sunlight.javascript.js"></script>
|
||||
<script src="scripts/sunlight-plugin.doclinks.js"></script>
|
||||
<script src="scripts/sunlight-plugin.linenumbers.js"></script>
|
||||
<script src="scripts/sunlight-plugin.menu.js"></script>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/jquery.scrollTo.js"></script>
|
||||
<script src="scripts/jquery.localScroll.js"></script>
|
||||
<script src="scripts/bootstrap-dropdown.js"></script>
|
||||
<script src="scripts/toc.js"></script>
|
||||
|
||||
|
||||
<script> Sunlight.highlightAll({lineNumbers:true, showMenu: true, enableDoclinks :true}); </script>
|
||||
|
||||
<script>
|
||||
$( function () {
|
||||
$( "#toc" ).toc( {
|
||||
anchorName : function(i, heading, prefix) {
|
||||
return $(heading).attr("id") || ( prefix + i );
|
||||
},
|
||||
selectors : "h1,h2,h3,h4",
|
||||
showAndHide : false,
|
||||
scrollTo : 60
|
||||
} );
|
||||
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
|
||||
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
|
||||
|
||||
} );
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
668
docs/Particles.js.html
Normal file
668
docs/Particles.js.html
Normal file
@@ -0,0 +1,668 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Phaser Source: particles/Particles.js</title>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
|
||||
|
||||
|
||||
<link type="text/css" rel="stylesheet" href="styles/site.cerulean.css">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="navbar navbar-fixed-top navbar-inverse">
|
||||
<div class="navbar-inner">
|
||||
<a class="brand" href="index.html">Phaser</a>
|
||||
<ul class="nav">
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-0">
|
||||
<a href="Phaser.html">Phaser</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Animation.html">Animation</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationManager.html">AnimationManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationParser.html">AnimationParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ArrayList.html">ArrayList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapData.html">BitmapData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapText.html">BitmapText</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Button.html">Button</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Cache.html">Cache</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Camera.html">Camera</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Canvas.html">Canvas</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Color.html">Color</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Device.html">Device</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Easing.html">Easing</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Back.html">Back</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Bounce.html">Bounce</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Circular.html">Circular</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Cubic.html">Cubic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Elastic.html">Elastic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Exponential.html">Exponential</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Linear.html">Linear</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quadratic.html">Quadratic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quartic.html">Quartic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quintic.html">Quintic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Sinusoidal.html">Sinusoidal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Ellipse.html">Ellipse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Events.html">Events</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Filter.html">Filter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Frame.html">Frame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.FrameData.html">FrameData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Game.html">Game</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectCreator.html">GameObjectCreator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Gamepad.html">Gamepad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GamepadButton.html">GamepadButton</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Graphics.html">Graphics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Group.html">Group</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Image.html">Image</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Input.html">Input</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.InputHandler.html">InputHandler</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Key.html">Key</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Keyboard.html">Keyboard</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Line.html">Line</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LinkedList.html">LinkedList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Loader.html">Loader</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LoaderParser.html">LoaderParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Math.html">Math</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Mouse.html">Mouse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.MSPointer.html">MSPointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Net.html">Net</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particle.html">Particle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particles.html">Particles</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Particles.Arcade.Emitter.html">Emitter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Physics.html">Physics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Arcade.html">Arcade</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Arcade.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Ninja.html">Ninja</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.AABB.html">AABB</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.P2.html">P2</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.BodyDebug.html">BodyDebug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.CollisionGroup.html">CollisionGroup</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.ContactMaterial.html">ContactMaterial</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.DistanceConstraint.html">DistanceConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.FixtureList.html">FixtureList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.GearConstraint.html">GearConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.InversePointProxy.html">InversePointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.LockConstraint.html">LockConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Material.html">Material</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PointProxy.html">PointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PrismaticConstraint.html">PrismaticConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.RevoluteConstraint.html">RevoluteConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Spring.html">Spring</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Plugin.html">Plugin</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.PluginManager.html">PluginManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Point.html">Point</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Pointer.html">Pointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Polygon.html">Polygon</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.QuadTree.html">QuadTree</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RandomDataGenerator.html">RandomDataGenerator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Rectangle.html">Rectangle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RenderTexture.html">RenderTexture</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RequestAnimationFrame.html">RequestAnimationFrame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RetroFont.html">RetroFont</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ScaleManager.html">ScaleManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Signal.html">Signal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SignalBinding.html">SignalBinding</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SinglePad.html">SinglePad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sound.html">Sound</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SoundManager.html">SoundManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sprite.html">Sprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SpriteBatch.html">SpriteBatch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Stage.html">Stage</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.State.html">State</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.StateManager.html">StateManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Text.html">Text</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tilemap.html">Tilemap</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapLayer.html">TilemapLayer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapParser.html">TilemapParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tileset.html">Tileset</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TileSprite.html">TileSprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Time.html">Time</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Timer.html">Timer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TimerEvent.html">TimerEvent</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Touch.html">Touch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tween.html">Tween</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TweenManager.html">TweenManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Utils.html">Utils</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Utils.Debug.html">Debug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.World.html">World</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row-fluid">
|
||||
|
||||
|
||||
<div class="span12">
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
|
||||
<h1 class="page-title">Source: particles/Particles.js</h1>
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <rich@photonstorm.com>
|
||||
* @copyright 2014 Photon Storm Ltd.
|
||||
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Phaser.Particles is the Particle Manager for the game. It is called during the game update loop and in turn updates any Emitters attached to it.
|
||||
*
|
||||
* @class Phaser.Particles
|
||||
* @classdesc Phaser Particles
|
||||
* @constructor
|
||||
* @param {Phaser.Game} game - A reference to the currently running game.
|
||||
*/
|
||||
Phaser.Particles = function (game) {
|
||||
|
||||
/**
|
||||
* @property {Phaser.Game} game - A reference to the currently running Game.
|
||||
*/
|
||||
this.game = game;
|
||||
|
||||
/**
|
||||
* @property {object} emitters - Internal emitters store.
|
||||
*/
|
||||
this.emitters = {};
|
||||
|
||||
/**
|
||||
* @property {number} ID -
|
||||
* @default
|
||||
*/
|
||||
this.ID = 0;
|
||||
|
||||
};
|
||||
|
||||
Phaser.Particles.prototype = {
|
||||
|
||||
/**
|
||||
* Adds a new Particle Emitter to the Particle Manager.
|
||||
* @method Phaser.Particles#add
|
||||
* @param {Phaser.Emitter} emitter - The emitter to be added to the particle manager.
|
||||
* @return {Phaser.Emitter} The emitter that was added.
|
||||
*/
|
||||
add: function (emitter) {
|
||||
|
||||
this.emitters[emitter.name] = emitter;
|
||||
|
||||
return emitter;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Removes an existing Particle Emitter from the Particle Manager.
|
||||
* @method Phaser.Particles#remove
|
||||
* @param {Phaser.Emitter} emitter - The emitter to remove.
|
||||
*/
|
||||
remove: function (emitter) {
|
||||
|
||||
delete this.emitters[emitter.name];
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Called by the core game loop. Updates all Emitters who have their exists value set to true.
|
||||
* @method Phaser.Particles#update
|
||||
* @protected
|
||||
*/
|
||||
update: function () {
|
||||
|
||||
for (var key in this.emitters)
|
||||
{
|
||||
if (this.emitters[key].exists)
|
||||
{
|
||||
this.emitters[key].update();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Phaser.Particles.prototype.constructor = Phaser.Particles;
|
||||
</pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<footer>
|
||||
|
||||
|
||||
<span class="copyright">
|
||||
Phaser Copyright © 2012-2014 Photon Storm Ltd.
|
||||
</span>
|
||||
<br />
|
||||
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
|
||||
on Tue May 20 2014 10:05:49 GMT+0100 (BST) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
<br clear="both">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script src="scripts/sunlight.js"></script>
|
||||
<script src="scripts/sunlight.javascript.js"></script>
|
||||
<script src="scripts/sunlight-plugin.doclinks.js"></script>
|
||||
<script src="scripts/sunlight-plugin.linenumbers.js"></script>
|
||||
<script src="scripts/sunlight-plugin.menu.js"></script>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/jquery.scrollTo.js"></script>
|
||||
<script src="scripts/jquery.localScroll.js"></script>
|
||||
<script src="scripts/bootstrap-dropdown.js"></script>
|
||||
<script src="scripts/toc.js"></script>
|
||||
|
||||
|
||||
<script> Sunlight.highlightAll({lineNumbers:true, showMenu: true, enableDoclinks :true}); </script>
|
||||
|
||||
<script>
|
||||
$( function () {
|
||||
$( "#toc" ).toc( {
|
||||
anchorName : function(i, heading, prefix) {
|
||||
return $(heading).attr("id") || ( prefix + i );
|
||||
},
|
||||
selectors : "h1,h2,h3,h4",
|
||||
showAndHide : false,
|
||||
scrollTo : 60
|
||||
} );
|
||||
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
|
||||
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
|
||||
|
||||
} );
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
3957
docs/Phaser.Animation.html
Normal file
3957
docs/Phaser.Animation.html
Normal file
File diff suppressed because it is too large
Load Diff
3220
docs/Phaser.AnimationManager.html
Normal file
3220
docs/Phaser.AnimationManager.html
Normal file
File diff suppressed because it is too large
Load Diff
1635
docs/Phaser.AnimationParser.html
Normal file
1635
docs/Phaser.AnimationParser.html
Normal file
File diff suppressed because it is too large
Load Diff
2020
docs/Phaser.ArrayList.html
Normal file
2020
docs/Phaser.ArrayList.html
Normal file
File diff suppressed because it is too large
Load Diff
8387
docs/Phaser.BitmapData.html
Normal file
8387
docs/Phaser.BitmapData.html
Normal file
File diff suppressed because it is too large
Load Diff
3262
docs/Phaser.BitmapText.html
Normal file
3262
docs/Phaser.BitmapText.html
Normal file
File diff suppressed because it is too large
Load Diff
8424
docs/Phaser.Button.html
Normal file
8424
docs/Phaser.Button.html
Normal file
File diff suppressed because it is too large
Load Diff
11129
docs/Phaser.Cache.html
Normal file
11129
docs/Phaser.Cache.html
Normal file
File diff suppressed because it is too large
Load Diff
3830
docs/Phaser.Camera.html
Normal file
3830
docs/Phaser.Camera.html
Normal file
File diff suppressed because it is too large
Load Diff
2818
docs/Phaser.Canvas.html
Normal file
2818
docs/Phaser.Canvas.html
Normal file
File diff suppressed because it is too large
Load Diff
4551
docs/Phaser.Circle.html
Normal file
4551
docs/Phaser.Circle.html
Normal file
File diff suppressed because it is too large
Load Diff
7481
docs/Phaser.Color.html
Normal file
7481
docs/Phaser.Color.html
Normal file
File diff suppressed because it is too large
Load Diff
7090
docs/Phaser.Device.html
Normal file
7090
docs/Phaser.Device.html
Normal file
File diff suppressed because it is too large
Load Diff
1118
docs/Phaser.Easing.Back.html
Normal file
1118
docs/Phaser.Easing.Back.html
Normal file
File diff suppressed because it is too large
Load Diff
1118
docs/Phaser.Easing.Bounce.html
Normal file
1118
docs/Phaser.Easing.Bounce.html
Normal file
File diff suppressed because it is too large
Load Diff
1118
docs/Phaser.Easing.Circular.html
Normal file
1118
docs/Phaser.Easing.Circular.html
Normal file
File diff suppressed because it is too large
Load Diff
1118
docs/Phaser.Easing.Cubic.html
Normal file
1118
docs/Phaser.Easing.Cubic.html
Normal file
File diff suppressed because it is too large
Load Diff
1118
docs/Phaser.Easing.Elastic.html
Normal file
1118
docs/Phaser.Easing.Elastic.html
Normal file
File diff suppressed because it is too large
Load Diff
1118
docs/Phaser.Easing.Exponential.html
Normal file
1118
docs/Phaser.Easing.Exponential.html
Normal file
File diff suppressed because it is too large
Load Diff
836
docs/Phaser.Easing.Linear.html
Normal file
836
docs/Phaser.Easing.Linear.html
Normal file
@@ -0,0 +1,836 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Phaser Class: Linear</title>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
|
||||
|
||||
|
||||
<link type="text/css" rel="stylesheet" href="styles/site.cerulean.css">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="navbar navbar-fixed-top navbar-inverse">
|
||||
<div class="navbar-inner">
|
||||
<a class="brand" href="index.html">Phaser</a>
|
||||
<ul class="nav">
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-0">
|
||||
<a href="Phaser.html">Phaser</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Animation.html">Animation</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationManager.html">AnimationManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationParser.html">AnimationParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ArrayList.html">ArrayList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapData.html">BitmapData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapText.html">BitmapText</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Button.html">Button</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Cache.html">Cache</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Camera.html">Camera</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Canvas.html">Canvas</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Color.html">Color</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Device.html">Device</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Easing.html">Easing</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Back.html">Back</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Bounce.html">Bounce</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Circular.html">Circular</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Cubic.html">Cubic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Elastic.html">Elastic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Exponential.html">Exponential</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Linear.html">Linear</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quadratic.html">Quadratic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quartic.html">Quartic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quintic.html">Quintic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Sinusoidal.html">Sinusoidal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Ellipse.html">Ellipse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Events.html">Events</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Filter.html">Filter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Frame.html">Frame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.FrameData.html">FrameData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Game.html">Game</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectCreator.html">GameObjectCreator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Gamepad.html">Gamepad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GamepadButton.html">GamepadButton</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Graphics.html">Graphics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Group.html">Group</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Image.html">Image</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Input.html">Input</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.InputHandler.html">InputHandler</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Key.html">Key</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Keyboard.html">Keyboard</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Line.html">Line</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LinkedList.html">LinkedList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Loader.html">Loader</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LoaderParser.html">LoaderParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Math.html">Math</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Mouse.html">Mouse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.MSPointer.html">MSPointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Net.html">Net</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particle.html">Particle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particles.html">Particles</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Particles.Arcade.Emitter.html">Emitter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Physics.html">Physics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Arcade.html">Arcade</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Arcade.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Ninja.html">Ninja</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.AABB.html">AABB</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.P2.html">P2</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.BodyDebug.html">BodyDebug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.CollisionGroup.html">CollisionGroup</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.ContactMaterial.html">ContactMaterial</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.DistanceConstraint.html">DistanceConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.FixtureList.html">FixtureList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.GearConstraint.html">GearConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.InversePointProxy.html">InversePointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.LockConstraint.html">LockConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Material.html">Material</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PointProxy.html">PointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PrismaticConstraint.html">PrismaticConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.RevoluteConstraint.html">RevoluteConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Spring.html">Spring</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Plugin.html">Plugin</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.PluginManager.html">PluginManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Point.html">Point</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Pointer.html">Pointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Polygon.html">Polygon</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.QuadTree.html">QuadTree</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RandomDataGenerator.html">RandomDataGenerator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Rectangle.html">Rectangle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RenderTexture.html">RenderTexture</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RequestAnimationFrame.html">RequestAnimationFrame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RetroFont.html">RetroFont</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ScaleManager.html">ScaleManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Signal.html">Signal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SignalBinding.html">SignalBinding</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SinglePad.html">SinglePad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sound.html">Sound</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SoundManager.html">SoundManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sprite.html">Sprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SpriteBatch.html">SpriteBatch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Stage.html">Stage</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.State.html">State</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.StateManager.html">StateManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Text.html">Text</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tilemap.html">Tilemap</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapLayer.html">TilemapLayer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapParser.html">TilemapParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tileset.html">Tileset</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TileSprite.html">TileSprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Time.html">Time</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Timer.html">Timer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TimerEvent.html">TimerEvent</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Touch.html">Touch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tween.html">Tween</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TweenManager.html">TweenManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Utils.html">Utils</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Utils.Debug.html">Debug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.World.html">World</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row-fluid">
|
||||
|
||||
|
||||
<div class="span8">
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
|
||||
<h1 class="page-title">Class: Linear</h1>
|
||||
<section>
|
||||
|
||||
<header>
|
||||
<h2>
|
||||
<span class="ancestors"><a href="Phaser.html">Phaser</a><a href="Phaser.Easing.html">.Easing</a>.</span>
|
||||
|
||||
Linear
|
||||
</h2>
|
||||
|
||||
</header>
|
||||
|
||||
<article>
|
||||
<div class="container-overview">
|
||||
|
||||
|
||||
|
||||
|
||||
<dt>
|
||||
<h4 class="name" id="Linear"><span class="type-signature"></span>new Linear<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
<div class="description">
|
||||
<p>Linear easing.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-16">line 16</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 class="subsection-title">Methods</h3>
|
||||
|
||||
<dl>
|
||||
|
||||
<dt>
|
||||
<h4 class="name" id="In"><span class="type-signature"></span>In<span class="signature">(k)</span><span class="type-signature"> → {number}</span></h4>
|
||||
|
||||
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
<div class="description">
|
||||
<p>Ease-in.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Parameters:</h5>
|
||||
|
||||
|
||||
<table class="params table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>k</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">number</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>The value to be tweened.</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-23">line 23</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Returns:</h5>
|
||||
|
||||
|
||||
<div class="param-desc">
|
||||
<p>k^2.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>
|
||||
Type
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<span class="param-type">number</span>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<footer>
|
||||
|
||||
|
||||
<span class="copyright">
|
||||
Phaser Copyright © 2012-2014 Photon Storm Ltd.
|
||||
</span>
|
||||
<br />
|
||||
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
|
||||
on Tue May 20 2014 10:05:54 GMT+0100 (BST) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="span3">
|
||||
<div id="toc"></div>
|
||||
</div>
|
||||
|
||||
<br clear="both">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script src="scripts/sunlight.js"></script>
|
||||
<script src="scripts/sunlight.javascript.js"></script>
|
||||
<script src="scripts/sunlight-plugin.doclinks.js"></script>
|
||||
<script src="scripts/sunlight-plugin.linenumbers.js"></script>
|
||||
<script src="scripts/sunlight-plugin.menu.js"></script>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/jquery.scrollTo.js"></script>
|
||||
<script src="scripts/jquery.localScroll.js"></script>
|
||||
<script src="scripts/bootstrap-dropdown.js"></script>
|
||||
<script src="scripts/toc.js"></script>
|
||||
|
||||
|
||||
<script> Sunlight.highlightAll({lineNumbers:true, showMenu: true, enableDoclinks :true}); </script>
|
||||
|
||||
<script>
|
||||
$( function () {
|
||||
$( "#toc" ).toc( {
|
||||
anchorName : function(i, heading, prefix) {
|
||||
return $(heading).attr("id") || ( prefix + i );
|
||||
},
|
||||
selectors : "h1,h2,h3,h4",
|
||||
showAndHide : false,
|
||||
scrollTo : 60
|
||||
} );
|
||||
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
|
||||
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
|
||||
|
||||
} );
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
1118
docs/Phaser.Easing.Quadratic.html
Normal file
1118
docs/Phaser.Easing.Quadratic.html
Normal file
File diff suppressed because it is too large
Load Diff
1118
docs/Phaser.Easing.Quartic.html
Normal file
1118
docs/Phaser.Easing.Quartic.html
Normal file
File diff suppressed because it is too large
Load Diff
1118
docs/Phaser.Easing.Quintic.html
Normal file
1118
docs/Phaser.Easing.Quintic.html
Normal file
File diff suppressed because it is too large
Load Diff
1118
docs/Phaser.Easing.Sinusoidal.html
Normal file
1118
docs/Phaser.Easing.Sinusoidal.html
Normal file
File diff suppressed because it is too large
Load Diff
785
docs/Phaser.Easing.html
Normal file
785
docs/Phaser.Easing.html
Normal file
@@ -0,0 +1,785 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Phaser Class: Easing</title>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
|
||||
|
||||
|
||||
<link type="text/css" rel="stylesheet" href="styles/site.cerulean.css">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="navbar navbar-fixed-top navbar-inverse">
|
||||
<div class="navbar-inner">
|
||||
<a class="brand" href="index.html">Phaser</a>
|
||||
<ul class="nav">
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-0">
|
||||
<a href="Phaser.html">Phaser</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Animation.html">Animation</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationManager.html">AnimationManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationParser.html">AnimationParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ArrayList.html">ArrayList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapData.html">BitmapData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapText.html">BitmapText</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Button.html">Button</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Cache.html">Cache</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Camera.html">Camera</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Canvas.html">Canvas</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Color.html">Color</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Device.html">Device</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Easing.html">Easing</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Back.html">Back</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Bounce.html">Bounce</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Circular.html">Circular</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Cubic.html">Cubic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Elastic.html">Elastic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Exponential.html">Exponential</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Linear.html">Linear</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quadratic.html">Quadratic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quartic.html">Quartic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quintic.html">Quintic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Sinusoidal.html">Sinusoidal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Ellipse.html">Ellipse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Events.html">Events</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Filter.html">Filter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Frame.html">Frame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.FrameData.html">FrameData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Game.html">Game</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectCreator.html">GameObjectCreator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Gamepad.html">Gamepad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GamepadButton.html">GamepadButton</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Graphics.html">Graphics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Group.html">Group</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Image.html">Image</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Input.html">Input</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.InputHandler.html">InputHandler</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Key.html">Key</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Keyboard.html">Keyboard</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Line.html">Line</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LinkedList.html">LinkedList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Loader.html">Loader</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LoaderParser.html">LoaderParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Math.html">Math</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Mouse.html">Mouse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.MSPointer.html">MSPointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Net.html">Net</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particle.html">Particle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particles.html">Particles</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Particles.Arcade.Emitter.html">Emitter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Physics.html">Physics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Arcade.html">Arcade</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Arcade.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Ninja.html">Ninja</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.AABB.html">AABB</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.P2.html">P2</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.BodyDebug.html">BodyDebug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.CollisionGroup.html">CollisionGroup</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.ContactMaterial.html">ContactMaterial</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.DistanceConstraint.html">DistanceConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.FixtureList.html">FixtureList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.GearConstraint.html">GearConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.InversePointProxy.html">InversePointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.LockConstraint.html">LockConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Material.html">Material</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PointProxy.html">PointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PrismaticConstraint.html">PrismaticConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.RevoluteConstraint.html">RevoluteConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Spring.html">Spring</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Plugin.html">Plugin</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.PluginManager.html">PluginManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Point.html">Point</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Pointer.html">Pointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Polygon.html">Polygon</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.QuadTree.html">QuadTree</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RandomDataGenerator.html">RandomDataGenerator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Rectangle.html">Rectangle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RenderTexture.html">RenderTexture</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RequestAnimationFrame.html">RequestAnimationFrame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RetroFont.html">RetroFont</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ScaleManager.html">ScaleManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Signal.html">Signal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SignalBinding.html">SignalBinding</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SinglePad.html">SinglePad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sound.html">Sound</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SoundManager.html">SoundManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sprite.html">Sprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SpriteBatch.html">SpriteBatch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Stage.html">Stage</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.State.html">State</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.StateManager.html">StateManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Text.html">Text</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tilemap.html">Tilemap</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapLayer.html">TilemapLayer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapParser.html">TilemapParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tileset.html">Tileset</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TileSprite.html">TileSprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Time.html">Time</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Timer.html">Timer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TimerEvent.html">TimerEvent</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Touch.html">Touch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tween.html">Tween</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TweenManager.html">TweenManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Utils.html">Utils</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Utils.Debug.html">Debug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.World.html">World</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row-fluid">
|
||||
|
||||
|
||||
<div class="span8">
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
|
||||
<h1 class="page-title">Class: Easing</h1>
|
||||
<section>
|
||||
|
||||
<header>
|
||||
<h2>
|
||||
<span class="ancestors"><a href="Phaser.html">Phaser</a>.</span>
|
||||
|
||||
Easing
|
||||
</h2>
|
||||
|
||||
</header>
|
||||
|
||||
<article>
|
||||
<div class="container-overview">
|
||||
|
||||
|
||||
|
||||
|
||||
<dt>
|
||||
<h4 class="name" id="Easing"><span class="type-signature"></span>new Easing<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
<div class="description">
|
||||
<p>A collection of easing methods defining ease-in ease-out curves.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-5">line 5</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 class="subsection-title">Classes</h3>
|
||||
|
||||
<dl>
|
||||
|
||||
|
||||
<dt class="class-depth-2">
|
||||
<a href="Phaser.Easing.Back.html">Back</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
<dt class="class-depth-2">
|
||||
<a href="Phaser.Easing.Bounce.html">Bounce</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
<dt class="class-depth-2">
|
||||
<a href="Phaser.Easing.Circular.html">Circular</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
<dt class="class-depth-2">
|
||||
<a href="Phaser.Easing.Cubic.html">Cubic</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
<dt class="class-depth-2">
|
||||
<a href="Phaser.Easing.Elastic.html">Elastic</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
<dt class="class-depth-2">
|
||||
<a href="Phaser.Easing.Exponential.html">Exponential</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
<dt class="class-depth-2">
|
||||
<a href="Phaser.Easing.Linear.html">Linear</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
<dt class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quadratic.html">Quadratic</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
<dt class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quartic.html">Quartic</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
<dt class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quintic.html">Quintic</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
<dt class="class-depth-2">
|
||||
<a href="Phaser.Easing.Sinusoidal.html">Sinusoidal</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<footer>
|
||||
|
||||
|
||||
<span class="copyright">
|
||||
Phaser Copyright © 2012-2014 Photon Storm Ltd.
|
||||
</span>
|
||||
<br />
|
||||
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
|
||||
on Tue May 20 2014 10:05:53 GMT+0100 (BST) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="span3">
|
||||
<div id="toc"></div>
|
||||
</div>
|
||||
|
||||
<br clear="both">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script src="scripts/sunlight.js"></script>
|
||||
<script src="scripts/sunlight.javascript.js"></script>
|
||||
<script src="scripts/sunlight-plugin.doclinks.js"></script>
|
||||
<script src="scripts/sunlight-plugin.linenumbers.js"></script>
|
||||
<script src="scripts/sunlight-plugin.menu.js"></script>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/jquery.scrollTo.js"></script>
|
||||
<script src="scripts/jquery.localScroll.js"></script>
|
||||
<script src="scripts/bootstrap-dropdown.js"></script>
|
||||
<script src="scripts/toc.js"></script>
|
||||
|
||||
|
||||
<script> Sunlight.highlightAll({lineNumbers:true, showMenu: true, enableDoclinks :true}); </script>
|
||||
|
||||
<script>
|
||||
$( function () {
|
||||
$( "#toc" ).toc( {
|
||||
anchorName : function(i, heading, prefix) {
|
||||
return $(heading).attr("id") || ( prefix + i );
|
||||
},
|
||||
selectors : "h1,h2,h3,h4",
|
||||
showAndHide : false,
|
||||
scrollTo : 60
|
||||
} );
|
||||
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
|
||||
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
|
||||
|
||||
} );
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
2965
docs/Phaser.Ellipse.html
Normal file
2965
docs/Phaser.Ellipse.html
Normal file
File diff suppressed because it is too large
Load Diff
742
docs/Phaser.Events.html
Normal file
742
docs/Phaser.Events.html
Normal file
@@ -0,0 +1,742 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Phaser Class: Events</title>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
|
||||
|
||||
|
||||
<link type="text/css" rel="stylesheet" href="styles/site.cerulean.css">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="navbar navbar-fixed-top navbar-inverse">
|
||||
<div class="navbar-inner">
|
||||
<a class="brand" href="index.html">Phaser</a>
|
||||
<ul class="nav">
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-0">
|
||||
<a href="Phaser.html">Phaser</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Animation.html">Animation</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationManager.html">AnimationManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.AnimationParser.html">AnimationParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ArrayList.html">ArrayList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapData.html">BitmapData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.BitmapText.html">BitmapText</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Button.html">Button</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Cache.html">Cache</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Camera.html">Camera</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Canvas.html">Canvas</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Color.html">Color</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Device.html">Device</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Easing.html">Easing</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Back.html">Back</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Bounce.html">Bounce</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Circular.html">Circular</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Cubic.html">Cubic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Elastic.html">Elastic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Exponential.html">Exponential</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Linear.html">Linear</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quadratic.html">Quadratic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quartic.html">Quartic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Quintic.html">Quintic</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Easing.Sinusoidal.html">Sinusoidal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Ellipse.html">Ellipse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Events.html">Events</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Filter.html">Filter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Frame.html">Frame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.FrameData.html">FrameData</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Game.html">Game</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectCreator.html">GameObjectCreator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Gamepad.html">Gamepad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.GamepadButton.html">GamepadButton</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Graphics.html">Graphics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Group.html">Group</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Image.html">Image</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Input.html">Input</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.InputHandler.html">InputHandler</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Key.html">Key</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Keyboard.html">Keyboard</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Line.html">Line</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LinkedList.html">LinkedList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Loader.html">Loader</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.LoaderParser.html">LoaderParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Math.html">Math</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Mouse.html">Mouse</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.MSPointer.html">MSPointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Net.html">Net</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particle.html">Particle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Particles.html">Particles</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Particles.Arcade.Emitter.html">Emitter</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Physics.html">Physics</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Arcade.html">Arcade</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Arcade.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.Ninja.html">Ninja</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.AABB.html">AABB</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Circle.html">Circle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.Ninja.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Physics.P2.html">P2</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Body.html">Body</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.BodyDebug.html">BodyDebug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.CollisionGroup.html">CollisionGroup</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.ContactMaterial.html">ContactMaterial</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.DistanceConstraint.html">DistanceConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.FixtureList.html">FixtureList</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.GearConstraint.html">GearConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.InversePointProxy.html">InversePointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.LockConstraint.html">LockConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Material.html">Material</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PointProxy.html">PointProxy</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.PrismaticConstraint.html">PrismaticConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.RevoluteConstraint.html">RevoluteConstraint</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-3">
|
||||
<a href="Phaser.Physics.P2.Spring.html">Spring</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Plugin.html">Plugin</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.PluginManager.html">PluginManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Point.html">Point</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Pointer.html">Pointer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Polygon.html">Polygon</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.QuadTree.html">QuadTree</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RandomDataGenerator.html">RandomDataGenerator</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Rectangle.html">Rectangle</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RenderTexture.html">RenderTexture</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RequestAnimationFrame.html">RequestAnimationFrame</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.RetroFont.html">RetroFont</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.ScaleManager.html">ScaleManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Signal.html">Signal</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SignalBinding.html">SignalBinding</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SinglePad.html">SinglePad</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sound.html">Sound</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SoundManager.html">SoundManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Sprite.html">Sprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.SpriteBatch.html">SpriteBatch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Stage.html">Stage</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.State.html">State</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.StateManager.html">StateManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Text.html">Text</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tilemap.html">Tilemap</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapLayer.html">TilemapLayer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TilemapParser.html">TilemapParser</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tileset.html">Tileset</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TileSprite.html">TileSprite</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Time.html">Time</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Timer.html">Timer</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TimerEvent.html">TimerEvent</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Touch.html">Touch</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Tween.html">Tween</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.TweenManager.html">TweenManager</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.Utils.html">Utils</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-2">
|
||||
<a href="Phaser.Utils.Debug.html">Debug</a>
|
||||
</li>
|
||||
|
||||
<li class="class-depth-1">
|
||||
<a href="Phaser.World.html">World</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row-fluid">
|
||||
|
||||
|
||||
<div class="span8">
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
|
||||
<h1 class="page-title">Class: Events</h1>
|
||||
<section>
|
||||
|
||||
<header>
|
||||
<h2>
|
||||
<span class="ancestors"><a href="Phaser.html">Phaser</a>.</span>
|
||||
|
||||
Events
|
||||
</h2>
|
||||
|
||||
<div class="class-description"><p>The Events component is a collection of events fired by the parent game object.</p>
|
||||
<p>For example to tell when a Sprite has been added to a new group:</p>
|
||||
<p><code>sprite.events.onAddedToGroup.add(yourFunction, this);</code></p>
|
||||
<p>Where <code>yourFunction</code> is the function you want called when this event occurs.</p>
|
||||
<p>Note that the Input related events only exist if the Sprite has had <code>inputEnabled</code> set to <code>true</code>.</p></div>
|
||||
|
||||
</header>
|
||||
|
||||
<article>
|
||||
<div class="container-overview">
|
||||
|
||||
|
||||
|
||||
|
||||
<dt>
|
||||
<h4 class="name" id="Events"><span class="type-signature"></span>new Events<span class="signature">(sprite)</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Parameters:</h5>
|
||||
|
||||
|
||||
<table class="params table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>sprite</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type"><a href="Phaser.Sprite.html">Phaser.Sprite</a></span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>A reference to Description.</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Events.js.html">gameobjects/Events.js</a>, <a href="Events.js.html#sunlight-1-line-24">line 24</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<footer>
|
||||
|
||||
|
||||
<span class="copyright">
|
||||
Phaser Copyright © 2012-2014 Photon Storm Ltd.
|
||||
</span>
|
||||
<br />
|
||||
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
|
||||
on Tue May 20 2014 10:05:55 GMT+0100 (BST) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="span3">
|
||||
<div id="toc"></div>
|
||||
</div>
|
||||
|
||||
<br clear="both">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script src="scripts/sunlight.js"></script>
|
||||
<script src="scripts/sunlight.javascript.js"></script>
|
||||
<script src="scripts/sunlight-plugin.doclinks.js"></script>
|
||||
<script src="scripts/sunlight-plugin.linenumbers.js"></script>
|
||||
<script src="scripts/sunlight-plugin.menu.js"></script>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/jquery.scrollTo.js"></script>
|
||||
<script src="scripts/jquery.localScroll.js"></script>
|
||||
<script src="scripts/bootstrap-dropdown.js"></script>
|
||||
<script src="scripts/toc.js"></script>
|
||||
|
||||
|
||||
<script> Sunlight.highlightAll({lineNumbers:true, showMenu: true, enableDoclinks :true}); </script>
|
||||
|
||||
<script>
|
||||
$( function () {
|
||||
$( "#toc" ).toc( {
|
||||
anchorName : function(i, heading, prefix) {
|
||||
return $(heading).attr("id") || ( prefix + i );
|
||||
},
|
||||
selectors : "h1,h2,h3,h4",
|
||||
showAndHide : false,
|
||||
scrollTo : 60
|
||||
} );
|
||||
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
|
||||
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
|
||||
|
||||
} );
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
2027
docs/Phaser.Filter.html
Normal file
2027
docs/Phaser.Filter.html
Normal file
File diff suppressed because it is too large
Load Diff
3256
docs/Phaser.Frame.html
Normal file
3256
docs/Phaser.Frame.html
Normal file
File diff suppressed because it is too large
Load Diff
2050
docs/Phaser.FrameData.html
Normal file
2050
docs/Phaser.FrameData.html
Normal file
File diff suppressed because it is too large
Load Diff
6618
docs/Phaser.Game.html
Normal file
6618
docs/Phaser.Game.html
Normal file
File diff suppressed because it is too large
Load Diff
5733
docs/Phaser.GameObjectCreator.html
Normal file
5733
docs/Phaser.GameObjectCreator.html
Normal file
File diff suppressed because it is too large
Load Diff
6544
docs/Phaser.GameObjectFactory.html
Normal file
6544
docs/Phaser.GameObjectFactory.html
Normal file
File diff suppressed because it is too large
Load Diff
3374
docs/Phaser.Gamepad.html
Normal file
3374
docs/Phaser.Gamepad.html
Normal file
File diff suppressed because it is too large
Load Diff
2695
docs/Phaser.GamepadButton.html
Normal file
2695
docs/Phaser.GamepadButton.html
Normal file
File diff suppressed because it is too large
Load Diff
2632
docs/Phaser.Graphics.html
Normal file
2632
docs/Phaser.Graphics.html
Normal file
File diff suppressed because it is too large
Load Diff
12399
docs/Phaser.Group.html
Normal file
12399
docs/Phaser.Group.html
Normal file
File diff suppressed because it is too large
Load Diff
4435
docs/Phaser.Image.html
Normal file
4435
docs/Phaser.Image.html
Normal file
File diff suppressed because it is too large
Load Diff
8739
docs/Phaser.Input.html
Normal file
8739
docs/Phaser.Input.html
Normal file
File diff suppressed because it is too large
Load Diff
8290
docs/Phaser.InputHandler.html
Normal file
8290
docs/Phaser.InputHandler.html
Normal file
File diff suppressed because it is too large
Load Diff
3229
docs/Phaser.Key.html
Normal file
3229
docs/Phaser.Key.html
Normal file
File diff suppressed because it is too large
Load Diff
3425
docs/Phaser.Keyboard.html
Normal file
3425
docs/Phaser.Keyboard.html
Normal file
File diff suppressed because it is too large
Load Diff
4223
docs/Phaser.Line.html
Normal file
4223
docs/Phaser.Line.html
Normal file
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user