OF Components and Systems - ECS - The toolkit includes a dedicated component for handling audio and MIDI sources.
README
ofxEnTTKit
ECS toolkit for openFrameworks built on top of EnTT (ofxEnTT).
ofxEnTTKit provides an opinionated set of components and systems for typical creative-coding needs (scene graph, 3D rendering, 2D graphics, animation, hardware I/O, LEDs, state/modulators, etc.) together with a lightweight property-reflection layer suitable for ImGui-based inspectors.The kit aims to capture the common openFrameworks objects —
nodes, cameras, meshes, materials, lights, shaders, textures, FBOs, images, video, audio, fonts, paths, polylines, serial I/O, and related drawing helpers — as ECS-friendly components.All components live in the
ecs:: namespace and are plain data structs, so they can be picked up by whichever GUI/serialization layer your app uses.Dependencies
- ofxEnTT — provides the EnTT header
Setup
Full kit (editors, ofxKit — all optional components and systems):
#include "ofxEnTTKit_all.h"Core only (scene graph, layers, basic components; add more headers as needed):
#include "ofxEnTTKit.h"You can also include
ofxEnTTKit_all_components.h and/or ofxEnTTKit_all_systems.h separately, or pick individual files under src/components/ and src/systems/.Header overview:
docs/headers-and-build.md.If you only need EnTT without OF components, depend on
ofxEnTT and #include <entt.hpp>.“Add Component” menu data (editor shells)
The picker registry lives in ofxEnTTKit — see
docs/component-registry.md. This is not EnTT type registration; it only produces picker metadata (display name, category, has / add / remove hooks) for shipped and addon ecs:: components.- Addons extend the registry via
ecs::registerComponent<T>(...). - ofxKit calls
ecs::finalizeComponentMenu()on attach and readsecs::componentMenuEntries()for the Properties picker.
What's inside
See
COMPONENTS_REFERENCE.md for the full component catalogue and SYSTEMS_REFERENCE.md for the systems reference (purpose, components consumed, public API, frame loop ordering).Quick overview:
| area | headers |
|---|---|
| base (nodes, cameras, meshes, audio, video, …) | components/base_components.h |
| 3D rendering (lights, materials, shaders, …) | components/rendering_components.h |
| 2D graphics (paths, shapes, sprites, text) | components/graphics2d_components.h |
| animation (tween, particles, postfx) | components/animation_components.h, components/eased_pulse_component.h, components/easing.h |
| modulators / state | components/modulator_component.h, components/state_components.h |
| audio/MIDI sources | components/audio_source_component.h, components/midi_source_component.h |
| input / interaction | components/input_components.h, components/interaction_components.h → InputSystem, ClickableSystem |
| hardware I/O (serial / OSC) | components/hardware_components.h → HardwareIOSystem |
| network (device / sACN PODs) | components/network_components.h (discovery/send systems in ofxESP32) |
| sensors (GPIO) | components/sensor_components.h (mmWave → ofxMicrowaveC4001) |
| LED / UV mapping | components/led_components.h → LEDSystem, UVRenderSystem |
| utility (grid, gizmo, AABB, rigidbody, mask) | components/utility_components.h |
| systems | systems/.h (via ofxEnTTKit_all_systems.h or systems/systems.h) |
| editor Add Component registry | component_editor_registration.h — see docs/component-registry.md |
Add ofxEnTTInspector for ImGui property UI (led_inspectors,hardware_inspectors, …) that matches these kit components.
License
MIT — see
license.md.
ofxAddons