Skip to content

Commit

Permalink
Merge pull request #8 from TheNexusCity/issues/adding-support-scn-imp…
Browse files Browse the repository at this point in the history
…ort-export

Issues/adding support scn import export
  • Loading branch information
lalalune authored Mar 9, 2022
2 parents 06941d6 + 1cf2466 commit 1a5c619
Show file tree
Hide file tree
Showing 3 changed files with 357 additions and 14 deletions.
8 changes: 5 additions & 3 deletions src/editor/Editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ export default class Editor extends EventEmitter {
this.gltfCache.disposeAndClear();
}

async loadProject(projectFile) {
async loadProject(projectFile, isScn = false) {
this.removeListener("objectsChanged", this.onEmitSceneModified);
this.removeListener("sceneGraphChanged", this.onEmitSceneModified);

Expand All @@ -289,8 +289,10 @@ export default class Editor extends EventEmitter {

this.sceneLoading = true;
this.disableUpdate = true;
const [scene, errors] = await SceneNode.loadProject(this, projectFile);
if(errors) console.log("errors", errors);
const [scene, errors] = isScn
? await SceneNode.loadProjectScn(this, projectFile)
: await SceneNode.loadProject(this, projectFile);
if (errors) console.log("errors", errors);
this.sceneLoading = false;
this.disableUpdate = false;
this.scene = scene;
Expand Down
Loading

0 comments on commit 1a5c619

Please sign in to comment.