#GenArtAPI

Karsten Schmidttoxi@mastodon.thi.ng
2025-06-22

Various thi.ng updates, bug fixes, additions and new version of github.com/thi-ng/zig-thing/ — now fully compatible with current Zig v0.14.1

On a more diary/devlog note: I also updated several of my Zig based work-in-progress art pieces to the latest version (some of them not touched in 2+ years) and it's so good to see how the thi.ng/wasm-api toolchain has been holding up with various breaking Zig changes and also how this setup simplifies creating hybrid Zig/TypeScript projects (e.g. for using DOM/WebGL from Zig). Related, I also want to mention once more the #GenArtAPI Zig WebAssembly bindings[1] (updated a few weeks ago), which add another layer of flexibility & boilerplate reduction for generative/procedural/algorithmic art projects...

I will be attempting yet another few takes creating a video overview & mini-workshop/tutorial about thi.ng/genart-api, hopefully also touching on these aspects...

[1] github.com/thi-ng/genart-api/t

#ThingUmbrella #Zig #Ziglang #WebAssembly #WASM #GenArtAPI #Art #GenerativeArt #AlgorithmicArt

Still image/poster of DANZA, an abstract, generative physics-based realtime animation. The composition shows multiple overlapping patches of cloth sims, each represented by tens of thousands of small dots, each patch in different colors.Still image of S-TRACE, an abstract generative realtime animation based on omnidirectional sphere tracing and multiple agents exploring the constantly changing positive & negative spaces
Karsten Schmidttoxi@mastodon.thi.ng
2025-06-02

#ReleaseMonday — New version (v0.27.0) of thi.ng/genart-api, a platform-independent extensible API for browser-based computational/algorithmic/generative art projects:

This version features an overhaul of the platform provided PRNG (pseudo-random number generator) handling and makes it easier to create multiple PRNGs for artworks which require/desire them...

Related section in the README:
github.com/thi-ng/genart-api/b

Also, just as a reminder, the project has:

- no external dependencies
- adapters for 3 art platforms (EditArt, fxhash, Layer)
- 6 example projects
- testing/dev sandbox with two parameter editors
- WebAssembly bindings & demo (currently for #Zig only)

Happy coding! :)

#GenArtAPI #GenerativeArt #AlgorithmicArt #ProceduralArt #Art #OpenSource #Parameters #Interoperability #TypeScript #JavaScript #WebAssembly #WASM #Ziglang

Karsten Schmidttoxi@mastodon.thi.ng
2025-01-10

Another day, another #GenArtAPI release (v0.25.0):

This update mainly features the new `@genart-api/wasm` package, providing Zig & TypeScript bindings for core GenArtAPI functionality (i.e. so far mostly parameter handling).

This WASM bridge/integration is designed as an API module for the thi.ng/wasm-api toolchain. Installation & build instructions are in the readme.

New package homepage:
github.com/thi-ng/genart-api/t

Example project (w/ param editor):
demo.thi.ng/genart-api/param-e

Example Zig source code:
github.com/thi-ng/genart-api/b

#GenArtAPI #GenerativeArt #Art #OpenSource #Parameters #Interoperability #TypeScript #WebAssembly #WASM #Zig #Ziglang

Karsten Schmidttoxi@mastodon.thi.ng
2025-01-09

New release of thi.ng/genart-api (v0.24.0) — a platform-independent extensible API for browser-based computational/algorithmic/generative art projects:

This release contains quite a few new features, as well as several important fixes for bugs which were accidentally introduced in the two most recent versions...

