cellseriesviewer

0.1.1 • Public • Published

cellseriesviewer

This is a small web app that displays series of cells generated by a cellular automaton. It expects cells to be in this kind of format:

{
  "d": {
    "name": "cello",
    "p": 1
  },
  "coords": [
    2,
    1
  ]
}

cellseriesviewer will show sets of cells at the first iteration, then will show them at the next iteration when you hit Next.

Installation

npm install cellseriesviewer

Usage

Edit cellseries-config.js file to provide information about your series.

var seriesData = [
  {
    id: 'default-cell-layer',
    url: 'location-of-a-file-containing-an-array-of-sets-of-cells.json',
    offset: [0, 550]
  }
];

You can have as many objects within the seriesData array as like. Each object represents a group of cells. The offset specifies where in the SVG they should rendered. The url points to a JSON file containing an array.

That outer array should contain iterations. Each iteration should be an array containing the the state of each cell in the series at that iteration.

Start a web server, then open the index.html to view your cell series.

Check out a working example.

License

MIT.

Package Sidebar

Install

npm i cellseriesviewer

Weekly Downloads

0

Version

0.1.1

License

MIT

Last publish

Collaborators

  • jimkang