very wip scrubber and camera
This commit is contained in:
8
world.js
8
world.js
@@ -67,7 +67,7 @@ export class World {
|
||||
}
|
||||
|
||||
if (cmd === 'l') {
|
||||
this.labels.set(tokens[1], currentTime);
|
||||
this.labels.set(tokens[1], this.events.length);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -168,8 +168,10 @@ export class WorldFrame {
|
||||
let targetTime = target;
|
||||
|
||||
if (typeof target === 'string') {
|
||||
targetTime = this.world.labels.get(target);
|
||||
if (targetTime === undefined) throw new Error(`Label not found: ${target}`);
|
||||
const absoluteIdx = this.world.labels.get(target);
|
||||
if (absoluteIdx === undefined) throw new Error(`Label not found: ${target}`);
|
||||
this.seekIndex(absoluteIdx - this.world.initialIndex);
|
||||
return;
|
||||
}
|
||||
|
||||
let changed = false;
|
||||
|
||||
Reference in New Issue
Block a user