Key.html 12 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>JSDoc: Class: Key</title>
  6. <script src="scripts/prettify/prettify.js"> </script>
  7. <script src="scripts/prettify/lang-css.js"> </script>
  8. <!--[if lt IE 9]>
  9. <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  10. <![endif]-->
  11. <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
  12. <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
  13. </head>
  14. <body>
  15. <div id="main">
  16. <h1 class="page-title">Class: Key</h1>
  17. <section>
  18. <header>
  19. <h2><span class="attribs"><span class="type-signature"></span></span>Key<span class="signature">()</span><span class="type-signature"></span></h2>
  20. </header>
  21. <article>
  22. <div class="container-overview">
  23. <h4 class="name" id="Key"><span class="type-signature"></span>new Key<span class="signature">()</span><span class="type-signature"></span></h4>
  24. <div class="description">
  25. Key is used by Keyboard, Pointer, etc, to represent a key state.
  26. </div>
  27. <dl class="details">
  28. <dt class="tag-source">Source:</dt>
  29. <dd class="tag-source"><ul class="dummy"><li>
  30. <a href="input_Key.js.html">input/Key.js</a>, <a href="input_Key.js.html#line6">line 6</a>
  31. </li></ul></dd>
  32. </dl>
  33. </div>
  34. <h3 class="subsection-title">Members</h3>
  35. <h4 class="name" id=".DOWN"><span class="type-signature">(static) </span>DOWN<span class="type-signature"> :number</span></h4>
  36. <div class="description">
  37. Key down event.
  38. </div>
  39. <h5>Type:</h5>
  40. <ul>
  41. <li>
  42. <span class="param-type">number</span>
  43. </li>
  44. </ul>
  45. <dl class="details">
  46. <dt class="tag-source">Source:</dt>
  47. <dd class="tag-source"><ul class="dummy"><li>
  48. <a href="input_Key.js.html">input/Key.js</a>, <a href="input_Key.js.html#line35">line 35</a>
  49. </li></ul></dd>
  50. </dl>
  51. <h4 class="name" id=".RESET"><span class="type-signature">(static) </span>RESET<span class="type-signature"> :number</span></h4>
  52. <div class="description">
  53. Key reset event.
  54. </div>
  55. <h5>Type:</h5>
  56. <ul>
  57. <li>
  58. <span class="param-type">number</span>
  59. </li>
  60. </ul>
  61. <dl class="details">
  62. <dt class="tag-source">Source:</dt>
  63. <dd class="tag-source"><ul class="dummy"><li>
  64. <a href="input_Key.js.html">input/Key.js</a>, <a href="input_Key.js.html#line49">line 49</a>
  65. </li></ul></dd>
  66. </dl>
  67. <h4 class="name" id=".UP"><span class="type-signature">(static) </span>UP<span class="type-signature"> :number</span></h4>
  68. <div class="description">
  69. Key up event.
  70. </div>
  71. <h5>Type:</h5>
  72. <ul>
  73. <li>
  74. <span class="param-type">number</span>
  75. </li>
  76. </ul>
  77. <dl class="details">
  78. <dt class="tag-source">Source:</dt>
  79. <dd class="tag-source"><ul class="dummy"><li>
  80. <a href="input_Key.js.html">input/Key.js</a>, <a href="input_Key.js.html#line42">line 42</a>
  81. </li></ul></dd>
  82. </dl>
  83. <h4 class="name" id="justPressed"><span class="type-signature"></span>justPressed<span class="type-signature"> :boolean</span></h4>
  84. <div class="description">
  85. Indicates if this key was just pressed.
  86. </div>
  87. <h5>Type:</h5>
  88. <ul>
  89. <li>
  90. <span class="param-type">boolean</span>
  91. </li>
  92. </ul>
  93. <dl class="details">
  94. <dt class="tag-source">Source:</dt>
  95. <dd class="tag-source"><ul class="dummy"><li>
  96. <a href="input_Key.js.html">input/Key.js</a>, <a href="input_Key.js.html#line20">line 20</a>
  97. </li></ul></dd>
  98. </dl>
  99. <h4 class="name" id="justReleased"><span class="type-signature"></span>justReleased<span class="type-signature"> :boolean</span></h4>
  100. <div class="description">
  101. Indicates if this key was just released.
  102. </div>
  103. <h5>Type:</h5>
  104. <ul>
  105. <li>
  106. <span class="param-type">boolean</span>
  107. </li>
  108. </ul>
  109. <dl class="details">
  110. <dt class="tag-source">Source:</dt>
  111. <dd class="tag-source"><ul class="dummy"><li>
  112. <a href="input_Key.js.html">input/Key.js</a>, <a href="input_Key.js.html#line27">line 27</a>
  113. </li></ul></dd>
  114. </dl>
  115. <h4 class="name" id="pressed"><span class="type-signature"></span>pressed<span class="type-signature"> :boolean</span></h4>
  116. <div class="description">
  117. Indicates if this key is currently pressed.
  118. </div>
  119. <h5>Type:</h5>
  120. <ul>
  121. <li>
  122. <span class="param-type">boolean</span>
  123. </li>
  124. </ul>
  125. <dl class="details">
  126. <dt class="tag-source">Source:</dt>
  127. <dd class="tag-source"><ul class="dummy"><li>
  128. <a href="input_Key.js.html">input/Key.js</a>, <a href="input_Key.js.html#line13">line 13</a>
  129. </li></ul></dd>
  130. </dl>
  131. <h3 class="subsection-title">Methods</h3>
  132. <h4 class="name" id="reset"><span class="type-signature"></span>reset<span class="signature">()</span><span class="type-signature"></span></h4>
  133. <div class="description">
  134. Reset key to default values.
  135. </div>
  136. <dl class="details">
  137. <dt class="tag-source">Source:</dt>
  138. <dd class="tag-source"><ul class="dummy"><li>
  139. <a href="input_Key.js.html">input/Key.js</a>, <a href="input_Key.js.html#line103">line 103</a>
  140. </li></ul></dd>
  141. </dl>
  142. <h4 class="name" id="set"><span class="type-signature"></span>set<span class="signature">(justPressed, pressed, justReleased)</span><span class="type-signature"></span></h4>
  143. <div class="description">
  144. Set this key attributes manually.
  145. </div>
  146. <h5>Parameters:</h5>
  147. <table class="params">
  148. <thead>
  149. <tr>
  150. <th>Name</th>
  151. <th>Type</th>
  152. <th class="last">Description</th>
  153. </tr>
  154. </thead>
  155. <tbody>
  156. <tr>
  157. <td class="name"><code>justPressed</code></td>
  158. <td class="type">
  159. <span class="param-type">boolean</span>
  160. </td>
  161. <td class="description last">Indicates if the button was just pressed.</td>
  162. </tr>
  163. <tr>
  164. <td class="name"><code>pressed</code></td>
  165. <td class="type">
  166. <span class="param-type">boolean</span>
  167. </td>
  168. <td class="description last">Indicates if the button is currently being pressed.</td>
  169. </tr>
  170. <tr>
  171. <td class="name"><code>justReleased</code></td>
  172. <td class="type">
  173. <span class="param-type">boolean</span>
  174. </td>
  175. <td class="description last">Indicates if the button was just released.</td>
  176. </tr>
  177. </tbody>
  178. </table>
  179. <dl class="details">
  180. <dt class="tag-source">Source:</dt>
  181. <dd class="tag-source"><ul class="dummy"><li>
  182. <a href="input_Key.js.html">input/Key.js</a>, <a href="input_Key.js.html#line93">line 93</a>
  183. </li></ul></dd>
  184. </dl>
  185. <h4 class="name" id="update"><span class="type-signature"></span>update<span class="signature">(action)</span><span class="type-signature"></span></h4>
  186. <div class="description">
  187. Update Key status based on new key state.
  188. </div>
  189. <h5>Parameters:</h5>
  190. <table class="params">
  191. <thead>
  192. <tr>
  193. <th>Name</th>
  194. <th>Type</th>
  195. <th class="last">Description</th>
  196. </tr>
  197. </thead>
  198. <tbody>
  199. <tr>
  200. <td class="name"><code>action</code></td>
  201. <td class="type">
  202. <span class="param-type">number</span>
  203. </td>
  204. <td class="description last">Key action that was performed.</td>
  205. </tr>
  206. </tbody>
  207. </table>
  208. <dl class="details">
  209. <dt class="tag-source">Source:</dt>
  210. <dd class="tag-source"><ul class="dummy"><li>
  211. <a href="input_Key.js.html">input/Key.js</a>, <a href="input_Key.js.html#line58">line 58</a>
  212. </li></ul></dd>
  213. </dl>
  214. </article>
  215. </section>
  216. </div>
  217. <nav>
  218. <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="AnimationTimer.html">AnimationTimer</a></li><li><a href="BarGraph.html">BarGraph</a></li><li><a href="BezierCurve.html">BezierCurve</a></li><li><a href="Box.html">Box</a></li><li><a href="Box2.html">Box2</a></li><li><a href="BoxMask.html">BoxMask</a></li><li><a href="Circle.html">Circle</a></li><li><a href="ColorStyle.html">ColorStyle</a></li><li><a href="DOM.html">DOM</a></li><li><a href="EventManager.html">EventManager</a></li><li><a href="FileUtils.html">FileUtils</a></li><li><a href="Gauge.html">Gauge</a></li><li><a href="GradientColorStop.html">GradientColorStop</a></li><li><a href="GradientStyle.html">GradientStyle</a></li><li><a href="Graph.html">Graph</a></li><li><a href="Helpers.html">Helpers</a></li><li><a href="Image.html">Image</a></li><li><a href="Key.html">Key</a></li><li><a href="Line.html">Line</a></li><li><a href="LinearGradientStyle.html">LinearGradientStyle</a></li><li><a href="Mask.html">Mask</a></li><li><a href="Matrix.html">Matrix</a></li><li><a href="MultiLineText.html">MultiLineText</a></li><li><a href="Node.html">Node</a></li><li><a href="NodeConnector.html">NodeConnector</a></li><li><a href="NodeGraph.html">NodeGraph</a></li><li><a href="NodeSocket.html">NodeSocket</a></li><li><a href="Object2D.html">Object2D</a></li><li><a href="Path.html">Path</a></li><li><a href="Pattern.html">Pattern</a></li><li><a href="PatternStyle.html">PatternStyle</a></li><li><a href="PieChart.html">PieChart</a></li><li><a href="Pointer.html">Pointer</a></li><li><a href="QuadraticCurve.html">QuadraticCurve</a></li><li><a href="RadialGradientStyle.html">RadialGradientStyle</a></li><li><a href="Renderer.html">Renderer</a></li><li><a href="RoundedBox.html">RoundedBox</a></li><li><a href="ScatterGraph.html">ScatterGraph</a></li><li><a href="Style.html">Style</a></li><li><a href="Text.html">Text</a></li><li><a href="UUID.html">UUID</a></li><li><a href="Vector2.html">Vector2</a></li><li><a href="Viewport.html">Viewport</a></li><li><a href="ViewportControls.html">ViewportControls</a></li></ul><h3>Global</h3><ul><li><a href="global.html#writeFile">writeFile</a></li></ul>
  219. </nav>
  220. <br class="clear">
  221. <footer>
  222. Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Sat Sep 17 2022 14:24:36 GMT+0100 (Hora de verão da Europa Ocidental)
  223. </footer>
  224. <script> prettyPrint(); </script>
  225. <script src="scripts/linenumber.js"> </script>
  226. </body>
  227. </html>