提交 47214979 编写于 作者: H hdx

AnimationFrame: 取消后重置为初始值

上级 01346ba8
......@@ -15,9 +15,9 @@
return {
title: 'AnimationFrame',
taskId: 0,
fps: 0,
lastTime: 0,
frameCount: 0,
fps: 0,
testFrameCount: 0
}
},
......@@ -40,7 +40,10 @@
this.startRequestAnimationFrame()
})
},
stopRequestAnimationFrame() {
stopRequestAnimationFrame() {
this.fps = 0
this.lastTime = 0
this.frameCount = 0
cancelAnimationFrame(this.taskId)
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册