Doesn't work if you dont have the cubes in the for loop.
Just been doing similar and have to have new cube() inside the loop.

9708 cubes 1 image

http://www.shrewballooba.co.uk/marge/
mouse wheel zoom in


for (var x:uint = 0; x < bmd.width; x++)
{
    for (var y:uint = 0; y < bmd.height; y++)
    {
        var color:uint = bmd.getPixel32(x, y);

        if (color > 0xffffff )
        {
        var c:Cube = new Cube(mat, 4, 4, 4,1,1,1,false);
        c.moveTo(x*6, y*6, 0);
        scaleUV(c, new Point((bmd.width),  (bmd.height)));
        incrementUV(c, new Point(x /  (bmd.width ),  y  / (bmd.height )));
        c.rotationZ = 180
        imgHolder.addChild(c);
...
scene.addChild(merge.applyToContainer(imgHolder))

Reply via email to