- let Cr_min = dimensions[0];
- let Cr_max = dimensions[1];
- let Cr_scale = Cr_max - Cr_min;
-
- let Ci_min = dimensions[2];
- let Ci_max = dimensions[3];
- let Ci_scale = Ci_max - Ci_min;
-
- let pixels = [];
- for (var img_y = line; img_y < canvas.height && img_y < line+8; img_y++)
- for (let img_x = 0; img_x < canvas.width; img_x++) {
- let C = new complex(Cr_min + (img_x / canvas.width) * Cr_scale,
- Ci_min + (img_y / canvas.height) * Ci_scale);
- pixels.push.apply(pixels, drawPoint(context, img_x, img_y, C, iterMax, algorithm));
- }
- context.putImageData({width: canvas.width, height: pixels.length/4/canvas.width, data: pixels}, 0, line);
+ let Cr_min = dimensions[0];
+ let Cr_max = dimensions[1];
+ let Cr_scale = Cr_max - Cr_min;
+
+ let Ci_min = dimensions[2];
+ let Ci_max = dimensions[3];
+ let Ci_scale = Ci_max - Ci_min;
+
+ let pixels = [];
+ for (var img_y = line; img_y < canvas.height && img_y < line+8; img_y++)
+ for (let img_x = 0; img_x < canvas.width; img_x++) {
+ let C = new complex(Cr_min + (img_x / canvas.width) * Cr_scale,
+ Ci_min + (img_y / canvas.height) * Ci_scale);
+ pixels.push.apply(pixels, drawPoint(context, img_x, img_y, C, iterMax, algorithm));
+ }
+ context.putImageData({width: canvas.width, height: pixels.length/4/canvas.width, data: pixels}, 0, line);