Browse Source

Refactor collision function

Fernando Serrano 5 năm trước cách đây
mục cha
commit
dee2d15923
1 tập tin đã thay đổi với 7 bổ sung1 xóa
  1. 7 1
      examples/webxr_vr_haptics.html

+ 7 - 1
examples/webxr_vr_haptics.html

@@ -215,7 +215,7 @@
 
 			}
 
-			function render() {
+			function handleCollisions() {
 
 				for ( var g = 0; g < controllers.length; g ++ ) {
 
@@ -275,6 +275,12 @@
 
 				}
 
+			}
+
+			function render() {
+
+				handleCollisions();
+
 				renderer.render( scene, camera );
 
 			}