diff --git a/classes/Assemblage.html b/classes/Assemblage.html new file mode 100644 index 0000000..c61009b --- /dev/null +++ b/classes/Assemblage.html @@ -0,0 +1,204 @@ + + + + + Reference + + + + +
+ +
+ +
+
+
+ + +
+ + + + + + +
+ +

Class Assemblage

+

Gives an entity a set of components.

+

+ + +

Methods

+ + + + + + + + + + + + + + + + + +
Assemblage:new (assemble)Creates a new Assemblage.
Assemblage:assemble (e, ...)Assembles an Entity.
Assemblage:hasName ()Returns true if the Assemblage has a name.
Assemblage:getName ()Returns the name of the Assemblage.
+ +
+
+ + +

Methods

+ +
+
+ + Assemblage:new (assemble) +
+
+ Creates a new Assemblage. + + +

Parameters:

+
    +
  • assemble + function + Function that assembles an Entity +
  • +
+ +

Returns:

+
    + + Assemblage + A new assemblage +
+ + + + +
+
+ + Assemblage:assemble (e, ...) +
+
+ Assembles an Entity. + + +

Parameters:

+
    +
  • e + Entity + Entity to assemble +
  • +
  • ... + additional arguments to pass to the assemble function +
  • +
+ +

Returns:

+
    + + Assemblage + self +
+ + + + +
+
+ + Assemblage:hasName () +
+
+ Returns true if the Assemblage has a name. + + + +

Returns:

+
    + + boolean + +
+ + + + +
+
+ + Assemblage:getName () +
+
+ Returns the name of the Assemblage. + + + +

Returns:

+
    + + string + +
+ + + + +
+
+ + +
+
+
+generated by LDoc 1.4.6 +Last updated 2020-01-04 10:27:07 +
+
+ + diff --git a/classes/Component.html b/classes/Component.html new file mode 100644 index 0000000..1a580d9 --- /dev/null +++ b/classes/Component.html @@ -0,0 +1,166 @@ + + + + + Reference + + + + +
+ +
+ +
+
+
+ + +
+ + + + + + +
+ +

Class Component

+

A pure data container that is contained by a single entity.

+

+ + +

Methods

+ + + + + + + + + + + + + +
Component:new (populate)Creates a new ComponentClass.
Component:hasName ()Returns true if the Component has a name.
Component:getName ()Returns the name of the Component.
+ +
+
+ + +

Methods

+ +
+
+ + Component:new (populate) +
+
+ Creates a new ComponentClass. + + +

Parameters:

+
    +
  • populate + function + Function that populates a Component with values +
  • +
+ +

Returns:

+
    + + Component + A new ComponentClass +
+ + + + +
+
+ + Component:hasName () +
+
+ Returns true if the Component has a name. + + + +

Returns:

+
    + + boolean + +
+ + + + +
+
+ + Component:getName () +
+
+ Returns the name of the Component. + + + +

Returns:

+
    + + string + +
+ + + + +
+
+ + +
+
+
+generated by LDoc 1.4.6 +Last updated 2021-11-02 16:22:32 +
+
+ + diff --git a/classes/Entity.html b/classes/Entity.html new file mode 100644 index 0000000..8f14c8d --- /dev/null +++ b/classes/Entity.html @@ -0,0 +1,415 @@ + + + + + Reference + + + + +
+ +
+ +
+
+
+ + +
+ + + + + + +
+ +

Class Entity

+

An object that exists in a world.

+

An entity + contains components which are processed by systems.

+ + +

Methods

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Entity:new ([world])Creates a new Entity.
Entity:give (componentClass, ...)Gives an Entity a Component.
Entity:ensure (componentClass, ...)Ensures an Entity to have a Component.
Entity:remove (componentClass)Removes a Component from an Entity.
Entity:assemble (assemblage, ...)Assembles an Entity.
Entity:destroy ()Destroys the Entity.
Entity:has (componentClass)Returns true if the Entity has a Component.
Entity:get (componentClass)Gets a Component from the Entity.
Entity:getComponents ()Returns a table of all Components the Entity has.
Entity:inWorld ()Returns true if the Entity is in a World.
Entity:getWorld ()Returns the World the Entity is in.
+ +
+
+ + +

Methods

+ +
+
+ + Entity:new ([world]) +
+
+ Creates a new Entity. Optionally adds it to a World. + + +

Parameters:

+
    +
  • world + World + World to add the entity to + (optional) +
  • +
+ +

Returns:

+
    + + Entity + A new Entity +
+ + + + +
+
+ + Entity:give (componentClass, ...) +
+
+ Gives an Entity a Component. + If the Component already exists, it's overridden by this new Component + + +

Parameters:

+
    +
  • componentClass + Component + ComponentClass to add an instance of +
  • +
  • ... + additional arguments to pass to the Component's populate function +
  • +
+ +

