Touchkit.js
Introduction
This toolkit is built on mtouch.js
and mcanvas.js
. Use it, you can build a gesture project quickly and get a image automatically. concerned less and do more!
Installation
npm install touchkit --save
Basic Usage
The idea of touchkit is that init create a touch box firstly, and then use tk.background()
add the background and use tk.add()
add the touch-element into the touch box, finally, export a composite image by tk.exportImage()
. The image is what you see in touch box.
the simple example, see the document for more details.
// init create touch box'.js-par' // add background image// type: contain/crop// the background-image will place at the bottom of touch-boxbackground image:'./images/p2.jpg' type:'contain' // add operable element to touch box // export a image contain all elements what you see in touch box