From 45d081c225e6c48918452de4e6e9e9feb6a07f95 Mon Sep 17 00:00:00 2001 From: Uwe Oestermeier Date: Fri, 21 Jul 2023 12:44:03 +0200 Subject: [PATCH] Fixed timestamp name mismatch. --- lib/scatter.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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() {