-
Notifications
You must be signed in to change notification settings - Fork 0
p5 Hammer.js
Jiashan Wu edited this page Aug 11, 2015
·
2 revisions
(Brief introduction for hammer.js and gestures)
Need
- hammer.js or hammer.min.js
Adding Hammer event listeners into p5 sketch
function setup(){
var myCan = createCanvas(windowWidth, windowHeight);
var element = document.getElementById(myCan.elt);
mc = new Hammer(element);
mc.on("press", function(e){ // add other Hammer event listeners here
// something happens here
});
}
Examples/Template