var _           = require('lodash');
var AssetLoader	= require('./assetLoader');

/**
 * SceneParser class
 * @param {object} param
 * @constructor
 */
function SceneParser() {
  if (SceneParser._instance === null) {
    SceneParser.prototype.init.apply(this, arguments);
    SceneParser.type = 'babylon';
    SceneParser._instance = this;
  } else {
    return SceneParser._instance;
  }
}

var proto = SceneParser.prototype;

proto.init = function(param) {
  param = param || {};
  this.sceneUrl = param.url;
  if (!this.sceneUrl) {
  	throw new Error('Scene should have an Url');
  }
  this.assetLoader = new AssetLoader();
  this.assetLoader.getFile(this.sceneUrl).then(function success() {

  }, function failure() {

  });
  /*
  this.assetLoader.push(this.sceneUrl);
  this.assetLoader.once(this.sceneUrl, this.parseScene.bind(this));
  this.assetLoader.start();
  */
};

proto.parseScene = function() {
	this.scene = this.assetLoader.resources[this.sceneUrl];

};

proto.parseMesh = function(mesh) {

};

//static
SceneParser._instance = null;
SceneParser.getInstance = function() {
  return SceneParser._instance;
};

module.exports = SceneParser;

@@ -665,214 +665,74 @@
 Url)
-.then(function success() %7B%0A%0A  %7D, function failure() %7B%0A%0A  %7D);%0A  /*%0A  this.assetLoader.push(this.sceneUrl);%0A  this.assetLoader.once(this.sceneUrl, this.parseScene.bind(this));%0A  this.assetLoader.start();%0A  */
+%0A  %09.then(this.parseScene.bind(this), function failure() %7B%0A%0A  %09%7D);
 %0A%7D;%0A
@@ -756,24 +756,29 @@
  = function(
+scene
 ) %7B%0A%09this.sc
@@ -787,49 +787,13 @@
 e = 
-this.assetLoader.resources%5Bthis.
 scene
-Url%5D
 ;%0A%0A%7D

Fix scene parser handlers