Re:Show HN: Terra, a JS framework for cellular automata and ...
by rileyjshaw on Saturday August 23, 2014 @07:21PM
(#8217160)
It doesn't have to be global! Terra works as a module with most popular module systems. For example:
should work in any CommonJS environment.
[ Parent
| on HN ]
Re:Show HN: Terra, a JS framework for cellular automata and ...
by ttty on Saturday August 23, 2014 @07:36PM
(#8217186)
I mean when you register
terra.creatureFactory.register({type: 'firstCreature'});
this is stored in the global `terra` variable... Would be better IMO var terra = new Terra();terra.creatureFactory.register({type: 'firstCreature'});