fix(fractal): keep non-escaping points black
Points that never escape kept the last loop index as iter, so they never reached the black color. Start iter at maxIterations and set it only when a point escapes. Update the ITEM_4 text (en, de) to match.
This commit is contained in:
1 parent
833e1ec8dc
commit
07e0fc1192
3 files changed
+3
-3
No files matched your search
@@ -124,6 +124,7 @@ export const FRACTAL2D_FRAGMENT = `
|
||||
}
|
||||
}
|
||||
else { // Mandelbrot (0), Julia (1), Burning Ship (2)
|
||||
iter = maxIterations; // stays at max for points that never escape (black interior)
|
||||
for(int i=0; i<2000; i++) {
|
||||
if (i >= maxIterations) break;
|
||||
|
||||
@@ -134,7 +135,6 @@ export const FRACTAL2D_FRAGMENT = `
|
||||
iter = i;
|
||||
break;
|
||||
}
|
||||
iter = i;
|
||||
|
||||
if (algorithm == 2) { // Burning Ship
|
||||
z.y = abs(z.y);
|
||||
|
||||
Reference in new issue
Block a user