Skip to content

Commit

Permalink
Standardized button names, reworked mapping lookup, API changes
Browse files Browse the repository at this point in the history
* button and axis names are standardized, no gamepad specifics
* mapping definition has been reworked to a more compressed form
* mapping lookup has been refactored to allow any filter combination
* dropped a few extra mappings due to standard mapping compliance
* API changes:
** dropped UNSUPPORTED event, definition marked deprecated (all are supported)
** removed public references of 'mapping' - both in events and gamepad object (no public use of it)
* Workflow changes:
** dropped buttonsDown member of gamepad - state can be determined via lastState
** _update() does not parse mapping anymore, all compiled at _connect()
  • Loading branch information
dertseha committed Jul 2, 2013
1 parent df47938 commit 957eeaf
Show file tree
Hide file tree
Showing 17 changed files with 2,878 additions and 1,145 deletions.
125 changes: 87 additions & 38 deletions doc/classes/FirefoxPlatform.html
Expand Up @@ -100,7 +100,7 @@ <h1>FirefoxPlatform Class</h1>


<div class="foundat">
Defined in: <a href="../files/gamepad.js.html#l215"><code>gamepad.js:215</code></a>
Defined in: <a href="../files/gamepad.js.html#l217"><code>gamepad.js:217</code></a>
</div>


Expand Down Expand Up @@ -155,7 +155,7 @@ <h3 class="name"><code>FirefoxPlatform</code></h3>



<a href="../files/gamepad.js.html#l215"><code>gamepad.js:215</code></a>
<a href="../files/gamepad.js.html#l217"><code>gamepad.js:217</code></a>

</p>

Expand Down Expand Up @@ -211,7 +211,16 @@ <h3>Methods</h3>
</li>

<li class="index-item method">
<a href="#method_getMapping">getMapping</a>
<a href="#method_getType()">getType()</a>


<span class="flag static">static</span>


</li>

<li class="index-item method">
<a href="#method_getType()">getType()</a>



Expand Down Expand Up @@ -295,7 +304,7 @@ <h3 class="name"><code>factory</code></h3>



<a href="../files/gamepad.js.html#l234"><code>gamepad.js:234</code></a>
<a href="../files/gamepad.js.html#l236"><code>gamepad.js:236</code></a>

</p>

Expand Down Expand Up @@ -353,26 +362,16 @@ <h4>Returns:</h4>
</div>


<div id="method_getMapping" class="method item">
<h3 class="name"><code>getMapping</code></h3>
<div id="method_getType()" class="method item">
<h3 class="name"><code>getType()</code></h3>


<div class="args">
<span class="paren">(</span><ul class="args-list inline commas">

<li class="arg">

<code>type</code>

</li>

</ul><span class="paren">)</span>
</div>
<span class="paren">()</span>



<span class="returns-inline">
<span class="type">Object</span>
<span class="type">String</span>
</span>


Expand All @@ -383,6 +382,8 @@ <h3 class="name"><code>getMapping</code></h3>



<span class="flag static">static</span>




Expand All @@ -399,7 +400,7 @@ <h3 class="name"><code>getMapping</code></h3>



<a href="../files/gamepad.js.html#l265"><code>gamepad.js:265</code></a>
<a href="../files/gamepad.js.html#l253"><code>gamepad.js:253</code></a>

</p>

Expand All @@ -414,28 +415,76 @@ <h3 class="name"><code>getMapping</code></h3>
</div>


<div class="params">
<h4>Parameters:</h4>

<ul class="params-list">

<li class="param">

<div class="returns">
<h4>Returns:</h4>

<div class="returns-description">


<code class="param-name">type</code>
<span class="type">String | Null</span>
<span class="type">String</span>:

'Firefox'

</div>
</div>




</div>

<div class="param-description">
<p>identifying the gamepad for which to provide the mapping</p>
</div>

<div id="method_getType()" class="method item">
<h3 class="name"><code>getType()</code></h3>


</li>

<span class="paren">()</span>



<span class="returns-inline">
<span class="type">String</span>
</span>














<div class="meta">


</ul>
</div>

<p>

Defined in




<a href="../files/gamepad.js.html#l262"><code>gamepad.js:262</code></a>

</p>





</div>

<div class="description">

</div>




Expand All @@ -445,9 +494,9 @@ <h4>Returns:</h4>
<div class="returns-description">


<span class="type">Object</span>:
<span class="type">String</span>:

mapping object
'Firefox'

</div>
</div>
Expand Down Expand Up @@ -493,7 +542,7 @@ <h3 class="name"><code>isSupported</code></h3>



<a href="../files/gamepad.js.html#l251"><code>gamepad.js:251</code></a>
<a href="../files/gamepad.js.html#l270"><code>gamepad.js:270</code></a>

</p>

Expand Down Expand Up @@ -560,7 +609,7 @@ <h3 class="name"><code>update</code></h3>



<a href="../files/gamepad.js.html#l259"><code>gamepad.js:259</code></a>
<a href="../files/gamepad.js.html#l278"><code>gamepad.js:278</code></a>

</p>

Expand Down

0 comments on commit 957eeaf

Please sign in to comment.