Javascript

cae.js: hand it a canvas and stand back

The cae.js project is a distillation of the cellular automaton built into the earlier cellular automata explorer project. It is a self-contained javascript class. It can instantiated thusly: First, include the cae.js source in your html: <script src="/javascripts/cae.js"></script> Then create an instance of cae: my_cae = new cae(); my_cae.init("my_canvas"); my_cae.draw(); And that’s it. Just replace “my_canvas” with the id of the canvas you’d like cae to draw upon, and it will determine the proper width and height.
Read more