Repository navigation
OpenECS-examples 0.2.0
Pre-release
Pre-release
This is the first release of OpenECS-examples, the examples for writing OpenECS plugins. It comes out with OpenECS 0.2.0, which ships these examples, built, in its examples/ folder, and OpenECS-std 0.2.0, whose plugins the later examples use.
Read the examples in the order of their numbers. Each explains the parts it is the first to use, and each has a test that shows what it does. Run one from OpenECS's folder:
./OpenECS --fresh --preset examples/1_hello/preset.luaWhat you can learn
OpenECS, from 1 to 12.
1_hello: a Lua plugin with a panel, and when OpenECS calls its functions.2_native: the same panel as a native plugin in C.3_ui: a button that counts clicks, and ui's other controls: a toggle, a switch, a slider, a selector, a dropdown and a list, and how drawing on demand works.4_settings: settings of each type, and the three layers they come from.5_services: a plugin in C that offers functions, and panels in Lua that call them withrequire.6_keys: key bindings for a plugin and for one panel type.7_events: events between plugins, and timers.8_state: a panel's and a plugin's saved state.9_drag_drop: dragging data between panels, and files from other programs.10_text_input: typed text, with input methods.11_popups: a menu drawn next to a panel.12_sketch: a whole drawing tool, twice, in C and in Lua, and resetting its layout.
The standard plugins, from 13.
13_terminal: a terminal with a few commands, on textgrid.14_media: a picture that plays a sound when it is clicked: image and audio read the files, and draw and mixer use them.15_network: a server and a client that send each other lines, with net, over TCP and over UDP.16_model: a glTF model that turns, read with gltf and drawn as lines with draw.17_files: a file browser, with fs, ui and Lua'sio.18_first_party: a tool with the settings window, the panel list and the launcher, and its themes.
Downloads
openecs-examples-0.2.0-source.tar.gz: the examples' source. Build them inside a checkout of OpenECS, as README.md says.SHA256SUMS: the checksum of the archive.
The examples are under the zlib license.