Adaptive p5.js Sketch