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.

Typescript?

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.

Release

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.

Examples

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.

One Response to “Away3D Typescript 4.1 Alpha”

Hi my name is Jacqueline and I just wanted to drop you a quick note here instead of calling you. I discovered your Away3D Typescript 4.1 Alpha | The Away Foundation page and noticed you could have a lot more traffic. I have found that the key to running a successful website is making sure the visitors you are getting are interested in your subject matter. There is a company that you can get targeted visitors from and they let you try the service for free for 7 days. I managed to get over 300 targeted visitors to day to my site. Visit them here: http://t8k.me/wl