瀏覽代碼

New triggers: BABYLON.ActionManager.OnIntersectionEnterTrigger, BABYLON.ActionManager.OnIntersectionExitTrigger

David Catuhe 11 年之前
父節點
當前提交
0d6ed4636a

+ 13 - 2
Babylon/Actions/babylon.action.js

@@ -1,8 +1,15 @@
 var BABYLON;
 (function (BABYLON) {
     var Action = (function () {
-        function Action(trigger, condition) {
-            this.trigger = trigger;
+        function Action(triggerOptions, condition) {
+            this.triggerOptions = triggerOptions;
+            if (triggerOptions.parameter) {
+                this.trigger = triggerOptions.trigger;
+                this._triggerParameter = triggerOptions.parameter;
+            } else {
+                this.trigger = triggerOptions;
+            }
+
             this._nextActiveAction = this;
             this._condition = condition;
         }
@@ -10,6 +17,10 @@
         Action.prototype._prepare = function () {
         };
 
+        Action.prototype.getTriggerParameter = function () {
+            return this._triggerParameter;
+        };
+
         Action.prototype._executeCurrent = function (evt) {
             if (this._condition) {
                 var currentRenderId = this._actionManager.getScene().getRenderId();

+ 15 - 1
Babylon/Actions/babylon.action.ts

@@ -1,12 +1,22 @@
 module BABYLON {
     export class Action {
+        public trigger: number;
         public _actionManager: ActionManager;
 
         private _nextActiveAction: Action;
         private _child: Action;
         private _condition: Condition;
+        private _triggerParameter: any;
+
+        constructor(public triggerOptions: any, condition?: Condition) {
+
+            if (triggerOptions.parameter) {
+                this.trigger = triggerOptions.trigger;
+                this._triggerParameter = triggerOptions.parameter;
+            } else {
+                this.trigger = triggerOptions;
+            }
 
-        constructor(public trigger: number, condition?: Condition) {
             this._nextActiveAction = this;
             this._condition = condition;
         }
@@ -15,6 +25,10 @@
         public _prepare(): void {
         }
 
+        public getTriggerParameter(): any {
+            return this._triggerParameter;
+        }
+
         public _executeCurrent(evt: ActionEvent): void {
             if (this._condition) {
                 var currentRenderId = this._actionManager.getScene().getRenderId();

+ 40 - 0
Babylon/Actions/babylon.actionManager.js

@@ -20,6 +20,8 @@
             // Members
             this.actions = new Array();
             this._scene = scene;
+
+            scene._actionManagers.push(this);
         }
         Object.defineProperty(ActionManager, "NothingTrigger", {
             get: function () {
@@ -85,11 +87,47 @@
             configurable: true
         });
 
+        Object.defineProperty(ActionManager, "OnIntersectionEnterTrigger", {
+            get: function () {
+                return ActionManager._OnIntersectionEnterTrigger;
+            },
+            enumerable: true,
+            configurable: true
+        });
+
+        Object.defineProperty(ActionManager, "OnIntersectionExitTrigger", {
+            get: function () {
+                return ActionManager._OnIntersectionExitTrigger;
+            },
+            enumerable: true,
+            configurable: true
+        });
+
         // Methods
+        ActionManager.prototype.dispose = function () {
+            var index = this._scene._actionManagers.indexOf(this);
+
+            if (index > -1) {
+                this._scene._actionManagers.splice(index, 1);
+            }
+        };
+
         ActionManager.prototype.getScene = function () {
             return this._scene;
         };
 
+        ActionManager.prototype.hasSpecificTriggers = function (triggers) {
+            for (var index = 0; index < this.actions.length; index++) {
+                var action = this.actions[index];
+
+                if (triggers.indexOf(action.trigger) > -1) {
+                    return true;
+                }
+            }
+
+            return false;
+        };
+
         ActionManager.prototype.registerAction = function (action) {
             if (action.trigger === ActionManager.OnEveryFrameTrigger) {
                 if (this.getScene().actionManager !== this) {
@@ -139,6 +177,8 @@
         ActionManager._OnPointerOverTrigger = 5;
         ActionManager._OnPointerOutTrigger = 6;
         ActionManager._OnEveryFrameTrigger = 7;
+        ActionManager._OnIntersectionEnterTrigger = 8;
+        ActionManager._OnIntersectionExitTrigger = 9;
         return ActionManager;
     })();
     BABYLON.ActionManager = ActionManager;

+ 32 - 0
Babylon/Actions/babylon.actionManager.ts

@@ -21,6 +21,8 @@
         private static _OnPointerOverTrigger = 5;
         private static _OnPointerOutTrigger = 6;
         private static _OnEveryFrameTrigger = 7;
+        private static _OnIntersectionEnterTrigger = 8;
+        private static _OnIntersectionExitTrigger = 9;
 
         public static get NothingTrigger(): number {
             return ActionManager._NothingTrigger;
@@ -54,6 +56,14 @@
             return ActionManager._OnEveryFrameTrigger;
         }
 
+        public static get OnIntersectionEnterTrigger(): number {
+            return ActionManager._OnIntersectionEnterTrigger;
+        }
+
+        public static get OnIntersectionExitTrigger(): number {
+            return ActionManager._OnIntersectionExitTrigger;
+        }
+
         // Members
         public actions = new Array<Action>();
 
@@ -61,13 +71,35 @@
 
         constructor(scene: Scene) {
             this._scene = scene;
+
+            scene._actionManagers.push(this);
         }
 
         // Methods
+        public dispose(): void {
+            var index = this._scene._actionManagers.indexOf(this);
+
+            if (index > -1) {
+                this._scene._actionManagers.splice(index, 1);
+            }
+        }
+
         public getScene(): Scene {
             return this._scene;
         }
 
+        public hasSpecificTriggers(triggers: number[]): boolean {
+            for (var index = 0; index < this.actions.length; index++) {
+                var action = this.actions[index];
+
+                if (triggers.indexOf(action.trigger) > -1) {
+                    return true;
+                }
+            }
+
+            return false;
+        }
+
         public registerAction(action: Action): Action {
             if (action.trigger === ActionManager.OnEveryFrameTrigger) {
                 if (this.getScene().actionManager !== this) {

+ 21 - 21
Babylon/Actions/babylon.directActions.js

@@ -8,8 +8,8 @@ var BABYLON;
 (function (BABYLON) {
     var SwitchBooleanAction = (function (_super) {
         __extends(SwitchBooleanAction, _super);
-        function SwitchBooleanAction(trigger, target, propertyPath, condition) {
-            _super.call(this, trigger, condition);
+        function SwitchBooleanAction(triggerOptions, target, propertyPath, condition) {
+            _super.call(this, triggerOptions, condition);
             this.propertyPath = propertyPath;
             this._target = target;
         }
@@ -27,8 +27,8 @@ var BABYLON;
 
     var SetStateAction = (function (_super) {
         __extends(SetStateAction, _super);
-        function SetStateAction(trigger, target, value, condition) {
-            _super.call(this, trigger, condition);
+        function SetStateAction(triggerOptions, target, value, condition) {
+            _super.call(this, triggerOptions, condition);
             this.value = value;
             this._target = target;
         }
@@ -41,8 +41,8 @@ var BABYLON;
 
     var SetValueAction = (function (_super) {
         __extends(SetValueAction, _super);
-        function SetValueAction(trigger, target, propertyPath, value, condition) {
-            _super.call(this, trigger, condition);
+        function SetValueAction(triggerOptions, target, propertyPath, value, condition) {
+            _super.call(this, triggerOptions, condition);
             this.propertyPath = propertyPath;
             this.value = value;
             this._target = target;
@@ -61,8 +61,8 @@ var BABYLON;
 
     var IncrementValueAction = (function (_super) {
         __extends(IncrementValueAction, _super);
-        function IncrementValueAction(trigger, target, propertyPath, value, condition) {
-            _super.call(this, trigger, condition);
+        function IncrementValueAction(triggerOptions, target, propertyPath, value, condition) {
+            _super.call(this, triggerOptions, condition);
             this.propertyPath = propertyPath;
             this.value = value;
             this._target = target;
@@ -85,8 +85,8 @@ var BABYLON;
 
     var PlayAnimationAction = (function (_super) {
         __extends(PlayAnimationAction, _super);
-        function PlayAnimationAction(trigger, target, from, to, loop, condition) {
-            _super.call(this, trigger, condition);
+        function PlayAnimationAction(triggerOptions, target, from, to, loop, condition) {
+            _super.call(this, triggerOptions, condition);
             this.from = from;
             this.to = to;
             this.loop = loop;
@@ -105,8 +105,8 @@ var BABYLON;
 
     var StopAnimationAction = (function (_super) {
         __extends(StopAnimationAction, _super);
-        function StopAnimationAction(trigger, target, condition) {
-            _super.call(this, trigger, condition);
+        function StopAnimationAction(triggerOptions, target, condition) {
+            _super.call(this, triggerOptions, condition);
             this._target = target;
         }
         StopAnimationAction.prototype._prepare = function () {
@@ -122,9 +122,9 @@ var BABYLON;
 
     var DoNothingAction = (function (_super) {
         __extends(DoNothingAction, _super);
-        function DoNothingAction(trigger, condition) {
-            if (typeof trigger === "undefined") { trigger = BABYLON.ActionManager.NothingTrigger; }
-            _super.call(this, trigger, condition);
+        function DoNothingAction(triggerOptions, condition) {
+            if (typeof triggerOptions === "undefined") { triggerOptions = BABYLON.ActionManager.NothingTrigger; }
+            _super.call(this, triggerOptions, condition);
         }
         DoNothingAction.prototype.execute = function () {
         };
@@ -134,8 +134,8 @@ var BABYLON;
 
     var CombineAction = (function (_super) {
         __extends(CombineAction, _super);
-        function CombineAction(trigger, children, condition) {
-            _super.call(this, trigger, condition);
+        function CombineAction(triggerOptions, children, condition) {
+            _super.call(this, triggerOptions, condition);
             this.children = children;
         }
         CombineAction.prototype._prepare = function () {
@@ -156,8 +156,8 @@ var BABYLON;
 
     var ExecuteCodeAction = (function (_super) {
         __extends(ExecuteCodeAction, _super);
-        function ExecuteCodeAction(trigger, func, condition) {
-            _super.call(this, trigger, condition);
+        function ExecuteCodeAction(triggerOptions, func, condition) {
+            _super.call(this, triggerOptions, condition);
             this.func = func;
         }
         ExecuteCodeAction.prototype.execute = function (evt) {
@@ -169,8 +169,8 @@ var BABYLON;
 
     var SetParentAction = (function (_super) {
         __extends(SetParentAction, _super);
-        function SetParentAction(trigger, target, parent, condition) {
-            _super.call(this, trigger, condition);
+        function SetParentAction(triggerOptions, target, parent, condition) {
+            _super.call(this, triggerOptions, condition);
             this._target = target;
             this._parent = parent;
         }

+ 20 - 20
Babylon/Actions/babylon.directActions.ts

@@ -3,8 +3,8 @@
         private _target: any;
         private _property: string;
 
-        constructor(trigger: number, target: any, public propertyPath: string, condition?: Condition) {
-            super(trigger, condition);
+        constructor(triggerOptions: any, target: any, public propertyPath: string, condition?: Condition) {
+            super(triggerOptions, condition);
             this._target = target;
         }
 
@@ -21,8 +21,8 @@
     export class SetStateAction extends Action {
         private _target: any;
 
-        constructor(trigger: number, target: any, public value: string, condition?: Condition) {
-            super(trigger, condition);
+        constructor(triggerOptions: any, target: any, public value: string, condition?: Condition) {
+            super(triggerOptions, condition);
             this._target = target;
         }
 
@@ -35,8 +35,8 @@
         private _target: any;
         private _property: string;
 
-        constructor(trigger: number, target: any, public propertyPath: string, public value: any, condition?: Condition) {
-            super(trigger, condition);
+        constructor(triggerOptions: any, target: any, public propertyPath: string, public value: any, condition?: Condition) {
+            super(triggerOptions, condition);
             this._target = target;
         }
 
@@ -54,8 +54,8 @@
         private _target: any;
         private _property: string;
 
-        constructor(trigger: number, target: any, public propertyPath: string, public value: any, condition?: Condition) {
-            super(trigger, condition);
+        constructor(triggerOptions: any, target: any, public propertyPath: string, public value: any, condition?: Condition) {
+            super(triggerOptions, condition);
             this._target = target;
         }
 
@@ -76,8 +76,8 @@
     export class PlayAnimationAction extends Action {
         private _target: any;
 
-        constructor(trigger: number, target: any, public from: number, public to: number, public loop?: boolean, condition?: Condition) {
-            super(trigger, condition);
+        constructor(triggerOptions: any, target: any, public from: number, public to: number, public loop?: boolean, condition?: Condition) {
+            super(triggerOptions, condition);
             this._target = target;
         }
 
@@ -93,8 +93,8 @@
     export class StopAnimationAction extends Action {
         private _target: any;
 
-        constructor(trigger: number, target: any, condition?: Condition) {
-            super(trigger, condition);
+        constructor(triggerOptions: any, target: any, condition?: Condition) {
+            super(triggerOptions, condition);
             this._target = target;
         }
 
@@ -108,8 +108,8 @@
     }
 
     export class DoNothingAction extends Action {
-        constructor(trigger: number = ActionManager.NothingTrigger, condition?: Condition) {
-            super(trigger, condition);
+        constructor(triggerOptions: any = ActionManager.NothingTrigger, condition?: Condition) {
+            super(triggerOptions, condition);
         }
 
         public execute(): void {
@@ -117,8 +117,8 @@
     }
 
     export class CombineAction extends Action {
-        constructor(trigger: number, public children: Action[], condition?: Condition) {
-            super(trigger, condition);
+        constructor(triggerOptions: any, public children: Action[], condition?: Condition) {
+            super(triggerOptions, condition);
         }
 
         public _prepare(): void {
@@ -136,8 +136,8 @@
     }
 
     export class ExecuteCodeAction extends Action {
-        constructor(trigger: number, public func: (evt: ActionEvent) => void, condition?: Condition) {
-            super(trigger, condition);
+        constructor(triggerOptions: any, public func: (evt: ActionEvent) => void, condition?: Condition) {
+            super(triggerOptions, condition);
         }
 
         public execute(evt: ActionEvent): void {
@@ -149,8 +149,8 @@
         private _parent: any;
         private _target: any;
 
-        constructor(trigger: number, target: any, parent: any, condition?: Condition) {
-            super(trigger, condition);
+        constructor(triggerOptions: any, target: any, parent: any, condition?: Condition) {
+            super(triggerOptions, condition);
             this._target = target;
             this._parent = parent;
         }

+ 2 - 2
Babylon/Actions/babylon.interpolateValueAction.js

@@ -8,9 +8,9 @@ var BABYLON;
 (function (BABYLON) {
     var InterpolateValueAction = (function (_super) {
         __extends(InterpolateValueAction, _super);
-        function InterpolateValueAction(trigger, target, propertyPath, value, duration, condition, stopOtherAnimations) {
+        function InterpolateValueAction(triggerOptions, target, propertyPath, value, duration, condition, stopOtherAnimations) {
             if (typeof duration === "undefined") { duration = 1000; }
-            _super.call(this, trigger, condition);
+            _super.call(this, triggerOptions, condition);
             this.propertyPath = propertyPath;
             this.value = value;
             this.duration = duration;

+ 2 - 2
Babylon/Actions/babylon.interpolateValueAction.ts

@@ -3,8 +3,8 @@
         private _target: any;
         private _property: string;
 
-        constructor(trigger: number, target: any, public propertyPath: string, public value: any, public duration: number = 1000, condition?: Condition, public stopOtherAnimations?: boolean) {
-            super(trigger, condition);
+        constructor(triggerOptions: any, target: any, public propertyPath: string, public value: any, public duration: number = 1000, condition?: Condition, public stopOtherAnimations?: boolean) {
+            super(triggerOptions, condition);
 
             this._target = target;
         }

+ 10 - 0
Babylon/Mesh/babylon.abstractMesh.js

@@ -48,6 +48,7 @@ var BABYLON;
             this._pivotMatrix = BABYLON.Matrix.Identity();
             this._isDisposed = false;
             this._renderId = 0;
+            this._intersectionsInProgress = new Array();
 
             scene.meshes.push(this);
         }
@@ -700,6 +701,15 @@ var BABYLON;
                 this.setPhysicsState(BABYLON.PhysicsEngine.NoImpostor);
             }
 
+            for (index = 0; index < this._intersectionsInProgress.length; index++) {
+                var other = this._intersectionsInProgress[index];
+
+                var pos = other._intersectionsInProgress.indexOf(this);
+                other._intersectionsInProgress.splice(pos, 1);
+            }
+
+            this._intersectionsInProgress = [];
+
             // SubMeshes
             this.releaseSubMeshes();
 

+ 12 - 1
Babylon/Mesh/babylon.abstractMesh.ts

@@ -82,6 +82,7 @@
 
         public subMeshes: SubMesh[];
         public _submeshesOctree: Octree<SubMesh>;
+        public _intersectionsInProgress = new Array<AbstractMesh>();
 
         constructor(name: string, scene: Scene) {
             super(name, scene);
@@ -419,7 +420,7 @@
             return true;
         }
 
-        public intersectsMesh(mesh: Mesh, precise?: boolean): boolean {
+        public intersectsMesh(mesh: AbstractMesh, precise?: boolean): boolean {
             if (!this._boundingInfo || !mesh._boundingInfo) {
                 return false;
             }
@@ -692,6 +693,16 @@
                 this.setPhysicsState(PhysicsEngine.NoImpostor);
             }
 
+            // Intersections in progress
+            for (index = 0; index < this._intersectionsInProgress.length; index++) {
+                var other = this._intersectionsInProgress[index];
+
+                var pos = other._intersectionsInProgress.indexOf(this);
+                other._intersectionsInProgress.splice(pos, 1);
+            }
+
+            this._intersectionsInProgress = [];
+
             // SubMeshes
             this.releaseSubMeshes();
 

+ 41 - 0
Babylon/babylon.scene.js

@@ -51,6 +51,8 @@
             this.customRenderTargets = new Array();
             // Imported meshes
             this.importedMeshesFiles = new Array();
+            this._actionManagers = new Array();
+            this._meshesForIntersections = new BABYLON.SmartArray(256);
             this._totalVertices = 0;
             this._activeVertices = 0;
             this._activeParticles = 0;
@@ -689,6 +691,11 @@
                 mesh.computeWorldMatrix();
                 mesh._preActivate();
 
+                // Intersections
+                if (mesh.actionManager && mesh.actionManager.hasSpecificTriggers([BABYLON.ActionManager.OnIntersectionEnterTrigger, BABYLON.ActionManager.OnIntersectionExitTrigger])) {
+                    this._meshesForIntersections.pushNoDuplicate(mesh);
+                }
+
                 if (mesh.isEnabled() && mesh.isVisible && mesh.visibility > 0 && ((mesh.layerMask & this.activeCamera.layerMask) != 0) && mesh.isInFrustum(this._frustumPlanes)) {
                     this._activeMeshes.push(mesh);
                     mesh._activate(this._renderId);
@@ -879,6 +886,36 @@
             this.activeCamera._updateFromScene();
         };
 
+        Scene.prototype._checkIntersections = function () {
+            for (var index = 0; index < this._meshesForIntersections.length; index++) {
+                var sourceMesh = this._meshesForIntersections.data[index];
+
+                for (var actionIndex = 0; actionIndex < sourceMesh.actionManager.actions.length; actionIndex++) {
+                    var action = sourceMesh.actionManager.actions[actionIndex];
+
+                    if (action.trigger == BABYLON.ActionManager.OnIntersectionEnterTrigger || action.trigger == BABYLON.ActionManager.OnIntersectionExitTrigger) {
+                        var otherMesh = action.getTriggerParameter();
+
+                        var areIntersecting = otherMesh.intersectsMesh(sourceMesh, false);
+                        var currentIntersectionInProgress = sourceMesh._intersectionsInProgress.indexOf(otherMesh);
+
+                        if (areIntersecting && currentIntersectionInProgress === -1 && action.trigger == BABYLON.ActionManager.OnIntersectionEnterTrigger) {
+                            sourceMesh.actionManager.processTrigger(BABYLON.ActionManager.OnIntersectionEnterTrigger, BABYLON.ActionEvent.CreateNew(sourceMesh));
+                            sourceMesh._intersectionsInProgress.push(otherMesh);
+                        } else if (!areIntersecting && currentIntersectionInProgress > -1 && action.trigger == BABYLON.ActionManager.OnIntersectionExitTrigger) {
+                            sourceMesh.actionManager.processTrigger(BABYLON.ActionManager.OnIntersectionExitTrigger, BABYLON.ActionEvent.CreateNew(sourceMesh));
+
+                            var indexOfOther = sourceMesh._intersectionsInProgress.indexOf(otherMesh);
+
+                            if (indexOfOther > -1) {
+                                sourceMesh._intersectionsInProgress.splice(indexOfOther, 1);
+                            }
+                        }
+                    }
+                }
+            }
+        };
+
         Scene.prototype.render = function () {
             var startDate = new Date().getTime();
             this._particlesDuration = 0;
@@ -888,6 +925,7 @@
             this._evaluateActiveMeshesDuration = 0;
             this._totalVertices = 0;
             this._activeVertices = 0;
+            this._meshesForIntersections.reset();
 
             // Actions
             if (this.actionManager) {
@@ -939,6 +977,9 @@
                 this._processSubCameras(this.activeCamera);
             }
 
+            // Intersection checks
+            this._checkIntersections();
+
             // After render
             if (this.afterRender) {
                 this.afterRender();

+ 42 - 0
Babylon/babylon.scene.ts

@@ -102,6 +102,8 @@
 
         // Actions
         public actionManager: ActionManager;
+        public _actionManagers = new Array<ActionManager>();
+        private _meshesForIntersections = new SmartArray<AbstractMesh>(256);
 
         // Private
         private _engine: Engine;
@@ -755,6 +757,11 @@
                 mesh.computeWorldMatrix();
                 mesh._preActivate();
 
+                // Intersections
+                if (mesh.actionManager && mesh.actionManager.hasSpecificTriggers([ActionManager.OnIntersectionEnterTrigger, ActionManager.OnIntersectionExitTrigger])) {
+                    this._meshesForIntersections.pushNoDuplicate(mesh);
+                }
+
                 if (mesh.isEnabled() && mesh.isVisible && mesh.visibility > 0 && ((mesh.layerMask & this.activeCamera.layerMask) != 0) && mesh.isInFrustum(this._frustumPlanes)) {
                     this._activeMeshes.push(mesh);
                     mesh._activate(this._renderId);
@@ -949,6 +956,37 @@
             this.activeCamera._updateFromScene();
         }
 
+        private _checkIntersections(): void {
+            for (var index = 0; index < this._meshesForIntersections.length; index++) {
+                var sourceMesh = this._meshesForIntersections.data[index];
+
+                for (var actionIndex = 0; actionIndex < sourceMesh.actionManager.actions.length; actionIndex++) {
+                    var action = sourceMesh.actionManager.actions[actionIndex];
+
+                    if (action.trigger == ActionManager.OnIntersectionEnterTrigger || action.trigger == ActionManager.OnIntersectionExitTrigger) {
+                        var otherMesh = action.getTriggerParameter();
+
+                        var areIntersecting = otherMesh.intersectsMesh(sourceMesh, false);
+                        var currentIntersectionInProgress = sourceMesh._intersectionsInProgress.indexOf(otherMesh);
+
+                        if (areIntersecting && currentIntersectionInProgress === -1 && action.trigger == ActionManager.OnIntersectionEnterTrigger ) {
+                            sourceMesh.actionManager.processTrigger(ActionManager.OnIntersectionEnterTrigger, ActionEvent.CreateNew(sourceMesh));
+                            sourceMesh._intersectionsInProgress.push(otherMesh);
+
+                        } else if (!areIntersecting && currentIntersectionInProgress > -1 && action.trigger == ActionManager.OnIntersectionExitTrigger ) {
+                            sourceMesh.actionManager.processTrigger(ActionManager.OnIntersectionExitTrigger, ActionEvent.CreateNew(sourceMesh));
+
+                            var indexOfOther = sourceMesh._intersectionsInProgress.indexOf(otherMesh);
+
+                            if (indexOfOther > -1) {
+                                sourceMesh._intersectionsInProgress.splice(indexOfOther, 1);
+                            }
+                        }
+                    }
+                }                
+            }
+        }
+
         public render(): void {
             var startDate = new Date().getTime();
             this._particlesDuration = 0;
@@ -958,6 +996,7 @@
             this._evaluateActiveMeshesDuration = 0;
             this._totalVertices = 0;
             this._activeVertices = 0;
+            this._meshesForIntersections.reset();
 
             // Actions
             if (this.actionManager) {
@@ -1010,6 +1049,9 @@
                 this._processSubCameras(this.activeCamera);
             }
 
+            // Intersection checks
+            this._checkIntersections();
+
             // After render
             if (this.afterRender) {
                 this.afterRender();

文件差異過大導致無法顯示
+ 2 - 2
babylon.1.13-beta-debug.js


文件差異過大導致無法顯示
+ 5 - 5
babylon.1.13-beta.js