- extracted the debug time provider & FPS overlay to separate package
- updated `bigint` param handling (esp. randomization)
- added `collector` and `iteration` metadata accessors
- updated platform adapters (esp. the #fxhash one)
- fixed image & ramp param handling
- added a bunch of utilities to core API to deduplicate code in various adapters
- updated/fixed examples & docs
- added more tests (and updated core API to be more testable outside the browser)

All changes since v0.21.0:
github.com/thi-ng/genart-api/c

🎉

#GenArtAPI #GenerativeArt #Art #OpenSource #Parameters #Interoperability #TypeScript #JavaScript

Karsten Schmidttoxi@mastodon.thi.ng
2025-01-03

#ReleaseFriday (1st release cycle of 2025) 🎉 — New additions & updates to thi.ng/genart-api, a platform-independent extensible API for browser-based computational/algorithmic/generative art projects:

- Added fxhash.xyz platform adapter (incl. support & adaptations for 10 of the 17 built-in GenArtAPI param types)
- Added `bigint` & `binary` data param types
- Updated parameter type definitions & factories (date, datetime, time, numlist, strlist, text, vector)
- Ensure any given default values are valid (and can be coerced)
- Added MurmurHash3 (128 bit version) functions (e.g. seed PRNGs)
- Added tests for all parameter types (factory functions & implementations)
- Added tests for utility functions
- Added GitHub actions (running tests)
- Various API docs updates, clarifications & fixes
- Update/refactor EditArt & Layer platform adapters
- Updated main & adapter readmes

New adapter package `@genart-api/adapter-fxhash`:
github.com/thi-ng/genart-api/t

Commits since last release:
github.com/thi-ng/genart-api/c

#GenArtAPI #ComputationalArt #AlgorithmicArt #GenerativeArt #Art #OpenSource #Parameters #Interoperability #TypeScript #JavaScript #Genuary

Karsten Schmidttoxi@mastodon.thi.ng
2024-12-24

Another new release of #GenArtAPI (v0.20.0), due to some urgent additions & updates of partially outdated documentation and refactoring/cleaning up of some parameter types. This project already contains more docs than code and because things are moving so fast, I forgot to update some parts... (Sorry for any confusion caused...)

Other notable updates:

- Simplified the core API's param value getter for obtaining time-based or randomized values (please check docs[1])
- Updated vector param definition
- Added a `.configure()` method for the EditArt platform adapter to allow manual selection of adapted params (to override the default auto-selection)[2]

You can see all the changes since the last release here:
github.com/thi-ng/genart-api/c

[1] docs.thi.ng/genart-api/core/in
[2] github.com/thi-ng/genart-api/t

#GenerativeArt #Art #OpenSource #Parameters #Interoperability #TypeScript #JavaScript

Karsten Schmidttoxi@mastodon.thi.ng
2024-12-22

#ReleaseSunday and already second #GenArtAPI update this week, plus the addition of a new platform adapter package for publishing artwork to editart.xyz (ready ahead of #Genuary2025 😉)... (cc/ @pifragile)

This new release (all packages at v0.19.0 now) also includes several updates to API docs and adapter readme's:

- github.com/thi-ng/genart-api
- github.com/thi-ng/genart-api/t
- github.com/thi-ng/genart-api/t

All implementations are WIP (but fully functional, to the best of my knowledge!). If there's demand, I'm considering adding more parameter type adaptations also for the EditArt adapater (e.g. to support vector/XY params, as already done for the Layer adapter...)

Since I've been told "people/artists don't read anymore", tonight I'm starting to record a video walkthrough, wish me luck! :)

#GenerativeArt #Art #OpenSource #Parameters #Interoperability #TypeScript #JavaScript

Karsten Schmidttoxi@mastodon.thi.ng
2024-12-19

Just been having a long interesting conversation about how thi.ng/genart-api can also become very interesting from a digital preservation perspective:

Right now a lot of contemporary browser-based computational/generative art pieces are somewhat bound to the lifespan of the art platforms/websites they've been published at/for (irrespective if the pieces themselves are hosted on IPFS or similar supposed longer-term storage). Most of these works are coded ad-hoc against the APIs provided by these respective individual platforms, each only optimizing for their own uses/biases. However, developing/refactoring such works to use an open source platform-independent API (i.e. #GenArtAPI) with any platform specifics handled via very easy-to-replace (and to develop) plugins/adapters, then at least potentially extends the lifespan & adaptability of these works by making it much easier to migrate them to new platforms/environments/emulators. In most cases, this migration can be done purely via configuration (replacing a couple of library `<script>` tags in the HTML wrapper), rather than having to make any code changes in the artwork itself.

(All this is acknowledging, but also ignoring here the much larger looming preservation issue related to the general dependency on web browsers and bitrotting web tech... Still every little helps! 😉)

#DigitalPreservation #Adaptation #OpenSource #Art #GenerativeArt

Karsten Schmidttoxi@mastodon.thi.ng
2024-12-18

New release of thi.ng/genart-api, a modular cross-platform API/SDK for browser-based computational/algorithmic/generative art projects, helping to reduce artists' efforts to adapt work for different art platforms/environments/uses/workflows.

Main new v0.18.0 additions:

- The param editor reference implementation now groups parameters by their declared group and sorts them by given order (both optional)
- The `@genart-api/adapter-layer` package supports adaptations/translations for more param types, incl. vectors, which are not yet natively supported by that platform. E.g. vectors will be transparently represented as multiple, separate numeric params on the platform side, but your artwork is blissfully unaware of this and still only would deal with vectors. The platform adapter does all the reconcilation and handling of param changes...
- Started adding tests
- Updated API docs & readme's

As always, feedback highly appreciated — this project is in active development...

I'm aware, the target audience for this larger project is quite limited, but the benefits are real (and palpable!), not just for artists in this field (but especially for them!)... I'll do my best to illustrate the (recurring) problems being solved here, demystify some of the concepts and squeeze in recording a short(ish) video showing how to develop a small project from scratch using this system/setup and then repurpose it and show related tools still in development...

#GenArtAPI #Art #GenerativeArt #AlgorithmicArt #Parameters #Interoperability #OpenSource #TypeScript #JavaScript

Karsten Schmidttoxi@mastodon.thi.ng
2024-12-13

#ReleaseFriday (the 13th) — New version (v0.17.0) of thi.ng/genart-api with the following updates:

- Added platform adapter IDs for use with external editors/tooling
- Updated editors[1] to check for platform adapter & API version compatibility, display warnings if needed...
- Added/migrated three different seedable PRNG implementations in API core package (SFC32, XorShift128, XsAdd). These are completely independent and can be used by platform adapters and/or artworks (also multiple instances)
- Initial release of first platform adapter for an upcoming art platform (currently invite only)
- Restructured all example projects
- Updated readme & API docs (docs.thi.ng/genart-api/core/)

[1] The param editor/sandbox requires your artwork to use the latest version of these packages: `@genart-api/core` and `@genart-api/adapter-urlparams`.

demo.thi.ng/genart-api/param-e

New improved version (of editor) with many more features (incl. variation/preset management) is in the works...

#GenArtAPI #OpenSource #GenerativeArt #Art #Parameters #Interoperability #TypeScript #JavaScript

Karsten Schmidttoxi@mastodon.thi.ng
2024-12-07

Major #GenArtAPI project updates from this past week:

thi.ng/genart-api

- Restructured the project as monorepo, splitting out core API and platform adapter(s) as separate packages
- Switched package scope from `@thi.ng` to `@genart-api` to highlight project/platform independence (not directly related with other thi.ng projects).
- Published new packages: `@genart-api/core` and `@genart-api/adapter-urlparams`
- Moved API docs to docs.thi.ng/genart-api/core/
- Added support for n-dimensional vector parameters and added support in the reference platform adapter and in param editor
- Updated all examples & parameter editor. The latter is now only compatible with this latest API version (v0.16.0)
- Updated docs/readme

If you want to find out more, the project readme has _a lot_ more information. Also feel free to get in touch with any questions/proposals!

#GenArtAPI #OpenSource #GenerativeArt #Art #Parameters #Interoperability #TypeScript #JavaScript

Karsten Schmidttoxi@mastodon.thi.ng
2024-12-01

It just dawned on me that I haven't been mentioning five(!) recent thi.ng/genart-api updates, all from the past month... 😱

The latest version (v0.14.0, just released) is largely about an overhaul of messaging related functionality and also addresses use cases related to managing multiple artworks embedded (via `<iframe>`s) in a single document/page (think: online gallery scenarios...)

If you're already using GenArtAPI message/event listeners in your own artwork, you might have to rename some of them. This commit has the important details:

github.com/thi-ng/genart-api/c

Also, the online parameter editors have been updated and are now only working with the latest version of the API, so be sure to update your artwork projects to stay compatible:

Generic editor harness (for your own compatible artworks):
demo.thi.ng/genart-api/param-e

Demo (with test artwork):
demo.thi.ng/genart-api/param-e

Other recent changes/additions (in no particular order):

- added new message types to poll the artwork/API for current state/info
- update message names & naming convention
- added ability to configure the API behavior/features (also via messaging)
- option to emit frame messages w/ current timing/frame info
- message broadcasting to multiple GenArtAPI instances/artworks
- inject common defaults for optional settings in param specs
- fixed date/datetime param handling (in editor)
- updated/fixed time providers
- updated debug time provider (w/ FPS visualization overlay)
- use gzip compression for image param values (in default platform adapter)
- added version info
- various documentation updates
- (WIP) WASM bindings for Zig-based artworks
- (WIP) unpublished progress on real platform adapters

Some of these features are all about enabling new use cases and improving usability of external tooling around artworks adapting GenArtAPI, for example:

- Ability to broadcast start/stop messages to either individual or all artworks embedded in a page
- Ability for the param editor to configure the artwork currently being worked on to emit timing & frame information (which then can be integrated in the editor UI without the editor knowing anything else about the artwork)
- Enable editors to identify an artwork/project and store param presets grouped by project ID
- Allow editors (or other tools) to check the API version used by the artwork by first sending a `genart:get-info` message, then listening for `genart:info` response (then maybe display a warning if version is incompatible)
- etc.

If you want to find out more, the project readme has _a lot_ more information. Also feel free to get in touch with any questions!

#GenArtAPI #OpenSource #GenerativeArt #Art #Parameters #Interoperability #TypeScript #JavaScript #Zig #WASM #WebAssembly

Karsten Schmidttoxi@mastodon.thi.ng
2024-11-09

Various #ThingUmbrella and #GenArtAPI updates from this week:

- Added null pointer checks & guards in thi.ng/wasm-api. This also includes support for structs with fields using Zig-style optional pointers.
- Updated the 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 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 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 (thi.ng/wasm-api-dom) and to handle Canvas2D drawing (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):
demo.thi.ng/genart-api/param-e

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):
github.com/thi-ng/genart-api/t

