[英]How to move a html5 canvas element(rectangle) by touching it by onTouch method
I have created a rectangle inside a canvas and i want to move it right side by touching this rectangle.it may just like draging rectangle along a straight line. 我在画布内创建了一个矩形,我想通过触摸此矩形将其向右侧移动。它可能就像沿直线拖动矩形一样。 Thanks in advance
提前致谢
I think this is what you need 我觉得这就是你所需要的
http://simonsarris.com/blog/140-canvas-moving-selectable-shapes http://www.html5canvastutorials.com/kineticjs/html5-canvas-stop-animation-with-kineticjs/ http://simonsarris.com/blog/140-canvas-moving-selectable-shapes http://www.html5canvastutorials.com/kineticjs/html5-canvas-stop-animation-with-kineticjs/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.