new Map(points, bbox, relaxations, improveCorners)
Creates an instance of Map.
| Name | Type | Default | Description |
|---|---|---|---|
points |
any | ||
bbox |
any | ||
relaxations |
number | 0 | optional |
improveCorners |
boolean | false | optional |
Extends
Methods
-
generate(ruleset)
Run a generation of cellular automation according to a user specified rule set
-
This function is used to call cellular automita on the graph object. The ruleset function should follow the following properties so that the automation can run properly. See the example for the details
Name Type Description rulesetfunction The - TODO
-
- Find a New Name
Example
var gameOfLife = function(center) { var n = center.neighbors.length; return { alive: center.data.alive && (n === 2 || n === 3) || !center.data.alive && n === 3 }; }