Category Archives: JavaScript

JavaScript Day 31: The End

Wow, look at that – Day 31! I made it! There were some rough points in the middle there, but I managed to pull off some filler posts until I figured out the next topic. I hope you’ve enjoyed this … Continue reading

Posted in JavaScript | 14 Comments

JavaScript Day 30: More pixels

Yesterday we looked at getting the pixels out of a canvas context via ImageData. Today we’ll look at getting the pixels defined in an ImageData object and drawing them back to a canvas. Essentially, it’s the same as getPixelData in … Continue reading

Posted in JavaScript | 4 Comments

JavaScript Day 29: Pixels

One thing we haven’t covered yet is pixel level access to canvas. The good news is that this is indeed possible. The bad news is that it isn’t quite as straightforward as it is in Flash. But it’s not horrible. … Continue reading

Posted in JavaScript | 3 Comments

JavaScript Day 28: Creating a UI Component

You know I like components. I’ve had it in the back of my mind since I started playing with JavaScript to try out making some minimalcomp type components in Canvas. This is a bit of a questionable endeavor. I mean, … Continue reading

Posted in JavaScript | 4 Comments

JavaScript Day 27: Mouse Part II

Today we do a bit more with the mouse. In particular, interacting with existing objects on the canvas. If you are used to Flash, dealing with mouse interaction with canvas objects may come across as very counterintuitive. This is because … Continue reading

Posted in JavaScript | 4 Comments

JavaScript Day 26: Mouse Part I

OK, here’s something we’ve largely passed by: handling mouse interactions. Might be useful, eh? HTML5 has various options to capture mouse and other events, and various ways of determining mouse coordinates. These vary in support across various browsers and platforms, … Continue reading

Posted in JavaScript | 5 Comments

JavaScript Day 25: More Art

I think I’ve covered most of the large technical aspects of JavaScript and canvas that I will be covering for the month. I’ll probably finish up with a bunch of random experiments utilizing all the stuff we’ve covered up till … Continue reading

Posted in JavaScript | 4 Comments

JavaScript Day 24: Curves

Just playing around with some generative type drawing today, using curves. In Flash, you have moveTo and curveTo. In JavaScript, you have the exact two functions that work exactly the same way, creating a quadratic curve. But you also have … Continue reading

Posted in JavaScript | 4 Comments

JavaScript Day 23: Shadows

A quick drive-by post today. I’m running out of content. Must… stretch… out… topics. In Flash, since version 8, we’ve had a few different bitmap effects: shadows, blurs, glows. Canvas at least has shadows built in. Very simple to use. … Continue reading

Posted in JavaScript | 3 Comments

JavaScript Day 22: Transformation

Today we’ll look at the basics of transformations on a canvas. The way transformations work is you call one of several functions that changes the current transformation matrix on the context of the canvas. This does not change anything that … Continue reading

Posted in JavaScript | 1 Comment