Module teraflop.ecs

Teraflop's Entity Component System primitives.

Inspired by Bevy ECS and entt.

See Also

Entity Component System on Wikipedia

Functions

NameDescription
component(data, name) Initialize a new Component optionally with initial data and a custom name.
tag(name) Create a new Tag given a name.

Classes

NameDescription
Component A container for specialized Entity data.
Entity A world entity consisting of a unique ID and a collection of associated components.
NamedComponent A named container for specialized Entity data.
System Derive this class to encapsulate a game System that operates on Resources and Components in the World.
SystemException Exception thrown on errors encountered in running Systems.
Tag A named, dataless Component used to flag Entities.
World A collection of Entities, their Components, and Resources. Systems operate on those components and mutate the World.

Structs

NameDescription
Diagnostic Diagnostic generated by a running System.
Resources A collection of Resource instances identified by their type.

Manifest constants

NameTypeDescription
inheritsComponent Detect whether T inherits from Component.
inheritsNamedComponent Detect whether T inherits from NamedComponent.
inheritsSystem Detect whether T inherits from System.
isCallableAsSystem Detect whether T is callable as a System.
isComponent Detect whether T is the Component class or inherits from Component.
isEntity Detect whether T is the Entity class.
isNamedComponent Detect whether T is the NamedComponent class or inherits from NamedComponent.
isResources Detect whether T is the Resources struct.
isSystem Detect whether T is the System class or inherits from System.
isWorld Detect whether T is the World class.
storableAsComponent Detect whether T may be stored as Component data.

Global variables

NameTypeDescription
Initialized immutable(Tag) Whether *all* of an Entity's GPU Resources have been initialized.
Loaded immutable(Tag) Whether *all* of an Entity's Asset Components have been loaded.

Aliases

NameTypeDescription
SystemGenerator System function(World) A function that initializes a new dynamically generated System.