mirror of
https://github.com/MapMakersAndProgrammers/Alternativa3D.git
synced 2025-10-26 18:09:14 -07:00
Mouse events bubbling fixed
This commit is contained in:
@@ -236,14 +236,12 @@ public class Camera3D extends Object3D {
|
|||||||
|
|
||||||
// Check if object of hierarchy is visible
|
// Check if object of hierarchy is visible
|
||||||
if (root.visible) {
|
if (root.visible) {
|
||||||
globalMouseHandlingType = 0;
|
|
||||||
|
|
||||||
// Calculating the matrix to transform from the camera space to local space
|
// Calculating the matrix to transform from the camera space to local space
|
||||||
root.cameraToLocalTransform.combine(root.inverseTransform, localToGlobalTransform);
|
root.cameraToLocalTransform.combine(root.inverseTransform, localToGlobalTransform);
|
||||||
// Calculating the matrix to transform from local space to the camera space
|
// Calculating the matrix to transform from local space to the camera space
|
||||||
root.localToCameraTransform.combine(globalToLocalTransform, root.transform);
|
root.localToCameraTransform.combine(globalToLocalTransform, root.transform);
|
||||||
|
|
||||||
if (root.mouseEnabled) globalMouseHandlingType |= root.mouseHandlingType;
|
globalMouseHandlingType = root.mouseHandlingType;
|
||||||
// Checking the culling
|
// Checking the culling
|
||||||
if (root.boundBox != null) {
|
if (root.boundBox != null) {
|
||||||
calculateFrustum(root.cameraToLocalTransform);
|
calculateFrustum(root.cameraToLocalTransform);
|
||||||
|
|||||||
@@ -1523,7 +1523,7 @@ package alternativa.engine3d.core {
|
|||||||
// Calculating matrix for converting from local coordinates to camera coordinates
|
// Calculating matrix for converting from local coordinates to camera coordinates
|
||||||
child.localToCameraTransform.combine(localToCameraTransform, child.transform);
|
child.localToCameraTransform.combine(localToCameraTransform, child.transform);
|
||||||
|
|
||||||
if (child.mouseEnabled) camera.globalMouseHandlingType |= child.mouseHandlingType;
|
camera.globalMouseHandlingType |= child.mouseHandlingType;
|
||||||
// Culling checking
|
// Culling checking
|
||||||
if (child.boundBox != null) {
|
if (child.boundBox != null) {
|
||||||
camera.calculateFrustum(child.cameraToLocalTransform);
|
camera.calculateFrustum(child.cameraToLocalTransform);
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ package alternativa.engine3d.objects {
|
|||||||
// Calculation of transfer matrix from local space to camera.
|
// Calculation of transfer matrix from local space to camera.
|
||||||
child.localToCameraTransform.combine(parent.localToCameraTransform, child.transform);
|
child.localToCameraTransform.combine(parent.localToCameraTransform, child.transform);
|
||||||
|
|
||||||
if (child.mouseEnabled) camera.globalMouseHandlingType |= child.mouseHandlingType;
|
camera.globalMouseHandlingType |= child.mouseHandlingType;
|
||||||
// Pass
|
// Pass
|
||||||
child.culling = parent.culling;
|
child.culling = parent.culling;
|
||||||
// Calculating visibility of the self content
|
// Calculating visibility of the self content
|
||||||
|
|||||||
Reference in New Issue
Block a user