jqueryrotate:可以改变旋转点吗? (变换画布函数)
我正在尝试通过使用 jquery roate 插件旋转图像来制作动画。 不幸的是,这个插件不会改变它的旋转点,它总是居中的。 并且它没有为此的参数
我发现使用画布执行此操作我可以使用 canvas.transform() 函数设置它。
我是使用画布的初学者,但如果有人能给我一个如何做到这一点的例子,我将非常感激。
这是图像旋转插件: http://wilq32.adobeair.pl/jQueryRotate/Wilq32.jQueryRotate .html
这里是用画布制作的..(但有点糟糕,因为它留下了痕迹。不知道为什么 http://jsbin.com/ipeqi3/2)
I'm trying to do an amimation by rotating an image with the jquery roate plugin.
Unfortunately this plugin doesn't change it's point of rotation it's always centered..
and it doesn't have a parameter for this
I've found that doing this with canvas I can set it with canvas.transform() function.
I'm a begginer on working with canvas, but if somebody can give me an example how to do this I will greatly apreciate it.
here's the image rotate plugin: http://wilq32.adobeair.pl/jQueryRotate/Wilq32.jQueryRotate.html
here's made with canvas..(but kind of bad because it leaves trails.don't know why http://jsbin.com/ipeqi3/2)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这就是我到目前为止所拥有的,实际上它通过平移改变旋转点来旋转图像(不是变换,我的错......)
它不做的事情它不会创建平滑的动画,它非常粗糙。 .我怎样才能做到这一点?
我需要的另一件事是背景必须是透明的,
这是到目前为止我的代码:
This is what I have so far, indeed it rotates the image by changing the point of rotation with translate (not transform, my bad...)
What It DOESN'T do it doesn't create a smooth animation, it's very rough..How can I accomplish that?
Another thing I need is that the background HAS to be transparent
here's my code so far: