Various #ThingUmbrella and #GenArtAPI updates from this week:
- Added null pointer checks & guards in https://thi.ng/wasm-api. This also includes support for structs with fields using Zig-style optional pointers.
- Updated the https://thi.ng/wasm-api-bindgen code generator for #TypeScript to produce smaller code for structs using many string fields
- Did major ground work on #Zig #WebAssembly bindings of core https://thi.ng/genart-api functionality (see small demo below)
- Fixed/updated/simplified time provider logic
- Updated the debug time provider with its FPS analytics/visualization overlay, now computing moving min/max and moving average (default period = 200 frames) and the viz is dynamically/smoothly rescaling to current peak
- Released new GenArtAPI v0.9.0
As for the Zig/WASM example: This is only interesting from a technical POV, no visuals here! All canvas drawing and parameter declarations/evaluations are done via Zig, using the aforementioned https://thi.ng/wasm-api infrastructure to provide a new API module which can be seamlessly used with the other hybrid WASM API modules, here for DOM creation (https://thi.ng/wasm-api-dom) and to handle Canvas2D drawing (https://thi.ng/wasm-api-canvas).
At the moment, this GenArtAPI WASM module is still a fixed part of this example, but will eventually be extracted & distributed as separate package.
Demo (with param editor):
https://demo.thi.ng/genart-api/param-editors/?url=https://demo.thi.ng/genart-api/zig-test/
Choose one of the two GUI implementations, then make any parameter changes and you should see the new values applied immediately (btw. the demo is likely not very usable on mobile)...
Source code (TypeScript in `/src`, Zig in `/zig` directories):
https://github.com/thi-ng/genart-api/tree/main/examples/zig-test/
#GenerativeArt #ArtMaking #Interop #OpenSource #Workflow #TypeScript #JavaScript