09 Oct 2013

Away3D Typescript 4.1 Alpha

by Rob Bateman Away3D Typescript 4.1 Alpha

The Away3D team is pleased to announce the first official release of Away3D Typescript!

The more observant of you may have noticed a few suspicious-looking tweets and posts around development activity over the last few months, but we can now officially reveal that yes, there is a new version of Away3D in development, and yes, it is built on top of Typescript / Javascript and WebGL.

Today we release some information around progress and support material, and plan to have more updates for you on our development roadmap in a separate post later this month.


To get you up to speed with Away3D Typescript, we first of all need to outline exactly what Typescript is and why it is so beneficial to Away3D. For more information about the language itself you can go to the official site linked above, but in a nutshell, Typescript is a superset of Javascript that adds class-like inheritance and typed functions & variables to basic Javascript code. It does this by using a compiler to convert Typescript code to Javascript code, which then runs natively in a browser or HTML5-based application platform.

At first glance this may seem like a convoluted route to Javascript development, but the advantages soon become clear the moment you start playing with the Typescript language. For complex libraries like Away3D, having type safety means less errors, clearer functionality, faster coding and more descriptive documentation. It will also be instantly familiar to anyone from an Actionscript 3 background because the two languages are derived from similar ECMAScript standards (Typescript is ES5, while the older Actionscript 3 is based on ES4). And it already has support from many industry-standard development tools such as FlashDevelop, Eclipse, WebStorm and Sublime Text.

Another huge benefit of Typescript is that it isn't trying to be something radically new, and doesn't force you to only work one way. Standard Javascript libs will happily work within a Typescript workflow with the inclusion of an easily created definitions file that specifies the mappings between Javascript and Typescript languages. Don't want to create a definitions file yourself? Head over to DefinitelyTyped, where you'll find several hundred definition files already created for the most popular JS libraries. Want to paste Javascript code into a Typescript file? Again not a problem - Typescript uses typed objects for error checking but you only have to use them if you want that feature.

So why is this beneficial to Away3D? Because this is where we see the web heading, and the emerging role of hardware accelerated graphics in cross-platform content. WebGL has been a web standard for several years now, and browser vendors are beginning to integrate WebGL support into their public version releases. We even see activity on mobile browsers with several vendors releasing WebGL-enabled developer releases on Android, Blackberry and iOS platforms. It is our intention to place Away3D at the center of this new standard as it reaches a coverage viable for use in commercial  projects - something we are only now starting to see.


Our new Github repos have the latest sources to sync, and we will be posting a "binary" release with minified includes and accompanying CDN urls later this month. The current version converts around 75% of the existing Flash version of Away3D 4.1 Gold, although we don't expect the same stability just yet as there are still some quirks of WebGL and Javascript that require working through. The library is being tested on all major browsers including those with WebGL capabilities on mobile, in order to focus on providing the best cross-platform experience with Away3D content.

A significant step of the conversion was to resolve our shader scripts into GLSL compatible scripts - not an easy task as all internal Away3D shaders are written on the fly. This was eventually cracked by Adobe, who very kindly donated some R&D work on an AGAL -> GLSL convertor. The code was ported to Typescript and has its own package structure separate from the main classes (christened AGLSL) for those interested in using the source in their own library conversion projects.


No release would be complete without some examples, so the above link takes you to a specially prepared mini-site where you can try out various demos and tests of the Away3D Typescript framework. Right now we have a limited subset of Away3D functionality ported from Away3D Flash 4.1, but we hope to be adding more very soon.

Remember, you will need a WebGL compatible setup to view the examples - this handy chart shows how compatibility has progressed over the last few years and can point you in the direction of a suitable browser version to download. Another aspect to consider is your operating system and hardware setup which has a role in determining if you will be able to view WebGL content or not - the Khronos Group has a maintained Blacklists and whitelists page on this very subject in case you are experiencing problems.

Getting Started

