David Catuhe 7 năm trước cách đây
mục cha
commit
2c0f41b434
25 tập tin đã thay đổi với 8489 bổ sung7483 xóa
  1. 7485 7205
      dist/preview release/babylon.d.ts
  2. 46 46
      dist/preview release/babylon.js
  3. 270 31
      dist/preview release/babylon.max.js
  4. 47 47
      dist/preview release/babylon.worker.js
  5. 270 31
      dist/preview release/es6.js
  6. 4 4
      dist/preview release/gui/babylon.gui.min.js
  7. 4 4
      dist/preview release/inspector/babylon.inspector.bundle.js
  8. 3 3
      dist/preview release/inspector/babylon.inspector.min.js
  9. 2 2
      dist/preview release/loaders/babylon.glTF1FileLoader.min.js
  10. 2 2
      dist/preview release/loaders/babylon.glTF2FileLoader.min.js
  11. 3 3
      dist/preview release/loaders/babylon.glTFFileLoader.min.js
  12. 1 1
      dist/preview release/loaders/babylon.objFileLoader.min.js
  13. 3 3
      dist/preview release/loaders/babylonjs.loaders.min.js
  14. 1 1
      dist/preview release/materialsLibrary/babylon.customMaterial.min.js
  15. 1 1
      dist/preview release/materialsLibrary/babylon.shadowOnlyMaterial.min.js
  16. 1 1
      dist/preview release/materialsLibrary/babylon.waterMaterial.min.js
  17. 3 3
      dist/preview release/materialsLibrary/babylonjs.materials.min.js
  18. 1 1
      dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.min.js
  19. 1 1
      dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.min.js
  20. 1 1
      dist/preview release/postProcessesLibrary/babylonjs.postProcess.min.js
  21. 1 1
      dist/preview release/serializers/babylon.glTF2Serializer.min.js
  22. 1 1
      dist/preview release/serializers/babylonjs.serializers.min.js
  23. 58 58
      dist/preview release/viewer/babylon.viewer.js
  24. 270 31
      dist/preview release/viewer/babylon.viewer.max.js
  25. 10 1
      src/Cameras/Inputs/babylon.arcRotateCameraMouseWheelInput.ts

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 7485 - 7205
dist/preview release/babylon.d.ts


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 46 - 46
dist/preview release/babylon.js


+ 270 - 31
dist/preview release/babylon.max.js

@@ -16608,7 +16608,7 @@ var BABYLON;
             _this._rotation = BABYLON.Vector3.Zero();
             _this._scaling = BABYLON.Vector3.One();
             _this._isDirty = false;
-            _this.billboardMode = BABYLON.AbstractMesh.BILLBOARDMODE_NONE;
+            _this.billboardMode = TransformNode.BILLBOARDMODE_NONE;
             _this.scalingDeterminant = 1;
             _this.infiniteDistance = false;
             _this.position = BABYLON.Vector3.Zero();