#GenerativeArt #ArtMaking #Interop #OpenSource #Workflow #TypeScript #JavaScript

Karsten Schmidttoxi@mastodon.thi.ng
2024-11-03

Some #GenArtAPI and #ThingUmbrella releases from this past week:

thi.ng/genart-api is already at v0.8.1 now. This latest version includes a new "debug mode" time provider plugin which also collects and computes frame rate statistics (moving average) and injects a canvas visualization overlay (everything configurable). Together with the parameter editor, this is a small, but useful tool to help configuring an artwork and ensure fluid performance on a target device/platform...

The URL chooser of the reference implementation's parameter editor is also mobile friendly now. You can see a demo of both in action here:
demo.thi.ng/genart-api/param-e

Some thi.ng/umbrella related updates:

thi.ng/memoize: Function memoization/caching. Added support for async functions/promises and made existing implementations variadic (and removed fixed arity versions!). This is thanks to a feature request by Hitomi Tenshi...

thi.ng/transducers-stats: Functional sequence processing. Added moving minimum/maximum transducers (deque-based to be super efficient) and updated Donchian channel transducer (aka moving min/max bounds) to also benefit from new implementation

There's also ongoing major (re)work of the long-promised 2D/3D mesh implementation. It's still on a private feature branch, but I'm getting closer for initial release...

