Visualize Your Ideas With Code
fix: previous scene invisible when seeking
aarthificial65e32f03b79a
diff --git a/src/Project.ts b/src/Project.tsindex 95c7a64b..e4c206e0 100644--- a/src/Project.ts+++ b/src/Project.ts@@ -97,7 +97,6 @@ export class Project extends Stage {await this.currentScene.next();if (this.currentScene.canTransitionOut()) {this.previousScene = this.currentScene;- this.previousScene.transitionFrame = this.frame;this.currentScene = this.getNextScene(this.previousScene);if (this.currentScene) {await this.currentScene.reset(this.previousScene);@@ -148,7 +147,7 @@ export class Project extends Stage {private findBestScene(frame: number): Scene {let lastScene = null;for (const scene of Object.values(this.sceneLookup)) {- if (scene.transitionFrame === null || scene.transitionFrame > frame) {+ if (scene.lastFrame === null || scene.lastFrame > frame) {return scene;}lastScene = scene;diff --git a/src/Scene.ts b/src/Scene.tsindex 8ce68f9e..3f740054 100644--- a/src/Scene.ts+++ b/src/Scene.ts@@ -27,7 +27,6 @@ export enum SceneState {export class Scene extends Layer {public firstFrame: number = null;- public transitionFrame: number = null;public lastFrame: number = null;public threadsCallback: ThreadsCallback = null;@@ -53,7 +52,6 @@ export class Scene extends Layer {public reload(runnerFactory: SceneRunner) {this.runnerFactory = runnerFactory;- this.transitionFrame = null;this.lastFrame = null;}