How to animate a texture in Away3D 4 beta?

Software: Away3D 4.x

clunetta, Newbie
Posted: 02 May 2012 12:51 PM   Total Posts: 9

What would be the recommended way to animate a texture?

I know that movie material is gone, but I would like to somehow update a texture according to a bitmapData that is drawing a movieclip. Any hints?

Thanks!

   

roco, Newbie
Posted: 02 May 2012 04:06 PM   Total Posts: 8   [ # 1 ]

I’m not sure if this scenario provides good performance but you can try to change the material as soon as it’s updated.
Just a bit of code i’m writing from the top of my head which is not working as is:

var cube:Mesh = new Mesh(new CubeGeometry(),material);

public function 
onEnterFrame():void {
     cube
.material = new BitmapMaterial(new BitmapTexture(getBitmapData()))
}

public function getBitmapData():BitmapData {
   
//update bitmapdata here
   

clunetta, Newbie
Posted: 02 May 2012 04:15 PM   Total Posts: 9   [ # 2 ]

that was very smart - I’ll try it, thanks!

   
   
‹‹ Mobile Z-order problem

X

Away3D Forum

Member Login

Username

Password

Remember_me



X