Ver código fonte

Fixed issue with actionManager and picking

David Catuhe 9 anos atrás
pai
commit
ca8bef845e

Diferenças do arquivo suprimidas por serem muito extensas
+ 17 - 17
dist/preview release/babylon.core.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 3821 - 3831
dist/preview release/babylon.d.ts


Diferenças do arquivo suprimidas por serem muito extensas
+ 29 - 29
dist/preview release/babylon.js


+ 0 - 42
dist/preview release/babylon.max.js

@@ -9043,27 +9043,6 @@ var BABYLON;
             enumerable: true,
             configurable: true
         });
-        Object.defineProperty(AbstractMesh.prototype, "actionManager", {
-            /**
-             * This scene's action manager
-             * @type {BABYLON.ActionManager}
-            */
-            get: function () {
-                if (!this._actionManager) {
-                    this.actionManager = new BABYLON.ActionManager(this.getScene());
-                }
-                return this._actionManager;
-            },
-            /**
-             * This scene's action manager
-             * @type {BABYLON.ActionManager}
-            */
-            set: function (value) {
-                this._actionManager = value;
-            },
-            enumerable: true,
-            configurable: true
-        });
         Object.defineProperty(AbstractMesh.prototype, "skeleton", {
             get: function () {
                 return this._skeleton;
@@ -15038,27 +15017,6 @@ var BABYLON;
             enumerable: true,
             configurable: true
         });
-        Object.defineProperty(Scene.prototype, "actionManager", {
-            /**
-             * This scene's action manager
-             * @type {BABYLON.ActionManager}
-            */
-            get: function () {
-                if (!this._sceneActionManager) {
-                    this.actionManager = new BABYLON.ActionManager(this);
-                }
-                return this._sceneActionManager;
-            },
-            /**
-             * This scene's action manager
-             * @type {BABYLON.ActionManager}
-            */
-            set: function (value) {
-                this._sceneActionManager = value;
-            },
-            enumerable: true,
-            configurable: true
-        });
         Object.defineProperty(Scene.prototype, "debugLayer", {
             // Properties
             get: function () {

Diferenças do arquivo suprimidas por serem muito extensas
+ 29 - 29
dist/preview release/babylon.noworker.js


+ 0 - 21
src/Mesh/babylon.abstractMesh.js

@@ -171,27 +171,6 @@ var BABYLON;
             enumerable: true,
             configurable: true
         });
-        Object.defineProperty(AbstractMesh.prototype, "actionManager", {
-            /**
-             * This scene's action manager
-             * @type {BABYLON.ActionManager}
-            */
-            get: function () {
-                if (!this._actionManager) {
-                    this.actionManager = new BABYLON.ActionManager(this.getScene());
-                }
-                return this._actionManager;
-            },
-            /**
-             * This scene's action manager
-             * @type {BABYLON.ActionManager}
-            */
-            set: function (value) {
-                this._actionManager = value;
-            },
-            enumerable: true,
-            configurable: true
-        });
         Object.defineProperty(AbstractMesh.prototype, "skeleton", {
             get: function () {
                 return this._skeleton;

+ 1 - 16
src/Mesh/babylon.abstractMesh.ts

@@ -116,26 +116,11 @@
 
         public alwaysSelectAsActiveMesh = false;
 
-        // Actions
-        private _actionManager: ActionManager;
         /**
          * This scene's action manager
          * @type {BABYLON.ActionManager}
         */
-        public get actionManager(): ActionManager {
-            if (!this._actionManager) {
-                this.actionManager = new ActionManager(this.getScene());
-            }
-
-            return this._actionManager;
-        }
-        /**
-         * This scene's action manager
-         * @type {BABYLON.ActionManager}
-        */
-        public set actionManager(value: ActionManager) {
-            this._actionManager = value;
-        }
+        public actionManager: ActionManager;
 
         // Physics
         public physicsImpostor: BABYLON.PhysicsImpostor;

+ 0 - 21
src/babylon.scene.js

@@ -395,27 +395,6 @@ var BABYLON;
             enumerable: true,
             configurable: true
         });
-        Object.defineProperty(Scene.prototype, "actionManager", {
-            /**
-             * This scene's action manager
-             * @type {BABYLON.ActionManager}
-            */
-            get: function () {
-                if (!this._sceneActionManager) {
-                    this.actionManager = new BABYLON.ActionManager(this);
-                }
-                return this._sceneActionManager;
-            },
-            /**
-             * This scene's action manager
-             * @type {BABYLON.ActionManager}
-            */
-            set: function (value) {
-                this._sceneActionManager = value;
-            },
-            enumerable: true,
-            configurable: true
-        });
         Object.defineProperty(Scene.prototype, "debugLayer", {
             // Properties
             get: function () {

+ 2 - 18
src/babylon.scene.ts

@@ -387,28 +387,12 @@
         // Database
         public database; //ANY
 
-        // Actions
-
-        private _sceneActionManager: ActionManager;
-        /**
-         * This scene's action manager
-         * @type {BABYLON.ActionManager}
-        */
-        public get actionManager(): ActionManager {
-            if (!this._sceneActionManager) {
-                this.actionManager = new ActionManager(this);
-            }
-
-            return this._sceneActionManager;
-        }
         /**
          * This scene's action manager
          * @type {BABYLON.ActionManager}
         */
-        public set actionManager(value: ActionManager) {
-            this._sceneActionManager = value;
-        }
-
+        public actionManager: ActionManager;
+     
         public _actionManagers = new Array<ActionManager>();
         private _meshesForIntersections = new SmartArray<AbstractMesh>(256);