hexells

1.2.1 • Public • Published

Hexells

Total NPM Downloads Monthly NPM Downloads

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 to 16
  • stepPerFrame The number of steps to take when generating and displaying each frame. Defaults to 1
  • timePerModel The number of milliseconds to wait before generating and displaying a different model. Defaults to 20000
  • responsive Whether or not to respond to input from the client. Defaults to false
  • fps The approximate number of frames per second to render. Defaults to 25

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.2.11latest

Version History

VersionDownloads (Last 7 Days)Published
1.2.11
1.2.01
1.1.81
1.1.71
1.1.61
1.1.51
1.1.41
1.1.31
1.1.21
1.1.11

Package Sidebar

Install

npm i hexells

Weekly Downloads

10

Version

1.2.1

License

Apache-2.0

Unpacked Size

1.21 MB

Total Files

6

Last publish

Collaborators

  • ajmeese7