mirror of
https://github.com/bakpakin/tiny-ecs.git
synced 2026-07-22 07:56:52 -06:00
Update docs to 1.0.1
This commit is contained in:
+44
-36
@@ -29,7 +29,6 @@
|
|||||||
|
|
||||||
<h2>Contents</h2>
|
<h2>Contents</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#Fields">Fields</a></li>
|
|
||||||
<li><a href="#Filter_functions">Filter functions </a></li>
|
<li><a href="#Filter_functions">Filter functions </a></li>
|
||||||
<li><a href="#System_functions">System functions </a></li>
|
<li><a href="#System_functions">System functions </a></li>
|
||||||
<li><a href="#World_functions">World functions </a></li>
|
<li><a href="#World_functions">World functions </a></li>
|
||||||
@@ -54,13 +53,6 @@
|
|||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
<h2><a href="#Fields">Fields</a></h2>
|
|
||||||
<table class="function_list">
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#tiny._VERSION">tiny._VERSION</a></td>
|
|
||||||
<td class="summary">Tiny-ecs Version, a period-separated three number string like "1.2.3"</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<h2><a href="#Filter_functions">Filter functions </a></h2>
|
<h2><a href="#Filter_functions">Filter functions </a></h2>
|
||||||
<table class="function_list">
|
<table class="function_list">
|
||||||
<tr>
|
<tr>
|
||||||
@@ -74,10 +66,13 @@
|
|||||||
</table>
|
</table>
|
||||||
<h2><a href="#System_functions">System functions </a></h2>
|
<h2><a href="#System_functions">System functions </a></h2>
|
||||||
<table class="function_list">
|
<table class="function_list">
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#tiny.processingSystem">tiny.processingSystem (table)</a></td>
|
||||||
|
<td class="summary">Creates a Processing System.</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#tiny.system">tiny.system (table)</a></td>
|
<td class="name" nowrap><a href="#tiny.system">tiny.system (table)</a></td>
|
||||||
<td class="summary">Marks a table conforming to the System interface as a System recognized by
|
<td class="summary">Creates a System.</td>
|
||||||
tiny-ecs.</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<h2><a href="#World_functions">World functions </a></h2>
|
<h2><a href="#World_functions">World functions </a></h2>
|
||||||
@@ -164,24 +159,6 @@
|
|||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
<h2><a name="Fields"></a>Fields</h2>
|
|
||||||
|
|
||||||
<dl class="function">
|
|
||||||
<dt>
|
|
||||||
<a name = "tiny._VERSION"></a>
|
|
||||||
<strong>tiny._VERSION</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Tiny-ecs Version, a period-separated three number string like "1.2.3"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
<h2><a name="Filter_functions"></a>Filter functions </h2>
|
<h2><a name="Filter_functions"></a>Filter functions </h2>
|
||||||
|
|
||||||
|
|
||||||
@@ -235,17 +212,48 @@
|
|||||||
|
|
||||||
A System is a wrapper around function callbacks for manipulating Entities.
|
A System is a wrapper around function callbacks for manipulating Entities.
|
||||||
<dl class="function">
|
<dl class="function">
|
||||||
|
<dt>
|
||||||
|
<a name = "tiny.processingSystem"></a>
|
||||||
|
<strong>tiny.processingSystem (table)</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Creates a Processing System. A Processing System iterates through its
|
||||||
|
Entities in no particluar order, and updates them individually. It has two
|
||||||
|
important fields, <code>function system:process(entity, dt)</code>, and <code>function
|
||||||
|
system:filter(entity)</code>. <code>entities</code> is an unordered table of Entities with
|
||||||
|
Entities as KEYS, and <code>dt</code> is the delta time. There are also a few other
|
||||||
|
optional callbacks:
|
||||||
|
<code>function system:preProcess(entities, dt)</code> - returns nil,
|
||||||
|
<code>function system:postProcess(entities, dt)</code> - returns nil,
|
||||||
|
<code>function system:onAdd(entity)</code> - returns nil,
|
||||||
|
<code>function system:onRemove(entity)</code> - returns nil.
|
||||||
|
For Filters, it is conveient to use <a href="index.html#tiny.requireAll">tiny.requireAll</a> or <a href="index.html#tiny.requireOne">tiny.requireOne</a>,
|
||||||
|
but one can write their own filters as well.
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Parameters:</h3>
|
||||||
|
<ul>
|
||||||
|
<li><span class="parameter">table</span>
|
||||||
|
A table to be used as a System, or <code>nil</code> to create a new
|
||||||
|
Processing System.
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "tiny.system"></a>
|
<a name = "tiny.system"></a>
|
||||||
<strong>tiny.system (table)</strong>
|
<strong>tiny.system (table)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Marks a table conforming to the System interface as a System recognized by
|
Creates a System. Systems are tables that contain at least one field;
|
||||||
tiny-ecs. Systems are tables that contain at least one field, an update
|
an update function that takes parameters like so:
|
||||||
function that takes parameters like so:
|
<code>function system:update(entities, dt)</code>. <code>entities</code> is an unordered table of
|
||||||
<code>function system:update(world, entities, dt)</code>. <a href="index.html#tiny.world">world</a> is the World the System
|
Entities with Entities as KEYS, and <code>dt</code> is the delta time. There are also a
|
||||||
belongs to, <code>entities</code> is an unordered table of Entities with Entities as KEYS,
|
few other optional callbacks:
|
||||||
and <code>dt</code> is the delta time. There are also a few other optional callbacks:
|
|
||||||
<code>function system:filter(entity)</code> - returns a boolean,
|
<code>function system:filter(entity)</code> - returns a boolean,
|
||||||
<code>function system:onAdd(entity)</code> - returns nil,
|
<code>function system:onAdd(entity)</code> - returns nil,
|
||||||
<code>function system:onRemove(entity)</code> - returns nil.
|
<code>function system:onRemove(entity)</code> - returns nil.
|
||||||
@@ -256,7 +264,7 @@
|
|||||||
<h3>Parameters:</h3>
|
<h3>Parameters:</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><span class="parameter">table</span>
|
<li><span class="parameter">table</span>
|
||||||
A table to be used as System, or <code>nil</code> to create a new System.
|
A table to be used as a System, or <code>nil</code> to create a new System.
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@@ -738,7 +746,7 @@
|
|||||||
</div> <!-- id="main" -->
|
</div> <!-- id="main" -->
|
||||||
<div id="about">
|
<div id="about">
|
||||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.3</a></i>
|
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.3</a></i>
|
||||||
<i style="float:right;">Last updated 2015-04-21 21:58:31 </i>
|
<i style="float:right;">Last updated 2015-04-22 17:58:12 </i>
|
||||||
</div> <!-- id="about" -->
|
</div> <!-- id="about" -->
|
||||||
</div> <!-- id="container" -->
|
</div> <!-- id="container" -->
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
Reference in New Issue
Block a user