3 ms·
It doesn't have to be global! Terra works as a module with most popular module systems. For example: var terra = require('./terra.min.js'); should work in a
by rileyjshaw 12y ago
It doesn't have to be global! Terra works as a module with most popular module systems. For example:
var terra = require('./terra.min.js');
should work in any CommonJS environment.
- ttty 12y agoI 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'});