You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

27 lines
603 B

'use strict';
function eventsSetup(){
p.keyPressed = () => {
switch (p.keyCode){
//Ctrl + D
case 68:
if (p.keyIsDown(17)){
debug = !debug;
let msg = 'Debug mode turned ' + (debug ? 'ON' : 'OFF');
console.info(msg);
return false;
}
break;
}
};
p.windowResized = () => {
let element = $('#canvas_holder');
let w = element.width(),
h = element.height();
p.resizeCanvas(w, h);
};
}