diff --git a/CHANGELOG.md b/CHANGELOG.md index 4de5466d..1724073a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Case insensitive `colors key` replace in **bibata-core** - **Alternate.cur** added in Windows package +- `minimumFrames` frames handler added for animated cursors in **bibata-core** ### Changed diff --git a/packages/core/src/BitmapsGenerator.ts b/packages/core/src/BitmapsGenerator.ts index c3a81941..4c4a875b 100644 --- a/packages/core/src/BitmapsGenerator.ts +++ b/packages/core/src/BitmapsGenerator.ts @@ -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++; } }