Skip to content

Commit

Permalink
temporary scenes
Browse files Browse the repository at this point in the history
  • Loading branch information
LilyMakesThings committed Oct 10, 2024
1 parent a0eab61 commit 8c92428
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/engine/runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -2797,15 +2797,19 @@ class Runtime extends EventEmitter {
this.threads = [];
this.threadMap.clear();

for (const scene in this.scenes) {
if (scene.temporary) {
this.deleteScene(scene.id);
}
}
this._clearTemporaryScenes();

// Remove all temporary scenes created during the project's run.
this.resetRunId();
}

_clearTemporaryScenes () {
for (const sceneId in this.scenes) {
const scene = this.scenes[sceneId];
if (scene.temporary) this.removeScene(sceneId);
}
}

_renderInterpolatedPositions () {
const frameStarted = this._lastStepTime;
const now = Date.now();
Expand Down

0 comments on commit 8c92428

Please sign in to comment.