浏览代码

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;
 
 			}