Permalink
Browse files

Fix NaN in flocker. Flocker is now good.

  • Loading branch information...
1 parent 2f244f1 commit e4cf00ddf8aa571cf5edabbc6f87e6d0ddb099d4 @izb committed May 29, 2013
Showing with 25,535 additions and 24,885 deletions.
  1. +155 −136 dist/doc/8way.Face8Way.html
  2. +162 −136 dist/doc/animate.Animate.html
  3. +154 −136 dist/doc/apply-velocity.ApplyVelocity.html
  4. +150 −136 dist/doc/bounce.Bounce.html
  5. +450 −432 dist/doc/circle-trace.CircleTrace.html
  6. +728 −716 dist/doc/composite.Composite.html
  7. +179 −136 dist/doc/flock.Flock.html
  8. +143 −136 dist/doc/follow-mouse.FollowMouse.html
  9. +343 −337 dist/doc/frame-phaser.FramePhaser.html
  10. +538 −527 dist/doc/ground-sprites.GroundSprites.html
  11. +546 −545 dist/doc/js.html
  12. +450 −447 dist/doc/keyboard.Keyboard.html
  13. +445 −432 dist/doc/line-trace.LineTrace.html
  14. +577 −570 dist/doc/minheap.MinHeap.html
  15. +6,183 −6,116 dist/doc/module-snaps.Snaps.html
  16. +281 −278 dist/doc/mouse.Mouse.html
  17. +137 −136 dist/doc/occlusion-scanner.OcclusionScanner.html
  18. +228 −184 dist/doc/particles.Particles.html
  19. +993 −961 dist/doc/pathfinder.PathFinder.html
  20. +472 −472 dist/doc/preload.Preloader.html
  21. +734 −704 dist/doc/proximity-tracker.ProximityTracker.html
  22. +250 −245 dist/doc/push-cam.PushCam.html
  23. +680 −654 dist/doc/rnd.html
  24. +414 −407 dist/doc/slowqueue.SlowQueue.html
  25. +2,068 −1,996 dist/doc/sprite.Sprite.html
  26. +2,524 −2,492 dist/doc/staggered-isometric.StaggeredIsometric.html
  27. +318 −318 dist/doc/stats.Stats.html
  28. +870 −865 dist/doc/tile.Tile.html
  29. +348 −337 dist/doc/time-phaser.TimePhaser.html
  30. +183 −136 dist/doc/track.Track.html
  31. +3,513 −3,478 dist/doc/tween.html
  32. +212 −207 dist/doc/ui.UI.html
  33. +33 −18 dist/snaps.js
  34. +41 −41 dist/snaps.min.js
  35. +24 −17 src/plugins/sprite/flock.js
  36. +9 −1 src/snaps.js
View
@@ -1,136 +1,155 @@
-<!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 spritemoves 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 commitproperty 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>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+</article>
+
+</section>
+
+
+
+
+ </div>
+</div>
+
+<br clear="both">
+
+<script> prettyPrint(); </script>
+</body>
+</html>
Oops, something went wrong.

0 comments on commit e4cf00d

Please sign in to comment.