@animini/core
Advanced tools
Comparing version 0.1.1 to 0.1.2
# @animini/core | ||
## 0.1.2 | ||
### Patch Changes | ||
- 6b9d542: fix global loop in three | ||
## 0.1.1 | ||
@@ -4,0 +10,0 @@ |
@@ -128,2 +128,4 @@ 'use strict'; | ||
_defineProperty(this, "updating", false); | ||
_defineProperty(this, "time", {}); | ||
@@ -141,5 +143,7 @@ | ||
update() { | ||
if (!this.running) return; | ||
if (!this.running || this.updating) return; | ||
this.updating = true; | ||
this.updateTime(); | ||
this.queue.forEach(cb => cb()); | ||
this.updating = false; | ||
} | ||
@@ -146,0 +150,0 @@ |
@@ -128,2 +128,4 @@ 'use strict'; | ||
_defineProperty(this, "updating", false); | ||
_defineProperty(this, "time", {}); | ||
@@ -141,5 +143,7 @@ | ||
update() { | ||
if (!this.running) return; | ||
if (!this.running || this.updating) return; | ||
this.updating = true; | ||
this.updateTime(); | ||
this.queue.forEach(cb => cb()); | ||
this.updating = false; | ||
} | ||
@@ -146,0 +150,0 @@ |
@@ -125,2 +125,4 @@ import { useRef, useMemo, useCallback, useEffect } from 'react'; | ||
_defineProperty(this, "updating", false); | ||
_defineProperty(this, "time", {}); | ||
@@ -138,5 +140,7 @@ | ||
update() { | ||
if (!this.running) return; | ||
if (!this.running || this.updating) return; | ||
this.updating = true; | ||
this.updateTime(); | ||
this.queue.forEach(cb => cb()); | ||
this.updating = false; | ||
} | ||
@@ -143,0 +147,0 @@ |
@@ -11,2 +11,3 @@ declare type Time = { | ||
private running; | ||
private updating; | ||
time: Time; | ||
@@ -13,0 +14,0 @@ onDemand: boolean; |
{ | ||
"name": "@animini/core", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "small animation lib", | ||
@@ -5,0 +5,0 @@ "keywords": [], |
@@ -16,2 +16,3 @@ function now() { | ||
private running = false | ||
private updating = false | ||
public time = {} as Time | ||
@@ -27,5 +28,7 @@ onDemand = false | ||
update() { | ||
if (!this.running) return | ||
if (!this.running || this.updating) return | ||
this.updating = true | ||
this.updateTime() | ||
this.queue.forEach((cb) => cb()) | ||
this.updating = false | ||
} | ||
@@ -32,0 +35,0 @@ |
74028
2209