A test with 3D on the Playbook

I decided to have a quick test of the webGL abilities of the Playbook. I have played with the Copperlight software in the past and that showed some promise with its javascript interface to 3D. It has a handy modeller GUI as well. Sadly the webkit browset in the simulator didn’t support webGL. So I moved back to Away3D which I’ve been comfortable with in the past. I’d try Unity, but it would cost some money to do it (unless I could use the 30 day trial? maybe later – they announced their Unity to Flash translator today – so no plugin to download. Must try that).

I need to create a library file from the Away3D sources. This is quite quick to do in Flash Builder. Download the latest (3.6) sources from the away3d site, Flash10 version; this will give you a zip file of the source code folders. I noticed that there is a free scene builder there. I hadn’t seen that before; I should give it a try when I get a moment.

In Flash Builder create a new Flex library project, named for example, away3d. This will have an empty src folder, a set of library files for Flex Hero and an empty bin folder. After unzipping the source files, just click and drag the src foldee from the zip file on to the project and accept the prompt to overwrite. The Away3D source files should then be under the src directory. If you then Build Project, the away3d.swc will be produced in the bin folder. Use this by reference, for the other examples.

Then back to the test project – created using the New Actionscript Mobile project. Click right on the project name (or ctrl click on Mac?) then look at Properties:Actionscript Build Path:Library path. Click “Add SWC folder” and find the bin directory for the away3d project. Using this will add the reference to the current project. We just need to add a bit of away3D code and run the project. If we use the “Desktop” configuration first, it is quick to see the animation running in a Flash Builder window. Once we have something running, run the Playbook simulator in VMWare, change theFlash Builder project configuration to “On device”, add the simulator IP address and password; running the app now will transfer the application to the simulator to run. It also makes some attempt to handle the rotation event.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s