mirror of
https://github.com/Reuh/ubiquitousse.git
synced 2025-10-27 17:19:31 +00:00
Improve documentation
This commit is contained in:
parent
489d0b4ba7
commit
af3bd51cb3
25 changed files with 1468 additions and 725 deletions
|
|
@ -62,8 +62,13 @@
|
|||
<div id="content">
|
||||
|
||||
<h1>Module <code>timer</code></h1>
|
||||
<p>Time related functions.</p>
|
||||
<p>Timer management for Lua.</p>
|
||||
<p> No dependency.</p>
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">TODO
|
||||
</pre>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2><a href="#Module">Module </a></h2>
|
||||
|
|
@ -84,19 +89,19 @@
|
|||
<h2><a href="#Timer_objects">Timer objects </a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Timer:after">Timer:after (time)</a></td>
|
||||
<td class="name" nowrap><a href="#Timer:after">Timer:after ([, time])</a></td>
|
||||
<td class="summary">Wait time seconds before running the function.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Timer:every">Timer:every (time)</a></td>
|
||||
<td class="name" nowrap><a href="#Timer:every">Timer:every ([, time])</a></td>
|
||||
<td class="summary">Run the function every time millisecond.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Timer:times">Timer:times (count)</a></td>
|
||||
<td class="name" nowrap><a href="#Timer:times">Timer:times ([, count])</a></td>
|
||||
<td class="summary">The function will not execute more than count times.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Timer:during">Timer:during (time)</a></td>
|
||||
<td class="name" nowrap><a href="#Timer:during">Timer:during ([, time])</a></td>
|
||||
<td class="summary">The timer will be active for a time duration.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
@ -193,7 +198,7 @@
|
|||
<h2><a href="#TweenTimer_objects">TweenTimer objects </a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#r.chain">r.chain (_, duration_, tbl_, to_, method_)</a></td>
|
||||
<td class="name" nowrap><a href="#r:chain">r:chain (duration, tbl, to[, method="linear"])</a></td>
|
||||
<td class="summary">Creates another tween which will be initialized when the current one ends.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
@ -264,7 +269,7 @@
|
|||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../modules/timer.html#Timer_objects">Timer</a></span>
|
||||
the object
|
||||
the new timer
|
||||
</ol>
|
||||
|
||||
|
||||
|
|
@ -326,7 +331,7 @@
|
|||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "Timer:after"></a>
|
||||
<strong>Timer:after (time)</strong>
|
||||
<strong>Timer:after ([, time])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Wait time seconds before running the function.
|
||||
|
|
@ -340,11 +345,18 @@
|
|||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">time</span>
|
||||
|
||||
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
duration to wait
|
||||
(<em>optional</em>)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../modules/timer.html#Timer_objects">Timer</a></span>
|
||||
the same timer, for chaining method calls
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
|
@ -352,7 +364,7 @@
|
|||
</dd>
|
||||
<dt>
|
||||
<a name = "Timer:every"></a>
|
||||
<strong>Timer:every (time)</strong>
|
||||
<strong>Timer:every ([, time])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Run the function every time millisecond.
|
||||
|
|
@ -366,11 +378,18 @@
|
|||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">time</span>
|
||||
|
||||
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
duration between execution
|
||||
(<em>optional</em>)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../modules/timer.html#Timer_objects">Timer</a></span>
|
||||
the same timer, for chaining method calls
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
|
@ -378,7 +397,7 @@
|
|||
</dd>
|
||||
<dt>
|
||||
<a name = "Timer:times"></a>
|
||||
<strong>Timer:times (count)</strong>
|
||||
<strong>Timer:times ([, count])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
The function will not execute more than count times.
|
||||
|
|
@ -392,11 +411,18 @@
|
|||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">count</span>
|
||||
|
||||
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
number of times
|
||||
(<em>optional</em>)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../modules/timer.html#Timer_objects">Timer</a></span>
|
||||
the same timer, for chaining method calls
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
|
@ -404,7 +430,7 @@
|
|||
</dd>
|
||||
<dt>
|
||||
<a name = "Timer:during"></a>
|
||||
<strong>Timer:during (time)</strong>
|
||||
<strong>Timer:during ([, time])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
The timer will be active for a time duration.
|
||||
|
|
@ -418,11 +444,18 @@
|
|||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">time</span>
|
||||
|
||||
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
duration of execution
|
||||
(<em>optional</em>)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../modules/timer.html#Timer_objects">Timer</a></span>
|
||||
the same timer, for chaining method calls
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
|
@ -464,11 +497,17 @@
|
|||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">func</span>
|
||||
|
||||
|
||||
<span class="types"><span class="type">function</span></span>
|
||||
function that returns true if condition is verified
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../modules/timer.html#Timer_objects">Timer</a></span>
|
||||
the same timer, for chaining method calls
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
|
@ -490,11 +529,17 @@
|
|||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">func</span>
|
||||
|
||||
|
||||
<span class="types"><span class="type">function</span></span>
|
||||
function that returns true if condition is verified
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../modules/timer.html#Timer_objects">Timer</a></span>
|
||||
the same timer, for chaining method calls
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
|
@ -517,11 +562,17 @@
|
|||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">func</span>
|
||||
|
||||
|
||||
<span class="types"><span class="type">function</span></span>
|
||||
function that returns true if condition is verified
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../modules/timer.html#Timer_objects">Timer</a></span>
|
||||
the same timer, for chaining method calls
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
|
@ -543,11 +594,17 @@
|
|||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">func</span>
|
||||
|
||||
|
||||
<span class="types"><span class="type">function</span></span>
|
||||
function that returns true if condition is verified
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../modules/timer.html#Timer_objects">Timer</a></span>
|
||||
the same timer, for chaining method calls
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
|
@ -585,6 +642,12 @@
|
|||
</ul>
|
||||
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../modules/timer.html#Timer_objects">Timer</a></span>
|
||||
the same timer, for chaining method calls
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
|
@ -603,6 +666,12 @@
|
|||
</ul>
|
||||
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../modules/timer.html#Timer_objects">Timer</a></span>
|
||||
the same timer, for chaining method calls
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
|
@ -621,6 +690,12 @@
|
|||
</ul>
|
||||
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../modules/timer.html#Timer_objects">Timer</a></span>
|
||||
the same timer, for chaining method calls
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
|
@ -641,11 +716,17 @@
|
|||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">time</span>
|
||||
|
||||
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
duration to skip
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../modules/timer.html#Timer_objects">Timer</a></span>
|
||||
the same timer, for chaining method calls
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
|
@ -685,11 +766,17 @@
|
|||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">func</span>
|
||||
|
||||
|
||||
<span class="types"><span class="type">function</span></span>
|
||||
function to call when timer start
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../modules/timer.html#Timer_objects">Timer</a></span>
|
||||
the same timer, for chaining method calls
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
|
@ -710,11 +797,17 @@
|
|||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">func</span>
|
||||
|
||||
|
||||
<span class="types"><span class="type">function</span></span>
|
||||
function to call at each timer update
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../modules/timer.html#Timer_objects">Timer</a></span>
|
||||
the same timer, for chaining method calls
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
|
@ -735,11 +828,17 @@
|
|||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">func</span>
|
||||
|
||||
|
||||
<span class="types"><span class="type">function</span></span>
|
||||
function to call when timer ends
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../modules/timer.html#Timer_objects">Timer</a></span>
|
||||
the same timer, for chaining method calls
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
|
@ -780,8 +879,8 @@
|
|||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">func</span>
|
||||
|
||||
|
||||
<span class="types"><span class="type">function</span></span>
|
||||
function called by the chained timer
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
|
@ -789,8 +888,7 @@
|
|||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../modules/timer.html#Timer_objects">Timer</a></span>
|
||||
|
||||
|
||||
the new timer
|
||||
</ol>
|
||||
|
||||
|
||||
|
|
@ -917,11 +1015,17 @@
|
|||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">func</span>
|
||||
|
||||
|
||||
<span class="types"><span class="type">function</span></span>
|
||||
function called by the timer
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../modules/timer.html#Timer_objects">Timer</a></span>
|
||||
the new timer
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
|
@ -960,6 +1064,12 @@
|
|||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../modules/timer.html#TweenTimer_objects">TweenTimer</a></span>
|
||||
the new timer
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
|
@ -991,13 +1101,13 @@
|
|||
</div>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "r.chain"></a>
|
||||
<strong>r.chain (_, duration_, tbl_, to_, method_)</strong>
|
||||
<a name = "r:chain"></a>
|
||||
<strong>r:chain (duration, tbl, to[, method="linear"])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Creates another tween which will be initialized when the current one ends.
|
||||
If tbl<em> and/or method</em> are not specified, the values from the current tween will be used.
|
||||
Returns the new tween.
|
||||
Returns the new tween timer.
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
|
|
@ -1006,25 +1116,22 @@
|
|||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">_</span>
|
||||
|
||||
|
||||
<li><span class="parameter">duration</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
tween duration (seconds)
|
||||
</li>
|
||||
<li><span class="parameter">duration_</span>
|
||||
|
||||
|
||||
<li><span class="parameter">tbl</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
||||
the table containing the values to tween
|
||||
</li>
|
||||
<li><span class="parameter">tbl_</span>
|
||||
|
||||
|
||||
<li><span class="parameter">to</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
||||
the new values
|
||||
</li>
|
||||
<li><span class="parameter">to_</span>
|
||||
|
||||
|
||||
</li>
|
||||
<li><span class="parameter">method_</span>
|
||||
|
||||
|
||||
<li><span class="parameter">method</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string/function</a></span>
|
||||
tweening method (string name or the actual function(time, start, change, duration))
|
||||
(<em>default</em> "linear")
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
|
@ -1032,8 +1139,7 @@
|
|||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../modules/timer.html#TweenTimer_objects">TweenTimer</a></span>
|
||||
|
||||
|
||||
the new timer
|
||||
</ol>
|
||||
|
||||
|
||||
|
|
@ -1047,7 +1153,7 @@
|
|||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||
<i style="float:right;">Last updated 2021-12-25 23:19:42 </i>
|
||||
<i style="float:right;">Last updated 2021-12-26 18:13:01 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue