ColorLookupTable
/**
* Copyright fladdict ( http://wonderfl.net/user/fladdict )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/xADO
*/
package {
import flash.display.Sprite;
import flash.display.BitmapData;
import flash.display.Bitmap;
public class FlashTest extends Sprite {
public function FlashTest() {
// write as3 code here..
var bmd:BitmapData = new BitmapData(512,512,false,0x000000);
var bitmap:Bitmap = new Bitmap(bmd);
this.addChild(bitmap);
for(var zz:int=0; zz<64; zz++){
for(var yy:int=0; yy<64; yy++){
for(var xx:int=0; xx<64;xx++){
var xxx:int = zz % 8;
var yyy:int = Math.floor(zz/8);
var r:int = xx * 4;
var g:int = yy * 4;
var b:int = zz * 4;
var col:int = (r << 16 | g<<8 | b);
bmd.setPixel(xx + xxx*64 -256 ,yy + yyy*64 ,col);
}
}
}
}
}
}