动画不是平滑的画布 [英] animation is not smooth canvas

查看:47
本文介绍了动画不是平滑的画布的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经举了这个例子

http://jsfiddle.net/mikulgohil/yc6Lb/

但问题在于动画不流畅
你能帮我使它光滑吗

but the issue is that animation is not smooth
can you help me to make it smooth

推荐答案

要使动画流畅,您需要使用requestAnimationFrame()API.

To make animations smooth you need to use requestAnimationFrame() API.

http://paulirish.com/2011/requestanimationframe-for-smart-animating/

这篇关于动画不是平滑的画布的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