@meta2d/core 1.1.19 → 1.1.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meta2d/core",
3
- "version": "1.1.19",
3
+ "version": "1.1.21",
4
4
  "description": "@meta2d/core: Powerful, Beautiful, Simple, Open - Web-Based 2D At Its Best .",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -4368,20 +4368,22 @@ export class Canvas {
4368
4368
  if (!this.patchFlags) {
4369
4369
  return;
4370
4370
  }
4371
- if (now - this.lastRender < this.store.options.interval) {
4372
- if (this.store.options.interval > this.store.options.minFPSNumber && this.store.options.autoFPS) {
4373
- this.store.options.interval--;
4374
- this.store.options.animateInterval = this.store.options.interval;
4371
+ if (patchFlags != null) {
4372
+ if (now - this.lastRender < this.store.options.interval) {
4373
+ if (this.store.options.interval > this.store.options.minFPSNumber && this.store.options.autoFPS) {
4374
+ this.store.options.interval--;
4375
+ this.store.options.animateInterval = this.store.options.interval;
4376
+ }
4377
+ if (this.renderTimer) {
4378
+ cancelAnimationFrame(this.renderTimer);
4379
+ }
4380
+ this.renderTimer = requestAnimationFrame(this.render);
4381
+ return;
4375
4382
  }
4376
- if (this.renderTimer) {
4377
- cancelAnimationFrame(this.renderTimer);
4383
+ else if (now - this.lastRender - this.store.options.interval > 10 && this.store.options.autoFPS && document.visibilityState === 'visible') {
4384
+ this.store.options.interval++;
4385
+ this.store.options.animateInterval = this.store.options.interval;
4378
4386
  }
4379
- this.renderTimer = requestAnimationFrame(this.render);
4380
- return;
4381
- }
4382
- else if (now - this.lastRender - this.store.options.interval > 10 && this.store.options.autoFPS && document.visibilityState === 'visible') {
4383
- this.store.options.interval++;
4384
- this.store.options.animateInterval = this.store.options.interval;
4385
4387
  }
4386
4388
  this.renderTimer = undefined;
4387
4389
  this.lastRender = now;