Returns:

+
    + + Entity + self +
+ + + + +
+
+ + Entity:ensure (componentClass, ...) +
+
+ Ensures an Entity to have a Component. + If the Component already exists, no action is taken + + +

Parameters:

+
    +
  • componentClass + Component + ComponentClass to add an instance of +
  • +
  • ... + additional arguments to pass to the Component's populate function +
  • +
+ +

Returns:

+
    + + Entity + self +
+ + + + +
+
+ + Entity:remove (componentClass) +
+
+ Removes a Component from an Entity. + + +

Parameters:

+
    +
  • componentClass + Component + ComponentClass of the Component to remove +
  • +
+ +

Returns:

+
    + + Entity + self +
+ + + + +
+
+ + Entity:assemble (assemblage, ...) +
+
+ Assembles an Entity. + + +

Parameters:

+
    +
  • assemblage + function + Function that will assemble an entity +
  • +
  • ... + additional arguments to pass to the assemblage function. +
  • +
+ +

Returns:

+
    + + Entity + self +
+ + + + +
+
+ + Entity:destroy () +
+
+ Destroys the Entity. + Removes the Entity from its World if it's in one. + + + +

Returns:

+
    + + self +
+ + + + +
+
+ + Entity:has (componentClass) +
+
+ Returns true if the Entity has a Component. + + +

Parameters:

+
    +
  • componentClass + Component + ComponentClass of the Component to check +
  • +
+ +

Returns:

+
    + + boolean + +
+ + + + +
+
+ + Entity:get (componentClass) +
+
+ Gets a Component from the Entity. + + +

Parameters:

+
    +
  • componentClass + Component + ComponentClass of the Component to get +
  • +
+ +

Returns:

+
    + + table + +
+ + + + +
+
+ + Entity:getComponents () +
+
+ Returns a table of all Components the Entity has. + Warning: Do not modify this table. + Use Entity:give/ensure/remove instead + + + +

Returns:

+
    + + table + Table of all Components the Entity has +
+ + + + +
+
+ + Entity:inWorld () +
+
+ Returns true if the Entity is in a World. + + + +

Returns:

+
    + + boolean + +
+ + + + +
+
+ + Entity:getWorld () +
+
+ Returns the World the Entity is in. + + + +

Returns:

+
    + + World + +
+ + + + +
+
+ + +
+
+
+generated by LDoc 1.4.6 +Last updated 2021-11-02 16:22:32 +
+
+ + diff --git a/classes/List.html b/classes/List.html new file mode 100644 index 0000000..5f2477b --- /dev/null +++ b/classes/List.html @@ -0,0 +1,287 @@ + + + + + Reference + + + + +
+ +
+ +
+
+
+ + +
+ + + + + + +
+ +

Class List

+

Data structure that allows for fast removal at the cost of containing order.

+

+ + +

Methods

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
List:new ()Creates a new List.
List:add (obj)Adds an object to the List.
List:remove (obj)Removes an object from the List.
List:clear ()Clears the List completely.
List:has (obj)Returns true if the List has the object.
List:get (i)Returns the object at an index.
List:indexOf (obj)Returns the index of an object in the List.
+ +
+
+ + +

Methods

+ +
+
+ + List:new () +
+
+ Creates a new List. + + + +

Returns:

+
    + + List + A new List +
+ + + + +
+
+ + List:add (obj) +
+
+ Adds an object to the List. + Object must be of reference type + Object may not be the string 'size' + + +

Parameters:

+
    +
  • obj + Object to add +
  • +
+ +

Returns:

+
    + + List + self +
+ + + + +
+
+ + List:remove (obj) +
+
+ Removes an object from the List. + + +

Parameters:

+
    +
  • obj + Object to remove +
  • +
+ +

Returns:

+
    + + List + self +
+ + + + +
+
+ + List:clear () +
+
+ Clears the List completely. + + + +

Returns:

+
    + + List + self +
+ + + + +
+
+ + List:has (obj) +
+
+ Returns true if the List has the object. + + +

Parameters:

+
    +
  • obj + Object to check for +
  • +
+ +

Returns:

+
    + + boolean + +
+ + + + +
+
+ + List:get (i) +
+
+ Returns the object at an index. + + +

Parameters:

+
    +
  • i + number + Index to get from +
  • +
+ +

Returns:

+
    + + Object at the index +
+ + + + +
+
+ + List:indexOf (obj) +
+
+ Returns the index of an object in the List. + + +

Parameters:

+
    +
  • obj + Object to get index of +
  • +
+ +

Returns:

+
    + + number + index of object in the List. +
+ + + + +
+
+ + +
+
+
+generated by LDoc 1.4.6 +Last updated 2021-11-02 16:22:32 +
+
+ + diff --git a/classes/Pool.html b/classes/Pool.html new file mode 100644 index 0000000..f5b1278 --- /dev/null +++ b/classes/Pool.html @@ -0,0 +1,257 @@ + + + + + Reference + + + + +
+ +
+ +
+
+
+ + +
+ + + + + + +
+ +

