I use the thunk version Away3d(revision: 2955)
private function onMove(e:MouseEvent3D):void
{
if (!_mouseDown) return;
var mat : WhiteShadingBitmapMaterial = _board.material as WhiteShadingBitmapMaterial;
var bmp : BitmapData = mat.bitmap;
var mtx : Matrix = new Matrix();
mtx.tx = e.uv.u * bmp.width;
mtx.ty = (1 - e.uv.v) * bmp.height;
bmp.draw(_brush, mtx);
mat.bitmap = bmp;
}
I make a painting program.And if mat.bitmap is created with
transparent=true,then the _board is not changed on screen immediately,but
changed at a random time.
You can modify the main.as this line:
var small:BitmapData = new BitmapData(size, size, false, 0xffffff);
to see the effect
Original issue reported on code.google.com by yangwei...@gmail.com on 3 Mar 2011 at 8:07
Original issue reported on code.google.com by
yangwei...@gmail.com
on 3 Mar 2011 at 8:07Attachments: