O'Reilly logo

Away3D 3.6 Cookbook by Michael Ivanov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating virtual trackball

Virtual trackball or Arcball is a widely used technique in 3D graphics which allows performing realistic interactive 3D rotation using so called virtual or imaginary sphere. There is some complex math involved behind the process which we are not going to discuss here in depth. Instead, with the following example, you will learn how to implement the concept practically within Away3D Lite. Special credits go to Ralph Hauwert who wrote the initial application with pure ActionScript, which I then ported into Away3D Lite.

Getting ready

Create a new class which extends FastTemplate and give it the name TrackballDemo.

How to do it...

In the following demo, we create an interactive sphere which is rotated in an extremely natural ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required