Class Pool

+

Used to iterate over Entities with a specific Components + A Pool contain a any amount of Entities.

+

+ + +

Methods

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Pool:new (name, filter)Creates a new Pool
Pool:eligible (e)Checks if an Entity is eligible for the Pool.
Pool:evaluate (e)Evaluate whether an Entity should be added or removed from the Pool.
Pool:getName ()Gets the name of the Pool
Pool:getFilter ()Gets the filter of the Pool.
Pool:onEntityAdded (e)Callback for when an Entity is added to the Pool.
+ +
+
+ + +

Methods

+ +
+
+ + Pool:new (name, filter) +
+
+ Creates a new Pool + + +

Parameters:

+
    +
  • name + string + Name for the Pool. +
  • +
  • filter + table + Table containing the required BaseComponents +
  • +
+ +

Returns:

+
    + + Pool + The new Pool +
+ + + + +
+
+ + Pool:eligible (e) +
+
+ Checks if an Entity is eligible for the Pool. + + +

Parameters:

+
    +
  • e + Entity + Entity to check +
  • +
+ +

Returns:

+
    + + boolean + +
+ + + + +
+
+ + Pool:evaluate (e) +
+
+ Evaluate whether an Entity should be added or removed from the Pool. + + +

Parameters:

+
    +
  • e + Entity to add or remove +
  • +
+ +

Returns:

+
    + + Pool + self +
+ + + + +
+
+ + Pool:getName () +
+
+ Gets the name of the Pool + + + +

Returns:

+
    + + string + +
+ + + + +
+
+ + Pool:getFilter () +
+
+ Gets the filter of the Pool. + Warning: Do not modify this filter. + + + +

Returns:

+
    + + Filter of the Pool. +
+ + + + +
+
+ + Pool:onEntityAdded (e) +
+
+ Callback for when an Entity is added to the Pool. + + +

Parameters:

+
    +
  • e + Entity + Entity that was added. +
  • +
+ + + + + +
+
+ + +
+
+
+generated by LDoc 1.4.6 +Last updated 2021-11-02 16:22:32 +
+
+ + diff --git a/classes/System.html b/classes/System.html new file mode 100644 index 0000000..5743a30 --- /dev/null +++ b/classes/System.html @@ -0,0 +1,315 @@ + + + + + Reference + + + + +
+ +
+ +
+
+
+ + +
+ + + + + + +
+ +

Class System

+

Iterates over Entities.

+

From these Entities its get Components and modify them. + A System contains 1 or more Pools. + A System is contained by 1 World.

+ + +

Methods

+ + + + + + + + + + + + + + + + + + + + + + + + + +
System:new (table)Creates a new SystemClass.
System:setEnabled (enable)Sets if the System is enabled
System:isEnabled ()Returns is the System is enabled
System:getWorld ()Returns the World the System is in.
System:hasName ()Returns true if the System has a name.
System:getName ()Returns the name of the System.
+

Callbacks

+ + + + + + + + + + + + + +
System:init (world)Callback for system initialization.
System:onEnabled ()Callback for when a System is enabled.
System:onDisabled ()Callback for when a System is disabled.
+ +
+
+ + +

Methods

+ +
+
+ + System:new (table) +
+
+ Creates a new SystemClass. + + +

Parameters:

+
    +
  • table + filters A table containing filters (name = {components...}) +
  • +
+ +

Returns:

+
    + + System + A new SystemClass +
+ + + + +
+
+ + System:setEnabled (enable) +
+
+ Sets if the System is enabled + + +

Parameters:

+
    +
  • enable + boolean + +
  • +
+ +

Returns:

+
    + + System + self +
+ + + + +
+
+ + System:isEnabled () +
+
+ Returns is the System is enabled + + + +

Returns:

+
    + + boolean + +
+ + + + +
+
+ + System:getWorld () +
+
+ Returns the World the System is in. + + + +

Returns:

+
    + + World + +
+ + + + +
+
+ + System:hasName () +
+
+ Returns true if the System has a name. + + + +

Returns:

+
    + + boolean + +
+ + + + +
+
+ + System:getName () +
+
+ Returns the name of the System. + + + +

Returns:

+
    + + string + +
+ + + + +
+
+

Callbacks

+ +
+
+ + System:init (world) +
+
+ Callback for system initialization. + + +

Parameters:

+
    +
  • world + World + The World the System was added to +
  • +
