Increased navigation speed.
authorEugen Sawin <sawine@me73.com>
Tue, 06 Jul 2010 23:59:31 +0200
changeset 25b2386d49eeae
parent 23 be999d87f5a5
child 26 5efc8bd3ebd0
Increased navigation speed.
chrome.html
script.js
     1.1 --- a/chrome.html	Tue Jul 06 22:51:41 2010 +0200
     1.2 +++ b/chrome.html	Tue Jul 06 23:59:31 2010 +0200
     1.3 @@ -35,12 +35,12 @@
     1.4  <!--<img src="images/world.png" alt="world map" height="280" width="100%" />
     1.5  -->
     1.6  <canvas id="mandelbrot" width="670" height="280"></canvas> 
     1.7 -<button onclick="draw(0, -1, 0, 0, 0);">Left</button>
     1.8 -<button onclick="draw(0, 1, 0, 0, 0);">Right</button>
     1.9 -<button onclick="draw(0, 0, -1, 0, 0)">Up</button>
    1.10 -<button onclick="draw(0, 0, 1, 0, 0);">Down</button>
    1.11 -<button onclick="draw(0, 0, 0, 1, 0);">Zoom in</button>
    1.12 -<button onclick="draw(0, 0, 0, -1, 0);">Zoom out</button>
    1.13 +<button onclick="draw(0, -2, 0, 0, 0);">Left</button>
    1.14 +<button onclick="draw(0, 2, 0, 0, 0);">Right</button>
    1.15 +<button onclick="draw(0, 0, -2, 0, 0)">Up</button>
    1.16 +<button onclick="draw(0, 0, 2, 0, 0);">Down</button>
    1.17 +<button onclick="draw(0, 0, 0, 2, 0);">Zoom in</button>
    1.18 +<button onclick="draw(0, 0, 0, -2, 0);">Zoom out</button>
    1.19  <button onclick="draw(0, 0, 0, 0, -1);">Inc Resolution</button>
    1.20  <button onclick="draw(0, 0, 0, 0, 1);">Dec Resolution</button>
    1.21  <button onclick="draw(100, 0, 0, 0, 0);">Inc Iterations</button>
     2.1 --- a/script.js	Tue Jul 06 22:51:41 2010 +0200
     2.2 +++ b/script.js	Tue Jul 06 23:59:31 2010 +0200
     2.3 @@ -262,8 +262,8 @@
     2.4  					(result.iter - max_iter / 25.0)), 2));			
     2.5  		 		var b = Math.min(255, Math.pow(Math.max(0, 
     2.6  					(result.iter - max_iter / 20.0)), 2));
     2.7 -		 		var colour = r + "," + g + "," + b;
     2.8 -		 		ctx.fillStyle = "rgb(" + colour + ")"; 
     2.9 +		 		var colour = "rgb(" + r + "," + g + "," + b + ")";
    2.10 +		 		ctx.fillStyle = colour; 
    2.11  				ctx.fillRect(x, y, resolution, resolution);			
    2.12  			}
    2.13    		}