anim.html 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html>
  4. <head>
  5. <title>Reference</title>
  6. <link rel="stylesheet" href="../../luadoc.css" type="text/css" />
  7. <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
  8. </head>
  9. <body>
  10. <div id="container">
  11. <div id="product">
  12. <div id="product_logo"></div>
  13. <div id="product_name"><big><b></b></big></div>
  14. <div id="product_description"></div>
  15. </div> <!-- id="product" -->
  16. <div id="main">
  17. <div id="navigation">
  18. <h1>LuaDoc</h1>
  19. <ul>
  20. <li><a href="../../index.html">Index</a></li>
  21. </ul>
  22. <!-- Module list -->
  23. <!-- File list -->
  24. <h1>Files</h1>
  25. <ul>
  26. <li><strong>anim/anim.lua</strong></li>
  27. <li>
  28. <a href="../../files/anim/style.html">anim/style.lua</a>
  29. </li>
  30. </ul>
  31. </div> <!-- id="navigation" -->
  32. <div id="content">
  33. <h1>File <code>anim/anim.lua</code></h1>
  34. <h2>Functions</h2>
  35. <table class="function_list">
  36. <tr>
  37. <td class="name" nowrap><a href="#anim:finish">anim:finish</a>&nbsp;()</td>
  38. <td class="summary">Finishes the animation instance, going instantly to the finish value.</td>
  39. </tr>
  40. <tr>
  41. <td class="name" nowrap><a href="#anim:new">anim:new</a>&nbsp;(anim_table)</td>
  42. <td class="summary">Create a new animation instance.</td>
  43. </tr>
  44. <tr>
  45. <td class="name" nowrap><a href="#anim:pause">anim:pause</a>&nbsp;()</td>
  46. <td class="summary">Pause the animation instance.</td>
  47. </tr>
  48. <tr>
  49. <td class="name" nowrap><a href="#anim:play">anim:play</a>&nbsp;()</td>
  50. <td class="summary">Plays or resumes the animation instance.</td>
  51. </tr>
  52. <tr>
  53. <td class="name" nowrap><a href="#anim:reverse">anim:reverse</a>&nbsp;()</td>
  54. <td class="summary">Reverse the animation instance.</td>
  55. </tr>
  56. <tr>
  57. <td class="name" nowrap><a href="#anim:update">anim:update</a>&nbsp;(dt)</td>
  58. <td class="summary">Updates all animations, use inside love.update().</td>
  59. </tr>
  60. </table>
  61. <h2>Tables</h2>
  62. <table class="table_list">
  63. <tr>
  64. <td class="name" nowrap><a href="#anim_table">anim_table</a></td>
  65. <td class="summary">An animation table </td>
  66. </tr>
  67. <tr>
  68. <td class="name" nowrap><a href="#styles">styles</a></td>
  69. <td class="summary">List of animation styles you can use.</td>
  70. </tr>
  71. </table>
  72. <h2>Examples</h2>
  73. <table class="table_list">
  74. <tr>
  75. <td class="name" nowrap><a href="#example1">example1</a></td>
  76. <td class="summary">Example </td>
  77. </tr>
  78. </table>
  79. <br/>
  80. <br/>
  81. <h2><a name="functions"></a>Functions</h2>
  82. <dl class="function">
  83. <dt><a name="anim:finish"></a><strong>anim:finish</strong>&nbsp;()</dt>
  84. <dd>
  85. <p class="func_description">Finishes the animation instance, going instantly to the finish value.</p>
  86. </dd>
  87. <dt><a name="anim:new"></a><strong>anim:new</strong>&nbsp;(anim_table)</dt>
  88. <dd>
  89. <p class="func_description">Create a new animation instance.</p>
  90. <h3>Parameters</h3>
  91. <ul>
  92. <li>
  93. <b>anim_table</b>: A table of animation paremeters.
  94. </li>
  95. </ul>
  96. <h3>Usage:</h3>
  97. <pre class="example"> new_animation = anim:new{<br /> table = myTable,<br /> key = 'x_position',<br /> start = 12,<br /> finish = 120,<br /> time = 4,<br /> style = 'linear'<br /> }<br /> </pre><br />
  98. <h3>Return value:</h3>
  99. <p class="func_return">table: An animation instance you can call anim methods on.</p>
  100. <h3>See also:</h3>
  101. <ul>
  102. <li><a href="../../files/anim/anim.html#anim_table">
  103. anim_table
  104. </a>
  105. </ul>
  106. </dd>
  107. <dt><a name="anim:pause"></a><strong>anim:pause</strong>&nbsp;()</dt>
  108. <dd>
  109. <p class="func_description">Pause the animation instance.</p>
  110. </dd>
  111. <dt><a name="anim:play"></a><strong>anim:play</strong>&nbsp;()</dt>
  112. <dd>
  113. <p class="func_description">Plays or resumes the animation instance.</p>
  114. <h3>Usage:</h3>
  115. <pre class="example"> new_anim = anim:new{}<br /> new_anim:play()<br /> </pre><br />
  116. </dd>
  117. <dt><a name="anim:reverse"></a><strong>anim:reverse</strong>&nbsp;()</dt>
  118. <dd>
  119. <p class="func_description">Reverse the animation instance. <br/> Reverses the animation, going from finish to start.</p>
  120. </dd>
  121. <dt><a name="anim:update"></a><strong>anim:update</strong>&nbsp;(dt)</dt>
  122. <dd>
  123. <p class="func_description">Updates all animations, use inside love.update().</p>
  124. <h3>Parameters</h3>
  125. <ul>
  126. <li>
  127. <b>dt</b>: delta time
  128. </li>
  129. </ul>
  130. </dd>
  131. </dl>
  132. <h2><a name="tables"></a>Tables</h2>
  133. <dl class="table">
  134. <dt><a name="anim_table"></a><strong>anim_table</strong></dt>
  135. <dd>An animation table
  136. <em>Fields</em>
  137. <ul>
  138. <li>
  139. <b>table</b> The table to pass to the anim object
  140. </li>
  141. <li>
  142. <b>key</b> The key to animate. (table[key] will be animated).
  143. </li>
  144. <li>
  145. <b>start</b> The value the animation starts at. (if nil current table[key] value will be used).
  146. </li>
  147. <li>
  148. <b>finish</b> The value the animation finishes at. (if nil current table[key] value will be used).
  149. </li>
  150. <li>
  151. <b>time</b> The time it takes for the animation to complete. (in seconds, default 1).
  152. </li>
  153. <li>
  154. <b>delay</b> The time it takes for the animation to start after calling anim:play(). (in seconds, default 0).
  155. </li>
  156. <li>
  157. <b>style</b> The style of the animation. (a string, default 'linear'). <a href='#styles'>See style</a>.
  158. </li>
  159. </ul>
  160. </dd>
  161. <dt><a name="styles"></a><strong>styles</strong></dt>
  162. <dd>List of animation styles you can use.
  163. <em>Fields</em>
  164. <ul>
  165. <li>
  166. <b>linear</b>
  167. </li>
  168. <li>
  169. <b>quartIn</b>
  170. </li>
  171. <li>
  172. <b>quartOut</b>
  173. </li>
  174. <li>
  175. <b>quartInOut</b>
  176. </li>
  177. <li>
  178. <b>quadIn</b>
  179. </li>
  180. <li>
  181. <b>quadOut</b>
  182. </li>
  183. <li>
  184. <b>quadInOut</b>
  185. </li>
  186. <li>
  187. <b>expoIn</b>
  188. </li>
  189. <li>
  190. <b>expoOut</b>
  191. </li>
  192. <li>
  193. <b>expoInOut</b>
  194. </li>
  195. <li>
  196. <b>elastic</b>
  197. </li>
  198. </ul>
  199. </dd>
  200. </dl>
  201. <h2><a name="examples"></a>Examples</h2>
  202. <dl class="example">
  203. <dt><a name="example1"></a><strong>example1</strong></dt>
  204. <dd>
  205. <div class="example">
  206. This does something? <pre class="example"><br /> testing<br /> this<br /> usage!<br /> lol<br /> lol<br /> end<br /> </pre><br />
  207. </div>
  208. </dd>
  209. </dl>
  210. </div> <!-- id="content" -->
  211. </div> <!-- id="main" -->
  212. <div id="about">
  213. <p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
  214. </div> <!-- id="about" -->
  215. </div> <!-- id="container" -->
  216. </body>
  217. </html>