Parcourir la source

Refactor collision function

Fernando Serrano il y a 5 ans
Parent
commit
dee2d15923
1 fichiers modifiés avec 7 ajouts et 1 suppressions
  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 );
 
 			}