main.js 437 B

123456789101112131415161718192021222324252627
  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();
  10. // create the game component
  11. var node = game.scene.createChild("TheScene");
  12. node.createJSComponent("Scene");
  13. }
  14. // called per frame
  15. function update(timeStep) {
  16. }