Skip to content

OpenECS-examples 0.7.0

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 18 Nov 13:47
· 242 commits to dev since this release
2835600

OpenECS-examples 0.7.0 adds eight examples, s18_regex to s25_keys, for the new standard plugins, the profiler and the key list. c8_state and c2_native reload their plugins while the tool runs, and c3_ui shows ui's new elements. The release has the examples built for Linux and Windows.

It comes out with OpenECS 0.7.0, which ships these examples, built, in its examples/ folder, and OpenECS-std 0.7.0, whose plugins they use.

Run an example from OpenECS's folder:

./OpenECS --fresh --preset examples/s24_profiler/preset.lua

What you can learn

Regular expressions. s18_regex is a log filter: a typed pattern filters the lines, and a pattern with named groups reads each one.

Markdown. s19_markdown shows a help file with ui's elements, with its headings as a tree. A click on a link, or Tab and Return, opens it.

Syntax. s20_syntax shows a C, a Lua and a JSON file with their code coloured.

Video. s21_video plays a clip with its sound; Space plays and pauses, and Left and Right seek.

Files, the viewer and the console. s5_files is a notes tool on the files panel: its menu makes, renames and deletes notes, and its grid shows them as tiles. s22_viewer shows text, images and sounds. s23_console runs a program and shows its output; a click on an entry's place opens it in the code editor.

The profiler. s24_profiler has a panel that draws every frame through draw, beside the profiler. The panel reads ecs.profile.get(), so its own time and draw's show apart.

Keys. s25_keys has a function that Ctrl+J runs, beside the key list, which gives it another key, resets it, removes it and adds one.

Reloading plugins. c8_state reloads its Lua plugin when its files change, and keeps its panels' state. c2_native reloads a native plugin from a new build of its library.

ui. c3_ui shows sections, colour pickers, a path field, a graph, a menu at a right click, a row that wraps, a tree that chooses many nodes and drags them, a number field that takes sums and drags sideways, and a slider that submits at its release, in Lua and in C where C has them.

Errors. c5_services fails with ECS_Fail and ecs.fail, and checks arguments with ECS_Check and ecs.check.

Drawing only what changed. c12_sketch's canvases paint only the new part of a stroke, and tell OpenECS the rectangle they changed.

Small fixes

  • s14_gamepad draws each gamepad's sticks, triggers and buttons.
  • s12_compress makes a .tar.gz and reads it back.
  • s1_terminal gives textgrid.fit the surface's scale.

What will break

Plugin API 3. Every example's plugin says api = 3, and needs OpenECS 0.7.0. Code copied from 0.6.0 must change as OpenECS-std's release says: ui's props last, selected and onSelect, and registrations without assert.

Downloads

  • openecs-examples-0.7.0-linux-x86_64.tar.gz and openecs-examples-0.7.0-windows-x86_64.zip: the examples built. Unpack one into an OpenECS 0.7.0 folder.
  • openecs-examples-0.7.0-source.tar.gz: the examples' source. Build them inside a checkout of OpenECS, as README.md says.
  • SHA256SUMS: checksums of the archives.

The examples are under the zlib license.