Skip to content

Commit

Permalink
Merge ae63a15 into b8e627d
Browse files Browse the repository at this point in the history
  • Loading branch information
straker committed Nov 14, 2019
2 parents b8e627d + ae63a15 commit 424c598
Show file tree
Hide file tree
Showing 82 changed files with 5,956 additions and 3,907 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ node_modules
coverage
test/permutations/*.js
test/permutations/*.spec.js
test/typings/*.js

!test/permutations/index.js
7 changes: 4 additions & 3 deletions docs/api/animation.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
<li><a href="api/sprite" >Sprite</a></li>
<li><a href="api/spriteSheet" >SpriteSheet</a></li>
<li><a href="api/store" >Store</a></li>
<li><a href="api/text" >Text</a></li>
<li><a href="api/tileEngine" >TileEngine</a></li>
<li><a href="api/vector" >Vector</a></li>
</ul>
Expand All @@ -73,7 +74,7 @@ <h1>Animation(&#8203;properties)

<p>An object for drawing sprite sheet animations.</p>
<p>An animation defines the sequence of frames to use from a sprite sheet. It also defines at what speed the animation should run using <code>frameRate</code>.</p>
<p>Typically you don&#39;t create an <a href="api/animation">Animation</a> directly, but rather you would create them from <a href="api/spriteSheet">SpriteSheet</a> by passing the <code>animations</code> argument.</p>
<p>Typically you don&#39;t create an Animation directly, but rather you would create them from <a href="api/sprite">Sprite</a>Sheet by passing the <code>animations</code> argument.</p>
<div class="tablist">
<ul role="tablist">
<li role="presentation" data-tab="global">
Expand Down Expand Up @@ -263,7 +264,7 @@ <h2 id="clone">
<p>Clone an animation so it can be used more than once. By default animations passed to <a href="api/sprite">Sprite</a> will be cloned so no two sprites update the same animation. Otherwise two sprites who shared the same animation would make it update twice as fast.</p>

<h3><span class="visually-hidden">clone</span> Return value</h3>
<p><p>A new <a href="api/animation">Animation</a> instance.</p>
<p><p>A new Animation instance.</p>
</p>
</section>
<section>
Expand Down Expand Up @@ -366,7 +367,7 @@ <h3 id="title-render"><span class="visually-hidden">render</span> Parameters</sp
<code>properties.context</code>
<span class="optional">Optional</span>
</dt>
<dd><p>Canvas​Rendering​Context2D. The context the animation should draw to. Defaults to <a href="api/core#getContext">core.getContext()</a>.</p>
<dd><p>CanvasRenderingContext2D. The context the animation should draw to. Defaults to <a href="api/core#getContext">core.getContext()</a>.</p>
</dd>
</dl>

Expand Down
3 changes: 2 additions & 1 deletion docs/api/assets.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
<li><a href="api/sprite" >Sprite</a></li>
<li><a href="api/spriteSheet" >SpriteSheet</a></li>
<li><a href="api/store" >Store</a></li>
<li><a href="api/text" >Text</a></li>
<li><a href="api/tileEngine" >TileEngine</a></li>
<li><a href="api/vector" >Vector</a></li>
</ul>
Expand Down Expand Up @@ -477,7 +478,7 @@ <h3 id="title-load"><span class="visually-hidden">load</span> Parameters</span><
<code>urls</code>

</dt>
<dd><p>String or an Array of Strings. Comma separated list of asset urls to load.</p>
<dd><p>...an Array of Strings. Comma separated list of asset urls to load.</p>
</dd>
</dl>

Expand Down
13 changes: 7 additions & 6 deletions docs/api/collision.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
<li><a href="api/sprite" >Sprite</a></li>
<li><a href="api/spriteSheet" >SpriteSheet</a></li>
<li><a href="api/store" >Store</a></li>
<li><a href="api/text" >Text</a></li>
<li><a href="api/tileEngine" >TileEngine</a></li>
<li><a href="api/vector" >Vector</a></li>
</ul>
Expand Down Expand Up @@ -84,7 +85,7 @@ <h3 id="methods">Methods</h3>
<ul aria-labelledby="methods">
<li>
<a href="api/collision#collides">
<span>collides(&#8203;object, object)</span>
<span>collides(&#8203;object1, object2)</span>
</a>
</li>
</ul>
Expand All @@ -96,12 +97,12 @@ <h3 id="methods">Methods</h3>
<section>
<h2 id="collides">
<a href="api/collision#collides" class="section-link">
<span>collides(&#8203;object, object)</span>
<span>collides(&#8203;object1, object2)</span>
<span aria-hidden="true">#</span>
</a>
</h2>

<p>Check if a two objects collide. Uses a simple <a href="https://developer.mozilla.org/en-US/docs/Games/Techniques/2D_collision_detection#Axis-Aligned_Bounding_Box">Axis-Aligned Bounding Box (AABB) collision check</a>. Takes into account the sprites <a href="api/sprite/#anchor">anchor</a>.</p>
<p>Check if a two objects collide. Uses a simple <a href="https://developer.mozilla.org/en-US/docs/Games/Techniques/2D_collision_detection#Axis-Aligned_Bounding_Box">Axis-Aligned Bounding Box (AABB) collision check</a>. Takes into account the sprites <a href="api/sprite#anchor">anchor</a>.</p>
<p><strong>NOTE:</strong> Does not take into account object rotation. If you need collision detection between rotated objects you will need to implement your own <code>collides()</code> function. I suggest looking at the Separate Axis Theorem.</p>
<div class="tablist">
<ul role="tablist">
Expand Down Expand Up @@ -183,13 +184,13 @@ <h2 id="collides">
<h3 id="title-collides"><span class="visually-hidden">collides</span> Parameters</span></h3>
<dl aria-labelledby="title-collides">
<dt>
<code>object</code>
<code>object1</code>

</dt>
<dd><p>Sprite. Object reference.</p>
<dd><p>Object. Object reference.</p>
</dd>
<dt>
<code>object</code>
<code>object2</code>

</dt>
<dd><p>Object. Object to check collision against.</p>
Expand Down
1 change: 1 addition & 0 deletions docs/api/core.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
<li><a href="api/sprite" >Sprite</a></li>
<li><a href="api/spriteSheet" >SpriteSheet</a></li>
<li><a href="api/store" >Store</a></li>
<li><a href="api/text" >Text</a></li>
<li><a href="api/tileEngine" >TileEngine</a></li>
<li><a href="api/vector" >Vector</a></li>
</ul>
Expand Down
9 changes: 5 additions & 4 deletions docs/api/events.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
<li><a href="api/sprite" >Sprite</a></li>
<li><a href="api/spriteSheet" >SpriteSheet</a></li>
<li><a href="api/store" >Store</a></li>
<li><a href="api/text" >Text</a></li>
<li><a href="api/tileEngine" >TileEngine</a></li>
<li><a href="api/vector" >Vector</a></li>
</ul>
Expand Down Expand Up @@ -130,7 +131,7 @@ <h3 id="methods">Methods</h3>
<ul aria-labelledby="methods">
<li>
<a href="api/events#emit">
<span>emit(&#8203;event[, args])</span>
<span>emit(&#8203;event, args)</span>
</a>
</li>
<li>
Expand Down Expand Up @@ -167,7 +168,7 @@ <h2 id="lifecycle-events">
<section>
<h2 id="emit">
<a href="api/events#emit" class="section-link">
<span>emit(&#8203;event[, args])</span>
<span>emit(&#8203;event, args)</span>
<span aria-hidden="true">#</span>
</a>
</h2>
Expand All @@ -183,9 +184,9 @@ <h3 id="title-emit"><span class="visually-hidden">emit</span> Parameters</span><
</dd>
<dt>
<code>args</code>
<span class="optional">Optional</span>

</dt>
<dd><p>Any type. Arguments passed to all callbacks.</p>
<dd><p>...*. Arguments passed to all callbacks.</p>
</dd>
</dl>

Expand Down
7 changes: 4 additions & 3 deletions docs/api/gameLoop.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
<li><a href="api/sprite" >Sprite</a></li>
<li><a href="api/spriteSheet" >SpriteSheet</a></li>
<li><a href="api/store" >Store</a></li>
<li><a href="api/text" >Text</a></li>
<li><a href="api/tileEngine" >TileEngine</a></li>
<li><a href="api/vector" >Vector</a></li>
</ul>
Expand Down Expand Up @@ -237,7 +238,7 @@ <h3 id="methods">Methods</h3>
</li>
<li>
<a href="api/gameLoop#update">
<span>GameLoop&#8203;.update(&#8203;dt)</span>
<span>GameLoop&#8203;.update(&#8203;[dt])</span>
</a>
</li>
</ul>
Expand Down Expand Up @@ -343,7 +344,7 @@ <h2 id="stop">
<section>
<h2 id="update">
<a href="api/gameLoop#update" class="section-link">
<span>GameLoop&#8203;.update(&#8203;dt)</span>
<span>GameLoop&#8203;.update(&#8203;[dt])</span>
<span aria-hidden="true">#</span>
</a>
</h2>
Expand All @@ -353,7 +354,7 @@ <h3 id="title-update"><span class="visually-hidden">update</span> Parameters</sp
<dl aria-labelledby="title-update">
<dt>
<code>dt</code>

<span class="optional">Optional</span>
</dt>
<dd><p>Number. The fixed dt time of 1/60 of a frame.</p>
</dd>
Expand Down

0 comments on commit 424c598

Please sign in to comment.