Scripts, Tools & Methods Developed at Hook
While in the midst of the some new rigid-body physics experiments (a continuation from my previous post on Jakobsen-style position based dynamics: here) , the hooplah around the iPad and Apple getting all ‘The Hills’ on Adobe provided a welcome excuse for trying something with a completely different perspective. With the tech world’s lips aflutter and teeth agnashing about HTML5 and it’s impact on the web, we decided to use a couple days between projects to dig in and see how we could translate our Flash awesomeness to something a little more worthy of having a lower case i before it.
But before we get into the meatliness of this post, lets look at a couple of works in progress for my next physics post:
From Actionscript to haXe
The first task was obviously to port my AS3 codebase to haXe, to get a feel for the shift between those two. Being based on the same specification as Actionscript, the transition was woefully painless and required barely any documentation references. If anything it was tedious because things were THAT similar, but to that end there are tools for converting AS3 classes to HX classes that do a surprisingly good job (I used as3tohaxe). Within no time all the hard work that went into my math and display libraries was available for use within haXe, and I was publishing out to a swf (with an amazingly fast compile time).
Am I conveying how amazingly simple this is?
Likewise haXe doesn’t save you from those wonderful browser implementation issues that plague the web, but there are extern libraries available for tools such as jQuery to make your DOM event life a little easier.
Oh, and to get rid of that stupid text-selection cursor you can just attach an onmousemove event to the canvas.
Next up: Position-based rigid body physics using a barycentric dynamics model