// 変数の宣言と初期化
var widthX:Number = 360;
var heightY:Number = 360;
var xx:Number = 0; //スクリーン画面のX座標
var yy:Number = 0; //スクリーン画面のY座標
var repMax:Number = 256; //最大計算回数
var creal:Number = -1.94; //実数部(-1.94)
var cimag:Number = -1.3; //虚数部(-1.3)
var czoom = 1; //拡大率
var cscale = 2.6 / czoom; //描画範囲
var a = creal;
var b = cimag;
var n = 0;
var col = 0;
var step:Number = Math.abs(cscale / widthX);
// ビットマップをアタッチする
screenBitmap = new BitmapData(widthX, heightY,false,0xffcccccc);
_root.attachBitmap(screenBitmap, 1);
//フレーム毎の処理
onEnterFrame = function() {
mandelbrot ();
if (xx > widthX) {
xx = 0;
a = creal;
yy ++;
b += step;
}
if (yy > heightY) {
stop();
}
xx ++;
a += step;
}
//マンデルブロの計算
function mandelbrot() {
var zx:Number = zxx = 0;
var zy:Number = zyy = 0;
n = 0;
while ( n < repMax ) {
zxx = zx*zx-zy*zy+a;
zyy = 2*zx*zy+b;
zx = zxx;
zy = zyy;
//発散判定
if ((zx*zx+zy*zy)>4) { break; }
n++;
}
getColor();
screenBitmap.setPixel(xx, yy, col);
}
//カラー設定
function getColor(){
var r = ((n-64)%64)*4;
var g = ((n-32)%32)*8;
var b = (n%16)*16;
col = r*256*256+g*256+b;
}
■https://bugzilla.mozilla.org/show_bug.cgi?id=443067
Radek 'sysKin' Czyz 2010-06-14 04:43:40 PDT
Verified fixed with hourly, changeset 7d3e81dd1018. Downloading a ~100 MB file
with 250 MB disk cache no longer advances cache "Storage in use" counter at all. Nice~
■https://bugzilla.mozilla.org/show_bug.cgi?id=443067
Radek 'sysKin' Czyz 2010-06-14 04:43:40 PDT
Verified fixed with hourly, changeset 7d3e81dd1018. Downloading a ~100 MB file
with 250 MB disk cache no longer advances cache "Storage in use" counter at all. Nice~
■ https://bugzilla.mozilla.org/show_bug.cgi?id=443067
Radek 'sysKin' Czyz 2010-06-14 04:43:40 PDT
Verified fixed with hourly, changeset 7d3e81dd1018. Downloading a ~100 MB file
with 250 MB disk cache no longer advances cache "Storage in use" counter at all. Nice~