Browse files

Flocking repairs (WIP)

  • Loading branch information...
1 parent 32765b1 commit 25b7f1be1a900f94155fb5397a7eb257442e9f8b @izb committed May 28, 2013
Sorry, we could not display the entire diff because it was too big.
View
291 dist/doc/8way.Face8Way.html
@@ -1,155 +1,136 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="utf-8">
- <title>JSDoc: Class: Face8Way</title>
-
- <script src="scripts/prettify/prettify.js"> </script>
- <script src="scripts/prettify/lang-css.js"> </script>
- <!--[if lt IE 9]>
- <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
- <![endif]-->
- <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
- <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
-</head>
-
-<body>
-
-<div class="topdiv">
- <nav>
- <h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="occlusion-scanner.html">ai/occlusion-scanner</a></li><li><a href="pathfinder.html">ai/pathfinder</a></li><li><a href="proximity-tracker.html">ai/proximity-tracker</a></li><li><a href="tween.html">animate/tween</a></li><li><a href="keyboard.html">input/keyboard</a></li><li><a href="mouse.html">input/mouse</a></li><li><a href="staggered-isometric.html">map/staggered-isometric</a></li><li><a href="tile.html">map/tile</a></li><li><a href="push-cam.html">plugins/ai/camera/push-cam</a></li><li><a href="frame-phaser.html">plugins/ai/phasers/frame-phaser</a></li><li><a href="time-phaser.html">plugins/ai/phasers/time-phaser</a></li><li><a href="circle-trace.html">plugins/collision/sprite-with-map/circle-trace</a></li><li><a href="line-trace.html">plugins/collision/sprite-with-map/line-trace</a></li><li><a href="particles.html">plugins/fx/particles</a></li><li><a href="ground-sprites.html">plugins/layer/ground-sprites</a></li><li><a href="ui.html">plugins/layer/ui</a></li><li><a href="8way.html">plugins/sprite/8way</a></li><li><a href="animate.html">plugins/sprite/animate</a></li><li><a href="apply-velocity.html">plugins/sprite/apply-velocity</a></li><li><a href="bounce.html">plugins/sprite/bounce</a></li><li><a href="flock.html">plugins/sprite/flock</a></li><li><a href="follow-mouse.html">plugins/sprite/follow-mouse</a></li><li><a href="track.html">plugins/sprite/track</a></li><li><a href="module-snaps.html">snaps</a></li><li><a href="composite.html">sprites/composite</a></li><li><a href="sprite.html">sprites/sprite</a></li><li><a href="bitmap.html">util/bitmap</a></li><li><a href="js.html">util/js</a></li><li><a href="minheap.html">util/minheap</a></li><li><a href="preload.html">util/preload</a></li><li><a href="rnd.html">util/rnd</a></li><li><a href="slowqueue.html">util/slowqueue</a></li><li><a href="stats.html">util/stats</a></li><li><a href="uid.html">util/uid</a></li><li><a href="url.html">util/url</a></li></ul><h3>Classes</h3><ul><li><a href="occlusion-scanner.OcclusionScanner.html">OcclusionScanner</a></li><li><a href="pathfinder.PathFinder.html">PathFinder</a></li><li><a href="proximity-tracker.ProximityTracker.html">ProximityTracker</a></li><li><a href="keyboard.Keyboard.html">Keyboard</a></li><li><a href="mouse.Mouse.html">Mouse</a></li><li><a href="staggered-isometric.StaggeredIsometric.html">StaggeredIsometric</a></li><li><a href="tile.Tile.html">Tile</a></li><li><a href="push-cam.PushCam.html">PushCam</a></li><li><a href="frame-phaser.FramePhaser.html">FramePhaser</a></li><li><a href="time-phaser.TimePhaser.html">TimePhaser</a></li><li><a href="circle-trace.CircleTrace.html">CircleTrace</a></li><li><a href="line-trace.LineTrace.html">LineTrace</a></li><li><a href="particles.Particles.html">Particles</a></li><li><a href="ground-sprites.GroundSprites.html">GroundSprites</a></li><li><a href="ui.UI.html">UI</a></li><li><a href="8way.Face8Way.html">Face8Way</a></li><li><a href="animate.Animate.html">Animate</a></li><li><a href="apply-velocity.ApplyVelocity.html">ApplyVelocity</a></li><li><a href="bounce.Bounce.html">Bounce</a></li><li><a href="flock.Flock.html">Flock</a></li><li><a href="follow-mouse.FollowMouse.html">FollowMouse</a></li><li><a href="track.Track.html">Track</a></li><li><a href="module-snaps.Snaps.html">Snaps</a></li><li><a href="composite.Composite.html">Composite</a></li><li><a href="sprite.Sprite.html">Sprite</a></li><li><a href="minheap.MinHeap.html">MinHeap</a></li><li><a href="preload.Preloader.html">Preloader</a></li><li><a href="slowqueue.SlowQueue.html">SlowQueue</a></li><li><a href="stats.Stats.html">Stats</a></li></ul>
- </nav><div id="main">
-
- <h1 class="page-title">Class: Face8Way</h1>
-
-
-
-
-
-<section>
-
-<header>
- <h2>
- <span class="ancestors"><a href="8way.html">plugins/sprite/8way</a>.</span>
-
- Face8Way
- </h2>
-
-</header>
-
-<article>
- <div class="container-overview">
-
-
-
-
-<dt>
- <h4 class="name" id="Face8Way"><span class="type-signature"></span>new Face8Way<span class="signature">()</span><span class="type-signature"></span></h4>
-
-
-</dt>
-<dd>
-
-
- <div class="description">
- A sprite updater that sets the sprite's state extension to a compass direction
-('n', 'ne', 'e', 'se'...)
-based on the direction values in the sprite. Direction updates automatically when the sprite
-moves but can be overridden with <a href="sprite.Sprite.html#setDirection"><code>setDirection</code></a>.
-The compass direction takes into account the isometric projection.
-<p>
-Note that this should not be constructed directly, but rather via the updates or commit
-property in your spawnSprite data, e.g. <code>updates:[{name:'8way'}]</code>.
-<p>
-See The <code>opts<code> parameter in the <a href="sprite.Sprite.html"><code>Sprite constructor</code></a>
-<p>
-Alongside the name, you can pass the following options
-<dl>
- <dt>anti_jitter</dt><dd>Creates a buffer between direction changes. Waits a certain number
- of frames before changing the direction. The direction only changes if the new direction
- is not the current direction for a set number of frames. Defaults to 0.</dd>
- <dt>bounce_base</dt><dd>Where is the 'floor'? E.g. a bounce_base of 25 and an bounce height
- of 100 will bounce up 100px on top of the floor level of 25. The height value will
- be 125 at its apex, midway through the state animation.</dd>
-</dl>
- </div>
-
-
-
-
-
-
-
-
-
-<dl class="details">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-</dl>
-
-
-
-
-
-
-
-
-
-</dd>
-
-
- </div>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-</article>
-
-</section>
-
-
-
-
- </div>
-</div>
-
-<br clear="both">
-
-<script> prettyPrint(); </script>
-</body>
-</html>
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>JSDoc: Class: Face8Way</title>
+
+ <script src="scripts/prettify/prettify.js"> </script>
+ <script src="scripts/prettify/lang-css.js"> </script>
+ <!--[if lt IE 9]>
+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
+ <![endif]-->
+ <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
+ <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
+</head>
+
+<body>
+
+<div class="topdiv">
+ <nav>
+ <h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="occlusion-scanner.html">ai/occlusion-scanner</a></li><li><a href="pathfinder.html">ai/pathfinder</a></li><li><a href="proximity-tracker.html">ai/proximity-tracker</a></li><li><a href="tween.html">animate/tween</a></li><li><a href="keyboard.html">input/keyboard</a></li><li><a href="mouse.html">input/mouse</a></li><li><a href="staggered-isometric.html">map/staggered-isometric</a></li><li><a href="tile.html">map/tile</a></li><li><a href="push-cam.html">plugins/ai/camera/push-cam</a></li><li><a href="frame-phaser.html">plugins/ai/phasers/frame-phaser</a></li><li><a href="time-phaser.html">plugins/ai/phasers/time-phaser</a></li><li><a href="circle-trace.html">plugins/collision/sprite-with-map/circle-trace</a></li><li><a href="line-trace.html">plugins/collision/sprite-with-map/line-trace</a></li><li><a href="particles.html">plugins/fx/particles</a></li><li><a href="ground-sprites.html">plugins/layer/ground-sprites</a></li><li><a href="ui.html">plugins/layer/ui</a></li><li><a href="8way.html">plugins/sprite/8way</a></li><li><a href="animate.html">plugins/sprite/animate</a></li><li><a href="apply-velocity.html">plugins/sprite/apply-velocity</a></li><li><a href="bounce.html">plugins/sprite/bounce</a></li><li><a href="flock.html">plugins/sprite/flock</a></li><li><a href="follow-mouse.html">plugins/sprite/follow-mouse</a></li><li><a href="track.html">plugins/sprite/track</a></li><li><a href="module-snaps.html">snaps</a></li><li><a href="composite.html">sprites/composite</a></li><li><a href="sprite.html">sprites/sprite</a></li><li><a href="bitmap.html">util/bitmap</a></li><li><a href="js.html">util/js</a></li><li><a href="minheap.html">util/minheap</a></li><li><a href="preload.html">util/preload</a></li><li><a href="rnd.html">util/rnd</a></li><li><a href="slowqueue.html">util/slowqueue</a></li><li><a href="stats.html">util/stats</a></li><li><a href="uid.html">util/uid</a></li><li><a href="url.html">util/url</a></li></ul><h3>Classes</h3><ul><li><a href="occlusion-scanner.OcclusionScanner.html">OcclusionScanner</a></li><li><a href="pathfinder.PathFinder.html">PathFinder</a></li><li><a href="proximity-tracker.ProximityTracker.html">ProximityTracker</a></li><li><a href="keyboard.Keyboard.html">Keyboard</a></li><li><a href="mouse.Mouse.html">Mouse</a></li><li><a href="staggered-isometric.StaggeredIsometric.html">StaggeredIsometric</a></li><li><a href="tile.Tile.html">Tile</a></li><li><a href="push-cam.PushCam.html">PushCam</a></li><li><a href="frame-phaser.FramePhaser.html">FramePhaser</a></li><li><a href="time-phaser.TimePhaser.html">TimePhaser</a></li><li><a href="circle-trace.CircleTrace.html">CircleTrace</a></li><li><a href="line-trace.LineTrace.html">LineTrace</a></li><li><a href="particles.Particles.html">Particles</a></li><li><a href="ground-sprites.GroundSprites.html">GroundSprites</a></li><li><a href="ui.UI.html">UI</a></li><li><a href="8way.Face8Way.html">Face8Way</a></li><li><a href="animate.Animate.html">Animate</a></li><li><a href="apply-velocity.ApplyVelocity.html">ApplyVelocity</a></li><li><a href="bounce.Bounce.html">Bounce</a></li><li><a href="flock.Flock.html">Flock</a></li><li><a href="follow-mouse.FollowMouse.html">FollowMouse</a></li><li><a href="track.Track.html">Track</a></li><li><a href="module-snaps.Snaps.html">Snaps</a></li><li><a href="composite.Composite.html">Composite</a></li><li><a href="sprite.Sprite.html">Sprite</a></li><li><a href="minheap.MinHeap.html">MinHeap</a></li><li><a href="preload.Preloader.html">Preloader</a></li><li><a href="slowqueue.SlowQueue.html">SlowQueue</a></li><li><a href="stats.Stats.html">Stats</a></li></ul>
+ </nav><div id="main">
+
+ <h1 class="page-title">Class: Face8Way</h1>
+
+
+
+
+
+<section>
+
+<header>
+ <h2>
+ <span class="ancestors"><a href="8way.html">plugins/sprite/8way</a>.</span>
+
+ Face8Way
+ </h2>
+
+</header>
+
+<article>
+ <div class="container-overview">
+
+
+
+
+<dt>
+ <h4 class="name" id="Face8Way"><span class="type-signature"></span>new Face8Way<span class="signature">()</span><span class="type-signature"></span></h4>
+
+
+</dt>
+<dd>
+
+
+ <div class="description">
+ A sprite updater that sets the sprite's state extension to a compass direction
+('n', 'ne', 'e', 'se'...)
+based on the direction values in the sprite. Direction updates automatically when the sprite
+moves but can be overridden with <a href="sprite.Sprite.html#setDirection"><code>setDirection</code></a>.
+The compass direction takes into account the isometric projection.
+<p>
+Note that this should not be constructed directly, but rather via the updates or commit
+property in your spawnSprite data, e.g. <code>updates:[{name:'8way'}]</code>.
+<p>
+See The <code>opts<code> parameter in the <a href="sprite.Sprite.html"><code>Sprite constructor</code></a>
+<p>
+Alongside the name, you can pass the following options
+<dl>
+ <dt>anti_jitter</dt><dd>Creates a buffer between direction changes. Waits a certain number
+ of frames before changing the direction. The direction only changes if the new direction
+ is not the current direction for a set number of frames. Defaults to 0.</dd>
+ <dt>bounce_base</dt><dd>Where is the 'floor'? E.g. a bounce_base of 25 and an bounce height
+ of 100 will bounce up 100px on top of the floor level of 25. The height value will
+ be 125 at its apex, midway through the state animation.</dd>
+</dl>
+ </div>
+
+
+
+
+
+
+
+
+
+<dl class="details">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+</dd>
+
+
+ </div>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
View
298 dist/doc/animate.Animate.html
@@ -1,162 +1,136 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="utf-8">
- <title>JSDoc: Class: Animate</title>
-
- <script src="scripts/prettify/prettify.js"> </script>
- <script src="scripts/prettify/lang-css.js"> </script>
- <!--[if lt IE 9]>
- <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
- <![endif]-->
- <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
- <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
-</head>
-
-<body>
-
-<div class="topdiv">
- <nav>
- <h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="occlusion-scanner.html">ai/occlusion-scanner</a></li><li><a href="pathfinder.html">ai/pathfinder</a></li><li><a href="proximity-tracker.html">ai/proximity-tracker</a></li><li><a href="tween.html">animate/tween</a></li><li><a href="keyboard.html">input/keyboard</a></li><li><a href="mouse.html">input/mouse</a></li><li><a href="staggered-isometric.html">map/staggered-isometric</a></li><li><a href="tile.html">map/tile</a></li><li><a href="push-cam.html">plugins/ai/camera/push-cam</a></li><li><a href="frame-phaser.html">plugins/ai/phasers/frame-phaser</a></li><li><a href="time-phaser.html">plugins/ai/phasers/time-phaser</a></li><li><a href="circle-trace.html">plugins/collision/sprite-with-map/circle-trace</a></li><li><a href="line-trace.html">plugins/collision/sprite-with-map/line-trace</a></li><li><a href="particles.html">plugins/fx/particles</a></li><li><a href="ground-sprites.html">plugins/layer/ground-sprites</a></li><li><a href="ui.html">plugins/layer/ui</a></li><li><a href="8way.html">plugins/sprite/8way</a></li><li><a href="animate.html">plugins/sprite/animate</a></li><li><a href="apply-velocity.html">plugins/sprite/apply-velocity</a></li><li><a href="bounce.html">plugins/sprite/bounce</a></li><li><a href="flock.html">plugins/sprite/flock</a></li><li><a href="follow-mouse.html">plugins/sprite/follow-mouse</a></li><li><a href="track.html">plugins/sprite/track</a></li><li><a href="module-snaps.html">snaps</a></li><li><a href="composite.html">sprites/composite</a></li><li><a href="sprite.html">sprites/sprite</a></li><li><a href="bitmap.html">util/bitmap</a></li><li><a href="js.html">util/js</a></li><li><a href="minheap.html">util/minheap</a></li><li><a href="preload.html">util/preload</a></li><li><a href="rnd.html">util/rnd</a></li><li><a href="slowqueue.html">util/slowqueue</a></li><li><a href="stats.html">util/stats</a></li><li><a href="uid.html">util/uid</a></li><li><a href="url.html">util/url</a></li></ul><h3>Classes</h3><ul><li><a href="occlusion-scanner.OcclusionScanner.html">OcclusionScanner</a></li><li><a href="pathfinder.PathFinder.html">PathFinder</a></li><li><a href="proximity-tracker.ProximityTracker.html">ProximityTracker</a></li><li><a href="keyboard.Keyboard.html">Keyboard</a></li><li><a href="mouse.Mouse.html">Mouse</a></li><li><a href="staggered-isometric.StaggeredIsometric.html">StaggeredIsometric</a></li><li><a href="tile.Tile.html">Tile</a></li><li><a href="push-cam.PushCam.html">PushCam</a></li><li><a href="frame-phaser.FramePhaser.html">FramePhaser</a></li><li><a href="time-phaser.TimePhaser.html">TimePhaser</a></li><li><a href="circle-trace.CircleTrace.html">CircleTrace</a></li><li><a href="line-trace.LineTrace.html">LineTrace</a></li><li><a href="particles.Particles.html">Particles</a></li><li><a href="ground-sprites.GroundSprites.html">GroundSprites</a></li><li><a href="ui.UI.html">UI</a></li><li><a href="8way.Face8Way.html">Face8Way</a></li><li><a href="animate.Animate.html">Animate</a></li><li><a href="apply-velocity.ApplyVelocity.html">ApplyVelocity</a></li><li><a href="bounce.Bounce.html">Bounce</a></li><li><a href="flock.Flock.html">Flock</a></li><li><a href="follow-mouse.FollowMouse.html">FollowMouse</a></li><li><a href="track.Track.html">Track</a></li><li><a href="module-snaps.Snaps.html">Snaps</a></li><li><a href="composite.Composite.html">Composite</a></li><li><a href="sprite.Sprite.html">Sprite</a></li><li><a href="minheap.MinHeap.html">MinHeap</a></li><li><a href="preload.Preloader.html">Preloader</a></li><li><a href="slowqueue.SlowQueue.html">SlowQueue</a></li><li><a href="stats.Stats.html">Stats</a></li></ul>
- </nav><div id="main">
-
- <h1 class="page-title">Class: Animate</h1>
-
-
-
-
-
-<section>
-
-<header>
- <h2>
- <span class="ancestors"><a href="animate.html">plugins/sprite/animate</a>.</span>
-
- Animate
- </h2>
-
-</header>
-
-<article>
- <div class="container-overview">
-
-
-
-
-<dt>
- <h4 class="name" id="Animate"><span class="type-signature"></span>new Animate<span class="signature">()</span><span class="type-signature"></span></h4>
-
-
-</dt>
-<dd>
-
-
- <div class="description">
- A sprite updater that animates one or more properties on the sprite. Properties are modified
-directly, so handle with care. Be aware that property updates on things such as position will bypass
-the automatic direction setting you'd get if you had called <a href="sprite.Sprite.html#move"><code>move</code></a>
-on your sprite.
-<p>
-Note that this should not be constructed directly, but rather via the updates or commit
-property in your spawnSprite data, e.g. <code>updates:[{name:'animate'}]</code>.
-<p>
-See The <code>opts</code> parameter in the <a href="sprite.Sprite.html"><code>Sprite constructor</code></a>
-<p>
-Alongside the name, you can pass the following options
-<dl>
- <dt>tween</dt><dd>The name of the tween function. See the tweens module for a full list of options.</dd>
- <dt>props</dt><dd>An object describing the properties to adjust. Values are relative adjustments, not
- absolute values. E.g.
- <pre>
- props: {
- x: 20,
- y: 30
- }
- </pre>
- Will increase x by 20 and y by 30.
- </dd>
- <dt>duration</dt><dd>The duration of the tween in milliseconds. If omitted, the duration will
- be automatically calculated from the maxloops lifespan of the sprite. The tweener assumes
- from this that the state will not change.</dd>
-</dl>
- </div>
-
-
-
-
-
-
-
-
-
-<dl class="details">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-</dl>
-
-
-
-
-
-
-
-
-
-</dd>
-
-
- </div>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-</article>
-
-</section>
-
-
-
-
- </div>
-</div>
-
-<br clear="both">
-
-<script> prettyPrint(); </script>
-</body>
-</html>
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>JSDoc: Class: Animate</title>
+
+ <script src="scripts/prettify/prettify.js"> </script>
+ <script src="scripts/prettify/lang-css.js"> </script>
+ <!--[if lt IE 9]>
+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
+ <![endif]-->
+ <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
+ <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
+</head>
+
+<body>
+
+<div class="topdiv">
+ <nav>
+ <h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="occlusion-scanner.html">ai/occlusion-scanner</a></li><li><a href="pathfinder.html">ai/pathfinder</a></li><li><a href="proximity-tracker.html">ai/proximity-tracker</a></li><li><a href="tween.html">animate/tween</a></li><li><a href="keyboard.html">input/keyboard</a></li><li><a href="mouse.html">input/mouse</a></li><li><a href="staggered-isometric.html">map/staggered-isometric</a></li><li><a href="tile.html">map/tile</a></li><li><a href="push-cam.html">plugins/ai/camera/push-cam</a></li><li><a href="frame-phaser.html">plugins/ai/phasers/frame-phaser</a></li><li><a href="time-phaser.html">plugins/ai/phasers/time-phaser</a></li><li><a href="circle-trace.html">plugins/collision/sprite-with-map/circle-trace</a></li><li><a href="line-trace.html">plugins/collision/sprite-with-map/line-trace</a></li><li><a href="particles.html">plugins/fx/particles</a></li><li><a href="ground-sprites.html">plugins/layer/ground-sprites</a></li><li><a href="ui.html">plugins/layer/ui</a></li><li><a href="8way.html">plugins/sprite/8way</a></li><li><a href="animate.html">plugins/sprite/animate</a></li><li><a href="apply-velocity.html">plugins/sprite/apply-velocity</a></li><li><a href="bounce.html">plugins/sprite/bounce</a></li><li><a href="flock.html">plugins/sprite/flock</a></li><li><a href="follow-mouse.html">plugins/sprite/follow-mouse</a></li><li><a href="track.html">plugins/sprite/track</a></li><li><a href="module-snaps.html">snaps</a></li><li><a href="composite.html">sprites/composite</a></li><li><a href="sprite.html">sprites/sprite</a></li><li><a href="bitmap.html">util/bitmap</a></li><li><a href="js.html">util/js</a></li><li><a href="minheap.html">util/minheap</a></li><li><a href="preload.html">util/preload</a></li><li><a href="rnd.html">util/rnd</a></li><li><a href="slowqueue.html">util/slowqueue</a></li><li><a href="stats.html">util/stats</a></li><li><a href="uid.html">util/uid</a></li><li><a href="url.html">util/url</a></li></ul><h3>Classes</h3><ul><li><a href="occlusion-scanner.OcclusionScanner.html">OcclusionScanner</a></li><li><a href="pathfinder.PathFinder.html">PathFinder</a></li><li><a href="proximity-tracker.ProximityTracker.html">ProximityTracker</a></li><li><a href="keyboard.Keyboard.html">Keyboard</a></li><li><a href="mouse.Mouse.html">Mouse</a></li><li><a href="staggered-isometric.StaggeredIsometric.html">StaggeredIsometric</a></li><li><a href="tile.Tile.html">Tile</a></li><li><a href="push-cam.PushCam.html">PushCam</a></li><li><a href="frame-phaser.FramePhaser.html">FramePhaser</a></li><li><a href="time-phaser.TimePhaser.html">TimePhaser</a></li><li><a href="circle-trace.CircleTrace.html">CircleTrace</a></li><li><a href="line-trace.LineTrace.html">LineTrace</a></li><li><a href="particles.Particles.html">Particles</a></li><li><a href="ground-sprites.GroundSprites.html">GroundSprites</a></li><li><a href="ui.UI.html">UI</a></li><li><a href="8way.Face8Way.html">Face8Way</a></li><li><a href="animate.Animate.html">Animate</a></li><li><a href="apply-velocity.ApplyVelocity.html">ApplyVelocity</a></li><li><a href="bounce.Bounce.html">Bounce</a></li><li><a href="flock.Flock.html">Flock</a></li><li><a href="follow-mouse.FollowMouse.html">FollowMouse</a></li><li><a href="track.Track.html">Track</a></li><li><a href="module-snaps.Snaps.html">Snaps</a></li><li><a href="composite.Composite.html">Composite</a></li><li><a href="sprite.Sprite.html">Sprite</a></li><li><a href="minheap.MinHeap.html">MinHeap</a></li><li><a href="preload.Preloader.html">Preloader</a></li><li><a href="slowqueue.SlowQueue.html">SlowQueue</a></li><li><a href="stats.Stats.html">Stats</a></li></ul>
+ </nav><div id="main">
+
+ <h1 class="page-title">Class: Animate</h1>
+
+
+
+
+
+<section>
+
+<header>
+ <h2>
+ <span class="ancestors"><a href="animate.html">plugins/sprite/animate</a>.</span>
+
+ Animate
+ </h2>
+
+</header>
+
+<article>
+ <div class="container-overview">
+
+
+
+
+<dt>
+ <h4 class="name" id="Animate"><span class="type-signature"></span>new Animate<span class="signature">()</span><span class="type-signature"></span></h4>
+
+
+</dt>
+<dd>
+
+
+ <div class="description">
+ A sprite updater that animates one or more properties on the sprite. Properties are modified
+directly, so handle with care. Be aware that property updates on things such as position will bypass
+the automatic direction setting you'd get if you had called <a href="sprite.Sprite.html#move"><code>move</code></a>
+on your sprite.
+<p>
+Note that this should not be constructed directly, but rather via the updates or commit
+property in your spawnSprite data, e.g. <code>updates:[{name:'animate'}]</code>.
+<p>
+See The <code>opts</code> parameter in the <a href="sprite.Sprite.html"><code>Sprite constructor</code></a>
+<p>
+Alongside the name, you can pass the following options
+<dl>
+ <dt>tween</dt><dd>The name of the tween function. See the tweens module for a full list of options.</dd>
+ <dt>props</dt><dd>An object describing the properties to adjust. Values are relative adjustments, not
+ absolute values. E.g.
+ <pre>
+ props: {
+ x: 20,
+ y: 30
+ }
+ </pre>
+ Will increase x by 20 and y by 30.
+ </dd>
+ <dt>duration</dt><dd>The duration of the tween in milliseconds. If omitted, the duration will
+ be automatically calculated from the maxloops lifespan of the sprite. The tweener assumes
+ from this that the state will not change.</dd>
+</dl>
+ </div>
+
+
+
+
+
+
+
+
+
+<dl class="details">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+</dd>
+
+
+ </div>
+
+
+
+
+
+
+
View
290 dist/doc/apply-velocity.ApplyVelocity.html
@@ -1,154 +1,136 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="utf-8">
- <title>JSDoc: Class: ApplyVelocity</title>
-
- <script src="scripts/prettify/prettify.js"> </script>
- <script src="scripts/prettify/lang-css.js"> </script>
- <!--[if lt IE 9]>
- <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
- <![endif]-->
- <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
- <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
-</head>
-
-<body>
-
-<div class="topdiv">
- <nav>
- <h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="occlusion-scanner.html">ai/occlusion-scanner</a></li><li><a href="pathfinder.html">ai/pathfinder</a></li><li><a href="proximity-tracker.html">ai/proximity-tracker</a></li><li><a href="tween.html">animate/tween</a></li><li><a href="keyboard.html">input/keyboard</a></li><li><a href="mouse.html">input/mouse</a></li><li><a href="staggered-isometric.html">map/staggered-isometric</a></li><li><a href="tile.html">map/tile</a></li><li><a href="push-cam.html">plugins/ai/camera/push-cam</a></li><li><a href="frame-phaser.html">plugins/ai/phasers/frame-phaser</a></li><li><a href="time-phaser.html">plugins/ai/phasers/time-phaser</a></li><li><a href="circle-trace.html">plugins/collision/sprite-with-map/circle-trace</a></li><li><a href="line-trace.html">plugins/collision/sprite-with-map/line-trace</a></li><li><a href="particles.html">plugins/fx/particles</a></li><li><a href="ground-sprites.html">plugins/layer/ground-sprites</a></li><li><a href="ui.html">plugins/layer/ui</a></li><li><a href="8way.html">plugins/sprite/8way</a></li><li><a href="animate.html">plugins/sprite/animate</a></li><li><a href="apply-velocity.html">plugins/sprite/apply-velocity</a></li><li><a href="bounce.html">plugins/sprite/bounce</a></li><li><a href="flock.html">plugins/sprite/flock</a></li><li><a href="follow-mouse.html">plugins/sprite/follow-mouse</a></li><li><a href="track.html">plugins/sprite/track</a></li><li><a href="module-snaps.html">snaps</a></li><li><a href="composite.html">sprites/composite</a></li><li><a href="sprite.html">sprites/sprite</a></li><li><a href="bitmap.html">util/bitmap</a></li><li><a href="js.html">util/js</a></li><li><a href="minheap.html">util/minheap</a></li><li><a href="preload.html">util/preload</a></li><li><a href="rnd.html">util/rnd</a></li><li><a href="slowqueue.html">util/slowqueue</a></li><li><a href="stats.html">util/stats</a></li><li><a href="uid.html">util/uid</a></li><li><a href="url.html">util/url</a></li></ul><h3>Classes</h3><ul><li><a href="occlusion-scanner.OcclusionScanner.html">OcclusionScanner</a></li><li><a href="pathfinder.PathFinder.html">PathFinder</a></li><li><a href="proximity-tracker.ProximityTracker.html">ProximityTracker</a></li><li><a href="keyboard.Keyboard.html">Keyboard</a></li><li><a href="mouse.Mouse.html">Mouse</a></li><li><a href="staggered-isometric.StaggeredIsometric.html">StaggeredIsometric</a></li><li><a href="tile.Tile.html">Tile</a></li><li><a href="push-cam.PushCam.html">PushCam</a></li><li><a href="frame-phaser.FramePhaser.html">FramePhaser</a></li><li><a href="time-phaser.TimePhaser.html">TimePhaser</a></li><li><a href="circle-trace.CircleTrace.html">CircleTrace</a></li><li><a href="line-trace.LineTrace.html">LineTrace</a></li><li><a href="particles.Particles.html">Particles</a></li><li><a href="ground-sprites.GroundSprites.html">GroundSprites</a></li><li><a href="ui.UI.html">UI</a></li><li><a href="8way.Face8Way.html">Face8Way</a></li><li><a href="animate.Animate.html">Animate</a></li><li><a href="apply-velocity.ApplyVelocity.html">ApplyVelocity</a></li><li><a href="bounce.Bounce.html">Bounce</a></li><li><a href="flock.Flock.html">Flock</a></li><li><a href="follow-mouse.FollowMouse.html">FollowMouse</a></li><li><a href="track.Track.html">Track</a></li><li><a href="module-snaps.Snaps.html">Snaps</a></li><li><a href="composite.Composite.html">Composite</a></li><li><a href="sprite.Sprite.html">Sprite</a></li><li><a href="minheap.MinHeap.html">MinHeap</a></li><li><a href="preload.Preloader.html">Preloader</a></li><li><a href="slowqueue.SlowQueue.html">SlowQueue</a></li><li><a href="stats.Stats.html">Stats</a></li></ul>
- </nav><div id="main">
-
- <h1 class="page-title">Class: ApplyVelocity</h1>
-
-
-
-
-
-<section>
-
-<header>
- <h2>
- <span class="ancestors"><a href="apply-velocity.html">plugins/sprite/apply-velocity</a>.</span>
-
- ApplyVelocity
- </h2>
-
-</header>
-
-<article>
- <div class="container-overview">
-
-
-
-
-<dt>
- <h4 class="name" id="ApplyVelocity"><span class="type-signature"></span>new ApplyVelocity<span class="signature">()</span><span class="type-signature"></span></h4>
-
-
-</dt>
-<dd>
-
-
- <div class="description">
- A sprite updater that simply takes the velocityx and velocityy properties on the sprite and
-applies it to the position via <a href="sprite.Sprite.html#move"><code>move</code></a>. This is useful
-in situations where another plugin is updating valocities but those velocities depend upon
-the momentary positions of sprites. E.g. you have a flock update which updates velocity.
-In that case you would have this plugin as a commit to apply the velocity calculated by flock.
-<p>
-Snaps runs all sprite updates first, then runs all sprite commits.
-<p>
-Note that this should not be constructed directly, but rather via the updates or commit
-property in your spawnSprite data, e.g. <code>commit:[{name:'apply-velocity'}]</code>.
-<p>
-See The <code>opts<code> parameter in the <a href="sprite.Sprite.html"><code>Sprite constructor</code></a>
-<p>
-Alongside the name, you can pass the following options
-<dl>
- <dt>on_collision</dt><dd>An optional function that is called if the sprite could not
- be moved to it's target position due to collision. This function will be called with the
- sprite as the function context.</dd>
-</dl>
- </div>
-
-
-
-
-
-
-
-
-
-<dl class="details">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-</dl>
-
-
-
-
-
-
-
-
-
-</dd>
-
-
- </div>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-</article>
-
-</section>
-
-
-
-
- </div>
-</div>
-
-<br clear="both">
-
-<script> prettyPrint(); </script>
-</body>
-</html>
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>JSDoc: Class: ApplyVelocity</title>
+
+ <script src="scripts/prettify/prettify.js"> </script>
+ <script src="scripts/prettify/lang-css.js"> </script>
+ <!--[if lt IE 9]>
+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
+ <![endif]-->
+ <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
+ <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
+</head>
+
+<body>
+
+<div class="topdiv">
+ <nav>
+ <h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="occlusion-scanner.html">ai/occlusion-scanner</a></li><li><a href="pathfinder.html">ai/pathfinder</a></li><li><a href="proximity-tracker.html">ai/proximity-tracker</a></li><li><a href="tween.html">animate/tween</a></li><li><a href="keyboard.html">input/keyboard</a></li><li><a href="mouse.html">input/mouse</a></li><li><a href="staggered-isometric.html">map/staggered-isometric</a></li><li><a href="tile.html">map/tile</a></li><li><a href="push-cam.html">plugins/ai/camera/push-cam</a></li><li><a href="frame-phaser.html">plugins/ai/phasers/frame-phaser</a></li><li><a href="time-phaser.html">plugins/ai/phasers/time-phaser</a></li><li><a href="circle-trace.html">plugins/collision/sprite-with-map/circle-trace</a></li><li><a href="line-trace.html">plugins/collision/sprite-with-map/line-trace</a></li><li><a href="particles.html">plugins/fx/particles</a></li><li><a href="ground-sprites.html">plugins/layer/ground-sprites</a></li><li><a href="ui.html">plugins/layer/ui</a></li><li><a href="8way.html">plugins/sprite/8way</a></li><li><a href="animate.html">plugins/sprite/animate</a></li><li><a href="apply-velocity.html">plugins/sprite/apply-velocity</a></li><li><a href="bounce.html">plugins/sprite/bounce</a></li><li><a href="flock.html">plugins/sprite/flock</a></li><li><a href="follow-mouse.html">plugins/sprite/follow-mouse</a></li><li><a href="track.html">plugins/sprite/track</a></li><li><a href="module-snaps.html">snaps</a></li><li><a href="composite.html">sprites/composite</a></li><li><a href="sprite.html">sprites/sprite</a></li><li><a href="bitmap.html">util/bitmap</a></li><li><a href="js.html">util/js</a></li><li><a href="minheap.html">util/minheap</a></li><li><a href="preload.html">util/preload</a></li><li><a href="rnd.html">util/rnd</a></li><li><a href="slowqueue.html">util/slowqueue</a></li><li><a href="stats.html">util/stats</a></li><li><a href="uid.html">util/uid</a></li><li><a href="url.html">util/url</a></li></ul><h3>Classes</h3><ul><li><a href="occlusion-scanner.OcclusionScanner.html">OcclusionScanner</a></li><li><a href="pathfinder.PathFinder.html">PathFinder</a></li><li><a href="proximity-tracker.ProximityTracker.html">ProximityTracker</a></li><li><a href="keyboard.Keyboard.html">Keyboard</a></li><li><a href="mouse.Mouse.html">Mouse</a></li><li><a href="staggered-isometric.StaggeredIsometric.html">StaggeredIsometric</a></li><li><a href="tile.Tile.html">Tile</a></li><li><a href="push-cam.PushCam.html">PushCam</a></li><li><a href="frame-phaser.FramePhaser.html">FramePhaser</a></li><li><a href="time-phaser.TimePhaser.html">TimePhaser</a></li><li><a href="circle-trace.CircleTrace.html">CircleTrace</a></li><li><a href="line-trace.LineTrace.html">LineTrace</a></li><li><a href="particles.Particles.html">Particles</a></li><li><a href="ground-sprites.GroundSprites.html">GroundSprites</a></li><li><a href="ui.UI.html">UI</a></li><li><a href="8way.Face8Way.html">Face8Way</a></li><li><a href="animate.Animate.html">Animate</a></li><li><a href="apply-velocity.ApplyVelocity.html">ApplyVelocity</a></li><li><a href="bounce.Bounce.html">Bounce</a></li><li><a href="flock.Flock.html">Flock</a></li><li><a href="follow-mouse.FollowMouse.html">FollowMouse</a></li><li><a href="track.Track.html">Track</a></li><li><a href="module-snaps.Snaps.html">Snaps</a></li><li><a href="composite.Composite.html">Composite</a></li><li><a href="sprite.Sprite.html">Sprite</a></li><li><a href="minheap.MinHeap.html">MinHeap</a></li><li><a href="preload.Preloader.html">Preloader</a></li><li><a href="slowqueue.SlowQueue.html">SlowQueue</a></li><li><a href="stats.Stats.html">Stats</a></li></ul>
+ </nav><div id="main">
+
+ <h1 class="page-title">Class: ApplyVelocity</h1>
+
+
+
+
+
+<section>
+
+<header>
+ <h2>
+ <span class="ancestors"><a href="apply-velocity.html">plugins/sprite/apply-velocity</a>.</span>
+
+ ApplyVelocity
+ </h2>
+
+</header>
+
+<article>
+ <div class="container-overview">
+
+
+
+
+<dt>
+ <h4 class="name" id="ApplyVelocity"><span class="type-signature"></span>new ApplyVelocity<span class="signature">()</span><span class="type-signature"></span></h4>
+
+
+</dt>
+<dd>
+
+
+ <div class="description">
+ A sprite updater that simply takes the velocityx and velocityy properties on the sprite and
+applies it to the position via <a href="sprite.Sprite.html#move"><code>move</code></a>. This is useful
+in situations where another plugin is updating valocities but those velocities depend upon
+the momentary positions of sprites. E.g. you have a flock update which updates velocity.
+In that case you would have this plugin as a commit to apply the velocity calculated by flock.
+<p>
+Snaps runs all sprite updates first, then runs all sprite commits.
+<p>
+Note that this should not be constructed directly, but rather via the updates or commit
+property in your spawnSprite data, e.g. <code>commit:[{name:'apply-velocity'}]</code>.
+<p>
+See The <code>opts<code> parameter in the <a href="sprite.Sprite.html"><code>Sprite constructor</code></a>
+<p>
+Alongside the name, you can pass the following options
+<dl>
+ <dt>on_collision</dt><dd>An optional function that is called if the sprite could not
+ be moved to it's target position due to collision. This function will be called with the
+ sprite as the function context.</dd>
+</dl>
+ </div>
+
+
+
+
+
+
+
+
+
+<dl class="details">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+</dd>
+
+
+ </div>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
View
286 dist/doc/bounce.Bounce.html
@@ -1,150 +1,136 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="utf-8">
- <title>JSDoc: Class: Bounce</title>
-
- <script src="scripts/prettify/prettify.js"> </script>
- <script src="scripts/prettify/lang-css.js"> </script>
- <!--[if lt IE 9]>
- <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
- <![endif]-->
- <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
- <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
-</head>
-
-<body>
-
-<div class="topdiv">
- <nav>
- <h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="occlusion-scanner.html">ai/occlusion-scanner</a></li><li><a href="pathfinder.html">ai/pathfinder</a></li><li><a href="proximity-tracker.html">ai/proximity-tracker</a></li><li><a href="tween.html">animate/tween</a></li><li><a href="keyboard.html">input/keyboard</a></li><li><a href="mouse.html">input/mouse</a></li><li><a href="staggered-isometric.html">map/staggered-isometric</a></li><li><a href="tile.html">map/tile</a></li><li><a href="push-cam.html">plugins/ai/camera/push-cam</a></li><li><a href="frame-phaser.html">plugins/ai/phasers/frame-phaser</a></li><li><a href="time-phaser.html">plugins/ai/phasers/time-phaser</a></li><li><a href="circle-trace.html">plugins/collision/sprite-with-map/circle-trace</a></li><li><a href="line-trace.html">plugins/collision/sprite-with-map/line-trace</a></li><li><a href="particles.html">plugins/fx/particles</a></li><li><a href="ground-sprites.html">plugins/layer/ground-sprites</a></li><li><a href="ui.html">plugins/layer/ui</a></li><li><a href="8way.html">plugins/sprite/8way</a></li><li><a href="animate.html">plugins/sprite/animate</a></li><li><a href="apply-velocity.html">plugins/sprite/apply-velocity</a></li><li><a href="bounce.html">plugins/sprite/bounce</a></li><li><a href="flock.html">plugins/sprite/flock</a></li><li><a href="follow-mouse.html">plugins/sprite/follow-mouse</a></li><li><a href="track.html">plugins/sprite/track</a></li><li><a href="module-snaps.html">snaps</a></li><li><a href="composite.html">sprites/composite</a></li><li><a href="sprite.html">sprites/sprite</a></li><li><a href="bitmap.html">util/bitmap</a></li><li><a href="js.html">util/js</a></li><li><a href="minheap.html">util/minheap</a></li><li><a href="preload.html">util/preload</a></li><li><a href="rnd.html">util/rnd</a></li><li><a href="slowqueue.html">util/slowqueue</a></li><li><a href="stats.html">util/stats</a></li><li><a href="uid.html">util/uid</a></li><li><a href="url.html">util/url</a></li></ul><h3>Classes</h3><ul><li><a href="occlusion-scanner.OcclusionScanner.html">OcclusionScanner</a></li><li><a href="pathfinder.PathFinder.html">PathFinder</a></li><li><a href="proximity-tracker.ProximityTracker.html">ProximityTracker</a></li><li><a href="keyboard.Keyboard.html">Keyboard</a></li><li><a href="mouse.Mouse.html">Mouse</a></li><li><a href="staggered-isometric.StaggeredIsometric.html">StaggeredIsometric</a></li><li><a href="tile.Tile.html">Tile</a></li><li><a href="push-cam.PushCam.html">PushCam</a></li><li><a href="frame-phaser.FramePhaser.html">FramePhaser</a></li><li><a href="time-phaser.TimePhaser.html">TimePhaser</a></li><li><a href="circle-trace.CircleTrace.html">CircleTrace</a></li><li><a href="line-trace.LineTrace.html">LineTrace</a></li><li><a href="particles.Particles.html">Particles</a></li><li><a href="ground-sprites.GroundSprites.html">GroundSprites</a></li><li><a href="ui.UI.html">UI</a></li><li><a href="8way.Face8Way.html">Face8Way</a></li><li><a href="animate.Animate.html">Animate</a></li><li><a href="apply-velocity.ApplyVelocity.html">ApplyVelocity</a></li><li><a href="bounce.Bounce.html">Bounce</a></li><li><a href="flock.Flock.html">Flock</a></li><li><a href="follow-mouse.FollowMouse.html">FollowMouse</a></li><li><a href="track.Track.html">Track</a></li><li><a href="module-snaps.Snaps.html">Snaps</a></li><li><a href="composite.Composite.html">Composite</a></li><li><a href="sprite.Sprite.html">Sprite</a></li><li><a href="minheap.MinHeap.html">MinHeap</a></li><li><a href="preload.Preloader.html">Preloader</a></li><li><a href="slowqueue.SlowQueue.html">SlowQueue</a></li><li><a href="stats.Stats.html">Stats</a></li></ul>
- </nav><div id="main">
-
- <h1 class="page-title">Class: Bounce</h1>
-
-
-
-
-
-<section>
-
-<header>
- <h2>
- <span class="ancestors"><a href="bounce.html">plugins/sprite/bounce</a>.</span>
-
- Bounce
- </h2>
-
-</header>
-
-<article>
- <div class="container-overview">
-
-
-
-
-<dt>
- <h4 class="name" id="Bounce"><span class="type-signature"></span>new Bounce<span class="signature">()</span><span class="type-signature"></span></h4>
-
-
-</dt>
-<dd>
-
-
- <div class="description">
- A simple way to make a sprite bounce by adjusting its height property. The sprite will bounce
-with a duration matching the current state's animation.
-<p>
-Note that this should not be constructed directly, but rather via the updates or commit
-property in your spawnSprite data, e.g. <code>update:[{name:'bounce'}]</code>.
-<p>
-See The <code>opts<code> parameter in the <a href="sprite.Sprite.html"><code>Sprite constructor</code></a>
-<p>
-Alongside the name, you can pass the following options
-<dl>
- <dt>bounce_height</dt><dd>How high it should bounce in pixels.</dd>
- <dt>bounce_base</dt><dd>Where is the 'floor'? E.g. a bounce_base of 25 and an bounce height
- of 100 will bounce up 100px on top of the floor level of 25. The height value will
- be 125 at its apex, midway through the state animation.</dd>
-</dl>
- </div>
-
-
-
-
-
-
-
-
-
-<dl class="details">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-</dl>
-
-
-
-
-
-
-
-
-
-</dd>
-
-
- </div>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-</article>
-
-</section>
-
-
-
-
- </div>
-</div>
-
-<br clear="both">
-
-<script> prettyPrint(); </script>
-</body>
-</html>
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>JSDoc: Class: Bounce</title>
+
+ <script src="scripts/prettify/prettify.js"> </script>
+ <script src="scripts/prettify/lang-css.js"> </script>
+ <!--[if lt IE 9]>
+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
+ <![endif]-->
+ <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
+ <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
+</head>
+
+<body>
+
+<div class="topdiv">
+ <nav>
+ <h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="occlusion-scanner.html">ai/occlusion-scanner</a></li><li><a href="pathfinder.html">ai/pathfinder</a></li><li><a href="proximity-tracker.html">ai/proximity-tracker</a></li><li><a href="tween.html">animate/tween</a></li><li><a href="keyboard.html">input/keyboard</a></li><li><a href="mouse.html">input/mouse</a></li><li><a href="staggered-isometric.html">map/staggered-isometric</a></li><li><a href="tile.html">map/tile</a></li><li><a href="push-cam.html">plugins/ai/camera/push-cam</a></li><li><a href="frame-phaser.html">plugins/ai/phasers/frame-phaser</a></li><li><a href="time-phaser.html">plugins/ai/phasers/time-phaser</a></li><li><a href="circle-trace.html">plugins/collision/sprite-with-map/circle-trace</a></li><li><a href="line-trace.html">plugins/collision/sprite-with-map/line-trace</a></li><li><a href="particles.html">plugins/fx/particles</a></li><li><a href="ground-sprites.html">plugins/layer/ground-sprites</a></li><li><a href="ui.html">plugins/layer/ui</a></li><li><a href="8way.html">plugins/sprite/8way</a></li><li><a href="animate.html">plugins/sprite/animate</a></li><li><a href="apply-velocity.html">plugins/sprite/apply-velocity</a></li><li><a href="bounce.html">plugins/sprite/bounce</a></li><li><a href="flock.html">plugins/sprite/flock</a></li><li><a href="follow-mouse.html">plugins/sprite/follow-mouse</a></li><li><a href="track.html">plugins/sprite/track</a></li><li><a href="module-snaps.html">snaps</a></li><li><a href="composite.html">sprites/composite</a></li><li><a href="sprite.html">sprites/sprite</a></li><li><a href="bitmap.html">util/bitmap</a></li><li><a href="js.html">util/js</a></li><li><a href="minheap.html">util/minheap</a></li><li><a href="preload.html">util/preload</a></li><li><a href="rnd.html">util/rnd</a></li><li><a href="slowqueue.html">util/slowqueue</a></li><li><a href="stats.html">util/stats</a></li><li><a href="uid.html">util/uid</a></li><li><a href="url.html">util/url</a></li></ul><h3>Classes</h3><ul><li><a href="occlusion-scanner.OcclusionScanner.html">OcclusionScanner</a></li><li><a href="pathfinder.PathFinder.html">PathFinder</a></li><li><a href="proximity-tracker.ProximityTracker.html">ProximityTracker</a></li><li><a href="keyboard.Keyboard.html">Keyboard</a></li><li><a href="mouse.Mouse.html">Mouse</a></li><li><a href="staggered-isometric.StaggeredIsometric.html">StaggeredIsometric</a></li><li><a href="tile.Tile.html">Tile</a></li><li><a href="push-cam.PushCam.html">PushCam</a></li><li><a href="frame-phaser.FramePhaser.html">FramePhaser</a></li><li><a href="time-phaser.TimePhaser.html">TimePhaser</a></li><li><a href="circle-trace.CircleTrace.html">CircleTrace</a></li><li><a href="line-trace.LineTrace.html">LineTrace</a></li><li><a href="particles.Particles.html">Particles</a></li><li><a href="ground-sprites.GroundSprites.html">GroundSprites</a></li><li><a href="ui.UI.html">UI</a></li><li><a href="8way.Face8Way.html">Face8Way</a></li><li><a href="animate.Animate.html">Animate</a></li><li><a href="apply-velocity.ApplyVelocity.html">ApplyVelocity</a></li><li><a href="bounce.Bounce.html">Bounce</a></li><li><a href="flock.Flock.html">Flock</a></li><li><a href="follow-mouse.FollowMouse.html">FollowMouse</a></li><li><a href="track.Track.html">Track</a></li><li><a href="module-snaps.Snaps.html">Snaps</a></li><li><a href="composite.Composite.html">Composite</a></li><li><a href="sprite.Sprite.html">Sprite</a></li><li><a href="minheap.MinHeap.html">MinHeap</a></li><li><a href="preload.Preloader.html">Preloader</a></li><li><a href="slowqueue.SlowQueue.html">SlowQueue</a></li><li><a href="stats.Stats.html">Stats</a></li></ul>
+ </nav><div id="main">
+
+ <h1 class="page-title">Class: Bounce</h1>
+
+
+
+
+
+<section>
+
+<header>
+ <h2>
+ <span class="ancestors"><a href="bounce.html">plugins/sprite/bounce</a>.</span>
+
+ Bounce
+ </h2>
+
+</header>
+
+<article>
+ <div class="container-overview">
+
+
+
+
+<dt>
+ <h4 class="name" id="Bounce"><span class="type-signature"></span>new Bounce<span class="signature">()</span><span class="type-signature"></span></h4>
+
+
+</dt>
+<dd>
+
+
+ <div class="description">
+ A simple way to make a sprite bounce by adjusting its height property. The sprite will bounce
+with a duration matching the current state's animation.
+<p>
+Note that this should not be constructed directly, but rather via the updates or commit
+property in your spawnSprite data, e.g. <code>update:[{name:'bounce'}]</code>.
+<p>
+See The <code>opts<code> parameter in the <a href="sprite.Sprite.html"><code>Sprite constructor</code></a>
+<p>
+Alongside the name, you can pass the following options
+<dl>
+ <dt>bounce_height</dt><dd>How high it should bounce in pixels.</dd>
+ <dt>bounce_base</dt><dd>Where is the 'floor'? E.g. a bounce_base of 25 and an bounce height
+ of 100 will bounce up 100px on top of the floor level of 25. The height value will
+ be 125 at its apex, midway through the state animation.</dd>
+</dl>
+ </div>
+
+
+
+
+
+
+
+
+
+<dl class="details">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+</dd>
+
+
+ </div>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+</article>
View
882 dist/doc/circle-trace.CircleTrace.html
@@ -1,450 +1,432 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="utf-8">
- <title>JSDoc: Class: CircleTrace</title>
-
- <script src="scripts/prettify/prettify.js"> </script>
- <script src="scripts/prettify/lang-css.js"> </script>
- <!--[if lt IE 9]>
- <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
- <![endif]-->
- <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
- <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
-</head>
-
-<body>
-
-<div class="topdiv">
- <nav>
- <h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="occlusion-scanner.html">ai/occlusion-scanner</a></li><li><a href="pathfinder.html">ai/pathfinder</a></li><li><a href="proximity-tracker.html">ai/proximity-tracker</a></li><li><a href="tween.html">animate/tween</a></li><li><a href="keyboard.html">input/keyboard</a></li><li><a href="mouse.html">input/mouse</a></li><li><a href="staggered-isometric.html">map/staggered-isometric</a></li><li><a href="tile.html">map/tile</a></li><li><a href="push-cam.html">plugins/ai/camera/push-cam</a></li><li><a href="frame-phaser.html">plugins/ai/phasers/frame-phaser</a></li><li><a href="time-phaser.html">plugins/ai/phasers/time-phaser</a></li><li><a href="circle-trace.html">plugins/collision/sprite-with-map/circle-trace</a></li><li><a href="line-trace.html">plugins/collision/sprite-with-map/line-trace</a></li><li><a href="particles.html">plugins/fx/particles</a></li><li><a href="ground-sprites.html">plugins/layer/ground-sprites</a></li><li><a href="ui.html">plugins/layer/ui</a></li><li><a href="8way.html">plugins/sprite/8way</a></li><li><a href="animate.html">plugins/sprite/animate</a></li><li><a href="apply-velocity.html">plugins/sprite/apply-velocity</a></li><li><a href="bounce.html">plugins/sprite/bounce</a></li><li><a href="flock.html">plugins/sprite/flock</a></li><li><a href="follow-mouse.html">plugins/sprite/follow-mouse</a></li><li><a href="track.html">plugins/sprite/track</a></li><li><a href="module-snaps.html">snaps</a></li><li><a href="composite.html">sprites/composite</a></li><li><a href="sprite.html">sprites/sprite</a></li><li><a href="bitmap.html">util/bitmap</a></li><li><a href="js.html">util/js</a></li><li><a href="minheap.html">util/minheap</a></li><li><a href="preload.html">util/preload</a></li><li><a href="rnd.html">util/rnd</a></li><li><a href="slowqueue.html">util/slowqueue</a></li><li><a href="stats.html">util/stats</a></li><li><a href="uid.html">util/uid</a></li><li><a href="url.html">util/url</a></li></ul><h3>Classes</h3><ul><li><a href="occlusion-scanner.OcclusionScanner.html">OcclusionScanner</a></li><li><a href="pathfinder.PathFinder.html">PathFinder</a></li><li><a href="proximity-tracker.ProximityTracker.html">ProximityTracker</a></li><li><a href="keyboard.Keyboard.html">Keyboard</a></li><li><a href="mouse.Mouse.html">Mouse</a></li><li><a href="staggered-isometric.StaggeredIsometric.html">StaggeredIsometric</a></li><li><a href="tile.Tile.html">Tile</a></li><li><a href="push-cam.PushCam.html">PushCam</a></li><li><a href="frame-phaser.FramePhaser.html">FramePhaser</a></li><li><a href="time-phaser.TimePhaser.html">TimePhaser</a></li><li><a href="circle-trace.CircleTrace.html">CircleTrace</a></li><li><a href="line-trace.LineTrace.html">LineTrace</a></li><li><a href="particles.Particles.html">Particles</a></li><li><a href="ground-sprites.GroundSprites.html">GroundSprites</a></li><li><a href="ui.UI.html">UI</a></li><li><a href="8way.Face8Way.html">Face8Way</a></li><li><a href="animate.Animate.html">Animate</a></li><li><a href="apply-velocity.ApplyVelocity.html">ApplyVelocity</a></li><li><a href="bounce.Bounce.html">Bounce</a></li><li><a href="flock.Flock.html">Flock</a></li><li><a href="follow-mouse.FollowMouse.html">FollowMouse</a></li><li><a href="track.Track.html">Track</a></li><li><a href="module-snaps.Snaps.html">Snaps</a></li><li><a href="composite.Composite.html">Composite</a></li><li><a href="sprite.Sprite.html">Sprite</a></li><li><a href="minheap.MinHeap.html">MinHeap</a></li><li><a href="preload.Preloader.html">Preloader</a></li><li><a href="slowqueue.SlowQueue.html">SlowQueue</a></li><li><a href="stats.Stats.html">Stats</a></li></ul>
- </nav><div id="main">
-
- <h1 class="page-title">Class: CircleTrace</h1>
-
-
-
-
-
-<section>
-
-<header>
- <h2>
- <span class="ancestors"><a href="circle-trace.html">plugins/collision/sprite-with-map/circle-trace</a>.</span>
-
- CircleTrace
- </h2>
-
-</header>
-
-<article>
- <div class="container-overview">
-
-
-
-
-<dt>
- <h4 class="name" id="CircleTrace"><span class="type-signature"></span>new CircleTrace<span class="signature">(opts)</span><span class="type-signature"></span></h4>
-
-
-</dt>
-<dd>
-
-
- <div class="description">
- Creates a circle tracer that traces a circle (An on-screen elipse in isometric-land)
-along a path to detect collision.
-Note that this should not be constructed directly, but rather via the plugin factory method
-<a href="module-snaps.Snaps.html#createCollider"><code>createCollider</code></a> on the engine.
- </div>
-
-
-
-
-
-
-
- <h5>Parameters:</h5>
-
-
-<table class="params">
- <thead>
- <tr>
-
- <th>Name</th>
-
-
- <th>Type</th>
-
-
-
-
-
- <th class="last">Description</th>
- </tr>
- </thead>
-
- <tbody>
-
-
- <tr>
-
- <td class="name"><code>opts</code></td>
-
-
- <td class="type">
-
-
-<span class="param-type">Object</span>
-
-
-
- </td>
-
-
-
-
-
- <td class="description last">An object with assorted options set in it.
-<dl>
- <dt>radius</dt><dd>The radius must be >0 and describes the x radius of the elipse as
- projected on-screen.</dd>
- <dt>autoSlip</dt><dd>Defaults to true for isometric maps. If set, the collision trace
- will 'slip' away from jagged pixel edges to prevent sprites from being caught up in
- jaggies when moving at isometric angles. In unsure, omit this property to use the
- default.</dd>
-</dl></td>
- </tr>
-
-
- </tbody>
-</table>
-
-
-
-<dl class="details">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-</dl>
-
-
-
-
-
-
-
-
-
-</dd>
-
-
- </div>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <h3 class="subsection-title">Methods</h3>
-
- <dl>
-
-<dt>
- <h4 class="name" id="test"><span class="type-signature"></span>test<span class="signature">(x0, y0, dx, dy, h, out)</span><span class="type-signature"> &rarr; {Number}</span></h4>
-
-
-</dt>
-<dd>
-
-
- <div class="description">
- Perform a trace to test for collision along a line with radius.
-Effectively traces an ellipse from one point to another, with some
-important performance compromises in accuracy.
- </div>
-
-
-
-
-
-
-
- <h5>Parameters:</h5>
-
-
-<table class="params">
- <thead>
- <tr>
-
- <th>Name</th>
-
-
- <th>Type</th>
-
-
-
-
-
- <th class="last">Description</th>
- </tr>
- </thead>
-
- <tbody>
-
-
- <tr>
-
- <td class="name"><code>x0</code></td>
-
-
- <td class="type">
-
-
-<span class="param-type">Number</span>
-
-
-
- </td>
-
-
-
-
-
- <td class="description last">World X position of the starting point</td>
- </tr>
-
-
-
- <tr>
-
- <td class="name"><code>y0</code></td>
-
-
- <td class="type">
-
-
-<span class="param-type">Number</span>
-
-
-
- </td>
-
-
-
-
-
- <td class="description last">World Y position of the starting point</td>
- </tr>
-
-
-
- <tr>
-
- <td class="name"><code>dx</code></td>
-
-
- <td class="type">
-
-
-<span class="param-type">Number</span>
-
-
-
- </td>
-
-
-
-
-
- <td class="description last">Amount to move in the X axis</td>
- </tr>
-
-
-
- <tr>
-
- <td class="name"><code>dy</code></td>
-
-
- <td class="type">
-
-
-<span class="param-type">Number</span>
-
-
-
- </td>
-
-
-
-
-
- <td class="description last">Amount to move in the Y axis</td>
- </tr>
-
-
-
- <tr>
-
- <td class="name"><code>h</code></td>
-
-
- <td class="type">
-
-
-<span class="param-type">Number</span>
-
-
-
- </td>
-
-
-
-
-
- <td class="description last">Tile pixel height considered the ground (non-collision)</td>
- </tr>
-
-
-
- <tr>
-
- <td class="name"><code>out</code></td>
-
-
- <td class="type">
-
-
-<span class="param-type">Array</span>
-
-
-
- </td>
-
-
-
-
-
- <td class="description last">An optional 2-length array which will recieve the
-point of contact. You can interpret this as the position to which the
-character can go along its path at which it will be touching a solid
-object. If there is no collision, the output position will be the
-desired new position.</td>
- </tr>
-
-
- </tbody>
-</table>
-
-
-
-<dl class="details">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-</dl>
-
-
-
-
-
-
-
- <h5>Returns:</h5>
-
-
-<div class="param-desc">
- A number from 0-1 representing how far along the route
-the trace managed to get. 1 means no collision.
-</div>
-
-
-
-<dl>
- <dt class="oneline">
- Type
- </dt>
- <dd class="oneline">
-
-<span class="param-type">Number</span>
-
-
- </dd>
-</dl>
-
-
-
-
-
-</dd>
-
- </dl>
-
-
-
-
-
-</article>
-
-</section>
-
-
-
-
- </div>
-</div>
-
-<br clear="both">
-
-<script> prettyPrint(); </script>
-</body>
-</html>
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>JSDoc: Class: CircleTrace</title>
+
+ <script src="scripts/prettify/prettify.js"> </script>
+ <script src="scripts/prettify/lang-css.js"> </script>
+ <!--[if lt IE 9]>
+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
+ <![endif]-->
+ <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
+ <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
+</head>
+
+<body>
+
+<div class="topdiv">
+ <nav>
+ <h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="occlusion-scanner.html">ai/occlusion-scanner</a></li><li><a href="pathfinder.html">ai/pathfinder</a></li><li><a href="proximity-tracker.html">ai/proximity-tracker</a></li><li><a href="tween.html">animate/tween</a></li><li><a href="keyboard.html">input/keyboard</a></li><li><a href="mouse.html">input/mouse</a></li><li><a href="staggered-isometric.html">map/staggered-isometric</a></li><li><a href="tile.html">map/tile</a></li><li><a href="push-cam.html">plugins/ai/camera/push-cam</a></li><li><a href="frame-phaser.html">plugins/ai/phasers/frame-phaser</a></li><li><a href="time-phaser.html">plugins/ai/phasers/time-phaser</a></li><li><a href="circle-trace.html">plugins/collision/sprite-with-map/circle-trace</a></li><li><a href="line-trace.html">plugins/collision/sprite-with-map/line-trace</a></li><li><a href="particles.html">plugins/fx/particles</a></li><li><a href="ground-sprites.html">plugins/layer/ground-sprites</a></li><li><a href="ui.html">plugins/layer/ui</a></li><li><a href="8way.html">plugins/sprite/8way</a></li><li><a href="animate.html">plugins/sprite/animate</a></li><li><a href="apply-velocity.html">plugins/sprite/apply-velocity</a></li><li><a href="bounce.html">plugins/sprite/bounce</a></li><li><a href="flock.html">plugins/sprite/flock</a></li><li><a href="follow-mouse.html">plugins/sprite/follow-mouse</a></li><li><a href="track.html">plugins/sprite/track</a></li><li><a href="module-snaps.html">snaps</a></li><li><a href="composite.html">sprites/composite</a></li><li><a href="sprite.html">sprites/sprite</a></li><li><a href="bitmap.html">util/bitmap</a></li><li><a href="js.html">util/js</a></li><li><a href="minheap.html">util/minheap</a></li><li><a href="preload.html">util/preload</a></li><li><a href="rnd.html">util/rnd</a></li><li><a href="slowqueue.html">util/slowqueue</a></li><li><a href="stats.html">util/stats</a></li><li><a href="uid.html">util/uid</a></li><li><a href="url.html">util/url</a></li></ul><h3>Classes</h3><ul><li><a href="occlusion-scanner.OcclusionScanner.html">OcclusionScanner</a></li><li><a href="pathfinder.PathFinder.html">PathFinder</a></li><li><a href="proximity-tracker.ProximityTracker.html">ProximityTracker</a></li><li><a href="keyboard.Keyboard.html">Keyboard</a></li><li><a href="mouse.Mouse.html">Mouse</a></li><li><a href="staggered-isometric.StaggeredIsometric.html">StaggeredIsometric</a></li><li><a href="tile.Tile.html">Tile</a></li><li><a href="push-cam.PushCam.html">PushCam</a></li><li><a href="frame-phaser.FramePhaser.html">FramePhaser</a></li><li><a href="time-phaser.TimePhaser.html">TimePhaser</a></li><li><a href="circle-trace.CircleTrace.html">CircleTrace</a></li><li><a href="line-trace.LineTrace.html">LineTrace</a></li><li><a href="particles.Particles.html">Particles</a></li><li><a href="ground-sprites.GroundSprites.html">GroundSprites</a></li><li><a href="ui.UI.html">UI</a></li><li><a href="8way.Face8Way.html">Face8Way</a></li><li><a href="animate.Animate.html">Animate</a></li><li><a href="apply-velocity.ApplyVelocity.html">ApplyVelocity</a></li><li><a href="bounce.Bounce.html">Bounce</a></li><li><a href="flock.Flock.html">Flock</a></li><li><a href="follow-mouse.FollowMouse.html">FollowMouse</a></li><li><a href="track.Track.html">Track</a></li><li><a href="module-snaps.Snaps.html">Snaps</a></li><li><a href="composite.Composite.html">Composite</a></li><li><a href="sprite.Sprite.html">Sprite</a></li><li><a href="minheap.MinHeap.html">MinHeap</a></li><li><a href="preload.Preloader.html">Preloader</a></li><li><a href="slowqueue.SlowQueue.html">SlowQueue</a></li><li><a href="stats.Stats.html">Stats</a></li></ul>
+ </nav><div id="main">
+
+ <h1 class="page-title">Class: CircleTrace</h1>
+
+
+
+
+
+<section>
+
+<header>
+ <h2>
+ <span class="ancestors"><a href="circle-trace.html">plugins/collision/sprite-with-map/circle-trace</a>.</span>
+
+ CircleTrace
+ </h2>
+
+</header>
+
+<article>
+ <div class="container-overview">
+
+
+
+
+<dt>
+ <h4 class="name" id="CircleTrace"><span class="type-signature"></span>new CircleTrace<span class="signature">(opts)</span><span class="type-signature"></span></h4>
+
+
+</dt>
+<dd>
+
+
+ <div class="description">
+ Creates a circle tracer that traces a circle (An on-screen elipse in isometric-land)
+along a path to detect collision.
+Note that this should not be constructed directly, but rather via the plugin factory method
+<a href="module-snaps.Snaps.html#createCollider"><code>createCollider</code></a> on the engine.
+ </div>
+
+
+
+
+
+
+
+ <h5>Parameters:</h5>
+
+
+<table class="params">
+ <thead>
+ <tr>
+
+ <th>Name</th>
+
+
+ <th>Type</th>
+
+
+
+
+
+ <th class="last">Description</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+ <tr>
+
+ <td class="name"><code>opts</code></td>
+
+
+ <td class="type">
+
+
+<span class="param-type">Object</span>
+
+
+
+ </td>
+
+
+
+
+
+ <td class="description last">An object with assorted options set in it.
+<dl>
+ <dt>radius</dt><dd>The radius must be >0 and describes the x radius of the elipse as
+ projected on-screen.</dd>
+ <dt>autoSlip</dt><dd>Defaults to true for isometric maps. If set, the collision trace
+ will 'slip' away from jagged pixel edges to prevent sprites from being caught up in
+ jaggies when moving at isometric angles. In unsure, omit this property to use the
+ default.</dd>
+</dl></td>
+ </tr>
+
+
+ </tbody>
+</table>
+
+
+
+<dl class="details">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+</dd>
+
+
+ </div>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <h3 class="subsection-title">Methods</h3>
+
+ <dl>
+
+<dt>
+ <h4 class="name" id="test"><span class="type-signature"></span>test<span class="signature">(x0, y0, dx, dy, h, out)</span><span class="type-signature"> &rarr; {Number}</span></h4>
+
+
+</dt>
+<dd>
+
+
+ <div class="description">
+ Perform a trace to test for collision along a line with radius.
+Effectively traces an ellipse from one point to another, with some
+important performance compromises in accuracy.
+ </div>
+
+
+
+
+
+
+
+ <h5>Parameters:</h5>
+
+
+<table class="params">
+ <thead>
+ <tr>
+
+ <th>Name</th>
+
+
+ <th>Type</th>
+
+
+
+
+
+ <th class="last">Description</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+ <tr>
+
+ <td class="name"><code>x0</code></td>
+
+
+ <td class="type">
+
+
+<span class="param-type">Number</span>
+
+
+
+ </td>
+
+
+
+
+
+ <td class="description last">World X position of the starting point</td>
+ </tr>
+
+
+
+ <tr>
+
+ <td class="name"><code>y0</code></td>
+
+
+ <td class="type">
+
+
+<span class="param-type">Number</span>
+
+
+
+ </td>
+
+
+
+
+
+ <td class="description last">World Y position of the starting point</td>
+ </tr>
+
+
+
+ <tr>
+
+ <td class="name"><code>dx</code></td>
+
+
+ <td class="type">
+
+
+<span class="param-type">Number</span>
+
+
+
+ </td>
+
+
+
+
+
+ <td class="description last">Amount to move in the X axis</td>
+ </tr>
+
+
+
+ <tr>
+
+ <td class="name"><code>dy</code></td>
+
+
+ <td class="type">
+
+
+<span class="param-type">Number</span>
+
+
+
+ </td>
+
+
+
+
+
+ <td class="description last">Amount to move in the Y axis</td>
+ </tr>
+
+
+
+ <tr>
+
+ <td class="name"><code>h</code></td>
+
+
+ <td class="type">
+
+
+<span class="param-type">Number</span>
+
+
+
+ </td>
+
+
+
+
+
+ <td class="description last">Tile pixel height considered the ground (non-collision)</td>
+ </tr>
+
+
+
+ <tr>
+
+ <td class="name"><code>out</code></td>
+
+
+ <td class="type">
+
+
+<span class="param-type">Array</span>
+
+
+
+ </td>
+
+
+
+
+
+ <td class="description last">An optional 2-length array which will recieve the
+point of contact. You can interpret this as the position to which the
+character can go along its path at which it will be touching a solid
+object. If there is no collision, the output position will be the
+desired new position.</td>
+ </tr>
+
+
+ </tbody>
+</table>
+
+
+
+<dl class="details">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+ <h5>Returns:</h5>
+
+
+<div class="param-desc">
+ A number from 0-1 representing how far along the route
+the trace managed to get. 1 means no collision.
+</div>
+
+
+
+<dl>
+ <dt class="oneline">
+ Type
+ </dt>
+ <dd class="oneline">
+
+<span class="param-type">Number</span>
+
+
+ </dd>
+</dl>
+
+
+
+
+
+</dd>
+
+ </dl>
+
+
View
1,444 dist/doc/composite.Composite.html
@@ -1,728 +1,716 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="utf-8">
- <title>JSDoc: Class: Composite</title>
-
- <script src="scripts/prettify/prettify.js"> </script>
- <script src="scripts/prettify/lang-css.js"> </script>
- <!--[if lt IE 9]>
- <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
- <![endif]-->
- <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
- <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
-</head>
-
-<body>
-
-<div class="topdiv">
- <nav>
- <h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="occlusion-scanner.html">ai/occlusion-scanner</a></li><li><a href="pathfinder.html">ai/pathfinder</a></li><li><a href="proximity-tracker.html">ai/proximity-tracker</a></li><li><a href="tween.html">animate/tween</a></li><li><a href="keyboard.html">input/keyboard</a></li><li><a href="mouse.html">input/mouse</a></li><li><a href="staggered-isometric.html">map/staggered-isometric</a></li><li><a href="tile.html">map/tile</a></li><li><a href="push-cam.html">plugins/ai/camera/push-cam</a></li><li><a href="frame-phaser.html">plugins/ai/phasers/frame-phaser</a></li><li><a href="time-phaser.html">plugins/ai/phasers/time-phaser</a></li><li><a href="circle-trace.html">plugins/collision/sprite-with-map/circle-trace</a></li><li><a href="line-trace.html">plugins/collision/sprite-with-map/line-trace</a></li><li><a href="particles.html">plugins/fx/particles</a></li><li><a href="ground-sprites.html">plugins/layer/ground-sprites</a></li><li><a href="ui.html">plugins/layer/ui</a></li><li><a href="8way.html">plugins/sprite/8way</a></li><li><a href="animate.html">plugins/sprite/animate</a></li><li><a href="apply-velocity.html">plugins/sprite/apply-velocity</a></li><li><a href="bounce.html">plugins/sprite/bounce</a></li><li><a href="flock.html">plugins/sprite/flock</a></li><li><a href="follow-mouse.html">plugins/sprite/follow-mouse</a></li><li><a href="track.html">plugins/sprite/track</a></li><li><a href="module-snaps.html">snaps</a></li><li><a href="composite.html">sprites/composite</a></li><li><a href="sprite.html">sprites/sprite</a></li><li><a href="bitmap.html">util/bitmap</a></li><li><a href="js.html">util/js</a></li><li><a href="minheap.html">util/minheap</a></li><li><a href="preload.html">util/preload</a></li><li><a href="rnd.html">util/rnd</a></li><li><a href="slowqueue.html">util/slowqueue</a></li><li><a href="stats.html">util/stats</a></li><li><a href="uid.html">util/uid</a></li><li><a href="url.html">util/url</a></li></ul><h3>Classes</h3><ul><li><a href="occlusion-scanner.OcclusionScanner.html">OcclusionScanner</a></li><li><a href="pathfinder.PathFinder.html">PathFinder</a></li><li><a href="proximity-tracker.ProximityTracker.html">ProximityTracker</a></li><li><a href="keyboard.Keyboard.html">Keyboard</a></li><li><a href="mouse.Mouse.html">Mouse</a></li><li><a href="staggered-isometric.StaggeredIsometric.html">StaggeredIsometric</a></li><li><a href="tile.Tile.html">Tile</a></li><li><a href="push-cam.PushCam.html">PushCam</a></li><li><a href="frame-phaser.FramePhaser.html">FramePhaser</a></li><li><a href="time-phaser.TimePhaser.html">TimePhaser</a></li><li><a href="circle-trace.CircleTrace.html">CircleTrace</a></li><li><a href="line-trace.LineTrace.html">LineTrace</a></li><li><a href="particles.Particles.html">Particles</a></li><li><a href="ground-sprites.GroundSprites.html">GroundSprites</a></li><li><a href="ui.UI.html">UI</a></li><li><a href="8way.Face8Way.html">Face8Way</a></li><li><a href="animate.Animate.html">Animate</a></li><li><a href="apply-velocity.ApplyVelocity.html">ApplyVelocity</a></li><li><a href="bounce.Bounce.html">Bounce</a></li><li><a href="flock.Flock.html">Flock</a></li><li><a href="follow-mouse.FollowMouse.html">FollowMouse</a></li><li><a href="track.Track.html">Track</a></li><li><a href="module-snaps.Snaps.html">Snaps</a></li><li><a href="composite.Composite.html">Composite</a></li><li><a href="sprite.Sprite.html">Sprite</a></li><li><a href="minheap.MinHeap.html">MinHeap</a></li><li><a href="preload.Preloader.html">Preloader</a></li><li><a href="slowqueue.SlowQueue.html">SlowQueue</a></li><li><a href="stats.Stats.html">Stats</a></li></ul>
- </nav><div id="main">
-
- <h1 class="page-title">Class: Composite</h1>
-
-
-
-
-
-<section>
-
-<header>
- <h2>
- <span class="ancestors"><a href="composite.html">sprites/composite</a>.</span>
-
- Composite
- </h2>
-
-</header>
-
-<article>
- <div class="container-overview">
-
-
-
-
-<dt>
- <h4 class="name" id="Composite"><span class="type-signature"></span>new Composite<span class="signature">(sn, x, y, id, <span class="optional">endCallback</span>)</span><span class="type-signature"></span></h4>
-
-
-</dt>
-<dd>
-
-
- <div class="description">
- Construct a composite sprite. Do not call this constructor directly; you should instead call
-<code>sn.createComposite()</code> on the engine.
-<p>
-A composite is a collection of sprites that can be manipulated as one. They share the same plane
-which means they are more efficient. A composite has x, y, but no h position, but the sprites within
-it behave as though they have x and h but no y position (y is ignored within a composite).
- </div>
-
-
-
-
-
-
-
- <h5>Parameters:</h5>
-
-
-<table class="params">
- <thead>
- <tr>
-
- <th>Name</th>
-
-
- <th>Type</th>
-
-
- <th>Argument</th>
-
-
-
-
- <th class="last">Description</th>
- </tr>
- </thead>
-
- <tbody>
-
-
- <tr>
-
- <td class="name"><code>sn</code></td>
-
-
- <td class="type">
-
-
-<span class="param-type">Object</span>
-
-
-
- </td>
-
-
- <td class="attributes">
-
-
-
-
-
- </td>
-
-
-
-
- <td class="description last">The engine reference</td>
- </tr>
-
-
-
- <tr>
-
- <td class="name"><code>x</code></td>
-
-
- <td class="type">
-
-
-<span class="param-type">Number</span>
-
-
-
- </td>
-
-
- <td class="attributes">
-
-
-
-
-
- </td>
-
-
-
-
- <td class="description last">X position in the world for the composite.</td>
- </tr>
-
-
-
- <tr>
-
- <td class="name"><code>y</code></td>
-
-
- <td class="type">
-
-
-<span class="param-type">Number</span>
-
-
-
- </td>
-
-
- <td class="attributes">
-
-
-
-
-
- </td>
-
-
-
-
- <td class="description last">Y position in the world for the composite.</td>
- </tr>
-
-
-
- <tr>
-
- <td class="name"><code>id</code></td>
-
-
- <td class="type">
-
-
-<span class="param-type">String</span>
-
-
-
- </td>
-
-
- <td class="attributes">
-
-
-
-
-
- </td>
-
-
-
-
- <td class="description last">A unique identifier.</td>
- </tr>
-
-
-
- <tr>
-
- <td class="name"><code>endCallback</code></td>
-
-
- <td class="type">
-
-
-<span class="param-type">Function</span>
-
-
-
- </td>
-
-
- <td class="attributes">
-
- &lt;optional><br>
-
-
-
-
-
- </td>
-
-
-
-
- <td class="description last">Once the composite and all its child sprites expire, this is called.</td>
- </tr>
-
-
- </tbody>
-</table>
-
-
-
-<dl class="details">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-</dl>
-
-
-
-
-
-
-
-
-
-</dd>
-
-
- </div>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <h3 class="subsection-title">Methods</h3>
-
- <dl>
-
-<dt>
- <h4 class="name" id="addSprite"><span class="type-signature"></span>addSprite<span class="signature">(defName, stateName, x, y, h, <span class="optional">opts</span>)</span><span class="type-signature"></span></h4>
-
-
-</dt>
-<dd>
-
-
- <div class="description">
- Add a sprite to the composite.
- </div>
-
-
-
-
-
-
-
- <h5>Parameters:</h5>
-
-
-<table class="params">
- <thead>
- <tr>
-
- <th>Name</th>
-
-
- <th>Type</th>
-
-
- <th>Argument</th>
-
-
-
-
- <th class="last">Description</th>
- </tr>
- </thead>
-
- <tbody>
-
-
- <tr>
-
- <td class="name"><code>defName</code></td>
-
-
- <td class="type">
-
- </td>
-
-
- <td class="attributes">
-
-
-
-
-
- </td>
-
-
-
-
- <td class="description last">The name of the sprite definition to use. These are
-set up in your game's spriteDefs data.</td>
- </tr>