@@ -16748,7 +16748,7 @@ var BABYLON;
         });
         /**
          * Copies the paramater passed Matrix into the mesh Pose matrix.
-         * Returns the AbstractMesh.
+         * Returns the TransformNode.
          */
         TransformNode.prototype.updatePoseMatrix = function (matrix) {
             this._poseMatrix.copyFrom(matrix);
@@ -16765,7 +16765,7 @@ var BABYLON;
             if (this._isDirty) {
                 return false;
             }
-            if (this.billboardMode !== this._cache.billboardMode || this.billboardMode !== BABYLON.AbstractMesh.BILLBOARDMODE_NONE)
+            if (this.billboardMode !== this._cache.billboardMode || this.billboardMode !== TransformNode.BILLBOARDMODE_NONE)
                 return false;
             if (this._cache.pivotMatrixUpdated) {
                 return false;
@@ -16852,7 +16852,7 @@ var BABYLON;
         };
         /**
          * Prevents the World matrix to be computed any longer.
-         * Returns the AbstractMesh.
+         * Returns the TransformNode.
          */
         TransformNode.prototype.freezeWorldMatrix = function () {
             this._isWorldMatrixFrozen = false; // no guarantee world is not already frozen, switch off temporarily
@@ -16862,7 +16862,7 @@ var BABYLON;
         };
         /**
          * Allows back the World matrix computation.
-         * Returns the AbstractMesh.
+         * Returns the TransformNode.
          */
         TransformNode.prototype.unfreezeWorldMatrix = function () {
             this._isWorldMatrixFrozen = false;
@@ -16890,7 +16890,7 @@ var BABYLON;
         };
         /**
          * Sets the mesh absolute position in the World from a Vector3 or an Array(3).
-         * Returns the AbstractMesh.
+         * Returns the TransformNode.
          */
         TransformNode.prototype.setAbsolutePosition = function (absolutePosition) {
             if (!absolutePosition) {
@@ -16927,7 +16927,7 @@ var BABYLON;
         };
         /**
            * Sets the mesh position in its local space.
-           * Returns the AbstractMesh.
+           * Returns the TransformNode.
            */
         TransformNode.prototype.setPositionWithLocalVector = function (vector3) {
             this.computeWorldMatrix();
@@ -16946,7 +16946,7 @@ var BABYLON;
         };
         /**
          * Translates the mesh along the passed Vector3 in its local space.
-         * Returns the AbstractMesh.
+         * Returns the TransformNode.
          */
         TransformNode.prototype.locallyTranslate = function (vector3) {
             this.computeWorldMatrix(true);
@@ -16967,7 +16967,7 @@ var BABYLON;
             if (pitchCor === void 0) { pitchCor = 0; }
             if (rollCor === void 0) { rollCor = 0; }
             if (space === void 0) { space = BABYLON.Space.LOCAL; }
-            var dv = BABYLON.AbstractMesh._lookAtVectorCache;
+            var dv = TransformNode._lookAtVectorCache;
             var pos = space === BABYLON.Space.LOCAL ? this.position : this.getAbsolutePosition();
             targetPoint.subtractToRef(pos, dv);
             var yaw = -Math.atan2(dv.z, dv.x) - Math.PI / 2;
@@ -16996,7 +16996,7 @@ var BABYLON;
          * Sets the Vector3 "result" as the rotated Vector3 "localAxis" in the same rotation than the mesh.
          * localAxis is expressed in the mesh local space.
          * result is computed in the Wordl space from the mesh World matrix.
-         * Returns the AbstractMesh.
+         * Returns the TransformNode.
          */
         TransformNode.prototype.getDirectionToRef = function (localAxis, result) {
             BABYLON.Vector3.TransformNormalToRef(localAxis, this.getWorldMatrix(), result);
@@ -17031,7 +17031,7 @@ var BABYLON;
         };
         /**
          * Sets the passed Vector3 "result" with the coordinates of the mesh pivot point in the local space.
-         * Returns the AbstractMesh.
+         * Returns the TransformNode.
          */
         TransformNode.prototype.getPivotPointToRef = function (result) {
             result.x = -this._pivotMatrix.m[12];
@@ -17049,7 +17049,7 @@ var BABYLON;
         };
         /**
          * Sets the Vector3 "result" coordinates with the mesh pivot point World coordinates.
-         * Returns the AbstractMesh.
+         * Returns the TransformNode.
          */
         TransformNode.prototype.getAbsolutePivotPointToRef = function (result) {
             result.x = this._pivotMatrix.m[12];
@@ -17157,7 +17157,7 @@ var BABYLON;
          * space (default LOCAL) can be either BABYLON.Space.LOCAL, either BABYLON.Space.WORLD.
          * Note that the property `rotationQuaternion` is then automatically updated and the property `rotation` is set to (0,0,0) and no longer used.
          * The passed axis is also normalized.
-         * Returns the AbstractMesh.
+         * Returns the TransformNode.
          */
         TransformNode.prototype.rotate = function (axis, amount, space) {
             axis.normalize();
@@ -17167,7 +17167,7 @@ var BABYLON;
             }
             var rotationQuaternion;
             if (!space || space === BABYLON.Space.LOCAL) {
-                rotationQuaternion = BABYLON.Quaternion.RotationAxisToRef(axis, amount, BABYLON.AbstractMesh._rotationAxisCache);
+                rotationQuaternion = BABYLON.Quaternion.RotationAxisToRef(axis, amount, TransformNode._rotationAxisCache);
                 this.rotationQuaternion.multiplyToRef(rotationQuaternion, this.rotationQuaternion);
             }
             else {
@@ -17176,7 +17176,7 @@ var BABYLON;
                     invertParentWorldMatrix.invert();
                     axis = BABYLON.Vector3.TransformNormal(axis, invertParentWorldMatrix);
                 }
-                rotationQuaternion = BABYLON.Quaternion.RotationAxisToRef(axis, amount, BABYLON.AbstractMesh._rotationAxisCache);
+                rotationQuaternion = BABYLON.Quaternion.RotationAxisToRef(axis, amount, TransformNode._rotationAxisCache);
                 rotationQuaternion.multiplyToRef(this.rotationQuaternion, this.rotationQuaternion);
             }
             return this;
@@ -17185,7 +17185,7 @@ var BABYLON;
          * Rotates the mesh around the axis vector for the passed angle (amount) expressed in radians, in world space.
          * Note that the property `rotationQuaternion` is then automatically updated and the property `rotation` is set to (0,0,0) and no longer used.
          * The passed axis is also normalized.
-         * Returns the AbstractMesh.
+         * Returns the TransformNode.
          * Method is based on http://www.euclideanspace.com/maths/geometry/affine/aroundPoint/index.htm
          */
         TransformNode.prototype.rotateAround = function (point, axis, amount) {
@@ -17208,7 +17208,7 @@ var BABYLON;
         /**
          * Translates the mesh along the axis vector for the passed distance in the given space.
          * space (default LOCAL) can be either BABYLON.Space.LOCAL, either BABYLON.Space.WORLD.
-         * Returns the AbstractMesh.
+         * Returns the TransformNode.
          */
         TransformNode.prototype.translate = function (axis, distance, space) {
             var displacementVector = axis.scale(distance);
@@ -17233,7 +17233,7 @@ var BABYLON;
          * ```
          * Note that `addRotation()` accumulates the passed rotation values to the current ones and computes the .rotation or .rotationQuaternion updated values.
          * Under the hood, only quaternions are used. So it's a little faster is you use .rotationQuaternion because it doesn't need to translate them back to Euler angles.
-         * Returns the AbstractMesh.
+         * Returns the TransformNode.
          */
         TransformNode.prototype.addRotation = function (x, y, z) {
             var rotationQuaternion;
@@ -17307,8 +17307,8 @@ var BABYLON;
             this._pivotMatrix.multiplyToRef(BABYLON.Tmp.Matrix[1], BABYLON.Tmp.Matrix[4]);
             BABYLON.Tmp.Matrix[4].multiplyToRef(BABYLON.Tmp.Matrix[0], BABYLON.Tmp.Matrix[5]);
             // Billboarding (testing PG:http://www.babylonjs-playground.com/#UJEIL#13)
-            if (this.billboardMode !== BABYLON.AbstractMesh.BILLBOARDMODE_NONE && camera) {
-                if ((this.billboardMode & BABYLON.AbstractMesh.BILLBOARDMODE_ALL) !== BABYLON.AbstractMesh.BILLBOARDMODE_ALL) {
+            if (this.billboardMode !== TransformNode.BILLBOARDMODE_NONE && camera) {
+                if ((this.billboardMode & TransformNode.BILLBOARDMODE_ALL) !== TransformNode.BILLBOARDMODE_ALL) {
                     // Need to decompose each rotation here
                     var currentPosition = BABYLON.Tmp.Vector3[3];
                     if (this.parent && this.parent.getWorldMatrix) {
@@ -17325,13 +17325,13 @@ var BABYLON;
                     }
                     currentPosition.subtractInPlace(camera.globalPosition);
                     var finalEuler = BABYLON.Tmp.Vector3[4].copyFromFloats(0, 0, 0);
-                    if ((this.billboardMode & BABYLON.AbstractMesh.BILLBOARDMODE_X) === BABYLON.AbstractMesh.BILLBOARDMODE_X) {
+                    if ((this.billboardMode & TransformNode.BILLBOARDMODE_X) === TransformNode.BILLBOARDMODE_X) {
                         finalEuler.x = Math.atan2(-currentPosition.y, currentPosition.z);
                     }
-                    if ((this.billboardMode & BABYLON.AbstractMesh.BILLBOARDMODE_Y) === BABYLON.AbstractMesh.BILLBOARDMODE_Y) {
+                    if ((this.billboardMode & TransformNode.BILLBOARDMODE_Y) === TransformNode.BILLBOARDMODE_Y) {
                         finalEuler.y = Math.atan2(currentPosition.x, currentPosition.z);
                     }
-                    if ((this.billboardMode & BABYLON.AbstractMesh.BILLBOARDMODE_Z) === BABYLON.AbstractMesh.BILLBOARDMODE_Z) {
+                    if ((this.billboardMode & TransformNode.BILLBOARDMODE_Z) === TransformNode.BILLBOARDMODE_Z) {
                         finalEuler.z = Math.atan2(currentPosition.y, currentPosition.x);
                     }
                     BABYLON.Matrix.RotationYawPitchRollToRef(finalEuler.y, finalEuler.x, finalEuler.z, BABYLON.Tmp.Matrix[0]);
@@ -17348,7 +17348,7 @@ var BABYLON;
             BABYLON.Tmp.Matrix[5].multiplyToRef(BABYLON.Tmp.Matrix[2], this._localWorld);
             // Parent
             if (this.parent && this.parent.getWorldMatrix) {
-                if (this.billboardMode !== BABYLON.AbstractMesh.BILLBOARDMODE_NONE) {
+                if (this.billboardMode !== TransformNode.BILLBOARDMODE_NONE) {
                     if (this._transformToBoneReferal) {
                         this.parent.getWorldMatrix().multiplyToRef(this._transformToBoneReferal.getWorldMatrix(), BABYLON.Tmp.Matrix[6]);
                         BABYLON.Tmp.Matrix[5].copyFrom(BABYLON.Tmp.Matrix[6]);
@@ -31790,6 +31790,21 @@ var BABYLON;
             },
             /**
              * Sets the value of the alpha mode.
+             *
+             * | Value | Type | Description |
+             * | --- | --- | --- |
+             * | 0 | ALPHA_DISABLE |   |
+             * | 1 | ALPHA_ADD |   |
+             * | 2 | ALPHA_COMBINE |   |
+             * | 3 | ALPHA_SUBTRACT |   |
+             * | 4 | ALPHA_MULTIPLY |   |
+             * | 5 | ALPHA_MAXIMIZED |   |
+             * | 6 | ALPHA_ONEONE |   |
+             * | 7 | ALPHA_PREMULTIPLIED |   |
+             * | 8 | ALPHA_PREMULTIPLIED_PORTERDUFF |   |
+             * | 9 | ALPHA_INTERPOLATE |   |
+             * | 10 | ALPHA_SCREENMODE |   |
+             *
              */
             set: function (value) {
                 if (this._alphaMode === value) {
@@ -44817,7 +44832,18 @@ var BABYLON;
                 var event = p.event;
                 var delta = 0;
                 if (event.wheelDelta) {
-                    delta = _this.wheelDeltaPercentage ? (event.wheelDelta * 0.01) * _this.camera.radius * _this.wheelDeltaPercentage : event.wheelDelta / (_this.wheelPrecision * 40);
+                    if (_this.wheelDeltaPercentage) {
+                        var wheelDelta = (event.wheelDelta * 0.01 * _this.wheelDeltaPercentage) * _this.camera.radius;
+                        if (event.wheelDelta > 0) {
+                            delta = wheelDelta / (1.0 + _this.wheelDeltaPercentage);
+                        }
+                        else {
+                            delta = wheelDelta * (1.0 + _this.wheelDeltaPercentage);
+                        }
+                    }
+                    else {
+                        delta = event.wheelDelta / (_this.wheelPrecision * 40);
+                    }
                 }
                 else if (event.detail) {
                     delta = -event.detail / _this.wheelPrecision;
@@ -49009,21 +49035,46 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /**
+     * A Condition applied to an Action
+     */
     var Condition = /** @class */ (function () {
+        /**
+         * Creates a new Condition
+         * @param actionManager the manager of the action the condition is applied to
+         */
         function Condition(actionManager) {
             this._actionManager = actionManager;
         }
+        /**
+         * Check if the current condition is valid
+         */
         Condition.prototype.isValid = function () {
             return true;
         };
+        /**
+         * Internal only
+         * @ignore
+         */
         Condition.prototype._getProperty = function (propertyPath) {
             return this._actionManager._getProperty(propertyPath);
         };
+        /**
+         * Internal only
+         * @ignore
+         */
         Condition.prototype._getEffectiveTarget = function (target, propertyPath) {
             return this._actionManager._getEffectiveTarget(target, propertyPath);
         };
+        /**
+         * Serialize placeholder for child classes
+         */
         Condition.prototype.serialize = function () {
         };
+        /**
+         * Internal only
+         * @ignore
+         */
         Condition.prototype._serialize = function (serializedCondition) {
             return {
                 type: 2,
@@ -49035,8 +49086,19 @@ var BABYLON;
         return Condition;
     }());
     BABYLON.Condition = Condition;
+    /**
+     * Defines specific conditional operators as extensions of Condition
+     */
     var ValueCondition = /** @class */ (function (_super) {
         __extends(ValueCondition, _super);
+        /**
+         * Creates a new ValueCondition
+         * @param actionManager manager for the action the condition applies to
+         * @param target for the action
+         * @param propertyPath path to specify the property of the target the conditional operator uses
+         * @param value the vale compared by the conditional operator against the current value of the property
+         * @param operator the conditional operator, default {BABYLON.ValueCondition.IsEqual}
+         */
         function ValueCondition(actionManager, target, propertyPath, value, operator) {
             if (operator === void 0) { operator = ValueCondition.IsEqual; }
             var _this = _super.call(this, actionManager) || this;
@@ -49049,6 +49111,9 @@ var BABYLON;
             return _this;
         }
         Object.defineProperty(ValueCondition, "IsEqual", {
+            /**
+             * @returns the number for IsEqual
+             */
             get: function () {
                 return ValueCondition._IsEqual;
             },
@@ -49056,6 +49121,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ValueCondition, "IsDifferent", {
+            /**
+             * @returns the number for IsDifferent
+             */
             get: function () {
                 return ValueCondition._IsDifferent;
             },
@@ -49063,6 +49131,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ValueCondition, "IsGreater", {
+            /**
+             * @returns the number for IsGreater
+             */
             get: function () {
                 return ValueCondition._IsGreater;
             },
@@ -49070,13 +49141,19 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ValueCondition, "IsLesser", {
+            /**
+             * @returns the number for IsLesser
+             */
             get: function () {
                 return ValueCondition._IsLesser;
             },
             enumerable: true,
             configurable: true
         });
-        // Methods
+        /**
+         * Compares the given value with the property value for the specified conditional operator
+         * @returns the result of the comparison
+         */
         ValueCondition.prototype.isValid = function () {
             switch (this.operator) {
                 case ValueCondition.IsGreater:
@@ -49096,6 +49173,10 @@ var BABYLON;
             }
             return false;
         };
+        /**
+         * Serialize the ValueCondition into a JSON compatible object
+         * @returns serialization object
+         */
         ValueCondition.prototype.serialize = function () {
             return this._serialize({
                 name: "ValueCondition",
@@ -49107,6 +49188,11 @@ var BABYLON;
                 ]
             });
         };
+        /**
+         * Gets the name of the conditional operator for the ValueCondition
+         * @param operator the conditional operator
+         * @returns the name
+         */
         ValueCondition.GetOperatorName = function (operator) {
             switch (operator) {
                 case ValueCondition._IsEqual: return "IsEqual";
@@ -49116,39 +49202,80 @@ var BABYLON;
                 default: return "";
             }
         };
-        // Statics
+        /**
+         * Internal only
+         * @ignore
+         */
         ValueCondition._IsEqual = 0;
+        /**
+         * Internal only
+         * @ignore
+         */
         ValueCondition._IsDifferent = 1;
+        /**
+         * Internal only
+         * @ignore
+         */
         ValueCondition._IsGreater = 2;
+        /**
+         * Internal only
+         * @ignore
+         */
         ValueCondition._IsLesser = 3;
         return ValueCondition;
     }(Condition));
     BABYLON.ValueCondition = ValueCondition;
+    /**
+     * Defines a predicate condition as an extension of Condition
+     */
     var PredicateCondition = /** @class */ (function (_super) {
         __extends(PredicateCondition, _super);
+        /**
+         * Creates a new {BABYLON.PredicateCondition}
+         * @param actionManager manager for the action the condition applies to
+         * @param predicate
+         */
         function PredicateCondition(actionManager, predicate) {
             var _this = _super.call(this, actionManager) || this;
             _this.predicate = predicate;
             return _this;
         }
+        /**
+         * @returns the validity of the predicate condition
+         */
         PredicateCondition.prototype.isValid = function () {
             return this.predicate();
         };
         return PredicateCondition;
     }(Condition));
     BABYLON.PredicateCondition = PredicateCondition;
+    /**
+     * Defines a state condition as an extension of {BABYLON.Condition}
+     */
     var StateCondition = /** @class */ (function (_super) {
         __extends(StateCondition, _super);
+        /**
+         * Creates a new {BABYLON.StateCondition}
+         * @param actionManager manager for the action the condition applies to
+         * @param target of the condition
+         * @param value to compare with target state
+         */
         function StateCondition(actionManager, target, value) {
             var _this = _super.call(this, actionManager) || this;
             _this.value = value;
             _this._target = target;
             return _this;
         }
-        // Methods
+        /**
+         * @returns the validity of the state
+         */
         StateCondition.prototype.isValid = function () {
             return this._target.state === this.value;
         };
+        /**
+         * Serialize the {BABYLON.StateCondition} into a JSON compatible object
+         * @returns serialization object
+         */
         StateCondition.prototype.serialize = function () {
             return this._serialize({
                 name: "StateCondition",
@@ -49168,9 +49295,22 @@ var BABYLON;
 "use strict";
 var BABYLON;
 (function (BABYLON) {
+    /**
+     * The action to be carried out following a trigger
+     * @see http://doc.babylonjs.com/how_to/how_to_use_actions#available-actions
+     */
     var Action = /** @class */ (function () {
+        /**
+         * Creates a new Action
+         * @param triggerOptions the trigger, with or without parameters, for the action
+         * @param condition an optional determinant of action
+         */
         function Action(triggerOptions, condition) {
             this.triggerOptions = triggerOptions;
+            /**
+            * An event triggered prior to action being executed.
+            * @type Observable
+            */
             this.onBeforeExecuteObservable = new BABYLON.Observable();
             if (triggerOptions.parameter) {
                 this.trigger = triggerOptions.trigger;
@@ -49182,12 +49322,23 @@ var BABYLON;
             this._nextActiveAction = this;
             this._condition = condition;
         }
-        // Methods
+        /**
+         * Internal only
+         * @ignore
+         */
         Action.prototype._prepare = function () {
         };
+        /**
+         * Gets the trigger parameters
+         * @returns the trigger parameters
+         */
         Action.prototype.getTriggerParameter = function () {
             return this._triggerParameter;
         };
+        /**
+         * Internal only - executes current action event
+         * @ignore
+         */
         Action.prototype._executeCurrent = function (evt) {
             if (this._nextActiveAction._condition) {
                 var condition = this._nextActiveAction._condition;
@@ -49211,8 +49362,15 @@ var BABYLON;
             this._nextActiveAction.execute(evt);
             this.skipToNextActiveAction();
         };
+        /**
+         * Execute placeholder for child classes
+         * @param evt optional action event
+         */
         Action.prototype.execute = function (evt) {
         };
+        /**
+         * Skips to next active action
+         */
         Action.prototype.skipToNextActiveAction = function () {
             if (this._nextActiveAction._child) {
                 if (!this._nextActiveAction._child._actionManager) {
@@ -49224,21 +49382,42 @@ var BABYLON;
                 this._nextActiveAction = this;
             }
         };
+        /**
+         * Adds action to chain of actions, may be a DoNothingAction
+         * @param index The index of the attribute.
+         * @returns The action passed in
+         * @see https://www.babylonjs-playground.com/#1T30HR#0
+         */
         Action.prototype.then = function (action) {
             this._child = action;
             action._actionManager = this._actionManager;
             action._prepare();
             return action;
         };
+        /**
+         * Internal only
+         * @ignore
+         */
         Action.prototype._getProperty = function (propertyPath) {
             return this._actionManager._getProperty(propertyPath);
         };
+        /**
+         * Internal only
+         * @ignore
+         */
         Action.prototype._getEffectiveTarget = function (target, propertyPath) {
             return this._actionManager._getEffectiveTarget(target, propertyPath);
         };
+        /**
+         * Serialize placeholder for child classes
+         * @param parent of child
+         */
         Action.prototype.serialize = function (parent) {
         };
-        // Called by BABYLON.Action objects in serialize(...). Internal use
+        /**
+         * Internal only called by serialize
+         * @ignore
+         */
         Action.prototype._serialize = function (serializedAction, parent) {
             var serializationObject = {
                 type: 1,
@@ -49264,6 +49443,10 @@ var BABYLON;
             }
             return serializationObject;
         };
+        /**
+         * Internal only
+         * @ignore
+         */
         Action._SerializeValueAsString = function (value) {
             if (typeof value === "number") {
                 return value.toString();
@@ -49285,6 +49468,10 @@ var BABYLON;
             }
             return value; // string
         };
+        /**
+         * Internal only
+         * @ignore
+         */
         Action._GetTargetProperty = function (target) {
             return {
                 name: "target",
@@ -49306,7 +49493,7 @@ var BABYLON;
 var BABYLON;
 (function (BABYLON) {
     /**
-     * ActionEvent is the event beint sent when an action is triggered.
+     * ActionEvent is the event being sent when an action is triggered.
      */
     var ActionEvent = /** @class */ (function () {
         /**
@@ -60351,8 +60538,21 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /**
+     * A class extending {BABYLON.Texture} allowing drawing on a texture
+     * @see http://doc.babylonjs.com/how_to/dynamictexture
+     */
     var DynamicTexture = /** @class */ (function (_super) {
         __extends(DynamicTexture, _super);
+        /**
+         * Creates a {BABYLON.DynamicTexture}
+         * @param name defines the name of the texture
+         * @param options provides 3 alternatives for width and height of texture, a canvas, object with width and height properties, number for both width and height
+         * @param scene defines the scene where you want the texture
+         * @param generateMipMaps defines the use of MinMaps or not (default is false)
+         * @param samplingMode defines the sampling mode to use (default is BABYLON.Texture.TRILINEAR_SAMPLINGMODE)
+         * @param format defines the texture format to use (default is BABYLON.Engine.TEXTUREFORMAT_RGBA)
+         */
         function DynamicTexture(name, options, scene, generateMipMaps, samplingMode, format) {
             if (scene === void 0) { scene = null; }
             if (samplingMode === void 0) { samplingMode = BABYLON.Texture.TRILINEAR_SAMPLINGMODE; }
@@ -60383,6 +60583,9 @@ var BABYLON;
             return _this;
         }
         Object.defineProperty(DynamicTexture.prototype, "canRescale", {
+            /**
+             * Gets the current state of canRescale
+             */
             get: function () {
                 return true;
             },
@@ -60395,28 +60598,59 @@ var BABYLON;
             this.releaseInternalTexture();
             this._texture = this._engine.createDynamicTexture(textureSize.width, textureSize.height, this._generateMipMaps, this._samplingMode);
         };
+        /**
+         * Scales the texture
+         * @param ratio the scale factor to apply to both width and height
+         */
         DynamicTexture.prototype.scale = function (ratio) {
             var textureSize = this.getSize();
             textureSize.width *= ratio;
             textureSize.height *= ratio;
             this._recreate(textureSize);
         };
+        /**
+         * Resizes the texture
+         * @param width the new width
+         * @param height the new height
+         */
         DynamicTexture.prototype.scaleTo = function (width, height) {
             var textureSize = this.getSize();
             textureSize.width = width;
             textureSize.height = height;
             this._recreate(textureSize);
         };
+        /**
+         * Gets the context of the canvas used by the texture
+         * @returns the canvas context of the dynamic texture
+         */
         DynamicTexture.prototype.getContext = function () {
             return this._context;
         };
+        /**
+         * Clears the texture
+         */
         DynamicTexture.prototype.clear = function () {
             var size = this.getSize();
             this._context.fillRect(0, 0, size.width, size.height);
         };
+        /**
+         * Updates the texture
+         * @param invertY defines the direction for the Y axis (default is true - y increases downwards)
+         */
         DynamicTexture.prototype.update = function (invertY) {
             this._engine.updateDynamicTexture(this._texture, this._canvas, invertY === undefined ? true : invertY, undefined, this._format || undefined);
         };
+        /**
+         * Draws text onto the texture
+         * @param text defines the text to be drawn
+         * @param x defines the placement of the text from the left
+         * @param y defines the placement of the text from the top when invertY is true and from the bottom when false
+         * @param font defines the font to be used with font-style, font-size, font-name
+         * @param color defines the color used for the text
+         * @param clearColor defines the color for the canvas, use null to not overwrite canvas
+         * @param invertY defines the direction for the Y axis (default is true - y increases downwards)
+         * @param update defines whether texture is immediately update (default is true)
+         */
         DynamicTexture.prototype.drawText = function (text, x, y, font, color, clearColor, invertY, update) {
             if (update === void 0) { update = true; }
             var size = this.getSize();
@@ -60440,6 +60674,10 @@ var BABYLON;
                 this.update(invertY);
             }
         };
+        /**
+         * Clones the texture
+         * @returns the clone of the texture.
+         */
         DynamicTexture.prototype.clone = function () {
             var scene = this.getScene();
             if (!scene) {
@@ -60455,6 +60693,7 @@ var BABYLON;
             newTexture.wrapV = this.wrapV;
             return newTexture;
         };
+        /** @ignore */
         DynamicTexture.prototype._rebuild = function () {
             this.update();
         };

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 47 - 47
dist/preview release/babylon.worker.js


+ 270 - 31
dist/preview release/es6.js

@@ -16580,7 +16580,7 @@ var BABYLON;
             _this._rotation = BABYLON.Vector3.Zero();
             _this._scaling = BABYLON.Vector3.One();
             _this._isDirty = false;
-            _this.billboardMode = BABYLON.AbstractMesh.BILLBOARDMODE_NONE;
+            _this.billboardMode = TransformNode.BILLBOARDMODE_NONE;
             _this.scalingDeterminant = 1;
             _this.infiniteDistance = false;
             _this.position = BABYLON.Vector3.Zero();
@@ -16720,7 +16720,7 @@ var BABYLON;
         });
         /**
          * Copies the paramater passed Matrix into the mesh Pose matrix.
-         * Returns the AbstractMesh.
+         * Returns the TransformNode.
          */
         TransformNode.prototype.updatePoseMatrix = function (matrix) {
             this._poseMatrix.copyFrom(matrix);
@@ -16737,7 +16737,7 @@ var BABYLON;
             if (this._isDirty) {
                 return false;
             }
-            if (this.billboardMode !== this._cache.billboardMode || this.billboardMode !== BABYLON.AbstractMesh.BILLBOARDMODE_NONE)
+            if (this.billboardMode !== this._cache.billboardMode || this.billboardMode !== TransformNode.BILLBOARDMODE_NONE)
                 return false;
             if (this._cache.pivotMatrixUpdated) {
                 return false;
@@ -16824,7 +16824,7 @@ var BABYLON;
         };
         /**
          * Prevents the World matrix to be computed any longer.
-         * Returns the AbstractMesh.
+         * Returns the TransformNode.
          */
         TransformNode.prototype.freezeWorldMatrix = function () {
             this._isWorldMatrixFrozen = false; // no guarantee world is not already frozen, switch off temporarily
@@ -16834,7 +16834,7 @@ var BABYLON;
         };
         /**
          * Allows back the World matrix computation.
-         * Returns the AbstractMesh.
+         * Returns the TransformNode.
          */
         TransformNode.prototype.unfreezeWorldMatrix = function () {
             this._isWorldMatrixFrozen = false;
@@ -16862,7 +16862,7 @@ var BABYLON;
         };
         /**
          * Sets the mesh absolute position in the World from a Vector3 or an Array(3).
-         * Returns the AbstractMesh.
+         * Returns the TransformNode.
          */
         TransformNode.prototype.setAbsolutePosition = function (absolutePosition) {
             if (!absolutePosition) {
@@ -16899,7 +16899,7 @@ var BABYLON;
         };
         /**
            * Sets the mesh position in its local space.
-           * Returns the AbstractMesh.
+           * Returns the TransformNode.
            */
         TransformNode.prototype.setPositionWithLocalVector = function (vector3) {
             this.computeWorldMatrix();
@@ -16918,7 +16918,7 @@ var BABYLON;
         };
         /**
          * Translates the mesh along the passed Vector3 in its local space.
-         * Returns the AbstractMesh.
+         * Returns the TransformNode.
          */
         TransformNode.prototype.locallyTranslate = function (vector3) {
             this.computeWorldMatrix(true);
@@ -16939,7 +16939,7 @@ var BABYLON;
             if (pitchCor === void 0) { pitchCor = 0; }
             if (rollCor === void 0) { rollCor = 0; }
             if (space === void 0) { space = BABYLON.Space.LOCAL; }
-            var dv = BABYLON.AbstractMesh._lookAtVectorCache;
+            var dv = TransformNode._lookAtVectorCache;
             var pos = space === BABYLON.Space.LOCAL ? this.position : this.getAbsolutePosition();
             targetPoint.subtractToRef(pos, dv);
             var yaw = -Math.atan2(dv.z, dv.x) - Math.PI / 2;
@@ -16968,7 +16968,7 @@ var BABYLON;
          * Sets the Vector3 "result" as the rotated Vector3 "localAxis" in the same rotation than the mesh.
          * localAxis is expressed in the mesh local space.
          * result is computed in the Wordl space from the mesh World matrix.
-         * Returns the AbstractMesh.
+         * Returns the TransformNode.
          */
         TransformNode.prototype.getDirectionToRef = function (localAxis, result) {
             BABYLON.Vector3.TransformNormalToRef(localAxis, this.getWorldMatrix(), result);
@@ -17003,7 +17003,7 @@ var BABYLON;
         };
         /**
          * Sets the passed Vector3 "result" with the coordinates of the mesh pivot point in the local space.
-         * Returns the AbstractMesh.
+         * Returns the TransformNode.
          */
         TransformNode.prototype.getPivotPointToRef = function (result) {
             result.x = -this._pivotMatrix.m[12];
@@ -17021,7 +17021,7 @@ var BABYLON;
         };
         /**
          * Sets the Vector3 "result" coordinates with the mesh pivot point World coordinates.
-         * Returns the AbstractMesh.
+         * Returns the TransformNode.
          */
         TransformNode.prototype.getAbsolutePivotPointToRef = function (result) {
             result.x = this._pivotMatrix.m[12];
@@ -17129,7 +17129,7 @@ var BABYLON;
          * space (default LOCAL) can be either BABYLON.Space.LOCAL, either BABYLON.Space.WORLD.
          * Note that the property `rotationQuaternion` is then automatically updated and the property `rotation` is set to (0,0,0) and no longer used.
          * The passed axis is also normalized.
-         * Returns the AbstractMesh.
+         * Returns the TransformNode.
          */
         TransformNode.prototype.rotate = function (axis, amount, space) {
             axis.normalize();
@@ -17139,7 +17139,7 @@ var BABYLON;
             }
             var rotationQuaternion;
             if (!space || space === BABYLON.Space.LOCAL) {
-                rotationQuaternion = BABYLON.Quaternion.RotationAxisToRef(axis, amount, BABYLON.AbstractMesh._rotationAxisCache);
+                rotationQuaternion = BABYLON.Quaternion.RotationAxisToRef(axis, amount, TransformNode._rotationAxisCache);
                 this.rotationQuaternion.multiplyToRef(rotationQuaternion, this.rotationQuaternion);
             }
             else {
@@ -17148,7 +17148,7 @@ var BABYLON;
                     invertParentWorldMatrix.invert();
                     axis = BABYLON.Vector3.TransformNormal(axis, invertParentWorldMatrix);
                 }
-                rotationQuaternion = BABYLON.Quaternion.RotationAxisToRef(axis, amount, BABYLON.AbstractMesh._rotationAxisCache);
+                rotationQuaternion = BABYLON.Quaternion.RotationAxisToRef(axis, amount, TransformNode._rotationAxisCache);
                 rotationQuaternion.multiplyToRef(this.rotationQuaternion, this.rotationQuaternion);
             }
             return this;
@@ -17157,7 +17157,7 @@ var BABYLON;
          * Rotates the mesh around the axis vector for the passed angle (amount) expressed in radians, in world space.
          * Note that the property `rotationQuaternion` is then automatically updated and the property `rotation` is set to (0,0,0) and no longer used.
          * The passed axis is also normalized.
-         * Returns the AbstractMesh.
+         * Returns the TransformNode.
          * Method is based on http://www.euclideanspace.com/maths/geometry/affine/aroundPoint/index.htm
          */
         TransformNode.prototype.rotateAround = function (point, axis, amount) {
@@ -17180,7 +17180,7 @@ var BABYLON;
         /**
          * Translates the mesh along the axis vector for the passed distance in the given space.
          * space (default LOCAL) can be either BABYLON.Space.LOCAL, either BABYLON.Space.WORLD.
-         * Returns the AbstractMesh.
+         * Returns the TransformNode.
          */
         TransformNode.prototype.translate = function (axis, distance, space) {
             var displacementVector = axis.scale(distance);
@@ -17205,7 +17205,7 @@ var BABYLON;
          * ```
          * Note that `addRotation()` accumulates the passed rotation values to the current ones and computes the .rotation or .rotationQuaternion updated values.
          * Under the hood, only quaternions are used. So it's a little faster is you use .rotationQuaternion because it doesn't need to translate them back to Euler angles.
-         * Returns the AbstractMesh.
+         * Returns the TransformNode.
          */
         TransformNode.prototype.addRotation = function (x, y, z) {
             var rotationQuaternion;
@@ -17279,8 +17279,8 @@ var BABYLON;
             this._pivotMatrix.multiplyToRef(BABYLON.Tmp.Matrix[1], BABYLON.Tmp.Matrix[4]);
             BABYLON.Tmp.Matrix[4].multiplyToRef(BABYLON.Tmp.Matrix[0], BABYLON.Tmp.Matrix[5]);
             // Billboarding (testing PG:http://www.babylonjs-playground.com/#UJEIL#13)
-            if (this.billboardMode !== BABYLON.AbstractMesh.BILLBOARDMODE_NONE && camera) {
-                if ((this.billboardMode & BABYLON.AbstractMesh.BILLBOARDMODE_ALL) !== BABYLON.AbstractMesh.BILLBOARDMODE_ALL) {
+            if (this.billboardMode !== TransformNode.BILLBOARDMODE_NONE && camera) {
+                if ((this.billboardMode & TransformNode.BILLBOARDMODE_ALL) !== TransformNode.BILLBOARDMODE_ALL) {
                     // Need to decompose each rotation here
                     var currentPosition = BABYLON.Tmp.Vector3[3];
                     if (this.parent && this.parent.getWorldMatrix) {
@@ -17297,13 +17297,13 @@ var BABYLON;
                     }
                     currentPosition.subtractInPlace(camera.globalPosition);
                     var finalEuler = BABYLON.Tmp.Vector3[4].copyFromFloats(0, 0, 0);
-                    if ((this.billboardMode & BABYLON.AbstractMesh.BILLBOARDMODE_X) === BABYLON.AbstractMesh.BILLBOARDMODE_X) {
+                    if ((this.billboardMode & TransformNode.BILLBOARDMODE_X) === TransformNode.BILLBOARDMODE_X) {
                         finalEuler.x = Math.atan2(-currentPosition.y, currentPosition.z);
                     }
-                    if ((this.billboardMode & BABYLON.AbstractMesh.BILLBOARDMODE_Y) === BABYLON.AbstractMesh.BILLBOARDMODE_Y) {
+                    if ((this.billboardMode & TransformNode.BILLBOARDMODE_Y) === TransformNode.BILLBOARDMODE_Y) {
                         finalEuler.y = Math.atan2(currentPosition.x, currentPosition.z);
                     }
-                    if ((this.billboardMode & BABYLON.AbstractMesh.BILLBOARDMODE_Z) === BABYLON.AbstractMesh.BILLBOARDMODE_Z) {
+                    if ((this.billboardMode & TransformNode.BILLBOARDMODE_Z) === TransformNode.BILLBOARDMODE_Z) {
                         finalEuler.z = Math.atan2(currentPosition.y, currentPosition.x);
                     }
                     BABYLON.Matrix.RotationYawPitchRollToRef(finalEuler.y, finalEuler.x, finalEuler.z, BABYLON.Tmp.Matrix[0]);
@@ -17320,7 +17320,7 @@ var BABYLON;
             BABYLON.Tmp.Matrix[5].multiplyToRef(BABYLON.Tmp.Matrix[2], this._localWorld);
             // Parent
             if (this.parent && this.parent.getWorldMatrix) {
-                if (this.billboardMode !== BABYLON.AbstractMesh.BILLBOARDMODE_NONE) {
+                if (this.billboardMode !== TransformNode.BILLBOARDMODE_NONE) {
                     if (this._transformToBoneReferal) {
                         this.parent.getWorldMatrix().multiplyToRef(this._transformToBoneReferal.getWorldMatrix(), BABYLON.Tmp.Matrix[6]);
                         BABYLON.Tmp.Matrix[5].copyFrom(BABYLON.Tmp.Matrix[6]);
@@ -31762,6 +31762,21 @@ var BABYLON;
             },
             /**
              * Sets the value of the alpha mode.
+             *
+             * | Value | Type | Description |
+             * | --- | --- | --- |
+             * | 0 | ALPHA_DISABLE |   |
+             * | 1 | ALPHA_ADD |   |
+             * | 2 | ALPHA_COMBINE |   |
+             * | 3 | ALPHA_SUBTRACT |   |
+             * | 4 | ALPHA_MULTIPLY |   |
+             * | 5 | ALPHA_MAXIMIZED |   |
+             * | 6 | ALPHA_ONEONE |   |
+             * | 7 | ALPHA_PREMULTIPLIED |   |
+             * | 8 | ALPHA_PREMULTIPLIED_PORTERDUFF |   |
+             * | 9 | ALPHA_INTERPOLATE |   |
+             * | 10 | ALPHA_SCREENMODE |   |
+             *
              */
             set: function (value) {
                 if (this._alphaMode === value) {
@@ -44789,7 +44804,18 @@ var BABYLON;
                 var event = p.event;
                 var delta = 0;
                 if (event.wheelDelta) {
-                    delta = _this.wheelDeltaPercentage ? (event.wheelDelta * 0.01) * _this.camera.radius * _this.wheelDeltaPercentage : event.wheelDelta / (_this.wheelPrecision * 40);
+                    if (_this.wheelDeltaPercentage) {
+                        var wheelDelta = (event.wheelDelta * 0.01 * _this.wheelDeltaPercentage) * _this.camera.radius;
+                        if (event.wheelDelta > 0) {
+                            delta = wheelDelta / (1.0 + _this.wheelDeltaPercentage);
+                        }
+                        else {
+                            delta = wheelDelta * (1.0 + _this.wheelDeltaPercentage);
+                        }
+                    }
+                    else {
+                        delta = event.wheelDelta / (_this.wheelPrecision * 40);
+                    }
                 }
                 else if (event.detail) {
                     delta = -event.detail / _this.wheelPrecision;
@@ -48981,21 +49007,46 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /**
+     * A Condition applied to an Action
+     */
     var Condition = /** @class */ (function () {
+        /**
+         * Creates a new Condition
+         * @param actionManager the manager of the action the condition is applied to
+         */
         function Condition(actionManager) {
             this._actionManager = actionManager;
         }
+        /**
+         * Check if the current condition is valid
+         */
         Condition.prototype.isValid = function () {
             return true;
         };
+        /**
+         * Internal only
+         * @ignore
+         */
         Condition.prototype._getProperty = function (propertyPath) {
             return this._actionManager._getProperty(propertyPath);
         };
+        /**
+         * Internal only
+         * @ignore
+         */
         Condition.prototype._getEffectiveTarget = function (target, propertyPath) {
             return this._actionManager._getEffectiveTarget(target, propertyPath);
         };
+        /**
+         * Serialize placeholder for child classes
+         */
         Condition.prototype.serialize = function () {
         };
+        /**
+         * Internal only
+         * @ignore
+         */
         Condition.prototype._serialize = function (serializedCondition) {
             return {
                 type: 2,
@@ -49007,8 +49058,19 @@ var BABYLON;
         return Condition;
     }());
     BABYLON.Condition = Condition;
+    /**
+     * Defines specific conditional operators as extensions of Condition
+     */
     var ValueCondition = /** @class */ (function (_super) {
         __extends(ValueCondition, _super);
+        /**
+         * Creates a new ValueCondition
+         * @param actionManager manager for the action the condition applies to
+         * @param target for the action
+         * @param propertyPath path to specify the property of the target the conditional operator uses
+         * @param value the vale compared by the conditional operator against the current value of the property
+         * @param operator the conditional operator, default {BABYLON.ValueCondition.IsEqual}
+         */
         function ValueCondition(actionManager, target, propertyPath, value, operator) {
             if (operator === void 0) { operator = ValueCondition.IsEqual; }
             var _this = _super.call(this, actionManager) || this;
@@ -49021,6 +49083,9 @@ var BABYLON;
             return _this;
         }
         Object.defineProperty(ValueCondition, "IsEqual", {
+            /**
+             * @returns the number for IsEqual
+             */
             get: function () {
                 return ValueCondition._IsEqual;
             },
@@ -49028,6 +49093,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ValueCondition, "IsDifferent", {
+            /**
+             * @returns the number for IsDifferent
+             */
             get: function () {
                 return ValueCondition._IsDifferent;
             },
@@ -49035,6 +49103,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ValueCondition, "IsGreater", {
+            /**
+             * @returns the number for IsGreater
+             */
             get: function () {
                 return ValueCondition._IsGreater;
             },
@@ -49042,13 +49113,19 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ValueCondition, "IsLesser", {
+            /**
+             * @returns the number for IsLesser
+             */
             get: function () {
                 return ValueCondition._IsLesser;
             },
             enumerable: true,
             configurable: true
         });
-        // Methods
+        /**
+         * Compares the given value with the property value for the specified conditional operator
+         * @returns the result of the comparison
+         */
         ValueCondition.prototype.isValid = function () {
             switch (this.operator) {
                 case ValueCondition.IsGreater:
@@ -49068,6 +49145,10 @@ var BABYLON;
             }
             return false;
         };
+        /**
+         * Serialize the ValueCondition into a JSON compatible object
+         * @returns serialization object
+         */
         ValueCondition.prototype.serialize = function () {
             return this._serialize({
                 name: "ValueCondition",
@@ -49079,6 +49160,11 @@ var BABYLON;
                 ]
             });
         };
+        /**
+         * Gets the name of the conditional operator for the ValueCondition
+         * @param operator the conditional operator
+         * @returns the name
+         */
         ValueCondition.GetOperatorName = function (operator) {
             switch (operator) {
                 case ValueCondition._IsEqual: return "IsEqual";
@@ -49088,39 +49174,80 @@ var BABYLON;
                 default: return "";
             }
         };
-        // Statics
+        /**
+         * Internal only
+         * @ignore
+         */
         ValueCondition._IsEqual = 0;
+        /**
+         * Internal only
+         * @ignore
+         */
         ValueCondition._IsDifferent = 1;
+        /**
+         * Internal only
+         * @ignore
+         */
         ValueCondition._IsGreater = 2;
+        /**
+         * Internal only
+         * @ignore
+         */
         ValueCondition._IsLesser = 3;
         return ValueCondition;
     }(Condition));
     BABYLON.ValueCondition = ValueCondition;
+    /**
+     * Defines a predicate condition as an extension of Condition
+     */
     var PredicateCondition = /** @class */ (function (_super) {
         __extends(PredicateCondition, _super);
+        /**
+         * Creates a new {BABYLON.PredicateCondition}
+         * @param actionManager manager for the action the condition applies to
+         * @param predicate
+         */
         function PredicateCondition(actionManager, predicate) {
             var _this = _super.call(this, actionManager) || this;
             _this.predicate = predicate;
             return _this;
         }
+        /**
+         * @returns the validity of the predicate condition
+         */
         PredicateCondition.prototype.isValid = function () {
             return this.predicate();
         };
         return PredicateCondition;
     }(Condition));
     BABYLON.PredicateCondition = PredicateCondition;
+    /**
+     * Defines a state condition as an extension of {BABYLON.Condition}
+     */
     var StateCondition = /** @class */ (function (_super) {
         __extends(StateCondition, _super);
+        /**
+         * Creates a new {BABYLON.StateCondition}
+         * @param actionManager manager for the action the condition applies to
+         * @param target of the condition
+         * @param value to compare with target state
+         */
         function StateCondition(actionManager, target, value) {
             var _this = _super.call(this, actionManager) || this;
             _this.value = value;
             _this._target = target;
             return _this;
         }
-        // Methods
+        /**
+         * @returns the validity of the state
+         */
         StateCondition.prototype.isValid = function () {
             return this._target.state === this.value;
         };
+        /**
+         * Serialize the {BABYLON.StateCondition} into a JSON compatible object
+         * @returns serialization object
+         */
         StateCondition.prototype.serialize = function () {
             return this._serialize({
                 name: "StateCondition",
@@ -49140,9 +49267,22 @@ var BABYLON;
 "use strict";
 var BABYLON;
 (function (BABYLON) {
+    /**
+     * The action to be carried out following a trigger
+     * @see http://doc.babylonjs.com/how_to/how_to_use_actions#available-actions
+     */
     var Action = /** @class */ (function () {
+        /**
+         * Creates a new Action
+         * @param triggerOptions the trigger, with or without parameters, for the action
+         * @param condition an optional determinant of action
+         */
         function Action(triggerOptions, condition) {
             this.triggerOptions = triggerOptions;
+            /**
+            * An event triggered prior to action being executed.
+            * @type Observable
+            */
             this.onBeforeExecuteObservable = new BABYLON.Observable();
             if (triggerOptions.parameter) {
                 this.trigger = triggerOptions.trigger;
@@ -49154,12 +49294,23 @@ var BABYLON;
             this._nextActiveAction = this;
             this._condition = condition;
         }
-        // Methods
+        /**
+         * Internal only
+         * @ignore
+         */
         Action.prototype._prepare = function () {
         };
+        /**
+         * Gets the trigger parameters
+         * @returns the trigger parameters
+         */
         Action.prototype.getTriggerParameter = function () {
             return this._triggerParameter;
         };
+        /**
+         * Internal only - executes current action event
+         * @ignore
+         */
         Action.prototype._executeCurrent = function (evt) {
             if (this._nextActiveAction._condition) {
                 var condition = this._nextActiveAction._condition;
@@ -49183,8 +49334,15 @@ var BABYLON;
             this._nextActiveAction.execute(evt);
             this.skipToNextActiveAction();
         };
+        /**
+         * Execute placeholder for child classes
+         * @param evt optional action event
+         */
         Action.prototype.execute = function (evt) {
         };
+        /**
+         * Skips to next active action
+         */
         Action.prototype.skipToNextActiveAction = function () {
             if (this._nextActiveAction._child) {
                 if (!this._nextActiveAction._child._actionManager) {
@@ -49196,21 +49354,42 @@ var BABYLON;
                 this._nextActiveAction = this;
             }
         };
+        /**
+         * Adds action to chain of actions, may be a DoNothingAction
+         * @param index The index of the attribute.
+         * @returns The action passed in
+         * @see https://www.babylonjs-playground.com/#1T30HR#0
+         */
         Action.prototype.then = function (action) {
             this._child = action;
             action._actionManager = this._actionManager;
             action._prepare();
             return action;
         };
+        /**
+         * Internal only
+         * @ignore
+         */
         Action.prototype._getProperty = function (propertyPath) {
             return this._actionManager._getProperty(propertyPath);
         };
+        /**
+         * Internal only
+         * @ignore
+         */
         Action.prototype._getEffectiveTarget = function (target, propertyPath) {
             return this._actionManager._getEffectiveTarget(target, propertyPath);
         };
+        /**
+         * Serialize placeholder for child classes
+         * @param parent of child
+         */
         Action.prototype.serialize = function (parent) {
         };
-        // Called by BABYLON.Action objects in serialize(...). Internal use
+        /**
+         * Internal only called by serialize
+         * @ignore
+         */
         Action.prototype._serialize = function (serializedAction, parent) {
             var serializationObject = {
                 type: 1,
@@ -49236,6 +49415,10 @@ var BABYLON;
             }
             return serializationObject;
         };
+        /**
+         * Internal only
+         * @ignore
+         */
         Action._SerializeValueAsString = function (value) {
             if (typeof value === "number") {
                 return value.toString();
@@ -49257,6 +49440,10 @@ var BABYLON;
             }
             return value; // string
         };
+        /**
+         * Internal only
+         * @ignore
+         */
         Action._GetTargetProperty = function (target) {
             return {
                 name: "target",
@@ -49278,7 +49465,7 @@ var BABYLON;
 var BABYLON;
 (function (BABYLON) {
     /**
-     * ActionEvent is the event beint sent when an action is triggered.
+     * ActionEvent is the event being sent when an action is triggered.
      */
     var ActionEvent = /** @class */ (function () {
         /**
@@ -60323,8 +60510,21 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /**
+     * A class extending {BABYLON.Texture} allowing drawing on a texture
+     * @see http://doc.babylonjs.com/how_to/dynamictexture
+     */
     var DynamicTexture = /** @class */ (function (_super) {
         __extends(DynamicTexture, _super);
+        /**
+         * Creates a {BABYLON.DynamicTexture}
+         * @param name defines the name of the texture
+         * @param options provides 3 alternatives for width and height of texture, a canvas, object with width and height properties, number for both width and height
+         * @param scene defines the scene where you want the texture
+         * @param generateMipMaps defines the use of MinMaps or not (default is false)
+         * @param samplingMode defines the sampling mode to use (default is BABYLON.Texture.TRILINEAR_SAMPLINGMODE)
+         * @param format defines the texture format to use (default is BABYLON.Engine.TEXTUREFORMAT_RGBA)
+         */
         function DynamicTexture(name, options, scene, generateMipMaps, samplingMode, format) {
             if (scene === void 0) { scene = null; }
             if (samplingMode === void 0) { samplingMode = BABYLON.Texture.TRILINEAR_SAMPLINGMODE; }
@@ -60355,6 +60555,9 @@ var BABYLON;
             return _this;
         }
         Object.defineProperty(DynamicTexture.prototype, "canRescale", {
+            /**
+             * Gets the current state of canRescale
+             */
             get: function () {
                 return true;
             },
@@ -60367,28 +60570,59 @@ var BABYLON;
             this.releaseInternalTexture();
             this._texture = this._engine.createDynamicTexture(textureSize.width, textureSize.height, this._generateMipMaps, this._samplingMode);
         };
+        /**
+         * Scales the texture
+         * @param ratio the scale factor to apply to both width and height
+         */
         DynamicTexture.prototype.scale = function (ratio) {
             var textureSize = this.getSize();
             textureSize.width *= ratio;
             textureSize.height *= ratio;
             this._recreate(textureSize);
         };
+        /**
+         * Resizes the texture
+         * @param width the new width
+         * @param height the new height
+         */
         DynamicTexture.prototype.scaleTo = function (width, height) {
             var textureSize = this.getSize();
             textureSize.width = width;
             textureSize.height = height;
             this._recreate(textureSize);
         };
+        /**
+         * Gets the context of the canvas used by the texture
+         * @returns the canvas context of the dynamic texture
+         */
         DynamicTexture.prototype.getContext = function () {
             return this._context;
         };
+        /**
+         * Clears the texture
+         */
         DynamicTexture.prototype.clear = function () {
             var size = this.getSize();
             this._context.fillRect(0, 0, size.width, size.height);
         };
+        /**
+         * Updates the texture
+         * @param invertY defines the direction for the Y axis (default is true - y increases downwards)
+         */
         DynamicTexture.prototype.update = function (invertY) {
             this._engine.updateDynamicTexture(this._texture, this._canvas, invertY === undefined ? true : invertY, undefined, this._format || undefined);
         };
+        /**
+         * Draws text onto the texture
+         * @param text defines the text to be drawn
+         * @param x defines the placement of the text from the left
+         * @param y defines the placement of the text from the top when invertY is true and from the bottom when false
+         * @param font defines the font to be used with font-style, font-size, font-name
+         * @param color defines the color used for the text
+         * @param clearColor defines the color for the canvas, use null to not overwrite canvas
+         * @param invertY defines the direction for the Y axis (default is true - y increases downwards)
+         * @param update defines whether texture is immediately update (default is true)
+         */
         DynamicTexture.prototype.drawText = function (text, x, y, font, color, clearColor, invertY, update) {
             if (update === void 0) { update = true; }
             var size = this.getSize();
@@ -60412,6 +60646,10 @@ var BABYLON;
                 this.update(invertY);
             }
         };
+        /**
+         * Clones the texture
+         * @returns the clone of the texture.
+         */
         DynamicTexture.prototype.clone = function () {
             var scene = this.getScene();
             if (!scene) {
@@ -60427,6 +60665,7 @@ var BABYLON;
             newTexture.wrapV = this.wrapV;
             return newTexture;
         };
+        /** @ignore */
         DynamicTexture.prototype._rebuild = function () {
             this.update();
         };

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 4 - 4
dist/preview release/gui/babylon.gui.min.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 4 - 4
dist/preview release/inspector/babylon.inspector.bundle.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 3 - 3
dist/preview release/inspector/babylon.inspector.min.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 2 - 2
dist/preview release/loaders/babylon.glTF1FileLoader.min.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 2 - 2
dist/preview release/loaders/babylon.glTF2FileLoader.min.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 3 - 3
dist/preview release/loaders/babylon.glTFFileLoader.min.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/preview release/loaders/babylon.objFileLoader.min.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 3 - 3
dist/preview release/loaders/babylonjs.loaders.min.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/preview release/materialsLibrary/babylon.customMaterial.min.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/preview release/materialsLibrary/babylon.shadowOnlyMaterial.min.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/preview release/materialsLibrary/babylon.waterMaterial.min.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 3 - 3
dist/preview release/materialsLibrary/babylonjs.materials.min.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.min.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.min.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/preview release/postProcessesLibrary/babylonjs.postProcess.min.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/preview release/serializers/babylon.glTF2Serializer.min.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/preview release/serializers/babylonjs.serializers.min.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 58 - 58
dist/preview release/viewer/babylon.viewer.js


+ 270 - 31
dist/preview release/viewer/babylon.viewer.max.js

@@ -16696,7 +16696,7 @@ var BABYLON;
             _this._rotation = BABYLON.Vector3.Zero();
             _this._scaling = BABYLON.Vector3.One();
             _this._isDirty = false;
-            _this.billboardMode = BABYLON.AbstractMesh.BILLBOARDMODE_NONE;
+            _this.billboardMode = TransformNode.BILLBOARDMODE_NONE;
             _this.scalingDeterminant = 1;
             _this.infiniteDistance = false;
             _this.position = BABYLON.Vector3.Zero();
@@ -16836,7 +16836,7 @@ var BABYLON;
         });
         /**
          * Copies the paramater passed Matrix into the mesh Pose matrix.
-         * Returns the AbstractMesh.
+         * Returns the TransformNode.
          */
         TransformNode.prototype.updatePoseMatrix = function (matrix) {
             this._poseMatrix.copyFrom(matrix);
@@ -16853,7 +16853,7 @@ var BABYLON;
             if (this._isDirty) {
                 return false;
             }
-            if (this.billboardMode !== this._cache.billboardMode || this.billboardMode !== BABYLON.AbstractMesh.BILLBOARDMODE_NONE)
+            if (this.billboardMode !== this._cache.billboardMode || this.billboardMode !== TransformNode.BILLBOARDMODE_NONE)
                 return false;
             if (this._cache.pivotMatrixUpdated) {
                 return false;
@@ -16940,7 +16940,7 @@ var BABYLON;
         };
         /**
          * Prevents the World matrix to be computed any longer.
-         * Returns the AbstractMesh.
+         * Returns the TransformNode.
          */
         TransformNode.prototype.freezeWorldMatrix = function () {
             this._isWorldMatrixFrozen = false; // no guarantee world is not already frozen, switch off temporarily
@@ -16950,7 +16950,7 @@ var BABYLON;
         };
         /**
          * Allows back the World matrix computation.
-         * Returns the AbstractMesh.
+         * Returns the TransformNode.
          */
         TransformNode.prototype.unfreezeWorldMatrix = function () {
             this._isWorldMatrixFrozen = false;
@@ -16978,7 +16978,7 @@ var BABYLON;
         };
         /**
          * Sets the mesh absolute position in the World from a Vector3 or an Array(3).
-         * Returns the AbstractMesh.
+         * Returns the TransformNode.
          */
         TransformNode.prototype.setAbsolutePosition = function (absolutePosition) {
             if (!absolutePosition) {
@@ -17015,7 +17015,7 @@ var BABYLON;
         };
         /**
            * Sets the mesh position in its local space.
-           * Returns the AbstractMesh.
+           * Returns the TransformNode.
            */
         TransformNode.prototype.setPositionWithLocalVector = function (vector3) {
             this.computeWorldMatrix();
@@ -17034,7 +17034,7 @@ var BABYLON;
         };
         /**
          * Translates the mesh along the passed Vector3 in its local space.
-         * Returns the AbstractMesh.
+         * Returns the TransformNode.
          */
         TransformNode.prototype.locallyTranslate = function (vector3) {
             this.computeWorldMatrix(true);
@@ -17055,7 +17055,7 @@ var BABYLON;
             if (pitchCor === void 0) { pitchCor = 0; }
             if (rollCor === void 0) { rollCor = 0; }
             if (space === void 0) { space = BABYLON.Space.LOCAL; }
-            var dv = BABYLON.AbstractMesh._lookAtVectorCache;
+            var dv = TransformNode._lookAtVectorCache;
             var pos = space === BABYLON.Space.LOCAL ? this.position : this.getAbsolutePosition();
             targetPoint.subtractToRef(pos, dv);
             var yaw = -Math.atan2(dv.z, dv.x) - Math.PI / 2;
@@ -17084,7 +17084,7 @@ var BABYLON;
          * Sets the Vector3 "result" as the rotated Vector3 "localAxis" in the same rotation than the mesh.
          * localAxis is expressed in the mesh local space.
          * result is computed in the Wordl space from the mesh World matrix.
-         * Returns the AbstractMesh.
+         * Returns the TransformNode.
          */
         TransformNode.prototype.getDirectionToRef = function (localAxis, result) {
             BABYLON.Vector3.TransformNormalToRef(localAxis, this.getWorldMatrix(), result);
@@ -17119,7 +17119,7 @@ var BABYLON;
         };
         /**
          * Sets the passed Vector3 "result" with the coordinates of the mesh pivot point in the local space.
-         * Returns the AbstractMesh.
+         * Returns the TransformNode.
          */
         TransformNode.prototype.getPivotPointToRef = function (result) {
             result.x = -this._pivotMatrix.m[12];
@@ -17137,7 +17137,7 @@ var BABYLON;
         };
         /**
          * Sets the Vector3 "result" coordinates with the mesh pivot point World coordinates.
-         * Returns the AbstractMesh.
+         * Returns the TransformNode.
          */
         TransformNode.prototype.getAbsolutePivotPointToRef = function (result) {
             result.x = this._pivotMatrix.m[12];
@@ -17245,7 +17245,7 @@ var BABYLON;
          * space (default LOCAL) can be either BABYLON.Space.LOCAL, either BABYLON.Space.WORLD.
          * Note that the property `rotationQuaternion` is then automatically updated and the property `rotation` is set to (0,0,0) and no longer used.
          * The passed axis is also normalized.
-         * Returns the AbstractMesh.
+         * Returns the TransformNode.
          */
         TransformNode.prototype.rotate = function (axis, amount, space) {
             axis.normalize();
@@ -17255,7 +17255,7 @@ var BABYLON;
             }
             var rotationQuaternion;
             if (!space || space === BABYLON.Space.LOCAL) {
-                rotationQuaternion = BABYLON.Quaternion.RotationAxisToRef(axis, amount, BABYLON.AbstractMesh._rotationAxisCache);
+                rotationQuaternion = BABYLON.Quaternion.RotationAxisToRef(axis, amount, TransformNode._rotationAxisCache);
                 this.rotationQuaternion.multiplyToRef(rotationQuaternion, this.rotationQuaternion);
             }
             else {
@@ -17264,7 +17264,7 @@ var BABYLON;
                     invertParentWorldMatrix.invert();
                     axis = BABYLON.Vector3.TransformNormal(axis, invertParentWorldMatrix);
                 }
-                rotationQuaternion = BABYLON.Quaternion.RotationAxisToRef(axis, amount, BABYLON.AbstractMesh._rotationAxisCache);
+                rotationQuaternion = BABYLON.Quaternion.RotationAxisToRef(axis, amount, TransformNode._rotationAxisCache);
                 rotationQuaternion.multiplyToRef(this.rotationQuaternion, this.rotationQuaternion);
             }
             return this;
@@ -17273,7 +17273,7 @@ var BABYLON;
          * Rotates the mesh around the axis vector for the passed angle (amount) expressed in radians, in world space.
          * Note that the property `rotationQuaternion` is then automatically updated and the property `rotation` is set to (0,0,0) and no longer used.
          * The passed axis is also normalized.
-         * Returns the AbstractMesh.
+         * Returns the TransformNode.
          * Method is based on http://www.euclideanspace.com/maths/geometry/affine/aroundPoint/index.htm
          */
         TransformNode.prototype.rotateAround = function (point, axis, amount) {
@@ -17296,7 +17296,7 @@ var BABYLON;
         /**
          * Translates the mesh along the axis vector for the passed distance in the given space.
          * space (default LOCAL) can be either BABYLON.Space.LOCAL, either BABYLON.Space.WORLD.
-         * Returns the AbstractMesh.
+         * Returns the TransformNode.
          */
         TransformNode.prototype.translate = function (axis, distance, space) {
             var displacementVector = axis.scale(distance);
@@ -17321,7 +17321,7 @@ var BABYLON;
          * ```
          * Note that `addRotation()` accumulates the passed rotation values to the current ones and computes the .rotation or .rotationQuaternion updated values.
          * Under the hood, only quaternions are used. So it's a little faster is you use .rotationQuaternion because it doesn't need to translate them back to Euler angles.
-         * Returns the AbstractMesh.
+         * Returns the TransformNode.
          */
         TransformNode.prototype.addRotation = function (x, y, z) {
             var rotationQuaternion;
@@ -17395,8 +17395,8 @@ var BABYLON;
             this._pivotMatrix.multiplyToRef(BABYLON.Tmp.Matrix[1], BABYLON.Tmp.Matrix[4]);
             BABYLON.Tmp.Matrix[4].multiplyToRef(BABYLON.Tmp.Matrix[0], BABYLON.Tmp.Matrix[5]);
             // Billboarding (testing PG:http://www.babylonjs-playground.com/#UJEIL#13)
-            if (this.billboardMode !== BABYLON.AbstractMesh.BILLBOARDMODE_NONE && camera) {
-                if ((this.billboardMode & BABYLON.AbstractMesh.BILLBOARDMODE_ALL) !== BABYLON.AbstractMesh.BILLBOARDMODE_ALL) {
+            if (this.billboardMode !== TransformNode.BILLBOARDMODE_NONE && camera) {
+                if ((this.billboardMode & TransformNode.BILLBOARDMODE_ALL) !== TransformNode.BILLBOARDMODE_ALL) {
                     // Need to decompose each rotation here
                     var currentPosition = BABYLON.Tmp.Vector3[3];
                     if (this.parent && this.parent.getWorldMatrix) {
@@ -17413,13 +17413,13 @@ var BABYLON;
                     }
                     currentPosition.subtractInPlace(camera.globalPosition);
                     var finalEuler = BABYLON.Tmp.Vector3[4].copyFromFloats(0, 0, 0);
-                    if ((this.billboardMode & BABYLON.AbstractMesh.BILLBOARDMODE_X) === BABYLON.AbstractMesh.BILLBOARDMODE_X) {
+                    if ((this.billboardMode & TransformNode.BILLBOARDMODE_X) === TransformNode.BILLBOARDMODE_X) {
                         finalEuler.x = Math.atan2(-currentPosition.y, currentPosition.z);
                     }
-                    if ((this.billboardMode & BABYLON.AbstractMesh.BILLBOARDMODE_Y) === BABYLON.AbstractMesh.BILLBOARDMODE_Y) {
+                    if ((this.billboardMode & TransformNode.BILLBOARDMODE_Y) === TransformNode.BILLBOARDMODE_Y) {
                         finalEuler.y = Math.atan2(currentPosition.x, currentPosition.z);
                     }
-                    if ((this.billboardMode & BABYLON.AbstractMesh.BILLBOARDMODE_Z) === BABYLON.AbstractMesh.BILLBOARDMODE_Z) {
+                    if ((this.billboardMode & TransformNode.BILLBOARDMODE_Z) === TransformNode.BILLBOARDMODE_Z) {
                         finalEuler.z = Math.atan2(currentPosition.y, currentPosition.x);
                     }
                     BABYLON.Matrix.RotationYawPitchRollToRef(finalEuler.y, finalEuler.x, finalEuler.z, BABYLON.Tmp.Matrix[0]);
@@ -17436,7 +17436,7 @@ var BABYLON;
             BABYLON.Tmp.Matrix[5].multiplyToRef(BABYLON.Tmp.Matrix[2], this._localWorld);
             // Parent
             if (this.parent && this.parent.getWorldMatrix) {
-                if (this.billboardMode !== BABYLON.AbstractMesh.BILLBOARDMODE_NONE) {
+                if (this.billboardMode !== TransformNode.BILLBOARDMODE_NONE) {
                     if (this._transformToBoneReferal) {
                         this.parent.getWorldMatrix().multiplyToRef(this._transformToBoneReferal.getWorldMatrix(), BABYLON.Tmp.Matrix[6]);
                         BABYLON.Tmp.Matrix[5].copyFrom(BABYLON.Tmp.Matrix[6]);
@@ -31878,6 +31878,21 @@ var BABYLON;
             },
             /**
              * Sets the value of the alpha mode.
+             *
+             * | Value | Type | Description |
+             * | --- | --- | --- |
+             * | 0 | ALPHA_DISABLE |   |
+             * | 1 | ALPHA_ADD |   |
+             * | 2 | ALPHA_COMBINE |   |
+             * | 3 | ALPHA_SUBTRACT |   |
+             * | 4 | ALPHA_MULTIPLY |   |
+             * | 5 | ALPHA_MAXIMIZED |   |
+             * | 6 | ALPHA_ONEONE |   |
+             * | 7 | ALPHA_PREMULTIPLIED |   |
+             * | 8 | ALPHA_PREMULTIPLIED_PORTERDUFF |   |
+             * | 9 | ALPHA_INTERPOLATE |   |
+             * | 10 | ALPHA_SCREENMODE |   |
+             *
              */
             set: function (value) {
                 if (this._alphaMode === value) {
@@ -44905,7 +44920,18 @@ var BABYLON;
                 var event = p.event;
                 var delta = 0;
                 if (event.wheelDelta) {
-                    delta = _this.wheelDeltaPercentage ? (event.wheelDelta * 0.01) * _this.camera.radius * _this.wheelDeltaPercentage : event.wheelDelta / (_this.wheelPrecision * 40);
+                    if (_this.wheelDeltaPercentage) {
+                        var wheelDelta = (event.wheelDelta * 0.01 * _this.wheelDeltaPercentage) * _this.camera.radius;
+                        if (event.wheelDelta > 0) {
+                            delta = wheelDelta / (1.0 + _this.wheelDeltaPercentage);
+                        }
+                        else {
+                            delta = wheelDelta * (1.0 + _this.wheelDeltaPercentage);
+                        }
+                    }
+                    else {
+                        delta = event.wheelDelta / (_this.wheelPrecision * 40);
+                    }
                 }
                 else if (event.detail) {
                     delta = -event.detail / _this.wheelPrecision;
@@ -49097,21 +49123,46 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /**
+     * A Condition applied to an Action
+     */
     var Condition = /** @class */ (function () {
+        /**
+         * Creates a new Condition
+         * @param actionManager the manager of the action the condition is applied to
+         */
         function Condition(actionManager) {
             this._actionManager = actionManager;
         }
+        /**
+         * Check if the current condition is valid
+         */
         Condition.prototype.isValid = function () {
             return true;
         };
+        /**
+         * Internal only
+         * @ignore
+         */
         Condition.prototype._getProperty = function (propertyPath) {
             return this._actionManager._getProperty(propertyPath);
         };
+        /**
+         * Internal only
+         * @ignore
+         */
         Condition.prototype._getEffectiveTarget = function (target, propertyPath) {
             return this._actionManager._getEffectiveTarget(target, propertyPath);
         };
+        /**
+         * Serialize placeholder for child classes
+         */
         Condition.prototype.serialize = function () {
         };
+        /**
+         * Internal only
+         * @ignore
+         */
         Condition.prototype._serialize = function (serializedCondition) {
             return {
                 type: 2,
@@ -49123,8 +49174,19 @@ var BABYLON;
         return Condition;
     }());
     BABYLON.Condition = Condition;
+    /**
+     * Defines specific conditional operators as extensions of Condition
+     */
     var ValueCondition = /** @class */ (function (_super) {
         __extends(ValueCondition, _super);
+        /**
+         * Creates a new ValueCondition
+         * @param actionManager manager for the action the condition applies to
+         * @param target for the action
+         * @param propertyPath path to specify the property of the target the conditional operator uses
+         * @param value the vale compared by the conditional operator against the current value of the property
+         * @param operator the conditional operator, default {BABYLON.ValueCondition.IsEqual}
+         */
         function ValueCondition(actionManager, target, propertyPath, value, operator) {
             if (operator === void 0) { operator = ValueCondition.IsEqual; }
             var _this = _super.call(this, actionManager) || this;
@@ -49137,6 +49199,9 @@ var BABYLON;
             return _this;
         }
         Object.defineProperty(ValueCondition, "IsEqual", {
+            /**
+             * @returns the number for IsEqual
+             */
             get: function () {
                 return ValueCondition._IsEqual;
             },
@@ -49144,6 +49209,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ValueCondition, "IsDifferent", {
+            /**
+             * @returns the number for IsDifferent
+             */
             get: function () {
                 return ValueCondition._IsDifferent;
             },
@@ -49151,6 +49219,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ValueCondition, "IsGreater", {
+            /**
+             * @returns the number for IsGreater
+             */
             get: function () {
                 return ValueCondition._IsGreater;
             },
@@ -49158,13 +49229,19 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ValueCondition, "IsLesser", {
+            /**
+             * @returns the number for IsLesser
+             */
             get: function () {
                 return ValueCondition._IsLesser;
             },
             enumerable: true,
             configurable: true
         });
-        // Methods
+        /**
+         * Compares the given value with the property value for the specified conditional operator
+         * @returns the result of the comparison
+         */
         ValueCondition.prototype.isValid = function () {
             switch (this.operator) {
                 case ValueCondition.IsGreater:
@@ -49184,6 +49261,10 @@ var BABYLON;
             }
             return false;
         };
+        /**
+         * Serialize the ValueCondition into a JSON compatible object
+         * @returns serialization object
+         */
         ValueCondition.prototype.serialize = function () {
             return this._serialize({
                 name: "ValueCondition",
@@ -49195,6 +49276,11 @@ var BABYLON;
                 ]
             });
         };
+        /**
+         * Gets the name of the conditional operator for the ValueCondition
+         * @param operator the conditional operator
+         * @returns the name
+         */
         ValueCondition.GetOperatorName = function (operator) {
             switch (operator) {
                 case ValueCondition._IsEqual: return "IsEqual";
@@ -49204,39 +49290,80 @@ var BABYLON;
                 default: return "";
             }
         };
-        // Statics
+        /**
+         * Internal only
+         * @ignore
+         */
         ValueCondition._IsEqual = 0;
+        /**
+         * Internal only
+         * @ignore
+         */
         ValueCondition._IsDifferent = 1;
+        /**
+         * Internal only
+         * @ignore
+         */
         ValueCondition._IsGreater = 2;
+        /**
+         * Internal only
+         * @ignore
+         */
         ValueCondition._IsLesser = 3;
         return ValueCondition;
     }(Condition));
     BABYLON.ValueCondition = ValueCondition;
+    /**
+     * Defines a predicate condition as an extension of Condition
+     */
     var PredicateCondition = /** @class */ (function (_super) {
         __extends(PredicateCondition, _super);
+        /**
+         * Creates a new {BABYLON.PredicateCondition}
+         * @param actionManager manager for the action the condition applies to
+         * @param predicate
+         */
         function PredicateCondition(actionManager, predicate) {
             var _this = _super.call(this, actionManager) || this;
             _this.predicate = predicate;
             return _this;
         }
+        /**
+         * @returns the validity of the predicate condition
+         */
         PredicateCondition.prototype.isValid = function () {
             return this.predicate();
         };
         return PredicateCondition;
     }(Condition));
     BABYLON.PredicateCondition = PredicateCondition;
+    /**
+     * Defines a state condition as an extension of {BABYLON.Condition}
+     */
     var StateCondition = /** @class */ (function (_super) {
         __extends(StateCondition, _super);
+        /**
+         * Creates a new {BABYLON.StateCondition}
+         * @param actionManager manager for the action the condition applies to
+         * @param target of the condition
+         * @param value to compare with target state
+         */
         function StateCondition(actionManager, target, value) {
             var _this = _super.call(this, actionManager) || this;
             _this.value = value;
             _this._target = target;
             return _this;
         }
-        // Methods
+        /**
+         * @returns the validity of the state
+         */
         StateCondition.prototype.isValid = function () {
             return this._target.state === this.value;
         };
+        /**
+         * Serialize the {BABYLON.StateCondition} into a JSON compatible object
+         * @returns serialization object
+         */
         StateCondition.prototype.serialize = function () {
             return this._serialize({
                 name: "StateCondition",
@@ -49256,9 +49383,22 @@ var BABYLON;
 "use strict";
 var BABYLON;
 (function (BABYLON) {
+    /**
+     * The action to be carried out following a trigger
+     * @see http://doc.babylonjs.com/how_to/how_to_use_actions#available-actions
+     */
     var Action = /** @class */ (function () {
+        /**
+         * Creates a new Action
+         * @param triggerOptions the trigger, with or without parameters, for the action
+         * @param condition an optional determinant of action
+         */
         function Action(triggerOptions, condition) {
             this.triggerOptions = triggerOptions;
+            /**
+            * An event triggered prior to action being executed.
+            * @type Observable
+            */
             this.onBeforeExecuteObservable = new BABYLON.Observable();
             if (triggerOptions.parameter) {
                 this.trigger = triggerOptions.trigger;
@@ -49270,12 +49410,23 @@ var BABYLON;
             this._nextActiveAction = this;
             this._condition = condition;
         }
-        // Methods
+        /**
+         * Internal only
+         * @ignore
+         */
         Action.prototype._prepare = function () {
         };
+        /**
+         * Gets the trigger parameters
+         * @returns the trigger parameters
+         */
         Action.prototype.getTriggerParameter = function () {
             return this._triggerParameter;
         };
+        /**
+         * Internal only - executes current action event
+         * @ignore
+         */
         Action.prototype._executeCurrent = function (evt) {
             if (this._nextActiveAction._condition) {
                 var condition = this._nextActiveAction._condition;
@@ -49299,8 +49450,15 @@ var BABYLON;
             this._nextActiveAction.execute(evt);
             this.skipToNextActiveAction();
         };
+        /**
+         * Execute placeholder for child classes
+         * @param evt optional action event
+         */
         Action.prototype.execute = function (evt) {
         };
+        /**
+         * Skips to next active action
+         */
         Action.prototype.skipToNextActiveAction = function () {
             if (this._nextActiveAction._child) {
                 if (!this._nextActiveAction._child._actionManager) {
@@ -49312,21 +49470,42 @@ var BABYLON;
                 this._nextActiveAction = this;
             }
         };
+        /**
+         * Adds action to chain of actions, may be a DoNothingAction
+         * @param index The index of the attribute.
+         * @returns The action passed in
+         * @see https://www.babylonjs-playground.com/#1T30HR#0
+         */
         Action.prototype.then = function (action) {
             this._child = action;
             action._actionManager = this._actionManager;
             action._prepare();
             return action;
         };
+        /**
+         * Internal only
+         * @ignore
+         */
         Action.prototype._getProperty = function (propertyPath) {
             return this._actionManager._getProperty(propertyPath);
         };
+        /**
+         * Internal only
+         * @ignore
+         */
         Action.prototype._getEffectiveTarget = function (target, propertyPath) {
             return this._actionManager._getEffectiveTarget(target, propertyPath);
         };
+        /**
+         * Serialize placeholder for child classes
+         * @param parent of child
+         */
         Action.prototype.serialize = function (parent) {
         };
-        // Called by BABYLON.Action objects in serialize(...). Internal use
+        /**
+         * Internal only called by serialize
+         * @ignore
+         */
         Action.prototype._serialize = function (serializedAction, parent) {
             var serializationObject = {
                 type: 1,
@@ -49352,6 +49531,10 @@ var BABYLON;
             }
             return serializationObject;
         };
+        /**
+         * Internal only
+         * @ignore
+         */
         Action._SerializeValueAsString = function (value) {
             if (typeof value === "number") {
                 return value.toString();
@@ -49373,6 +49556,10 @@ var BABYLON;
             }
             return value; // string
         };
+        /**
+         * Internal only
+         * @ignore
+         */
         Action._GetTargetProperty = function (target) {
             return {
                 name: "target",
@@ -49394,7 +49581,7 @@ var BABYLON;
 var BABYLON;
 (function (BABYLON) {
     /**
-     * ActionEvent is the event beint sent when an action is triggered.
+     * ActionEvent is the event being sent when an action is triggered.
      */
     var ActionEvent = /** @class */ (function () {
         /**
@@ -60439,8 +60626,21 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /**
+     * A class extending {BABYLON.Texture} allowing drawing on a texture
+     * @see http://doc.babylonjs.com/how_to/dynamictexture
+     */
     var DynamicTexture = /** @class */ (function (_super) {
         __extends(DynamicTexture, _super);
+        /**
+         * Creates a {BABYLON.DynamicTexture}
+         * @param name defines the name of the texture
+         * @param options provides 3 alternatives for width and height of texture, a canvas, object with width and height properties, number for both width and height
+         * @param scene defines the scene where you want the texture
+         * @param generateMipMaps defines the use of MinMaps or not (default is false)
+         * @param samplingMode defines the sampling mode to use (default is BABYLON.Texture.TRILINEAR_SAMPLINGMODE)
+         * @param format defines the texture format to use (default is BABYLON.Engine.TEXTUREFORMAT_RGBA)
+         */
         function DynamicTexture(name, options, scene, generateMipMaps, samplingMode, format) {
             if (scene === void 0) { scene = null; }
             if (samplingMode === void 0) { samplingMode = BABYLON.Texture.TRILINEAR_SAMPLINGMODE; }
@@ -60471,6 +60671,9 @@ var BABYLON;
             return _this;
         }
         Object.defineProperty(DynamicTexture.prototype, "canRescale", {
+            /**
+             * Gets the current state of canRescale
+             */
             get: function () {
                 return true;
             },
@@ -60483,28 +60686,59 @@ var BABYLON;
             this.releaseInternalTexture();
             this._texture = this._engine.createDynamicTexture(textureSize.width, textureSize.height, this._generateMipMaps, this._samplingMode);
         };
+        /**
+         * Scales the texture
+         * @param ratio the scale factor to apply to both width and height
+         */
         DynamicTexture.prototype.scale = function (ratio) {
             var textureSize = this.getSize();
             textureSize.width *= ratio;
             textureSize.height *= ratio;
             this._recreate(textureSize);
         };
+        /**
+         * Resizes the texture
+         * @param width the new width
+         * @param height the new height
+         */
         DynamicTexture.prototype.scaleTo = function (width, height) {
             var textureSize = this.getSize();
             textureSize.width = width;
             textureSize.height = height;
             this._recreate(textureSize);
         };
+        /**
+         * Gets the context of the canvas used by the texture
+         * @returns the canvas context of the dynamic texture
+         */
         DynamicTexture.prototype.getContext = function () {
             return this._context;
         };
+        /**
+         * Clears the texture
+         */
         DynamicTexture.prototype.clear = function () {
             var size = this.getSize();
             this._context.fillRect(0, 0, size.width, size.height);
         };
+        /**
+         * Updates the texture
+         * @param invertY defines the direction for the Y axis (default is true - y increases downwards)
+         */
         DynamicTexture.prototype.update = function (invertY) {
             this._engine.updateDynamicTexture(this._texture, this._canvas, invertY === undefined ? true : invertY, undefined, this._format || undefined);
         };
+        /**
+         * Draws text onto the texture
+         * @param text defines the text to be drawn
+         * @param x defines the placement of the text from the left
+         * @param y defines the placement of the text from the top when invertY is true and from the bottom when false
+         * @param font defines the font to be used with font-style, font-size, font-name
+         * @param color defines the color used for the text
+         * @param clearColor defines the color for the canvas, use null to not overwrite canvas
+         * @param invertY defines the direction for the Y axis (default is true - y increases downwards)
+         * @param update defines whether texture is immediately update (default is true)
+         */
         DynamicTexture.prototype.drawText = function (text, x, y, font, color, clearColor, invertY, update) {
             if (update === void 0) { update = true; }
             var size = this.getSize();
@@ -60528,6 +60762,10 @@ var BABYLON;
                 this.update(invertY);
             }
         };
+        /**
+         * Clones the texture
+         * @returns the clone of the texture.
+         */
         DynamicTexture.prototype.clone = function () {
             var scene = this.getScene();
             if (!scene) {
@@ -60543,6 +60781,7 @@ var BABYLON;
             newTexture.wrapV = this.wrapV;
             return newTexture;
         };
+        /** @ignore */
         DynamicTexture.prototype._rebuild = function () {
             this.update();
         };

+ 10 - 1
src/Cameras/Inputs/babylon.arcRotateCameraMouseWheelInput.ts

@@ -23,7 +23,16 @@ module BABYLON {
                 var delta = 0;
 
                 if (event.wheelDelta) {
-                    delta = this.wheelDeltaPercentage ? (event.wheelDelta * 0.01) * this.camera.radius * this.wheelDeltaPercentage : event.wheelDelta / (this.wheelPrecision * 40);
+                    if (this.wheelDeltaPercentage) {
+                        var wheelDelta = (event.wheelDelta * 0.01 * this.wheelDeltaPercentage) * this.camera.radius;
+                        if (event.wheelDelta > 0) {
+                            delta = wheelDelta / (1.0 + this.wheelDeltaPercentage);
+                        } else {
+                            delta = wheelDelta * (1.0 + this.wheelDeltaPercentage);
+                        }
+                    } else {
+                        delta = event.wheelDelta / (this.wheelPrecision * 40);
+                    }
                 } else if (event.detail) {
                     delta = -event.detail / this.wheelPrecision;
                 }