For a step-by step guide on how to setup your development environment for Away3D Typescript, take a look at the tutorial above. This will guide you through the initial install process of the typescript compiler, and has all the necessary links for downloading a set of examples and a compatible IDE. We have also created a few accompanying video tutorials that should guide you through the basics (in these we use the excellent WebStorm IDE for coding).

Further Updates

Keep an eye on our new Github repos for development activity - we are expecting to put in plenty of work over the coming weeks and months to complete the 4.1 conversion and firm up the library ready for a production release. We will also be posting more on various public speaking events where Away3D Typescript will be presented and discussed. The first of these will be at the Flash Online Conference #6 later this week on Friday 11th October, where you'll hear more about the current state of things, and get a chance to ask any questions you may have. Show your interest by selecting our session on the Stage3D facebook group page.

We are always keen to encourage others to get involved with Away3D development, and with any new development the time to get stuck in is at the start, so let us know if you are interested in helping out! Get in touch via Github or the Away3D forums, we'd also love to hear feedback or suggestions on the current library's implementation / features / bugs.

Enjoy the new release!

The Away3D team


09 Oct 2013 07:45 PM

TrueSign said:

Does it mean that you stopped developing the flash based version of Away3d ?

Examples are not looking very well. Maybe because it's 75% progress. I'm using the latest version of Firefox. Models are loading in pieces. Textures are broken, and models are full of artefacts. It's getting better after 20-30sec but still some errors and artefacts. Comparing the the flash version it's not so smooth.

Compatibility table looks promising but at this point of time it's still nothing like flash.

10 Oct 2013 12:41 AM

Rob Bateman said:


Of course, we realise that there are deficiencies to the current Typescript library, but we hope it is understood that this is just the beginning. We fully intend to evolve and optimise the API over the next few months, to improve both performance and compatibility. The primary purpose of this release is to begin gathering feedback and put it into improvements and additions to the library. When you say textures are broken and models are full of artefacts, can you be more specific? It would greatly help us tune the library and create a more consistent experience.

10 Oct 2013 09:04 AM

TrueSign said:

I get back to the examples page to take you a print screen of an artefacts but I couldn't find one. This time all models loaded in split sec without any distortions. Maybe it's a loading thing an once it's cached it's all fine?

10 Oct 2013 11:34 AM

Rob Bateman said:

Yes, most of the demos allow for a simple streaming approach to assets - textures are sometimes represented by placeholders as the image files are loaded in etc. Its not the only way to load 3D data but it can be a better experience on slower machines to stream in this way. Certainly, this is something you can decide for yourself in your own Away3D Typescript projects

12 Oct 2013 09:05 PM

SuperSam said:

This is probably a good thing and I know you know what you're doing.

My concern is that this conversion process is temporarily halting further development of both Away3D and AwayBuilder. It's been a couple months already and will apparently continue in the coming months.

All of this for WebGL which has 30% penetration rate and may not be as powerful as Stage3D (yet, I hope).

I feel developing AwayBuilder towards being a 3D level editor and pushing Away3D capabilities further is more urgent, because IMHO Away Foundation should want to be as accessible as possible to future users as well as powerful and advanced enough for studios to use it on high quality web & device games. (instead of Minko, Unity or whatever)

The port to WebGL could have IMHO waited another 6 months because of this. But I trust your decision and am not asking for justifications - WebGL will be an important target when IE 11 becomes widespread. So this works has to be done at some point.

I just wanted to express some concerns and give some feedback on priorities, since Away Foundation doesn't have unlimited manpower smile

12 Oct 2013 10:22 PM

80prozent said:

Thanks to the guys that have been working hard to make this possible !

i think this might be a very important step for the future of away3d.

typescript.away3d.com is the first away3d code i see running in browser of my samsung s3.


i have some artifacts on the ape-head on my s3.....but i believe they will disappear eventually wink

great work !

Only registered members can comment. Click here to login or here to register