Author Archives: Rich Hauck
Recursion 2
I tried making multiple calls of drawSquare() within drawSquare() and quickly discovered the processing limitations of my browser… window.addEventListener(‘load’, init, false); function init(){ var canvas = document.getElementById(“canvas”); if (canvas.getContext(‘2d’)){ main(canvas); } else { console.log(“Canvas tag is not supported”); } }
Recursion 2
I tried making multiple calls of drawSquare() within drawSquare() and quickly discovered the processing limitations of my browser… window.addEventListener(‘load’, init, false); function init(){ var canvas = document.getElementById(“canvas”); if (canvas.getContext(‘2d’)){ main(canvas); } else { console.log(“Canvas tag is not supported”); } }
Recursion
Well, after trying to draw for an hour with no luck, I delved into a book and briefly played with recursion. I don’t usually call functions in functions. Something about it feels messy to me! window.addEventListener(‘load’, init, false); function init(){
Recursion
Well, after trying to draw for an hour with no luck, I delved into a book and briefly played with recursion. I don’t usually call functions in functions. Something about it feels messy to me! window.addEventListener(‘load’, init, false); function init(){