How to use BitmapCubeTexture ?

Software: Away3D 4.x

Mr Margaret Scratcher, Sr. Member
Posted: 29 February 2012 12:59 AM   Total Posts: 344

Migrating to the latest version of Away3d, and running into a couple of problems…

Tried this:

private function init_defaultCaseMat():void
  {
   
var blankBMP:BitmapData = new BitmapData (64,64,true,0x101010),
   
defaultCaseMat = new BitmapCubeTexture (blankBMPblankBMPblankBMPblankBMPblankBMPblankBMP);
  

Okay, so I’ve just realised while typing this that BitmapCubeTexture is a texture and not a material.. How do I assign the texture I’ve created about to a material?

   

Mr Margaret Scratcher, Sr. Member
Posted: 29 February 2012 01:05 AM   Total Posts: 344   [ # 1 ]

So then tried this:

private function init_defaultCaseMat():void
  {
   
var blankBMP:BitmapData = new BitmapData (64,64,false,0x101010),
   
defaultCaseText = new BitmapCubeTexture (blankBMPblankBMPblankBMPblankBMPblankBMPblankBMP);
   
defaultCaseMat = new TextureMaterial (defaultCaseTex);
   
defaultCaseMat.lightPicker lightPicker;
  

But that’s not right, as TextureMaterial expects the argument to be a Texture2DBase.

 

   

Mr Margaret Scratcher, Sr. Member
Posted: 29 February 2012 01:23 AM   Total Posts: 344   [ # 2 ]

Oh okay, the only material that accepts BitmapCubeTexture is the SkyBoxMaterial…

Aha, so I have to go the long way round still…. I see!

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X