style: rename

This commit is contained in:
Acid Chicken (硫酸鶏) 2023-04-09 15:07:15 +09:00
parent 7fb1a3fc81
commit e421ebf508
No known key found for this signature in database
GPG Key ID: 3E87B98A3F6BAB99
1 changed files with 3 additions and 3 deletions

View File

@ -9,10 +9,10 @@ export default class IdlingRenderScheduler {
this.#renderers = new Set(); this.#renderers = new Set();
this.#budget = budget; this.#budget = budget;
this.#rafId = 0; this.#rafId = 0;
this.#ricId = requestIdleCallback((deadline) => this.#render(deadline)); this.#ricId = requestIdleCallback((deadline) => this.#schedule(deadline));
} }
#render(deadline: IdleDeadline): void { #schedule(deadline: IdleDeadline): void {
if (deadline.timeRemaining() > this.#budget) { if (deadline.timeRemaining() > this.#budget) {
this.#rafId = requestAnimationFrame((time) => { this.#rafId = requestAnimationFrame((time) => {
for (const renderer of this.#renderers) { for (const renderer of this.#renderers) {
@ -20,7 +20,7 @@ export default class IdlingRenderScheduler {
} }
}); });
} }
this.#ricId = requestIdleCallback((arg) => this.#render(arg)); this.#ricId = requestIdleCallback((arg) => this.#schedule(arg));
} }
add(renderer: FrameRequestCallback): void { add(renderer: FrameRequestCallback): void {