Browse Source

expose raycaster in drag control (#22851)

draibolit 3 năm trước cách đây
mục cha
commit
00434467a9

+ 6 - 0
examples/js/controls/DragControls.js

@@ -65,6 +65,12 @@
 
 			}
 
+			function getRaycaster() {
+
+				return _raycaster;
+
+			}
+
 			function onPointerMove( event ) {
 
 				if ( scope.enabled === false ) return;

+ 6 - 0
examples/jsm/controls/DragControls.js

@@ -64,6 +64,12 @@ class DragControls extends EventDispatcher {
 
 		}
 
+		function getRaycaster() {
+
+			return _raycaster;
+
+		}
+
 		function onPointerMove( event ) {
 
 			if ( scope.enabled === false ) return;