@@ -224,10 +224,10 @@ qx.Class.define("desk.THREE.Container",
224
224
* @return {Array } array of objects
225
225
*/
226
226
getMeshes : function ( ) {
227
- var meshes = [ ] ;
227
+ const meshes = [ ] ;
228
228
if ( ! this . getScene ( ) ) return [ ] ;
229
229
this . getScene ( ) . traverse ( function ( child ) {
230
- if ( child . userData . viewerProperties ) {
230
+ if ( ! child . isGroup && child . userData . viewerProperties ) {
231
231
meshes . push ( child ) ;
232
232
}
233
233
} ) ;
@@ -789,22 +789,19 @@ qx.Class.define("desk.THREE.Container",
789
789
* @return {Array } array of intersections
790
790
*/
791
791
getIntersections : function ( meshes ) {
792
- var origin = this . getContentLocation ( ) ;
793
- var x = this . __x - origin . left ;
794
- var y = this . __y - origin . top ;
792
+ const origin = this . getContentLocation ( ) ;
793
+ const x = this . __x - origin . left ;
794
+ const y = this . __y - origin . top ;
795
795
796
- var elementSize = this . getInnerSize ( ) ;
797
- var mouse = new THREE . Vector2 ( ) ;
796
+ const elementSize = this . getInnerSize ( ) ;
797
+ const mouse = new THREE . Vector2 ( ) ;
798
798
mouse . x = ( x / elementSize . width ) * 2 - 1 ;
799
799
mouse . y = - ( y / elementSize . height ) * 2 + 1 ;
800
800
801
- var raycaster = new THREE . Raycaster ( ) ;
801
+ const raycaster = new THREE . Raycaster ( ) ;
802
802
raycaster . setFromCamera ( mouse , this . getCamera ( ) ) ;
803
803
804
- meshes = meshes || _ . filter ( this . getMeshes ( ) , function ( mesh ) {
805
- return mesh . visible ;
806
- } ) ;
807
-
804
+ meshes = meshes || this . getMeshes ( ) . filter ( m => m . visible ) ;
808
805
if ( this . rayCasterParams ) raycaster . params = this . rayCasterParams ;
809
806
return raycaster . intersectObjects ( meshes ) ;
810
807
} ,
0 commit comments