Skip to content

Commit

Permalink
Adding data moniker to scene loader
Browse files Browse the repository at this point in the history
  • Loading branch information
deltakosh committed May 22, 2014
1 parent 933e044 commit 137abac
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
12 changes: 11 additions & 1 deletion Babylon/Loading/babylon.sceneLoader.js
Expand Up @@ -34,7 +34,7 @@ var BABYLON = BABYLON || {};

var plugin = this._getPluginForFilename(sceneFilename);

BABYLON.Tools.LoadFile(rootUrl + sceneFilename, function (data) {
var importMeshFromData = function(data) {
var meshes = [];
var particleSystems = [];
var skeletons = [];
Expand All @@ -51,6 +51,16 @@ var BABYLON = BABYLON || {};
scene.importedMeshesFiles.push(rootUrl + sceneFilename);
onsuccess(meshes, particleSystems, skeletons);
}
};

if (sceneFilename.substr(0, 5) === "data:") {
// Direct load
importMeshFromData(sceneFilename.substr(5));
return;
}

BABYLON.Tools.LoadFile(rootUrl + sceneFilename, function (data) {
importMeshFromData(data);
}, progressCallBack, database);
},

Expand Down

0 comments on commit 137abac

Please sign in to comment.