From 801c0fcbf3745111161377c10fe5bcdfa47f6196 Mon Sep 17 00:00:00 2001 From: hdx Date: Wed, 7 Aug 2024 14:23:01 +0800 Subject: [PATCH] =?UTF-8?q?ball:=20=E4=BD=BF=E7=94=A8=E5=85=A8=E5=B1=80=20?= =?UTF-8?q?AnimationFrame?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/component/canvas/canvas/ball.uvue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/component/canvas/canvas/ball.uvue b/pages/component/canvas/canvas/ball.uvue index df16a2e5..4c0aff27 100644 --- a/pages/component/canvas/canvas/ball.uvue +++ b/pages/component/canvas/canvas/ball.uvue @@ -96,20 +96,20 @@ if (!this.runningFlag) { return } - this._animateResult = uni.requestAnimationFrame((_: number) => { + this._animateResult = requestAnimationFrame((_: number) => { this.animate() }) } start() { - uni.cancelAnimationFrame(this._animateResult) + cancelAnimationFrame(this._animateResult) this.runningFlag = true this.animate() } stop() { this.runningFlag = false - uni.cancelAnimationFrame(this._animateResult) + cancelAnimationFrame(this._animateResult) } } -- GitLab