xxxxxxxxxx
document.oncontextmenu=()=>false;
var cam;
function setup() {
createCanvas(windowWidth,windowHeight, WEBGL);
cam=createEasyCam();
// swap the handlers
cam.mouse.mouseDragLeft = cam.mouseDragPan.bind(cam); // mouseLeft now pans
cam.mouse.mouseDragCenter = cam.mouseDragZoom.bind(cam); // mouseCenter now zooms
cam.mouse.mouseDragRight = cam.mouseDragRotate.bind(cam); // mouseRight now rotates
//default: cam.mouse.mouseWheelAction = cam.mouseWheelZoom.bind(cam);
cam.mouse.touchmoveSingle = cam.mouseDragPan.bind(cam); // single touch now pans
cam.mouse.touchmoveMulti = function() {
cam.mouseDragRotate(); // two touch rotates
cam.mouseDragZoom(); // two touch or zooms (default)
};
}
function draw() {
background(100);
box(200);
}