Say you are a designer tasked with creating an image. The only specs you have are that the size of the image needs to be one pixel high and two pixels wide. Seems pretty simple, right?
Just considering RGB colors, that gives you 16,777,216 color choices for the leftmost pixel. And another 16,777,216 for the rightmost pixel. Combined, that means that for that 1×2 pixel image, there are over 281 trillion different images you can create. 281,474,976,710,656 to be exact.
Read more...Just playing around and came up with a neat little library for drawing weave patterns on a canvas.
https://github.com/bit101/weave
Not a whole ton to say about it. Not sure how useful it would actually ever be to anyone except… those rare cases when… you just need a weave pattern… done in canvas. But anyway, it was fun to make, and I used QuickSettings extensively during the development to try out different parameters quickly and easily. And that gave me the ideas for several improvements to QuickSettings itself. If you could compare the code before and after the QuickSettings binding and global change handler features, you’d see how useful those are.
Read more...I’ve done some updates to QuickSettings over the last few weeks. First, I added quicksettings_minimal.css and quicksettings_minimal_dark.css style sheets, which bring everything down in size somewhat and get the range control sliders looking a bit more consistent across browsers and platforms. OK, OK, what I’m trying to say is that the whole thing looks more like good old MinimalComps. But it’s still all made with standard HTML controls and CSS.
I added a dropdown control that creates… well, a dropdown. Or an HTML Selection control, if you want to call things by their proper names.
Read more...Let’s recall the glory days of Flash and ActionScript. Initially, ActionScript was a scripting language with built in graphics and animation capabilities. There was a simple button object, but no other high level ui controls built in to the language.
Before long though, people figured out how to code them and all kinds of UI component libraries popped up. Macromedia created their own component set, which eventually evolved into Flex.
Read more...I’m continuing to dig through old code and consolidate and release it.
This new library, grid, is not a CSS layout util, but draws grids of various kinds on an HTML5 Canvas. Here’s a demo of the various kinds of grids it can currently draw. Click for full size.
I could go into all the options and so forth, but it’s all pretty straightforward and you can just check the readme at the github site:
Read more...Another week, another JS library.
https://github.com/bit101/shapes
Again, I’m sure there are hundreds of other libraries that add improved functionality for Canvas drawing. There’s even CreateJS, which is super powerful, creating a Flash-like display list with animation, etc. That’s cool, but it kind of becomes a framework that you need to buy into fully. My goal was not to create a new paradigm, just make the existing one a bit easier to work with.
Read more...A few days ago, I released my clrs color library for HTML/JS/Canvas/CSS. It’s not that I thought it was revolutionary or anything. In fact I’d be surprised if you couldn’t dig up at least a dozen other similar libraries out there. I’ve already been shown two. But it was code that I’d written myself a few times, so I consolidated it all into one place and put it on line. If nothing else, it will keep me from writing it again. And judging from the number of favorites and retweets on twitter, it seems like others thought it might be useful as well. If one person uses it and likes it, my job is done.
Read more...As most of you know, I grew up as a programmer using Flash and ActionScript, and in the last few years have been much more into web programming, particularly with HTML’s Canvas. In general I do like Canvas a lot. It’s a different mindset than Flash, but I enjoy the challenge.
One thing that has consistently annoyed me, though, is using colors. In ActionScript, colors were 24-bit or 32-bit numbers. So they were easy to manipulate. Want RGB? 0xffcc00. Combine channels? red « 16 | green « 8 | blue. Extract a channel? red = color » 16, green = color » 8 & 0xff, blue = color & 0xff. Because everything is numbers, numbers, numbers, it’s super easy to create random colors, tween colors, generate colors based on any math formula, etc.
Read more...At the beginning of March, I was laid off, along with a few hundred others, from Playdom/Disney Interactive. Due to a very generous severance package, I was able to, and in a very real sense, was required to, take a 60 day sabbatical. (Think of it as a paid vacation with full benefits.) No complaints there. I had a great time. But like all good things, it came to an end. Not that I mind working, not at all, but if I could find someone to pay me to do whatever I want for the rest of my life, I’d jump on it. I guess that’s called retirement. If so, I’m looking forward to it.
Read more...Today I tweeted a link to another stupid linkbait article proclaiming that Flash is dead. Of course, this set off a huge flurry of tweets about whether or not Flash is still breathing. And it made me realize that I haven’t made my current position on Flash very clear.
The fact is that I have no longer have any interest in Flash or ActionScript as a platform or language. While I did do some work with ActionScript and mobile AIR development while I was at Disney, I don’t think I’ve done any personal Flash development in two or three years. I don’t have Flash Authoring or Flash Builder or any other Flash development tools on any of the computers that I currently use.
Read more...