|
@@ -36,8 +36,8 @@ class Scene extends Object implements h3d.IDrawable implements hxd.SceneEvents.I
|
|
var z1 = i1.hitPoint.w;
|
|
var z1 = i1.hitPoint.w;
|
|
var z2 = i2.hitPoint.w;
|
|
var z2 = i2.hitPoint.w;
|
|
if( z1 > z2 )
|
|
if( z1 > z2 )
|
|
- return 1;
|
|
|
|
- return -1;
|
|
|
|
|
|
+ return -1;
|
|
|
|
+ return 1;
|
|
}
|
|
}
|
|
|
|
|
|
public function dispatchEvent( event : hxd.Event, to : hxd.SceneEvents.Interactive ) {
|
|
public function dispatchEvent( event : hxd.Event, to : hxd.SceneEvents.Interactive ) {
|
|
@@ -90,10 +90,9 @@ class Scene extends Object implements h3d.IDrawable implements hxd.SceneEvents.I
|
|
hitInteractives.sort(sortHitPointByCameraDistance);
|
|
hitInteractives.sort(sortHitPointByCameraDistance);
|
|
}
|
|
}
|
|
|
|
|
|
- hitInteractives.push(null);
|
|
|
|
|
|
+ hitInteractives.unshift(null);
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
while( hitInteractives.length > 0 ) {
|
|
while( hitInteractives.length > 0 ) {
|
|
|
|
|
|
var i = hitInteractives.pop();
|
|
var i = hitInteractives.pop();
|
|
@@ -111,6 +110,9 @@ class Scene extends Object implements h3d.IDrawable implements hxd.SceneEvents.I
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if( !event.propagate )
|
|
|
|
+ hitInteractives = [];
|
|
|
|
+
|
|
return i;
|
|
return i;
|
|
}
|
|
}
|
|
|
|
|