Away3D TypeScript

away3d_logo

Away3D TypeScript Dev

For the last 8 weeks, Plugin.IO have been working alongside Karim Beyrouti to port the popular Away3D framework to JavaScript via TypeScript. The project involves using bleeding edge HTML5, WebGL and TypeScript technologies and is aimed to be a direct port of the existing Away3D framework. TypeScript was chosen as it enables developers to create programs that adhere to stricter programmatic paradigms, in order to aid development of large scale projects, by offering typed structures similar to those found in C++, C#, Java etc. The TypeScript code is then compiled down to structured JavaScript code.

Our role during the project has been in the areas of WebGL interfacing, algebra math, GLSL, core porting and the adaptation of these to adhere to the existing Away3D API effectively. The result was a collaboration to develop TypeScript packages for Geom, Display3D, Display and BitmapData, Utils etc that attempt to mimic the Flash API as closely as practicable whilst also adding some additional functionality for GLSL shaders. This effectively makes working with the new classes intuitive and familiar when coming from the AS3 language (which, incidentally, resembles some of the TypeScript constructs and structures).

The process has involved multiple layers of reverse engineering of the Flash framework and the incorporation of some of Adobes own code (Kindly given to us by Adobe themselves – Thank you Adobe).

The brilliant Karim Beyrouti was on a mission to port a large subset of the core Away3D classes (which he managed incredibly quickly) whilst I worked on some core porting and AS3 style libraries. I then followed this with systems that would carriage the data through an AGAL to GLSL translation system along with adaptations for particular cases that are enforced by the code derived from Adobes own code. This was a period of development that would require all subsystems to slot together at the end. After everything was ready, a few tweaks and out popped our visual demo running on the full view stack of the new TypeScript Away3D system.

http://bit.ly/13JB8fE

[added 20.08.2013]
http://bit.ly/1cVAx3J (Inside culling)
http://bit.ly/14XKB9n (Blend modes)

We are already moving into the main debugging phase. As you can imagine, over 300 classes in 8 weeks means a lot to debug but having a visual is a major milestone and will prove to aid the debugging effort considerably. There are a few things left to add such as animators and file format parsers but we are now well on the way to bringing a complete Away3D JS / TypeScript library to the HTML5 world.

You can get all of the code today from the GitHub repo at:

https://github.com/away3d/away3d-core-ts

Gary Paluk
@plugin_io

Posted in away3d Tagged with: , , , ,
9 comments on “Away3D TypeScript
  1. test says:

    hello.the shader tool look good?can create agal and glsl?
    will you port the shader tool 2 haxe?

  2. FlyOn says:

    o.m.g. you have no idea how thankfull I am. I’ve been working on a very cool (but long) project for 3 years now. I chose flash when I started, after long thinking, instead of webGL, because it was just so much easier to develop in for me. These days, with the project nearly being ready for release, I often feel a ‘shit, at some point I have to port this to a different, webGL engine’ … Well, guess you guys are making that a WHOLE LOT easier. Havn’t checked it out yet, but thank you for any effort put into this!

    • admin says:

      Hi FlyOn, Thanks. Hopefully that will be much easier. If you do port your project to Away3D TypeScript, please let us know how you find it. We want to make that as smooth as possible.

  3. Katz says:

    Hi, IMHO if there is a Haxe port or extern, migration could be much smooth and Away3D might become a more stable choice (for me). Like, from Haxe + Away3D (Flash/AIR) to Haxe + Away3D (WebGL). I think WebGL will not be ready within 3-5 years…

    Anyway thank you for your great library!

    • admin says:

      Many thanks. 🙂 There is a big difference between availability and coverage. WebGL is available today. Haxe might be a logical choice for you if you are already familiar with Haxe but TypeScript is a logical choice for the next generation of JS developers and TypeScripts similarity to AS3 makes TypeScript a good choice for current AS3 developers.

  4. Andrew says:

    My IE-10 says WebGL is not available.

2 Pings/Trackbacks for "Away3D TypeScript"
  1. […] >>Away3D TypeScript | Author: […]

  2. […] nicht Dart … Komm gerade drauf, weil Away3D auch gerade einen TypeScript-Bruder bekommt. Away3D TypeScript | https://dl.dropboxusercontent.com/u/…o13/index.html Everything's not lost. __________________ […]

Leave a Reply

Your email address will not be published. Required fields are marked *

*