开发者

How can I add pan and zoom controls to a Processing.js canvas?

I can draw sh开发者_StackOverflowapes on a canvas. Now I'd like to let users pan and zoom in and out using keyboard controls.


You could use variable to keep track of user feedback for zoom and pan, which you use as arguments to the translate()(pan) and scale()(zoom) functions.

It might help to have a look how Proessing.js fits with js/html/css.

HTH

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