main.js 695 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. // This script is the main entry point of the game
  2. require("AtomicGame");
  3. Atomic.script("Utils.js");
  4. Atomic.game.init(start, update);
  5. // called at the start of play
  6. function start() {
  7. var game = Atomic.game;
  8. // create a 2D scene
  9. game.createScene3D("Scenes/ToonTown.scene");
  10. // create the game component
  11. var node = game.scene.createChild("TheScene");
  12. node.createJSComponent("Scene");
  13. if (Atomic.platform == "iOS" || Atomic.platform == "Android")
  14. {
  15. node.createJSComponent("TouchInput");
  16. }
  17. else
  18. {
  19. // bump the shadowmap size up so it is crisper
  20. game.renderer.shadowMapSize = 2048;
  21. }
  22. }
  23. // called per frame
  24. function update(timeStep) {
  25. }