Explorar o código

Examples: webgl_multiple_elements_text fix animation speed on >60hz screens (#24596)

* fix animation speed on >60hz screens

* switch to THREE.Clock()

* Update webgl_multiple_elements_text.html

Co-authored-by: Michael Herzog <[email protected]>
Caleb %!s(int64=2) %!d(string=hai) anos
pai
achega
04d91e2d99
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      examples/webgl_multiple_elements_text.html

+ 3 - 1
examples/webgl_multiple_elements_text.html

@@ -100,6 +100,8 @@
 
 			const scenes = [];
 
+			const clock = new THREE.Clock();
+
 			let views, t, canvas, renderer;
 
 			window.onload = init;
@@ -275,7 +277,7 @@
 
 				} );
 
-				t ++;
+				t += clock.getDelta() * 60;
 
 			}