+ + + + + +
+
+ + System:onEnabled () +
+
+ Callback for when a System is enabled. + + + + + + + +
+
+ + System:onDisabled () +
+
+ Callback for when a System is disabled. + + + + + + + +
+
+ + +
+
+
+generated by LDoc 1.4.6 +Last updated 2021-11-02 16:22:32 +
+
+ + diff --git a/classes/World.html b/classes/World.html new file mode 100644 index 0000000..a95449e --- /dev/null +++ b/classes/World.html @@ -0,0 +1,468 @@ + + + + + Reference + + + + +
+ +
+ +
+
+
+ + +
+ + + + + + +
+ +

Class World

+

A collection of Systems and Entities.

+

+ A world emits to let Systems iterate. + A World contains any amount of Systems. + A World contains any amount of Entities.

+ + +

Methods

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
World:new ()Creates a new World.
World:addEntity (e)Adds an Entity to the World.
World:removeEntity (e)Removes an Entity from the World.
World:addSystem (systemClass)Adds a System to the World.
World:addSystems (...)Adds multiple Systems to the World.
World:hasSystem (systemClass)Returns if the World has a System.
World:getSystem (systemClass)Gets a System from the World.
World:emit (functionName, ...)Emits a callback in the World.
World:clear ()Removes all entities from the World
World:hasName ()Returns true if the World has a name.
World:getName ()Returns the name of the World.
World:onEntityAdded (e)Callback for when an Entity is added to the World.
World:onEntityRemoved (e)Callback for when an Entity is removed from the World.
+ +
+
+ + +

Methods

+ +
+
+ + World:new () +
+
+ Creates a new World. + + + +

Returns:

+
    + + World + The new World +
+ + + + +
+
+ + World:addEntity (e) +
+
+ Adds an Entity to the World. + + +

Parameters:

+
    +
  • e + Entity + Entity to add +
  • +
+ +

Returns:

+
    + + World + self +
+ + + + +
+
+ + World:removeEntity (e) +
+
+ Removes an Entity from the World. + + +

Parameters:

+
    +
  • e + Entity + Entity to remove +
  • +
+ +

Returns:

+
    + + World + self +
+ + + + +
+
+ + World:addSystem (systemClass) +
+
+ Adds a System to the World. + Callbacks are registered automatically + Entities added before are added to the System retroactively + + +

Parameters:

+
    +
  • systemClass + System + SystemClass of System to add +
  • +
+ +

Returns:

+
    + + World + self +
+ + +

See also:

+ + + +
+
+ + World:addSystems (...) +
+
+ Adds multiple Systems to the World. + Callbacks are registered automatically + + +

Parameters:

+
    +
  • ... + SystemClasses of Systems to add +
  • +
+ +

Returns:

+
    + + World + self +
+ + +

See also:

+ + + +
+
+ + World:hasSystem (systemClass) +
+
+ Returns if the World has a System. + + +

Parameters:

+
    +
  • systemClass + System + SystemClass of System to check for +
  • +
+ +

Returns:

+
    + + boolean + +
+ + + + +
+
+ + World:getSystem (systemClass) +
+
+ Gets a System from the World. + + +

Parameters:

+
    +
  • systemClass + System + SystemClass of System to get +
  • +
+ +

Returns:

+
    + + System + System to get +
+ + + + +
+
+ + World:emit (functionName, ...) +
+
+ Emits a callback in the World. + Calls all functions with the functionName of added Systems + + +

Parameters:

+
    +
  • functionName + string + Name of functions to call. +
  • +
  • ... + Parameters passed to System's functions +
  • +
+ +

Returns:

+
    + + World + self +
+ + + + +
+
+ + World:clear () +
+
+ Removes all entities from the World + + + +

Returns:

+
    + + World + self +
+ + + + +
+
+ + World:hasName () +
+
+ Returns true if the World has a name. + + + +

Returns:

+
    + + boolean + +
+ + + + +
+
+ + World:getName () +
+
+ Returns the name of the World. + + + +

Returns:

+
    + + string + +
+ + + + +
+
+ + World:onEntityAdded (e) +
+
+ Callback for when an Entity is added to the World. + + +

Parameters:

+
    +
  • e + Entity + The Entity that was added +
  • +
+ + + + + +
+
+ + World:onEntityRemoved (e) +
+
+ Callback for when an Entity is removed from the World. + + +

Parameters:

+
    +
  • e + Entity + The Entity that was removed +
  • +
+ + + + + +
+
+ + +
+
+
+generated by LDoc 1.4.6 +Last updated 2021-11-02 16:22:32 +
+
+ + diff --git a/index.html b/index.html new file mode 100644 index 0000000..1f3f2e9 --- /dev/null +++ b/index.html @@ -0,0 +1,114 @@ + + + + + Reference + + + + +
+ +
+ +
+
+
+ + +
+ + + + + + +
+ + +

A feature-complete ECS library

+ +

Modules

+ + + + + + + + + + + + + + + + + +
ComponentsContainer for registered ComponentClasses
Concord
typeType + Helper module to do easy type checking for Concord types
utilsUtils + Helper module for misc operations
+

Classes

