@vectojs/core 1.11.1 → 1.11.2

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/dist/index.js CHANGED
@@ -2192,7 +2192,11 @@ var Scene = (_class2 = class _Scene {
2192
2192
  this.scheduleFrame();
2193
2193
  return;
2194
2194
  }
2195
- const dt = time - this.lastTime;
2195
+ let dt = time - this.lastTime;
2196
+ if (cap > 0) {
2197
+ const nominal = 1e3 / cap;
2198
+ if (Math.abs(dt - nominal) < nominal * 0.3) dt = nominal;
2199
+ }
2196
2200
  this.lastTime = time;
2197
2201
  if (this.renderMode === "onDemand" && isIdle) {
2198
2202
  this.scheduleFrame();
package/dist/index.mjs CHANGED
@@ -2192,7 +2192,11 @@ var Scene = class _Scene {
2192
2192
  this.scheduleFrame();
2193
2193
  return;
2194
2194
  }
2195
- const dt = time - this.lastTime;
2195
+ let dt = time - this.lastTime;
2196
+ if (cap > 0) {
2197
+ const nominal = 1e3 / cap;
2198
+ if (Math.abs(dt - nominal) < nominal * 0.3) dt = nominal;
2199
+ }
2196
2200
  this.lastTime = time;
2197
2201
  if (this.renderMode === "onDemand" && isIdle) {
2198
2202
  this.scheduleFrame();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vectojs/core",
3
- "version": "1.11.1",
3
+ "version": "1.11.2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },