ah i think i've solved it, for anyone else wondering: comment out these. thanks again for the great template :)
// if (w * r > window.innerHeight) {
// w = Math.min(w, Math.ceil(h / r));
// }
//h = Math.floor(w * r);