Explorar el Código

use requestAnimationFrame for redrawing on zoom.

much nicer, but still with a noticable delay.
Lucas Stadler %!s(int64=12) %!d(string=hace) años
padre
commit
f09b7e5d9f
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      js/pixl/public/index.html

+ 1 - 1
js/pixl/public/index.html

@ -126,7 +126,7 @@
126 126
			} else if (pixl.size > pixl.window.w / 2) {
127 127
				pixl.size = Math.round(pixl.window.w / 2);
128 128
			}
129
			pixl.redraw();
129
			requestAnimationFrame(pixl.redraw);
130 130
		});
131 131
132 132
		window.addEventListener("resize", function(ev) {