소스 검색

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 2 년 전
부모
커밋
04d91e2d99
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  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;
 
 			}