cellular-automat
TypeScript icon, indicating that this package has built-in type declarations

2.1.0 • Public • Published

cellular-js

cellular-automat is a javascript library of a cellular automat like conways game of life.

prepare:

npm install

test:

npm test

build:

npm run build

example

typescript

This is the typescript example. See the example project.

import {
    Configuration,
    EEFFRule, 
    Universe,
    CellularAutomat
} from "cellular-automat";


const config = new Configuration(new Universe(300, 300), new EEFFRule(2, 3, 3, 3))
var ca = new CellularAutomat(document.getElementById('canvas') as HTMLCanvasElement, config)
ca.random()
ca.start()

javascript

This is the javascript example. See the example project.

var config = new cellularJs.Configuration(
    new cellularJs.Universe(300, 300), 
    new cellularJs.EEFFRule(2, 3, 3, 3)
    )
var ca = new cellularJs.CellularAutomat(document.getElementById('canvas'), config)
ca.random()
ca.start()

Package Sidebar

Install

npm i cellular-automat

Weekly Downloads

6

Version

2.1.0

License

Apache-2.0

Unpacked Size

70.4 kB

Total Files

31

Last publish

Collaborators

  • t53k