I’m trying to render text in 3D space by creating bitmap textures from external MovieClips. I’m creating a mesh out of these textures using a plane.
Using this bit of code everything seems to work
var text:IBitmapDrawable = new ExtAssets.TextMesh() as IBitmapDrawable;
var bmd:BitmapData = new BitmapData(128, 128, true, 0x000000);
bmd.draw(text, null, null, null, null, true);
var bmt:BitmapTexture = new BitmapTexture(bmd);
var textMat:TextureMaterial = new TextureMaterial(bmt);
var pTest:PlaneGeometry = new PlaneGeometry(128, 128);
var mTest:Mesh = new Mesh(pTest, textMat);
I’m trying to use this texture on both sides of my plane but I get an error when I set
pTest.doubleSided = true;
Main Thread (Suspended: RangeError: Error #3669: Bad input size.)