diff --git a/lib/scatter.js b/lib/scatter.js index ce51279..7066dcb 100644 --- a/lib/scatter.js +++ b/lib/scatter.js @@ -138,10 +138,8 @@ class Throwable { this.autoThrow = autoThrow this.velocities = [] this.velocity = null - this.timestamp = null + this.lastframe = null this.onThrowFinished = onThrowFinished - this._requestAnimation = 0 - //console.log("onThrowFinished", onThrowFinished) } static defaultThrow() { @@ -182,6 +180,7 @@ class Throwable { addTestVelocity(delta, dt=20, buffer = 5) { let t = performance.now() + this.lastframe = t let velocity = { t: t, dt: dt, @@ -216,6 +215,7 @@ class Throwable { killAnimation() { this.velocity = null this.velocities = [] + this.lastframe = null } startThrow() {