grab cursor
This commit is contained in:
		
							
								
								
									
										12
									
								
								app.js
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								app.js
									
									
									
									
									
								
							| @ -769,6 +769,9 @@ controls.maxAzimuthAngle = 2.14 - Math.PI/2 | ||||
| controls.target = P(5, 10) | ||||
| controls.update() | ||||
|  | ||||
| controls.addEventListener("start", () => renderer.domElement.style.cursor = "grabbing") | ||||
| controls.addEventListener("end", () => renderer.domElement.style.cursor = "grab") | ||||
|  | ||||
| const showFPS = window.location.search.includes("fps") | ||||
| const fps = new FPS.default(); | ||||
| if (showFPS) document.body.appendChild(fps.dom); | ||||
| @ -941,7 +944,6 @@ function pauseSettings() { | ||||
|  | ||||
|     music.pause() | ||||
|     document.onkeydown = null | ||||
|     renderer.domElement.style.cursor = "auto" | ||||
|  | ||||
|     settings.show() | ||||
| } | ||||
| @ -977,6 +979,7 @@ function resume(event) { | ||||
|     if (settings.form.checkValidity()) { | ||||
|         settings.modal.hide() | ||||
|         settings.getInputs() | ||||
|         renderer.domElement.focus() | ||||
|  | ||||
|         document.onkeydown = onkeydown | ||||
|         document.onkeyup = onkeyup | ||||
| @ -990,8 +993,6 @@ function resume(event) { | ||||
|             music.play() | ||||
|         } | ||||
|  | ||||
|         renderer.domElement.style.cursor = "move" | ||||
|  | ||||
|         if (piece) scheduler.setInterval(fall, stats.fallPeriod) | ||||
|         else generate() | ||||
|     } | ||||
| @ -1145,7 +1146,6 @@ function gameOver() { | ||||
|     document.onkeydown = null | ||||
|     onblur = null | ||||
|     playing = false | ||||
|     renderer.domElement.style.cursor = "auto" | ||||
|     music.pause() | ||||
|  | ||||
|     stats.show() | ||||
| @ -1156,7 +1156,3 @@ window.onbeforeunload = function(event) { | ||||
|     settings.save() | ||||
|     if (playing) return false | ||||
| } | ||||
|  | ||||
| /*if ('serviceWorker' in navigator) { | ||||
|     navigator.serviceWorker.register('service-worker.js') | ||||
| }*/ | ||||
		Reference in New Issue
	
	Block a user