John Salamon 7 năm trước cách đây
mục cha
commit
3ce025446a
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  1. 5 0
      code.js

+ 5 - 0
code.js

@@ -161,6 +161,11 @@ let startGL = function(img) {
 	requestId = window.requestAnimationFrame(render);
 	function render(t) {
 
+		if(pause) {
+			requestId = window.requestAnimationFrame(render);
+			return;
+		}
+
 		gl.viewport(0, 0, img.width, img.height);
 
 		// swap which texture is being rendered to each frame