Skip to content

Commit

Permalink
Morph state and anti-jitter
Browse files Browse the repository at this point in the history
  • Loading branch information
izb committed May 27, 2013
1 parent 0b37b14 commit 074d2e1
Show file tree
Hide file tree
Showing 7 changed files with 413 additions and 269 deletions.
10 changes: 9 additions & 1 deletion dist/doc/8way.Face8Way.html
Expand Up @@ -63,7 +63,15 @@ <h4 class="name" id="Face8Way"><span class="type-signature"></span>new Face8Way<
<p>
See The <code>opts<code> parameter in the <a href="sprite.Sprite.html"><code>Sprite constructor</code></a>
<p>
This plugin takes no options.
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>


Expand Down
78 changes: 77 additions & 1 deletion dist/doc/sprite.Sprite.html
Expand Up @@ -1262,7 +1262,7 @@ <h5>Parameters:</h5>


<dt>
<h4 class="name" id="setState"><span class="type-signature"></span>setState<span class="signature">(state, ext)</span><span class="type-signature"></span></h4>
<h4 class="name" id="setState"><span class="type-signature"></span>setState<span class="signature">(state, ext, <span class="optional">epoch</span>)</span><span class="type-signature"> &rarr; {Boolean}</span></h4>


</dt>
Expand Down Expand Up @@ -1294,6 +1294,8 @@ <h5>Parameters:</h5>
<th>Type</th>


<th>Argument</th>




Expand All @@ -1319,6 +1321,14 @@ <h5>Parameters:</h5>
</td>


<td class="attributes">





</td>




Expand All @@ -1343,13 +1353,55 @@ <h5>Parameters:</h5>
</td>


<td class="attributes">





</td>




<td class="description last">The state extension to set, or undefined.</td>
</tr>



<tr>

<td class="name"><code>epoch</code></td>


<td class="type">


<span class="param-type">Number</span>



</td>


<td class="attributes">

&lt;optional><br>





</td>




<td class="description last">If omitted, the state will begin now. Override this by passing in a
time in order to skew the animation jog position.</td>
</tr>


</tbody>
</table>

Expand Down Expand Up @@ -1387,6 +1439,30 @@ <h5>Parameters:</h5>



<h5>Returns:</h5>


<div class="param-desc">
true if the state was changed. False if, for example, the state was already
the one requested.
</div>



<dl>
<dt class="oneline">
Type
</dt>
<dd class="oneline">

<span class="param-type">Boolean</span>


</dd>
</dl>





</dd>
Expand Down

0 comments on commit 074d2e1

Please sign in to comment.