From d995a345d98166d01503f75b44d93e7a21c1839e Mon Sep 17 00:00:00 2001 From: bakpakin Date: Wed, 22 Apr 2015 17:59:23 +0800 Subject: [PATCH] Update docs to 1.0.1 --- doc/index.html | 80 +++++++++++++++++++++++++++----------------------- index.html | 0 2 files changed, 44 insertions(+), 36 deletions(-) delete mode 100644 index.html diff --git a/doc/index.html b/doc/index.html index 796f6ee..97dabe2 100644 --- a/doc/index.html +++ b/doc/index.html @@ -29,7 +29,6 @@

Contents

-

Fields

- - - - - -
tiny._VERSIONTiny-ecs Version, a period-separated three number string like "1.2.3"

Filter functions

@@ -74,10 +66,13 @@

System functions

+ + + + - +
tiny.processingSystem (table)Creates a Processing System.
tiny.system (table)Marks a table conforming to the System interface as a System recognized by - tiny-ecs.Creates a System.

World functions

@@ -164,24 +159,6 @@
-

Fields

- -
-
- - tiny._VERSION -
-
- Tiny-ecs Version, a period-separated three number string like "1.2.3" - - - - - - - -
-

Filter functions

@@ -235,17 +212,48 @@ A System is a wrapper around function callbacks for manipulating Entities.
+
+ + tiny.processingSystem (table) +
+
+ Creates a Processing System. A Processing System iterates through its + Entities in no particluar order, and updates them individually. It has two + important fields, function system:process(entity, dt), and function + system:filter(entity). entities is an unordered table of Entities with + Entities as KEYS, and dt is the delta time. There are also a few other + optional callbacks: + function system:preProcess(entities, dt) - returns nil, + function system:postProcess(entities, dt) - returns nil, + function system:onAdd(entity) - returns nil, + function system:onRemove(entity) - returns nil. + For Filters, it is conveient to use tiny.requireAll or tiny.requireOne, + but one can write their own filters as well. + + +

Parameters:

+
    +
  • table + A table to be used as a System, or nil to create a new + Processing System. +
  • +
+ + + + + +
tiny.system (table)
- Marks a table conforming to the System interface as a System recognized by - tiny-ecs. Systems are tables that contain at least one field, an update - function that takes parameters like so: - function system:update(world, entities, dt). world is the World the System - belongs to, entities is an unordered table of Entities with Entities as KEYS, - and dt is the delta time. There are also a few other optional callbacks: + Creates a System. Systems are tables that contain at least one field; + an update function that takes parameters like so: + function system:update(entities, dt). entities is an unordered table of + Entities with Entities as KEYS, and dt is the delta time. There are also a + few other optional callbacks: function system:filter(entity) - returns a boolean, function system:onAdd(entity) - returns nil, function system:onRemove(entity) - returns nil. @@ -256,7 +264,7 @@

Parameters:

  • table - A table to be used as System, or nil to create a new System. + A table to be used as a System, or nil to create a new System.
@@ -738,7 +746,7 @@
generated by LDoc 1.4.3 -Last updated 2015-04-21 21:58:31 +Last updated 2015-04-22 17:58:12
diff --git a/index.html b/index.html deleted file mode 100644 index e69de29..0000000