selectiveBitmapDraw and text3D

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

selectiveBitmapDraw and text3D

mosha
I tried to use the Moses selectiveBitmapDraw Utility (http://blog.mosessupposes.com/?p=47), to cache a text3d object as a bitmap. But this doesn't work. Probably because the text3d class works differently to  normal displayObeject3d. Anyone any ideas, how I could still make it work or if I could use another method to cache my text3d?
Reply | Threaded
Open this post in threaded view
|

Re: selectiveBitmapDraw and text3D

mosha
Alright, found a way!
You need to access the children of the text3D, basically the letters:
so you have a view possibilities:

var bmd:BitmapData = new BitmapData(w, h, true, 0xF);
var sbd:SelectiveBitmapDraw3D = new SelectiveBitmapDraw3D(bmd, scene, camera, viewport, renderer);

for each (var item:DisplayObject3D in _text3D.children)
{
        sbd.draw(viewport, [item]);
}
/////////////////// or

for each (var item:DisplayObject3D in _text3D.letters)
{
        sbd.draw(viewport, [item]);
}
/////////////////// or

sbd.draw(viewport, _text3D.letters);


mosha wrote
I tried to use the Moses selectiveBitmapDraw Utility (http://blog.mosessupposes.com/?p=47), to cache a text3d object as a bitmap. But this doesn't work. Probably because the text3d class works differently to  normal displayObeject3d. Anyone any ideas, how I could still make it work or if I could use another method to cache my text3d?
Reply | Threaded
Open this post in threaded view
|

Re: selectiveBitmapDraw and text3D

kingpinwebdesigns
This post has NOT been accepted by the mailing list yet.
Hey I know this was a long time ago, but could you expand on how you are getting the bitmapData out of the Text3D?  Im trying to cast the BitmapData to a BitmapParticleMaterial... thanks.