Lorenz Attractor – HTML5 Stylee

First, let me just say this up front, I will give up Flash when they pry it from my cold dead fingers. When Flash is outlawed only outlaws will code in Actionscript. Add any other cliches you’d like to, here. The point is, I love the Flash Platform and will continue to use it for years to come. But, let’s face it, anyone who refuses to expand their skillset – whether it be with HTML5, Unity3D, or any other technology – or who at least chooses not to know their enemies won’t last very long in this game.

So, that in mind, here is my first go at HTML5: a simple Lorenz Attractor. Not the most way-out thing folks have done, but ya gotta start somewhere.

A few things I learned along the way:

  • Trying to code in a OO fashion with Javascript is a serious pain in the ass. It’s funny that people have said this is the future of the web. For a Flash developer, it’s like stepping backwards in time 4 or 5 years. Any of you out there remember coding classes in Actionscript 1? Well, blow the dust off that nightmare memory ’cause it’s all coming back. As @ezekielDFM commented on Twitter, “it’s like doing all the things you trained yourself NOT to do.” It’s really a shame Ecmascript 4 was shot down. It would have been the perfect scripting language to complement the HTML5 canvas.
  • I’m not particularly keen on the fact that all code essentially becomes “open-sourced” by anyone doing a “view source” with their browser. Yes, I know that .swf files aren’t particularly difficult to decompile, but it does take a bit more effort to both get then reassemble in a functional way. And, in theory, decompiling .swf’s that aren’t your own is illegal, so that may prevent 4 or 5 folks from doing it. For something as simple as my little Lorenz attractor, it ain’t that big of a deal – but if I really don’t want to spend days, weeks, or months on a large commercial project only to have some script kiddie yoinking it off the web and doing the same in a few minutes with little to no modifications. And would the client be happy about that? Probably not. I’m sure there’s some way to obfuscate js though. I’ll look into it when I care more.
  • I used Processing.js for this experiment, which, despite my general dislike of javascript, I really liked a lot. Once that is, I figured out how to actually get it going. That proved a little more difficult than expected.
  • All in all, html5 isn’t a horrible thing, but in it’s current state it seems to be more of just a “toy” than what detractors of Flash call Flash. I really feel like diving into some serious object oriented Actionscript now, just to wash away the taste…

Leave a Reply

Devon O. Wolfgang

Technical Reviewer of “The Essential Guide to Flash CS4 AIR Development”

Contributing Author of “Flash AS3 for Interactive Agencies”

Senior Software Developer in Dublin, Ireland

Portfolio

Bayer Pixel Bender Filter

Bayer Mosaic Filter in Pixel Bender


Now, seeing as how I’ve been trying to learn some Pixel Bender coding lately[...]

Liquitext

Liquid Text Effect


Haven’t been too active around here lately due to a major on going project at work lately as well as the fact that my wife and I are in the slow process of moving homes. Really, the only free time it seems I have these days is during the lunch hour. So, over the past two days, I came up with this fun little toy during lunches[...]

Google’s Text To Speech Engine in Flash

I’m not sure how I managed to miss this, but I just happened to run across a ‘new’ (well, newish), albeit still unofficial, offering of Google today: text-to-speech. You can see what few details there are on this Techcrunch post. Basically, it just boils down to this though – you send your phrase to be [...]

Quick Sound Effects Generator


Need some beeps, boops, or bops, to go with your UI or games [...]

Quick QuickBox2D Tip II – Collision Detection

Custom collision detection/handling in QuickBox2D [...]

None of This Runs Eternal


No Flash/Actionscript stuff here. Just me rambling about the upcoming Current 93 concert [...]

Playing Around with the New UndoManager

Included in the Flex 4.0 SDK and the, just released, Flash Professional CS5 lies a new hidden little gem of a class: flashx.undo.UndoManager (although the Flex 4.0 SDK’s been out for awhile, I have to admit I didn’t even notice this until I installed Flash CS5 and started poking around the documentation looking for new [...]

Making Waves

In a previous post, “Digging into the Microphone in Flash Player 10.1″, reader David Law asked in the comments how it would be possible to save .wav files to the server. I wasn’t sure right offhand, but thought I’d spend my lunch hour yesterday looking into it. Well, after reading this quick tutorial on Adobe [...]

Some Drawing Fun and a Bad Movie You’ll Never See

Earlier today, Dave Gillem posted a link on Facebook to an incredible Processing based drawing application. Thought I’d have a go at reproducing something similar in Flash. Well, I failed miserably, but the results were still interesting enough to check out. You can play around with it below. Just mouse down to draw in the [...]

Animating Bezier Curves


The other day I got the notion in my head that I wanted to draw some bezier curves in an animated fashion. I’m sure this has been done a million times before, but sometimes reinventing the wheel can be a good learning experience [...]

My God, It’s Full of Stars…


Just a quick little thing I got an idea for (i.e. pretty much ripped off) while browsing Processing examples.

Another Year, Another Look

As a few folks may have noticed, the blog is looking a little bit different as of today [...]

The Webcam Warholizer


Just a little bit of quick Friday fun with webcam and bitmapata…

More With the JiglibFlash Terrain

Playing around a bit more with the animated JiglibFlash terrain idea from my last post, I wanted to see how it would work in conjunction with a webcam. So, needless to say, you’ll need a webcam to check out the results below.

Rockin and Rollin with the JiglibFlash Terrain


Finally got the chance to play around with the new JiglibFlash height map terrain, today, and have to say I am very impressed [...]