fix: first frame
This commit is contained in:
parent
e17df79133
commit
ed8f5bf24f
2 changed files with 4 additions and 3 deletions
|
|
@ -145,12 +145,13 @@ export class Drawer {
|
|||
},
|
||||
);
|
||||
}
|
||||
invalidate(scheduler = this.scheduler) {
|
||||
invalidate(scheduler = this.scheduler, t) {
|
||||
if (!scheduler) {
|
||||
return;
|
||||
}
|
||||
// TODO: scheduler.now() seems to move even when it's stopped, this hints at a bug...
|
||||
t = t ?? scheduler.now();
|
||||
this.scheduler = scheduler;
|
||||
const t = scheduler.now();
|
||||
let [_, lookahead] = this.drawTime;
|
||||
const [begin, end] = [Math.max(t, 0), t + lookahead + 0.1];
|
||||
// remove all future haps
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue