Hello every one…
im new to Away3D and i found it very powerful and lovly .
now i have a problem… i have a bunch of Textures with different size, when i import them into my project Away3D throw error.
so i changed the setBitmap function in Away3d engine . if a texture is not power of 2 then i create a new bitmap and draw old one into this new one:
if (!TextureUtils.isBitmapDataValid(value)){
var trueSize:Point = new Point()
trueSize.x = TextureUtils.getBestPowerOf2(value.width);
trueSize.y = TextureUtils.getBestPowerOf2(value.height);
var newValue:BitmapData = new BitmapData(trueSize.x , trueSize.y , true ,0xFFFF00);
newValue.draw(value,null,null,null);
newValue.scroll((trueSize.x - value.width)/2, (trueSize.y - value.height)/2);
value = newValue;
}
now the problem is textures dose not place in correct position of model.
please some one show me the correct way of doing this…
tanks a lot….