Documentation ¶
Overview ¶
Director is a graphical scene abstraction, implemented using the `akara` ECS framework and `raylib-go`, the golang port of `raylib`. A scene is an extension of a system (from the ECS design pattern), but with access to a bunch of object factories and generic rendering facilities built in.
Inside of the root of this repository, the top-level API for director is declared. The files that contain these declarations are all prefixed with `api_`. The API declarations are just aliases to things inside of the `pkg` directory, and are intended to reduce the cognitive load on the end-user. If these declarations were not provided here, then an end-user would need to know about the internals of director, and where everything is defined inside of `pkg`.
The real boon is that we can coherently separate things inside of pkg, as well also coherently organize them for use by the end-user here. The downside to declaring the API this way is that it is tightly coupled to `pkg`, and changes inside of `pkg` will likely require changes to the API, but this is not at all surprising.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLuaScene ¶
NewLuaScene creates a new scene from a lua script. The lua script needs to have both `init` and `update(TimeDelta)` functions declared.
func NewLuaSystem ¶
NewLuaSystem creates a new system from a lua script. The lua script needs to have both `init` and `update(TimeDelta)` functions declared.
A lua system is like a non-graphical scene, but still has access to some of the director scene stuff.
Types ¶
type Scene ¶
Scene is an extension of a director system, which has director lifecycle methods, object factories, components, lua state machine, etc.
The main difference between a Director System and a Scene is that a System is non-graphical, but still has access to most things a scene does.
type SceneComponents ¶
type SceneComponents = common.SceneComponents
SceneComponents contains component factories that scenes use for composing objects
type SceneInterface ¶
type SceneInterface = pkg.SceneInterface
SceneInterface defines what a Scene is to director
type SceneObjects ¶
type SceneObjects = pkg.ObjectFactory
SceneObjects contains object factories used by scenes for composing entities in the scene.
type SceneSystems ¶
type SceneSystems = pkg.DirectorSystems
PrimitiveSystems is a struct containing systems
type System ¶
type System = pkg.SceneSystem
System is an extension of an akara system, with director lifecycle methods, object factories, components, lua state machine, etc.
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
primitive_scenes
|
|
tick_graph
the tick_graph scene is used for printing tick_graph information about all running scenes known to director
|
the tick_graph scene is used for printing tick_graph information about all running scenes known to director |