+ + + + + + + + + + + + + + + + + + + + + + + + + +
ComponentA pure data container that is contained by a single entity.
EntityAn object that exists in a world.
ListData structure that allows for fast removal at the cost of containing order.
PoolUsed to iterate over Entities with a specific Components + A Pool contain a any amount of Entities.
SystemIterates over Entities.
WorldA collection of Systems and Entities.
+ +
+
+
+generated by LDoc 1.4.6 +Last updated 2021-11-02 16:22:32 +
+
+ + diff --git a/ldoc.css b/ldoc.css new file mode 100644 index 0000000..52c4ad2 --- /dev/null +++ b/ldoc.css @@ -0,0 +1,303 @@ +/* BEGIN RESET + +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 2.8.2r1 +*/ +html { + color: #000; + background: #FFF; +} +body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td { + margin: 0; + padding: 0; +} +table { + border-collapse: collapse; + border-spacing: 0; +} +fieldset,img { + border: 0; +} +address,caption,cite,code,dfn,em,strong,th,var,optgroup { + font-style: inherit; + font-weight: inherit; +} +del,ins { + text-decoration: none; +} +li { + margin-left: 20px; +} +caption,th { + text-align: left; +} +h1,h2,h3,h4,h5,h6 { + font-size: 100%; + font-weight: bold; +} +q:before,q:after { + content: ''; +} +abbr,acronym { + border: 0; + font-variant: normal; +} +sup { + vertical-align: baseline; +} +sub { + vertical-align: baseline; +} +legend { + color: #000; +} +input,button,textarea,select,optgroup,option { + font-family: inherit; + font-size: inherit; + font-style: inherit; + font-weight: inherit; +} +input,button,textarea,select {*font-size:100%; +} +/* END RESET */ + +body { + margin-left: 1em; + margin-right: 1em; + font-family: arial, helvetica, geneva, sans-serif; + background-color: #ffffff; margin: 0px; +} + +code, tt { font-family: monospace; font-size: 1.1em; } +span.parameter { font-family:monospace; } +span.parameter:after { content:":"; } +span.types:before { content:"("; } +span.types:after { content:")"; } +.type { font-weight: bold; font-style:italic } + +body, p, td, th { font-size: .95em; line-height: 1.2em;} + +p, ul { margin: 10px 0 0 0px;} + +strong { font-weight: bold;} + +em { font-style: italic;} + +h1 { + font-size: 1.5em; + margin: 20px 0 20px 0; +} +h2, h3, h4 { margin: 15px 0 10px 0; } +h2 { font-size: 1.25em; } +h3 { font-size: 1.15em; } +h4 { font-size: 1.06em; } + +a:link { font-weight: bold; color: #004080; text-decoration: none; } +a:visited { font-weight: bold; color: #006699; text-decoration: none; } +a:link:hover { text-decoration: underline; } + +hr { + color:#cccccc; + background: #00007f; + height: 1px; +} + +blockquote { margin-left: 3em; } + +ul { list-style-type: disc; } + +p.name { + font-family: "Andale Mono", monospace; + padding-top: 1em; +} + +pre { + background-color: rgb(245, 245, 245); + border: 1px solid #C0C0C0; /* silver */ + padding: 10px; + margin: 10px 0 10px 0; + overflow: auto; + font-family: "Andale Mono", monospace; +} + +pre.example { + font-size: .85em; +} + +table.index { border: 1px #00007f; } +table.index td { text-align: left; vertical-align: top; } + +#container { + margin-left: 1em; + margin-right: 1em; + background-color: #f0f0f0; +} + +#product { + text-align: center; + border-bottom: 1px solid #cccccc; + background-color: #ffffff; +} + +#product big { + font-size: 2em; +} + +#main { + background-color: #f0f0f0; + border-left: 2px solid #cccccc; +} + +#navigation { + float: left; + width: 14em; + vertical-align: top; + background-color: #f0f0f0; + overflow: visible; +} + +#navigation h2 { + background-color:#e7e7e7; + font-size:1.1em; + color:#000000; + text-align: left; + padding:0.2em; + border-top:1px solid #dddddd; + border-bottom:1px solid #dddddd; +} + +#navigation ul +{ + font-size:1em; + list-style-type: none; + margin: 1px 1px 10px 1px; +} + +#navigation li { + text-indent: -1em; + display: block; + margin: 3px 0px 0px 22px; +} + +#navigation li li a { + margin: 0px 3px 0px -1em; +} + +#content { + margin-left: 14em; + padding: 1em; + width: 700px; + border-left: 2px solid #cccccc; + border-right: 2px solid #cccccc; + background-color: #ffffff; +} + +#about { + clear: both; + padding: 5px; + border-top: 2px solid #cccccc; + background-color: #ffffff; +} + +@media print { + body { + font: 12pt "Times New Roman", "TimeNR", Times, serif; + } + a { font-weight: bold; color: #004080; text-decoration: underline; } + + #main { + background-color: #ffffff; + border-left: 0px; + } + + #container { + margin-left: 2%; + margin-right: 2%; + background-color: #ffffff; + } + + #content { + padding: 1em; + background-color: #ffffff; + } + + #navigation { + display: none; + } + pre.example { + font-family: "Andale Mono", monospace; + font-size: 10pt; + page-break-inside: avoid; + } +} + +table.module_list { + border-width: 1px; + border-style: solid; + border-color: #cccccc; + border-collapse: collapse; +} +table.module_list td { + border-width: 1px; + padding: 3px; + border-style: solid; + border-color: #cccccc; +} +table.module_list td.name { background-color: #f0f0f0; min-width: 200px; } +table.module_list td.summary { width: 100%; } + + +table.function_list { + border-width: 1px; + border-style: solid; + border-color: #cccccc; + border-collapse: collapse; +} +table.function_list td { + border-width: 1px; + padding: 3px; + border-style: solid; + border-color: #cccccc; +} +table.function_list td.name { background-color: #f0f0f0; min-width: 200px; } +table.function_list td.summary { width: 100%; } + +ul.nowrap { + overflow:auto; + white-space:nowrap; +} + +dl.table dt, dl.function dt {border-top: 1px solid #ccc; padding-top: 1em;} +dl.table dd, dl.function dd {padding-bottom: 1em; margin: 10px 0 0 20px;} +dl.table h3, dl.function h3 {font-size: .95em;} + +/* stop sublists from having initial vertical space */ +ul ul { margin-top: 0px; } +ol ul { margin-top: 0px; } +ol ol { margin-top: 0px; } +ul ol { margin-top: 0px; } + +/* make the target distinct; helps when we're navigating to a function */ +a:target + * { + background-color: #FF9; +} + + +/* styles for prettification of source */ +pre .comment { color: #558817; } +pre .constant { color: #a8660d; } +pre .escape { color: #844631; } +pre .keyword { color: #aa5050; font-weight: bold; } +pre .library { color: #0e7c6b; } +pre .marker { color: #512b1e; background: #fedc56; font-weight: bold; } +pre .string { color: #8080ff; } +pre .number { color: #f8660d; } +pre .operator { color: #2239a8; font-weight: bold; } +pre .preprocessor, pre .prepro { color: #a33243; } +pre .global { color: #800080; } +pre .user-keyword { color: #800080; } +pre .prompt { color: #558817; } +pre .url { color: #272fc2; text-decoration: underline; } + diff --git a/modules/Components.html b/modules/Components.html new file mode 100644 index 0000000..de933d3 --- /dev/null +++ b/modules/Components.html @@ -0,0 +1,185 @@ + + + + + Reference + + + + +
+ +
+ +
+
+
+ + +
+ + + + + + +
+ +

Module Components

+

Container for registered ComponentClasses

+

+ + +

Functions

+ + + + + + + + + + + + + +
has (name)Returns true if the containter has the ComponentClass with the specified name
try (name)Returns true and the ComponentClass if one was registered with the specified name + or false and an error otherwise
get (name)Returns the ComponentClass with the specified name
+ +
+
+ + +

Functions

+ +
+
+ + has (name) +
+
+ Returns true if the containter has the ComponentClass with the specified name + + +

Parameters:

+
    +
  • name + string + Name of the ComponentClass to check +
  • +
+ +

Returns:

+
    + + boolean + +
+ + + + +
+
+ + try (name) +
+
+ Returns true and the ComponentClass if one was registered with the specified name + or false and an error otherwise + + +

Parameters:

+
    +
  • name + string + Name of the ComponentClass to check +
  • +
+ +

Returns:

+
    +
  1. + boolean +
  2. +
  3. + Component + or error string
  4. +
+ + + + +
+
+ + get (name) +
+
+ Returns the ComponentClass with the specified name + + +

Parameters:

+
    +
  • name + string + Name of the ComponentClass to get +
  • +
+ +

Returns:

+
    + + Component + +
+ + + + +
+
+ + +
+
+
+generated by LDoc 1.4.6 +Last updated 2021-11-02 16:22:32 +
+
+ + diff --git a/modules/Concord.html b/modules/Concord.html new file mode 100644 index 0000000..1255a6c --- /dev/null +++ b/modules/Concord.html @@ -0,0 +1,76 @@ + + + + + Reference + + + + +
+ +
+ +
+
+
+ + +
+ + + + + + +
+ +

Module Concord

+

+

+ + + +
+
+ + + + +
+
+
+generated by LDoc 1.4.6 +Last updated 2021-11-02 16:22:32 +
+
+ + diff --git a/modules/assemblages.html b/modules/assemblages.html new file mode 100644 index 0000000..8b4d725 --- /dev/null +++ b/modules/assemblages.html @@ -0,0 +1,182 @@ + + + + + Reference + + + + +
+ +
+ +
+
+
+ + +
+ + + + + + +
+ +

Module Assemblages

+

A container for registered Assemblages

+

+ + +

Functions

+ + + + + + + + + + + + + +
register (name, assemblage)Registers an Assemblage.
has (name)Returns true if the containter has an Assemblage with the specified name
get (name)Returns the Assemblage with the specified name
+ +
+
+ + +

Functions

+ +
+
+ + register (name, assemblage) +
+
+ Registers an Assemblage. + + +

Parameters:

+
    +
  • name + string + Name to register under +
  • +
  • assemblage + Assemblage + Assemblage to register +
  • +
+ + + + + +
+
+ + has (name) +
+
+ Returns true if the containter has an Assemblage with the specified name + + +

Parameters:

+
    +
  • name + string + Name of the Assemblage to check +
  • +
+ +

Returns:

+
    + + boolean + +
+ + + + +
+
+ + get (name) +
+
+ Returns the Assemblage with the specified name + + +

Parameters:

+
    +
  • name + string + Name of the Assemblage to get +
  • +
+ +

Returns:

+
    + + Assemblage + +
+ + + + +
+
+ + +
+
+
+generated by LDoc 1.4.6 +Last updated 2020-01-04 10:27:07 +
+
+ + diff --git a/modules/components.html b/modules/components.html new file mode 100644 index 0000000..de521c2 --- /dev/null +++ b/modules/components.html @@ -0,0 +1,185 @@ + + + + + Reference + + + + +
+ +
+ +
+
+
+ + +
+ + + + + + +
+ +

Module Components

+

Container for registered ComponentClasses

+

+ + +

Functions

+ + + + + + + + + + + + + +
has (name)Returns true if the containter has the ComponentClass with the specified name
try (name)Returns true and the ComponentClass if one was registered with the specified name + or false and an error otherwise
get (name)Returns the ComponentClass with the specified name
+ +
+
+ + +

Functions

+ +
+
+ + has (name) +
+
+ Returns true if the containter has the ComponentClass with the specified name + + +

Parameters:

+
    +
  • name + string + Name of the ComponentClass to check +
  • +
+ +

Returns:

+
    + + boolean + +
+ + + + +
+
+ + try (name) +
+
+ Returns true and the ComponentClass if one was registered with the specified name + or false and an error otherwise + + +

Parameters:

+
    +
  • name + string + Name of the ComponentClass to check +
  • +
+ +

Returns:

+
    +
  1. + boolean +
  2. +
  3. + Component + or error string
  4. +
+ + + + +
+
+ + get (name) +
+
+ Returns the ComponentClass with the specified name + + +

Parameters:

+
    +
  • name + string + Name of the ComponentClass to get +
  • +
+ +

Returns:

+
    + + Component + +
+ + + + +
+
+ + +
+
+
+generated by LDoc 1.4.6 +Last updated 2020-08-18 15:20:32 +
+
+ + diff --git a/modules/systems.html b/modules/systems.html new file mode 100644 index 0000000..c1e22b0 --- /dev/null +++ b/modules/systems.html @@ -0,0 +1,181 @@ + + + + + Reference + + + + +
+ +
+ +
+
+
+ + +
+ + + + + + +
+ +

Module Systems

+

Container for registered SystemClasses

+

+ + +

Functions

+ + + + + + + + + + + + + +
register (name, systemClass)Registers a SystemClass.
has (name)Returns true if the containter has the SystemClass with the name
get (name)Returns the SystemClass with the name
+ +
+
+ + +

Functions

+ +
+
+ + register (name, systemClass) +
+
+ Registers a SystemClass. + + +

Parameters:

+
    +
  • name + string + Name to register under +
  • +
  • systemClass + System + SystemClass to register +
  • +
+ + + + + +
+
+ + has (name) +
+
+ Returns true if the containter has the SystemClass with the name + + +

Parameters:

+
    +
  • name + string + Name of the SystemClass to check +
  • +
+ +

Returns:

+
    + + boolean + +
+ + + + +
+
+ + get (name) +
+
+ Returns the SystemClass with the name + + +

Parameters:

+
    +
  • name + string + Name of the SystemClass to get +
  • +
+ +

Returns:

+
    + + SystemClass with the name +
+ + + + +
+
+ + +
+
+
+generated by LDoc 1.4.6 +Last updated 2020-01-04 10:27:07 +
+
+ + diff --git a/modules/type.html b/modules/type.html new file mode 100644 index 0000000..c88886d --- /dev/null +++ b/modules/type.html @@ -0,0 +1,268 @@ + + + + + Reference + + + + +
+ +
+ +
+
+
+ + +
+ + + + + + +
+ +

Module type

+

Type + Helper module to do easy type checking for Concord types

+

+ + +

Functions

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Type.isEntity (t)Returns if object is an Entity.
Type.isComponentClass (t)Returns if object is a ComponentClass.
Type.isComponent (t)Returns if object is a Component.
Type.isSystemClass (t)Returns if object is a SystemClass.
Type.isSystem (t)Returns if object is a System.
Type.isWorld (t)Returns if object is a World.
+ +
+
+ + +

Functions

+ +
+
+ + Type.isEntity (t) +
+
+ Returns if object is an Entity. + + +

Parameters:

+
    +
  • t + Object to check +
  • +
+ +

Returns:

+
    + + boolean + +
+ + + + +
+
+ + Type.isComponentClass (t) +
+
+ Returns if object is a ComponentClass. + + +

Parameters:

+
    +
  • t + Object to check +
  • +
+ +

Returns:

+
    + + boolean + +
+ + + + +
+
+ + Type.isComponent (t) +
+
+ Returns if object is a Component. + + +

Parameters:

+
    +
  • t + Object to check +
  • +
+ +

Returns:

+
    + + boolean + +
+ + + + +
+
+ + Type.isSystemClass (t) +
+
+ Returns if object is a SystemClass. + + +

Parameters:

+
    +
  • t + Object to check +
  • +
+ +

Returns:

+
    + + boolean + +
+ + + + +
+
+ + Type.isSystem (t) +
+
+ Returns if object is a System. + + +

Parameters:

+
    +
  • t + Object to check +
  • +
+ +

Returns:

+
    + + boolean + +
+ + + + +
+
+ + Type.isWorld (t) +
+
+ Returns if object is a World. + + +

Parameters:

+
    +
  • t + Object to check +
  • +
+ +

Returns:

+
    + + boolean + +
+ + + + +
+
+ + +
+
+
+generated by LDoc 1.4.6 +Last updated 2021-11-02 16:22:32 +
+
+ + diff --git a/modules/utils.html b/modules/utils.html new file mode 100644 index 0000000..50af447 --- /dev/null +++ b/modules/utils.html @@ -0,0 +1,150 @@ + + + + + Reference + + + + +
+ +
+ +
+
+
+ + +
+ + + + + + +
+ +

Module utils

+

Utils + Helper module for misc operations

+

+ + +

Functions

+ + + + + + + + + +
Utils.shallowCopy (orig, target)Does a shallow copy of a table and appends it to a target table.
Utils.loadNamespace (pathOrFiles, namespace)Requires files and puts them in a table.
+ +
+
+ + +

Functions

+ +
+
+ + Utils.shallowCopy (orig, target) +
+
+ Does a shallow copy of a table and appends it to a target table. + + +

Parameters:

+
    +
  • orig + Table to copy +
  • +
  • target + Table to append to +
  • +
+ + + + + +
+
+ + Utils.loadNamespace (pathOrFiles, namespace) +
+
+ Requires files and puts them in a table. + Accepts a table of paths to Lua files: {"path/to/file_1", "path/to/another/file_2", "etc"} + Accepts a path to a directory with Lua files: "my_files/here" + + +

Parameters:

+
    +
  • pathOrFiles + The table of paths or a path to a directory. +
  • +
  • namespace + A table that will hold the required files +
  • +
+ +

Returns:

+
    + + table + The namespace table +
+ + + + +
+
+ + +
+
+
+generated by LDoc 1.4.6 +Last updated 2021-11-02 16:22:32 +
+
+ + diff --git a/modules/worlds.html b/modules/worlds.html new file mode 100644 index 0000000..88489f7 --- /dev/null +++ b/modules/worlds.html @@ -0,0 +1,181 @@ + + + + + Reference + + + + +
+ +
+ +
+
+
+ + +
+ + + + + + +
+ +

Module worlds

+

Worlds + Container for registered Worlds

+

+ + +

Functions

+ + + + + + + + + + + + + +
Worlds.register (name, world)Registers a World.
Worlds.has (name)Returns true if the containter has the World with the name
Worlds.get (name)Returns the World with the name
+ +
+
+ + +

Functions

+ +
+
+ + Worlds.register (name, world) +
+
+ Registers a World. + + +

Parameters:

+
    +
  • name + string + Name to register under +
  • +
  • world + World to register +
  • +
+ + + + + +
+
+ + Worlds.has (name) +
+
+ Returns true if the containter has the World with the name + + +

Parameters:

+
    +
  • name + string + Name of the World to check +
  • +
+ +

Returns:

+
    + + boolean + +
+ + + + +
+
+ + Worlds.get (name) +
+
+ Returns the World with the name + + +

Parameters:

+
    +
  • name + string + Name of the World to get +
  • +
+ +

Returns:

+
    + + World with the name +
+ + + + +
+
+ + +
+
+
+generated by LDoc 1.4.6 +Last updated 2020-01-04 10:27:07 +
+
+ +