Hi,
I’m using dev branch version of away3d 4.
BitmapFileMaterial is not supported any more. BitmapMaterial has been marked as deprecated. So instead of BitmapMaterial I should use
new TextureMaterial(new BitmapTexture(bitmapData)) I can’t figure it out the formula. I used something like this:
[Embed(source="/../assets/textureDiffuse.png")]
private var PlaneTexture:Class;
var _mat:TextureMaterial = new TextureMaterial(new PlaneTexture(new BitmapData(256,256,false, 0x00FF00 )));
Error: undefined method BitmapData.
I have tried
var mat:TextureMaterial = new TextureMaterial(new PlaneTexture().bitmapData);
but Type Coercion failed: cannot convert flash.display::BitmapData@836d161 to away3d.textures.Texture2DBase
How can I assign a jpg or a png to material now?