very wip scrubber and camera

This commit is contained in:
2026-07-05 22:12:26 -04:00
parent fcd26b32d1
commit 5a201f0cfd
5 changed files with 385 additions and 232 deletions

View File

@@ -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;