Change face material of Cube6 independently

8 views
Skip to first unread message

Casey

unread,
Nov 24, 2009, 3:51:43 AM11/24/09
to away3d.dev
Is it possible to change the material of each face independently? So
far my attempts have had no success...

var cube:Cube6 = new Cube6();
cube.faces[0].mesh.material = new ColorMaterial();

//all faces change

Am I missing something?

Thanks,

Casey

Pierre Karadia

unread,
Nov 25, 2009, 9:02:41 PM11/25/09
to away3...@googlegroups.com
not sure that this would work, since the Cube6 uses map6 properties, ie
a single image wrapped around all the faces.

try using a bit map like the skyBox example and change the colours on
the surface that you want to change, that way you can have some control
over the individual faces..

also you can always swap bitmaps at runtime so you can change teh
material colors by swapping bitmapmaterials

hope this helps.

Pierre

Rob Bateman

unread,
Nov 26, 2009, 1:31:23 PM11/26/09
to away3...@googlegroups.com
Hey casey

this is not possible yet in lite, but we are working on a new material
framework that will allow all kinds of advanced material manipulations
using faces. We hope it will be released soon - be sure to keep an eye
on the svn updates!

Cheers

Rob
--
Rob Bateman
Flash Development & Consultancy

rob.b...@gmail.com
www.infiniteturtles.co.uk
www.away3d.com
Reply all
Reply to author
Forward
0 new messages