mirror of
https://github.com/ful1e5/Bibata_Cursor.git
synced 2025-06-04 16:54:03 -04:00
🎥 Minimum Frames handler
This commit is contained in:
parent
7fbb14bcf5
commit
cb9c6aef2b
2 changed files with 3 additions and 2 deletions
|
@ -15,6 +15,7 @@ import { matchImages } from "./utils/matchImages";
|
|||
export class BitmapsGenerator {
|
||||
private readonly staticCurs: Cursors;
|
||||
private readonly animatedCurs: Cursors;
|
||||
private readonly minimumFrames: number = 30;
|
||||
|
||||
/**
|
||||
* @param source `BitmapsGenerator` Class's object arguments.
|
||||
|
@ -151,11 +152,10 @@ export class BitmapsGenerator {
|
|||
img2Buff: newFrame
|
||||
});
|
||||
|
||||
if (matched) {
|
||||
if (matched && index > this.minimumFrames) {
|
||||
breakRendering = true;
|
||||
} else {
|
||||
frames[key] = { buffer: newFrame };
|
||||
setTimeout(() => {}, 1);
|
||||
index++;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue