Skip to content

OpenECS-examples 0.3.0

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 19 Oct 05:13
· 455 commits to dev since this release
12327b9

OpenECS-examples 0.3.0 adds four examples: web requests and WebSockets, workers on threads of their own, and two that draw on the GPU. The examples of 0.2.0 show the new functions of OpenECS and its standard plugins, and each of their tests checks them.

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

Every preset has a hint now, which the title bar shows after the tool's name: what to try first, and the keys to press. Run an example from OpenECS's folder:

./OpenECS --fresh --preset examples/21_gpu/preset.lua

What you can learn

New examples.

  • 18_web: a panel that fetches each typed URL with web, and shows the answer's status, type and first line. A ws:// URL opens a WebSocket connection, and each typed line is a message. The plugin serves its own pages and an echo server with net, so the example needs no internet.
  • 20_workers: four workers, Lua scripts on threads of their own, count primes in chunks while the panel stays free to use.
  • 21_gpu: two GPU panels with the same picture: one in Lua, with the gpu plugin, and one in C, with SDL's GPU API. The Lua one draws its title with gpu.text. Both keep drawing after they pop out into a window of their own.
  • 22_gpu_model: a glTF torus, lit and turning on the GPU, drawn with its own shaders and a depth texture. Drag turns it, and the wheel moves it nearer. Its shaders are GLSL, compiled to SPIR-V with glslang.

New in the examples of 0.2.0.

  • 3_ui: a name field to type and select in, a note that wraps, a number field, a tooltip, tabs, a tree and a sortable table. Tab moves between the controls. button_c shows the same controls in C, with ui's macros.
  • 5_services: counter.watch keeps a function and calls it at each change, so both tally panels show the total in their titles.
  • 7_events: an event carries a panel's handle and bytes, and a handle has a method of its own.
  • 8_state: closing a panel with unsaved work asks in OpenECS's own dialog.
  • 10_text_input: a key that an input method repeats types once for each press.
  • 13_terminal: bold, underlined and wide characters, and Ctrl with + or - changes the font size; the lines wrap again at each size.
  • 14_media: a frame with rounded corners, a picture that turns, fades and is written to a PNG file, an animated GIF, a streamed tune, a tone made in Lua and panned, and a low-pass filter, an echo and a reverb.
  • 15_network: a TLS server with a certificate made for the example, and a client that trusts it.
  • 16_model: a texture from inside a .glb, a badge that its animation turns and moves, and a skinned arm that bends.
  • 17_files: the list follows the folder's changes with fs.watch.
  • 19_first_party, which was 18_first_party: the launcher opens in the tool itself, with Alt+W, then /.

What will break

  • 18_first_party is now 19_first_party, so the examples of the standard plugins stay together.

Downloads

  • openecs-examples-0.3.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.