#OpenSource #Release #Announcement #TypeScript #JavaScript #GenerativeArt

Karsten Schmidttoxi@mastodon.thi.ng
2024-10-03

More exciting updates to thi.ng/genart-api, an API for browser-based generative artworks:

- added two list param types (numeric & string)
- added support for composite/nested param types, esp. interesting for custom param types declared by artworks and/or platforms
- updated the first (of two) GUI param editors in the reference implementation to support composite params
- added new example showcasing custom & composite param types (oscillators)

New example w/ editor (make sure to select the "imgui" editor):
demo.thi.ng/genart-api/param-e

Example source code:
github.com/thi-ng/genart-api/b

To explain a bit further: The example defines a custom oscillator parameter type, which itself consists of multiple sub-params to configure waveform, frequency, amplitude etc. Using the GenArtAPI messaging protocol, the external param editor (not knowing anything about the artwork or this custom param type) can still provide GUI widgets to customize the 2 oscillators used... Likewise, the artwork is completely decoupled from how those oscillator values are being computed or how they're customized via the editor...

#GenArtAPI #GenerativeArt #Art #API #Interop #OpenSource #ArtMaking #Workflow #TypeScript #JavaScript

Karsten Schmidttoxi@mastodon.thi.ng
2024-09-28

Lots of new additions & improvements to the thi.ng/genart-api proposal, documentation, the reference implementation, examples and param editors this week:

thi.ng/genart-api

- added new (12th) parameter type: image maps (supporting grayscale or RGB)
- added new example project using an image parameter to create artwork
- added code example showing how an art platform (or artwork itself) might define & work with a custom parameter type (example: sine oscillator)
- added/updated API docs (docs.thi.ng/umbrella/genart-ap)
- started documenting API states & transitions (diagram still WIP, forthcoming)
- initial documentation of message protocol (for communicating w/ parent window and/or external tooling)
- simplified the pluggable time provider implementations (for animation)
- updated the reference implementation platform adapter to support all built-in param types
- major update GUI param editors, now allowing users to dynamically load & customize externally hosted (compatible!) artworks, and also supporting image params, custom color chooser component...

Example editors:

- demo.thi.ng/genart-api/param-e — either of the two editors can be used...
- demo.thi.ng/genart-api/param-e — currently only the rdom-forms editor can be used for this and you'll need to choose an image for the other params to make sense...

(Note: The imgui-based editor is NOT mobile friendly. Also, the editor sidebar can be toggled on/off via Escape key)

As usual, everything's work-in-progress until further notice. Feedback welcome!

#GenArtAPI #GenerativeArt #Art #API #Interop #OpenSource #ArtMaking #Workflow #TypeScript #JavaScript

Screenshot of the linked image map parameter example, showing a sidebar with different parameter controls (low res grayscale image preview, color picker), and the artwork showing the imported image represented as a fine grid of differently sized pink dots on dark blue background

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst