Hi
I have a number of cubes touching each other to form a seamless surface. I am trying to apply a single image across the front faces of these cubes so it appears seamless.
I am using copyPixels to first ‘slice’ the source bitmapdata BEFORE I apply it to each of the cube front faces.
it seems to work, no compile errors, however, the final bitmapData on each of the faces is scaled WAY too large for some strange reason. Each cube face image seems large and blurred.
Copy pixels is straightforward, can’t see why this isn’t working.
Can’t see anything wrong with my code…pulling my hair out…any help appreciated!!!
//CODE START
var _myFrontBMD:BitmapData
var _myFrontBM:BitmapMaterial
//following in a loop, xValue and yValue defined on each iteration
var rect:Rectangle = new Rectangle(xValue, yValue, 30, 30);
var bmd2:BitmapData = new BitmapData(30, 30, false);
var pt:Point = new Point(0, 0);
bmd2.copyPixels(_myFrontBMD, rect, pt);
_myFrontBM=new BitmapMaterial(bmd2);
myCube.faces[0].material =_myFrontBM;
//end loop
//CODE END