Hexells
Introduction
Hexells is a Self-Organising System of cells, that was trained to build textures using neighbour communication only. This work exposes the relation between the life of an individual cell, and the cell collective as a whole. The original library belongs to Alexander Mordvintsev, and you can see the demonstration of his implementation here.
The "cell" system is based on Neural Cellular Automata.
Usage
Hexells was designed with widespread usage possibilities in mind. The software can be imported directly via npm
, or can be used as a library by generating a single-file bundle with browserify
via npm run build
.
const canvas = document.createElement("canvas");
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
// `Hexells` is in the window scope
new Hexells(canvas);
document.body.appendChild(canvas);
Configuration
Available parameters (within the options
argument):
-
powerPreference
The power preference to use when creating the WebGL context. Defaults to"default"
-
brushRadius
The size of the brush to use, in pixels. Defaults to16
-
stepPerFrame
The number of steps to take when generating and displaying each frame. Defaults to1
-
timePerModel
The number of milliseconds to wait before generating and displaying a different model. Defaults to20000
-
responsive
Whether or not to respond to input from the client. Defaults tofalse
-
fps
The approximate number of frames per second to render. Defaults to25