Grafting Shapes on Type #1
Had this sudden urge to map or graft shape onto type. The gist of it is to draw a source display object or bitmap into a BitmapData object. Create a virtual grid and sample the center of any grid unit. If the center yields a black pixel, map something at those coordinates. Lots of optimization to get it to run this fast. Of special note is:
//faster than addChild(something)
addChildAt( something, 0 );
The speed difference is around 4x. It works best if you add it at position 0 though using an index is still faster than addChild.
You’re currently reading “Grafting Shapes on Type #1”, an entry on Visual Gratis
- Published:
- 11.30.09 / 11pm
- Category:
- Actionscript, Experiments, Flash
- Tags:
- Post Navigation:
- « Predictive Interaction 1: Proximity
Grafting Shapes on Type #2 »