|
@@ -52,27 +52,23 @@ THREE.TransformControls = function ( camera, domElement ) {
|
|
|
|
|
|
var raycaster = new THREE.Raycaster();
|
|
|
|
|
|
- var intersectObjectWithRay = function ( object, raycaster, includeInvisible ) {
|
|
|
+ function intersectObjectWithRay( object, raycaster, includeInvisible ) {
|
|
|
|
|
|
var allIntersections = raycaster.intersectObject( object, true );
|
|
|
|
|
|
- var intersection = false;
|
|
|
-
|
|
|
for ( var i = allIntersections.length; i --; ) {
|
|
|
|
|
|
if ( allIntersections[ i ].object.visible || includeInvisible ) {
|
|
|
|
|
|
- intersection = allIntersections[ i ];
|
|
|
-
|
|
|
- continue;
|
|
|
+ return allIntersections[ i ];
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
- return intersection;
|
|
|
+ return false;
|
|
|
|
|
|
- };
|
|
|
+ }
|
|
|
|
|
|
var _tempVector = new THREE.Vector3();
|
|
|
var _tempVector2 = new THREE.Vector3();
|