@zcomponent/core 1.12.0 → 1.12.1

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.
@@ -88,7 +88,7 @@ export class Animation {
88
88
  tick() {
89
89
  if (!this._initialize)
90
90
  return;
91
- const t = this.timeSource?.() ?? performance.now();
91
+ const t = Math.floor(this.timeSource?.() ?? performance.now());
92
92
  const touchedPaths = [];
93
93
  if (this._spotlightLayer) {
94
94
  this._spotlightLayer.tick(t, touchedPaths);
@@ -107,7 +107,7 @@ export class Animation {
107
107
  evaluateTouchedPaths(paths, t) {
108
108
  if (!this._initialize)
109
109
  return;
110
- t = t ?? this.timeSource?.() ?? performance.now();
110
+ t = t ?? Math.floor(this.timeSource?.() ?? performance.now());
111
111
  const unique = new Set([...paths]);
112
112
  for (const entry of unique.values()) {
113
113
  this._evaluatePath(t, entry);
@@ -61,7 +61,7 @@ export class LayerClip {
61
61
  return t1 - t;
62
62
  }
63
63
  _getTime() {
64
- return this.timeSource?.() ?? this.animation.timeSource?.() ?? performance.now();
64
+ return Math.floor(this.timeSource?.() ?? this.animation.timeSource?.() ?? performance.now());
65
65
  }
66
66
  queue(opts) {
67
67
  this.layer.queue(this, opts);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zcomponent/core",
3
- "version": "1.12.0",
3
+ "version": "1.12.1",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",