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.
 
 
 

31 lines
701 B

'use strict';
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;
case 67:
colors.display();
break;
case 76:
if (p.isLooping()){
p.noLoop();
} else{
p.loop();
}
}
};
p.windowResized = () => {
let element = $('#canvas_holder');
let w = element.width(),
h = element.height();
p.resizeCanvas(w, h);
};