Better JavaScript Using Modern Techniques

I’m going to highlight some of my favorite modern JavaScript features in this post. Most of these are new to ES6, but a few of them are not. I call these features modern because they allow JavaScript to be written in a way that supports conciseness for better readability. This isn’t intended to summarize all of ES6. It’s mostly just tips for more readable and interactive code. Continue reading “Better JavaScript Using Modern Techniques”

HTML5 Canvas Object Rotation

There is no simple function that you can use to rotate objects within the HTML5 Canvas. To implement rotation you need to rotate the entire canvas context and draw your object on the rotated context and then rotate the entire thing that back to it’s normal state. While you’re doing that, you also need to update the coordinate space of the canvas context. Continue reading “HTML5 Canvas Object Rotation”