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

Interactively painting on the model's texture

Adding interactivity to your object not always means to just make it responsive to the mouse click, or transform it around the scene. You may have much more fun if you are able to also change the way your object looks. In this recipe, you will learn how to paint on the material of your 3D object in the runtime interactively using the mouse as a brush.

Getting ready

Set up a new Away3D scene using AwayTemplate.

In this example, we use a ColorChooser component to switch between different colors from a drop-down palette it supplies or by hex values input. The ColorChooser is one of many great components developed by Keith Peters and called MinimalComps. You can get it for free here at http://www.minimalcomps.com/ ...

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