sebastien 7 tahun lalu
induk
melakukan
22c8208b8d

File diff ditekan karena terlalu besar
+ 10146 - 9861
Playground/babylon.d.txt


File diff ditekan karena terlalu besar
+ 10257 - 9972
dist/preview release/babylon.d.ts


File diff ditekan karena terlalu besar
+ 1 - 1
dist/preview release/babylon.js


+ 325 - 44
dist/preview release/babylon.max.js

@@ -3214,13 +3214,7 @@ var BABYLON;
          * @returns the current updated Vector3
          */
         Vector3.prototype.minimizeInPlace = function (other) {
-            if (other.x < this.x)
-                this.x = other.x;
-            if (other.y < this.y)
-                this.y = other.y;
-            if (other.z < this.z)
-                this.z = other.z;
-            return this;
+            return this.minimizeInPlaceFromFloats(other.x, other.y, other.z);
         };
         /**
          * Updates the current Vector3 with the maximal coordinate values between its and the given vector ones.
@@ -3228,12 +3222,32 @@ var BABYLON;
          * @returns the current updated Vector3
          */
         Vector3.prototype.maximizeInPlace = function (other) {
-            if (other.x > this.x)
-                this.x = other.x;
-            if (other.y > this.y)
-                this.y = other.y;
-            if (other.z > this.z)
-                this.z = other.z;
+            return this.maximizeInPlaceFromFloats(other.x, other.y, other.z);
+        };
+        /**
+         * Updates the current Vector3 with the minimal coordinate values between its and the given coordinates
+         * @param x defines the x coordinate of the operand
+         * @param y defines the y coordinate of the operand
+         * @param z defines the z coordinate of the operand
+         * @returns the current updated Vector3
+         */
+        Vector3.prototype.minimizeInPlaceFromFloats = function (x, y, z) {
+            this.x = Math.min(this.x, x);
+            this.y = Math.min(this.y, y);
+            this.z = Math.min(this.z, z);
+            return this;
+        };
+        /**
+         * Updates the current Vector3 with the maximal coordinate values between its and the given coordinates.
+         * @param x defines the x coordinate of the operand
+         * @param y defines the y coordinate of the operand
+         * @param z defines the z coordinate of the operand
+         * @returns the current updated Vector3
+         */
+        Vector3.prototype.maximizeInPlaceFromFloats = function (x, y, z) {
+            this.x = Math.max(this.x, x);
+            this.y = Math.max(this.y, y);
+            this.z = Math.max(this.z, z);
             return this;
         };
         Object.defineProperty(Vector3.prototype, "isNonUniform", {
@@ -9503,9 +9517,12 @@ var BABYLON;
             var minimum = new BABYLON.Vector3(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE);
             var maximum = new BABYLON.Vector3(-Number.MAX_VALUE, -Number.MAX_VALUE, -Number.MAX_VALUE);
             for (var index = indexStart; index < indexStart + indexCount; index++) {
-                var current = new BABYLON.Vector3(positions[indices[index] * 3], positions[indices[index] * 3 + 1], positions[indices[index] * 3 + 2]);
-                minimum = BABYLON.Vector3.Minimize(current, minimum);
-                maximum = BABYLON.Vector3.Maximize(current, maximum);
+                var offset = indices[index];
+                var x = positions[offset];
+                var y = positions[offset + 1];
+                var z = positions[offset + 2];
+                minimum.minimizeInPlaceFromFloats(x, y, z);
+                maximum.maximizeInPlaceFromFloats(x, y, z);
             }
             if (bias) {
                 minimum.x -= minimum.x * bias.x + bias.y;
@@ -9536,10 +9553,12 @@ var BABYLON;
             if (!stride) {
                 stride = 3;
             }
-            for (var index = start; index < start + count; index++) {
-                var current = new BABYLON.Vector3(positions[index * stride], positions[index * stride + 1], positions[index * stride + 2]);
-                minimum = BABYLON.Vector3.Minimize(current, minimum);
-                maximum = BABYLON.Vector3.Maximize(current, maximum);
+            for (var index = start, offset = start * stride; index < start + count; index++, offset += stride) {
+                var x = positions[offset];
+                var y = positions[offset + 1];
+                var z = positions[offset + 2];
+                minimum.minimizeInPlaceFromFloats(x, y, z);
+                maximum.maximizeInPlaceFromFloats(x, y, z);
             }
             if (bias) {
                 minimum.x -= minimum.x * bias.x + bias.y;
@@ -18295,6 +18314,8 @@ var BABYLON;
             this._worldMatrix = BABYLON.Matrix.Identity();
             /** @hidden */
             this._worldMatrixDeterminant = 0;
+            /** @hidden */
+            this._sceneRootNodesIndex = -1;
             this._animationPropertiesOverride = null;
             /**
             * An event triggered when the mesh is disposed
@@ -18307,7 +18328,7 @@ var BABYLON;
             this._scene = (scene || BABYLON.Engine.LastCreatedScene);
             this.uniqueId = this._scene.getUniqueId();
             this._initCache();
-            this._scene.rootNodes.push(this);
+            this.addToSceneRootNodes();
         }
         /**
          * Add a new node constructor
@@ -18358,8 +18379,7 @@ var BABYLON;
                         this._parentNode._children.splice(index, 1);
                     }
                     if (!parent) {
-                        // Need to add this node to the rootNodes
-                        this._scene.rootNodes.push(this);
+                        this.addToSceneRootNodes();
                     }
                 }
                 // Store new parent
@@ -18371,11 +18391,7 @@ var BABYLON;
                     }
                     this._parentNode._children.push(this);
                     if (!previousParentNode) {
-                        // Need to remove from rootNodes
-                        var rootNodeIndex = this._scene.rootNodes.indexOf(this);
-                        if (rootNodeIndex > -1) {
-                            this._scene.rootNodes.splice(rootNodeIndex, 1);
-                        }
+                        this.removeFromSceneRootNodes();
                     }
                 }
                 // Enabled state
@@ -18384,6 +18400,22 @@ var BABYLON;
             enumerable: true,
             configurable: true
         });
+        Node.prototype.addToSceneRootNodes = function () {
+            if (this._sceneRootNodesIndex === -1) {
+                this._sceneRootNodesIndex = this._scene.rootNodes.length;
+                this._scene.rootNodes.push(this);
+            }
+        };
+        Node.prototype.removeFromSceneRootNodes = function () {
+            if (this._sceneRootNodesIndex !== -1) {
+                var rootNodes = this._scene.rootNodes;
+                var lastIdx = rootNodes.length - 1;
+                rootNodes[this._sceneRootNodesIndex] = rootNodes[lastIdx];
+                rootNodes[this._sceneRootNodesIndex]._sceneRootNodesIndex = this._sceneRootNodesIndex;
+                this._scene.rootNodes.pop();
+                this._sceneRootNodesIndex = -1;
+            }
+        };
         Object.defineProperty(Node.prototype, "animationPropertiesOverride", {
             /**
              * Gets or sets the animation properties override
@@ -18831,10 +18863,7 @@ var BABYLON;
                 }
             }
             if (!this.parent) {
-                var rootNodeIndex = this._scene.rootNodes.indexOf(this);
-                if (rootNodeIndex > -1) {
-                    this._scene.rootNodes.splice(rootNodeIndex, 1);
-                }
+                this.removeFromSceneRootNodes();
             }
             else {
                 this.parent = null;
@@ -39742,10 +39771,15 @@ var BABYLON;
              *  Gets or sets the Bias Vector to apply on the bounding elements (box/sphere), the max extend is computed as v += v * bias.x + bias.y, the min is computed as v -= v * bias.x + bias.y
              */
             set: function (value) {
-                if (this._boundingBias && this._boundingBias.equals(value)) {
-                    return;
+                if (this._boundingBias) {
+                    if (this._boundingBias.equals(value)) {
+                        return;
+                    }
+                    this._boundingBias.copyFrom(value);
+                }
+                else {
+                    this._boundingBias = value.clone();
                 }
-                this._boundingBias = value.clone();
                 this._updateBoundingInfo(true, null);
             },
             enumerable: true,
@@ -59286,6 +59320,7 @@ var BABYLON;
          * @param gradient defines the gradient to use (between 0 and 1)
          * @param color1 defines the color to affect to the specified gradient
          * @param color2 defines an additional color used to define a range ([color, color2]) with main color to pick the final color from
+         * @returns this particle system
          */
         ParticleSystem.prototype.addColorGradient = function (gradient, color1, color2) {
             if (!this._colorGradients) {
@@ -59310,6 +59345,7 @@ var BABYLON;
         /**
          * Remove a specific color gradient
          * @param gradient defines the gradient to remove
+         * @returns this particle system
          */
         ParticleSystem.prototype.removeColorGradient = function (gradient) {
             if (!this._colorGradients) {
@@ -59810,6 +59846,7 @@ var BABYLON;
             }
             return attributeNamesOrOptions;
         };
+        /** @hidden */
         ParticleSystem._GetEffectCreationOptions = function (isAnimationSheetEnabled) {
             if (isAnimationSheetEnabled === void 0) { isAnimationSheetEnabled = false; }
             var effectCreationOption = ["invView", "view", "projection", "vClipPlane", "vClipPlane2", "vClipPlane3", "vClipPlane4", "textureMask", "translationPivot", "eyePosition"];
@@ -59818,6 +59855,7 @@ var BABYLON;
             }
             return effectCreationOption;
         };
+        /** @hidden */
         ParticleSystem.prototype._getEffect = function (blendMode) {
             if (this._customEffect) {
                 return this._customEffect;
@@ -68170,11 +68208,11 @@ var BABYLON;
                 path3D = storage.path3D.update(path);
                 pathArray = tubePathArray(path, path3D, storage.pathArray, radius, storage.tessellation, radiusFunction, storage.cap, arc);
                 instance = MeshBuilder.CreateRibbon("", { pathArray: pathArray, instance: instance });
-                instance._creationDataStorage = new BABYLON._CreationDataStorage();
-                instance._creationDataStorage.path3D = path3D;
-                instance._creationDataStorage.pathArray = pathArray;
-                instance._creationDataStorage.arc = arc;
-                instance._creationDataStorage.radius = radius;
+                // Update mode, no need to recreate the storage.
+                storage.path3D = path3D;
+                storage.pathArray = pathArray;
+                storage.arc = arc;
+                storage.radius = radius;
                 return instance;
             }
             // tube creation
@@ -82177,13 +82215,31 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /**
+     * PostProcessRenderPipelineManager class
+     * @see https://doc.babylonjs.com/how_to/how_to_use_postprocessrenderpipeline
+     */
     var PostProcessRenderPipelineManager = /** @class */ (function () {
+        /**
+         * Initializes a PostProcessRenderPipelineManager
+         * @see https://doc.babylonjs.com/how_to/how_to_use_postprocessrenderpipeline
+         */
         function PostProcessRenderPipelineManager() {
             this._renderPipelines = {};
         }
+        /**
+         * Adds a pipeline to the manager
+         * @param renderPipeline The pipeline to add
+         */
         PostProcessRenderPipelineManager.prototype.addPipeline = function (renderPipeline) {
             this._renderPipelines[renderPipeline._name] = renderPipeline;
         };
+        /**
+         * Attaches a camera to the pipeline
+         * @param renderPipelineName The name of the pipeline to attach to
+         * @param cameras the camera to attach
+         * @param unique if the camera can be attached multiple times to the pipeline
+         */
         PostProcessRenderPipelineManager.prototype.attachCamerasToRenderPipeline = function (renderPipelineName, cameras, unique) {
             if (unique === void 0) { unique = false; }
             var renderPipeline = this._renderPipelines[renderPipelineName];
@@ -82192,6 +82248,11 @@ var BABYLON;
             }
             renderPipeline._attachCameras(cameras, unique);
         };
+        /**
+         * Detaches a camera from the pipeline
+         * @param renderPipelineName The name of the pipeline to detach from
+         * @param cameras the camera to detach
+         */
         PostProcessRenderPipelineManager.prototype.detachCamerasFromRenderPipeline = function (renderPipelineName, cameras) {
             var renderPipeline = this._renderPipelines[renderPipelineName];
             if (!renderPipeline) {
@@ -82199,6 +82260,12 @@ var BABYLON;
             }
             renderPipeline._detachCameras(cameras);
         };
+        /**
+         * Enables an effect by name on a pipeline
+         * @param renderPipelineName the name of the pipeline to enable the effect in
+         * @param renderEffectName the name of the effect to enable
+         * @param cameras the cameras that the effect should be enabled on
+         */
         PostProcessRenderPipelineManager.prototype.enableEffectInPipeline = function (renderPipelineName, renderEffectName, cameras) {
             var renderPipeline = this._renderPipelines[renderPipelineName];
             if (!renderPipeline) {
@@ -82206,6 +82273,12 @@ var BABYLON;
             }
             renderPipeline._enableEffect(renderEffectName, cameras);
         };
+        /**
+         * Disables an effect by name on a pipeline
+         * @param renderPipelineName the name of the pipeline to disable the effect in
+         * @param renderEffectName the name of the effect to disable
+         * @param cameras the cameras that the effect should be disabled on
+         */
         PostProcessRenderPipelineManager.prototype.disableEffectInPipeline = function (renderPipelineName, renderEffectName, cameras) {
             var renderPipeline = this._renderPipelines[renderPipelineName];
             if (!renderPipeline) {
@@ -82213,6 +82286,9 @@ var BABYLON;
             }
             renderPipeline._disableEffect(renderEffectName, cameras);
         };
+        /**
+         * Updates the state of all contained render pipelines and disposes of any non supported pipelines
+         */
         PostProcessRenderPipelineManager.prototype.update = function () {
             for (var renderPipelineName in this._renderPipelines) {
                 if (this._renderPipelines.hasOwnProperty(renderPipelineName)) {
@@ -82236,6 +82312,9 @@ var BABYLON;
                 }
             }
         };
+        /**
+         * Disposes of the manager and pipelines
+         */
         PostProcessRenderPipelineManager.prototype.dispose = function () {
             for (var renderPipelineName in this._renderPipelines) {
                 if (this._renderPipelines.hasOwnProperty(renderPipelineName)) {
@@ -82497,7 +82576,16 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /**
+     * PostProcessRenderPipeline
+     * @see https://doc.babylonjs.com/how_to/how_to_use_postprocessrenderpipeline
+     */
     var PostProcessRenderPipeline = /** @class */ (function () {
+        /**
+         * Initializes a PostProcessRenderPipeline
+         * @param engine engine to add the pipeline to
+         * @param name name of the pipeline
+         */
         function PostProcessRenderPipeline(engine, name) {
             this.engine = engine;
             this._name = name;
@@ -82505,10 +82593,17 @@ var BABYLON;
             this._renderEffectsForIsolatedPass = new Array();
             this._cameras = [];
         }
+        /**
+         * "PostProcessRenderPipeline"
+         * @returns "PostProcessRenderPipeline"
+         */
         PostProcessRenderPipeline.prototype.getClassName = function () {
             return "PostProcessRenderPipeline";
         };
         Object.defineProperty(PostProcessRenderPipeline.prototype, "isSupported", {
+            /**
+             * If all the render effects in the pipeline are support
+             */
             get: function () {
                 for (var renderEffectName in this._renderEffects) {
                     if (this._renderEffects.hasOwnProperty(renderEffectName)) {
@@ -82522,6 +82617,10 @@ var BABYLON;
             enumerable: true,
             configurable: true
         });
+        /**
+         * Adds an effect to the pipeline
+         * @param renderEffect the effect to add
+         */
         PostProcessRenderPipeline.prototype.addEffect = function (renderEffect) {
             this._renderEffects[renderEffect._name] = renderEffect;
         };
@@ -82537,6 +82636,7 @@ var BABYLON;
             }
             renderEffects._enable(BABYLON.Tools.MakeArray(cameras || this._cameras));
         };
+        /** @hidden */
         PostProcessRenderPipeline.prototype._disableEffect = function (renderEffectName, cameras) {
             var renderEffects = this._renderEffects[renderEffectName];
             if (!renderEffects) {
@@ -82617,6 +82717,9 @@ var BABYLON;
             }
             return false;
         };
+        /**
+         * Disposes of the pipeline
+         */
         PostProcessRenderPipeline.prototype.dispose = function () {
             // Must be implemented by children 
         };
@@ -84084,9 +84187,15 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /**
+     * Standard rendering pipeline
+     * Default pipeline should be used going forward but the standard pipeline will be kept for backwards compatibility.
+     * @see https://doc.babylonjs.com/how_to/using_standard_rendering_pipeline
+     */
     var StandardRenderingPipeline = /** @class */ (function (_super) {
         __extends(StandardRenderingPipeline, _super);
         /**
+         * Default pipeline should be used going forward but the standard pipeline will be kept for backwards compatibility.
          * @constructor
          * @param {string} name - The rendering pipeline name
          * @param {BABYLON.Scene} scene - The scene linked to this pipeline
@@ -86141,10 +86250,12 @@ var BABYLON;
              */
             _this.SharpenPostProcessId = "SharpenPostProcessEffect";
             /**
+             * @ignore
              * ID of the image processing post process;
              */
             _this.ImageProcessingPostProcessId = "ImageProcessingPostProcessEffect";
             /**
+             * @ignore
              * ID of the Fast Approximate Anti-Aliasing post process;
              */
             _this.FxaaPostProcessId = "FxaaPostProcessEffect";
@@ -88157,9 +88268,33 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /**
+     * Post process which applies a refractin texture
+     * @see https://doc.babylonjs.com/how_to/how_to_use_postprocesses#refraction
+     */
     var RefractionPostProcess = /** @class */ (function (_super) {
         __extends(RefractionPostProcess, _super);
-        function RefractionPostProcess(name, refractionTextureUrl, color, depth, colorLevel, options, camera, samplingMode, engine, reusable) {
+        /**
+         * Initializes the RefractionPostProcess
+         * @see https://doc.babylonjs.com/how_to/how_to_use_postprocesses#refraction
+         * @param name The name of the effect.
+         * @param refractionTextureUrl Url of the refraction texture to use
+         * @param color the base color of the refraction (used to taint the rendering)
+         * @param depth simulated refraction depth
+         * @param colorLevel the coefficient of the base color (0 to remove base color tainting)
+         * @param camera The camera to apply the render pass to.
+         * @param options The required width/height ratio to downsize to before computing the render pass.
+         * @param samplingMode The sampling mode to be used when computing the pass. (default: 0)
+         * @param engine The engine which the post process will be applied. (default: current engine)
+         * @param reusable If the post process can be reused on the same frame. (default: false)
+         */
+        function RefractionPostProcess(name, refractionTextureUrl, 
+        /** the base color of the refraction (used to taint the rendering) */
+        color, 
+        /** simulated refraction depth */
+        depth, 
+        /** the coefficient of the base color (0 to remove base color tainting) */
+        colorLevel, options, camera, samplingMode, engine, reusable) {
             var _this = _super.call(this, name, "refraction", ["baseColor", "depth", "colorLevel"], ["refractionSampler"], options, camera, samplingMode, engine, reusable) || this;
             _this.color = color;
             _this.depth = depth;
@@ -88195,6 +88330,10 @@ var BABYLON;
             configurable: true
         });
         // Methods
+        /**
+         * Disposes of the post process
+         * @param camera Camera to dispose post process on
+         */
         RefractionPostProcess.prototype.dispose = function (camera) {
             if (this._refTexture && this._ownRefractionTexture) {
                 this._refTexture.dispose();
@@ -88212,10 +88351,26 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /**
+     * Post process used to render in black and white
+     */
     var BlackAndWhitePostProcess = /** @class */ (function (_super) {
         __extends(BlackAndWhitePostProcess, _super);
+        /**
+         * Creates a black and white post process
+         * @see https://doc.babylonjs.com/how_to/how_to_use_postprocesses#black-and-white
+         * @param name The name of the effect.
+         * @param options The required width/height ratio to downsize to before computing the render pass.
+         * @param camera The camera to apply the render pass to.
+         * @param samplingMode The sampling mode to be used when computing the pass. (default: 0)
+         * @param engine The engine which the post process will be applied. (default: current engine)
+         * @param reusable If the post process can be reused on the same frame. (default: false)
+         */
         function BlackAndWhitePostProcess(name, options, camera, samplingMode, engine, reusable) {
             var _this = _super.call(this, name, "blackAndWhite", ["degree"], null, options, camera, samplingMode, engine, reusable) || this;
+            /**
+             * Linear about to convert he result to black and white (default: 1)
+             */
             _this.degree = 1;
             _this.onApplyObservable.add(function (effect) {
                 effect.setFloat("degree", _this.degree);
@@ -88297,9 +88452,24 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /**
+     * Applies a kernel filter to the image
+     */
     var FilterPostProcess = /** @class */ (function (_super) {
         __extends(FilterPostProcess, _super);
-        function FilterPostProcess(name, kernelMatrix, options, camera, samplingMode, engine, reusable) {
+        /**
+         *
+         * @param name The name of the effect.
+         * @param kernelMatrix The matrix to be applied to the image
+         * @param options The required width/height ratio to downsize to before computing the render pass.
+         * @param camera The camera to apply the render pass to.
+         * @param samplingMode The sampling mode to be used when computing the pass. (default: 0)
+         * @param engine The engine which the post process will be applied. (default: current engine)
+         * @param reusable If the post process can be reused on the same frame. (default: false)
+         */
+        function FilterPostProcess(name, 
+        /** The matrix to be applied to the image */
+        kernelMatrix, options, camera, samplingMode, engine, reusable) {
             var _this = _super.call(this, name, "filter", ["kernelMatrix"], null, options, camera, samplingMode, engine, reusable) || this;
             _this.kernelMatrix = kernelMatrix;
             _this.onApply = function (effect) {
@@ -88813,8 +88983,20 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /**
+     * DisplayPassPostProcess which produces an output the same as it's input
+     */
     var DisplayPassPostProcess = /** @class */ (function (_super) {
         __extends(DisplayPassPostProcess, _super);
+        /**
+         * Creates the DisplayPassPostProcess
+         * @param name The name of the effect.
+         * @param options The required width/height ratio to downsize to before computing the render pass.
+         * @param camera The camera to apply the render pass to.
+         * @param samplingMode The sampling mode to be used when computing the pass. (default: 0)
+         * @param engine The engine which the post process will be applied. (default: current engine)
+         * @param reusable If the post process can be reused on the same frame. (default: false)
+         */
         function DisplayPassPostProcess(name, options, camera, samplingMode, engine, reusable) {
             return _super.call(this, name, "displayPass", ["passSampler"], ["passSampler"], options, camera, samplingMode, engine, reusable) || this;
         }
@@ -88828,8 +89010,23 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /**
+     * Extracts highlights from the image
+     * @see https://doc.babylonjs.com/how_to/how_to_use_postprocesses
+     */
     var HighlightsPostProcess = /** @class */ (function (_super) {
         __extends(HighlightsPostProcess, _super);
+        /**
+         * Extracts highlights from the image
+         * @see https://doc.babylonjs.com/how_to/how_to_use_postprocesses
+         * @param name The name of the effect.
+         * @param options The required width/height ratio to downsize to before computing the render pass.
+         * @param camera The camera to apply the render pass to.
+         * @param samplingMode The sampling mode to be used when computing the pass. (default: 0)
+         * @param engine The engine which the post process will be applied. (default: current engine)
+         * @param reusable If the post process can be reused on the same frame. (default: false)
+         * @param textureType Type of texture for the post process (default: Engine.TEXTURETYPE_UNSIGNED_INT)
+         */
         function HighlightsPostProcess(name, options, camera, samplingMode, engine, reusable, textureType) {
             if (textureType === void 0) { textureType = BABYLON.Engine.TEXTURETYPE_UNSIGNED_INT; }
             return _super.call(this, name, "highlights", null, null, options, camera, samplingMode, engine, reusable, null, textureType) || this;
@@ -88849,6 +89046,10 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /**
+     * ImageProcessingPostProcess
+     * @see https://doc.babylonjs.com/how_to/how_to_use_postprocesses#imageprocessing
+     */
     var ImageProcessingPostProcess = /** @class */ (function (_super) {
         __extends(ImageProcessingPostProcess, _super);
         function ImageProcessingPostProcess(name, options, camera, samplingMode, engine, reusable, textureType, imageProcessingConfiguration) {
@@ -89221,6 +89422,10 @@ var BABYLON;
             enumerable: true,
             configurable: true
         });
+        /**
+         *  "ImageProcessingPostProcess"
+         * @returns "ImageProcessingPostProcess"
+         */
         ImageProcessingPostProcess.prototype.getClassName = function () {
             return "ImageProcessingPostProcess";
         };
@@ -101321,25 +101526,57 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /**
+     * Octrees are a really powerful data structure that can quickly select entities based on space coordinates.
+     * @see https://doc.babylonjs.com/how_to/optimizing_your_scene_with_octrees
+     */
     var Octree = /** @class */ (function () {
-        function Octree(creationFunc, maxBlockCapacity, maxDepth) {
+        /**
+         * Creates a octree
+         * @see https://doc.babylonjs.com/how_to/optimizing_your_scene_with_octrees
+         * @param creationFunc function to be used to instatiate the octree
+         * @param maxBlockCapacity defines the maximum number of meshes you want on your octree's leaves (default: 64)
+         * @param maxDepth defines the maximum depth (sub-levels) for your octree. Default value is 2, which means 8 8 8 = 512 blocks :) (This parameter takes precedence over capacity.)
+         */
+        function Octree(creationFunc, maxBlockCapacity, 
+        /** Defines the maximum depth (sub-levels) for your octree. Default value is 2, which means 8 8 8 = 512 blocks :) (This parameter takes precedence over capacity.) */
+        maxDepth) {
             if (maxDepth === void 0) { maxDepth = 2; }
             this.maxDepth = maxDepth;
+            /**
+             * Content stored in the octree
+             */
             this.dynamicContent = new Array();
             this._maxBlockCapacity = maxBlockCapacity || 64;
             this._selectionContent = new BABYLON.SmartArrayNoDuplicate(1024);
             this._creationFunc = creationFunc;
         }
         // Methods
+        /**
+         * Updates the octree by adding blocks for the passed in meshes within the min and max world parameters
+         * @param worldMin worldMin for the octree blocks var blockSize = new Vector3((worldMax.x - worldMin.x) / 2, (worldMax.y - worldMin.y) / 2, (worldMax.z - worldMin.z) / 2);
+         * @param worldMax worldMax for the octree blocks var blockSize = new Vector3((worldMax.x - worldMin.x) / 2, (worldMax.y - worldMin.y) / 2, (worldMax.z - worldMin.z) / 2);
+         * @param entries meshes to be added to the octree blocks
+         */
         Octree.prototype.update = function (worldMin, worldMax, entries) {
             Octree._CreateBlocks(worldMin, worldMax, entries, this._maxBlockCapacity, 0, this.maxDepth, this, this._creationFunc);
         };
+        /**
+         * Adds a mesh to the octree
+         * @param entry Mesh to add to the octree
+         */
         Octree.prototype.addMesh = function (entry) {
             for (var index = 0; index < this.blocks.length; index++) {
                 var block = this.blocks[index];
                 block.addEntry(entry);
             }
         };
+        /**
+         * Selects an array of meshes within the frustum
+         * @param frustumPlanes The frustum planes to use which will select all meshes within it
+         * @param allowDuplicate If duplicate objects are allowed in the resulting object array
+         * @returns array of meshes within the frustum
+         */
         Octree.prototype.select = function (frustumPlanes, allowDuplicate) {
             this._selectionContent.reset();
             for (var index = 0; index < this.blocks.length; index++) {
@@ -101354,6 +101591,13 @@ var BABYLON;
             }
             return this._selectionContent;
         };
+        /**
+         * Test if the octree intersect with the given bounding sphere and if yes, then add its content to the selection array
+         * @param sphereCenter defines the bounding sphere center
+         * @param sphereRadius defines the bounding sphere radius
+         * @param allowDuplicate defines if the selection array can contains duplicated entries
+         * @returns an array of objects that intersect the sphere
+         */
         Octree.prototype.intersects = function (sphereCenter, sphereRadius, allowDuplicate) {
             this._selectionContent.reset();
             for (var index = 0; index < this.blocks.length; index++) {
@@ -101368,6 +101612,11 @@ var BABYLON;
             }
             return this._selectionContent;
         };
+        /**
+        * Test if the octree intersect with the given ray and if yes, then add its content to resulting array
+         * @param ray defines the ray to test with
+         * @returns array of intersected objects
+         */
         Octree.prototype.intersectsRay = function (ray) {
             this._selectionContent.reset();
             for (var index = 0; index < this.blocks.length; index++) {
@@ -101377,6 +101626,9 @@ var BABYLON;
             this._selectionContent.concatWithNoDuplicate(this.dynamicContent);
             return this._selectionContent;
         };
+        /**
+         * @hidden
+         */
         Octree._CreateBlocks = function (worldMin, worldMax, entries, maxBlockCapacity, currentDepth, maxDepth, target, creationFunc) {
             target.blocks = new Array();
             var blockSize = new BABYLON.Vector3((worldMax.x - worldMin.x) / 2, (worldMax.y - worldMin.y) / 2, (worldMax.z - worldMin.z) / 2);
@@ -101393,12 +101645,18 @@ var BABYLON;
                 }
             }
         };
+        /**
+         * Adds a mesh into the octree block if it intersects the block
+         */
         Octree.CreationFuncForMeshes = function (entry, block) {
             var boundingInfo = entry.getBoundingInfo();
             if (!entry.isBlocked && boundingInfo.boundingBox.intersectsMinMax(block.minPoint, block.maxPoint)) {
                 block.entries.push(entry);
             }
         };
+        /**
+         * Adds a submesh into the octree block if it intersects the block
+         */
         Octree.CreationFuncForSubMeshes = function (entry, block) {
             var boundingInfo = entry.getBoundingInfo();
             if (boundingInfo.boundingBox.intersectsMinMax(block.minPoint, block.maxPoint)) {
@@ -101955,8 +102213,20 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /**
+     * StereoscopicInterlacePostProcess used to render stereo views from a rigged camera
+     */
     var StereoscopicInterlacePostProcess = /** @class */ (function (_super) {
         __extends(StereoscopicInterlacePostProcess, _super);
+        /**
+         * Initializes a StereoscopicInterlacePostProcess
+         * @param name The name of the effect.
+         * @param rigCameras The rig cameras to be appled to the post process
+         * @param isStereoscopicHoriz If the rendered results are horizontal or verticle
+         * @param samplingMode The sampling mode to be used when computing the pass. (default: 0)
+         * @param engine The engine which the post process will be applied. (default: current engine)
+         * @param reusable If the post process can be reused on the same frame. (default: false)
+         */
         function StereoscopicInterlacePostProcess(name, rigCameras, isStereoscopicHoriz, samplingMode, engine, reusable) {
             var _this = _super.call(this, name, "stereoscopicInterlace", ['stepSize'], ['camASampler'], 1, rigCameras[1], samplingMode, engine, reusable, isStereoscopicHoriz ? "#define IS_STEREOSCOPIC_HORIZ 1" : undefined) || this;
             _this._passedProcess = rigCameras[0]._rigPostProcess;
@@ -102147,8 +102417,18 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /**
+     * VRDistortionCorrectionPostProcess used for mobile VR
+     */
     var VRDistortionCorrectionPostProcess = /** @class */ (function (_super) {
         __extends(VRDistortionCorrectionPostProcess, _super);
+        /**
+         * Initializes the VRDistortionCorrectionPostProcess
+         * @param name The name of the effect.
+         * @param camera The camera to apply the render pass to.
+         * @param isRightEye If this is for the right eye distortion
+         * @param vrMetrics All the required metrics for the VR camera
+         */
         function VRDistortionCorrectionPostProcess(name, camera, isRightEye, vrMetrics) {
             var _this = _super.call(this, name, "vrDistortionCorrection", [
                 'LensCenter',
@@ -115049,7 +115329,8 @@ var BABYLON;
         /**
          * Static function used to export a particle system to a ParticleSystemSet variable.
          * Please note that the emitter shape is not exported
-         * @param system defines the particle systems to export
+         * @param systems defines the particle systems to export
+         * @returns the created particle system set
          */
         ParticleHelper.ExportSet = function (systems) {
             var set = new BABYLON.ParticleSystemSet();

+ 325 - 44
dist/preview release/babylon.no-module.max.js

@@ -3181,13 +3181,7 @@ var BABYLON;
          * @returns the current updated Vector3
          */
         Vector3.prototype.minimizeInPlace = function (other) {
-            if (other.x < this.x)
-                this.x = other.x;
-            if (other.y < this.y)
-                this.y = other.y;
-            if (other.z < this.z)
-                this.z = other.z;
-            return this;
+            return this.minimizeInPlaceFromFloats(other.x, other.y, other.z);
         };
         /**
          * Updates the current Vector3 with the maximal coordinate values between its and the given vector ones.
@@ -3195,12 +3189,32 @@ var BABYLON;
          * @returns the current updated Vector3
          */
         Vector3.prototype.maximizeInPlace = function (other) {
-            if (other.x > this.x)
-                this.x = other.x;
-            if (other.y > this.y)
-                this.y = other.y;
-            if (other.z > this.z)
-                this.z = other.z;
+            return this.maximizeInPlaceFromFloats(other.x, other.y, other.z);
+        };
+        /**
+         * Updates the current Vector3 with the minimal coordinate values between its and the given coordinates
+         * @param x defines the x coordinate of the operand
+         * @param y defines the y coordinate of the operand
+         * @param z defines the z coordinate of the operand
+         * @returns the current updated Vector3
+         */
+        Vector3.prototype.minimizeInPlaceFromFloats = function (x, y, z) {
+            this.x = Math.min(this.x, x);
+            this.y = Math.min(this.y, y);
+            this.z = Math.min(this.z, z);
+            return this;
+        };
+        /**
+         * Updates the current Vector3 with the maximal coordinate values between its and the given coordinates.
+         * @param x defines the x coordinate of the operand
+         * @param y defines the y coordinate of the operand
+         * @param z defines the z coordinate of the operand
+         * @returns the current updated Vector3
+         */
+        Vector3.prototype.maximizeInPlaceFromFloats = function (x, y, z) {
+            this.x = Math.max(this.x, x);
+            this.y = Math.max(this.y, y);
+            this.z = Math.max(this.z, z);
             return this;
         };
         Object.defineProperty(Vector3.prototype, "isNonUniform", {
@@ -9470,9 +9484,12 @@ var BABYLON;
             var minimum = new BABYLON.Vector3(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE);
             var maximum = new BABYLON.Vector3(-Number.MAX_VALUE, -Number.MAX_VALUE, -Number.MAX_VALUE);
             for (var index = indexStart; index < indexStart + indexCount; index++) {
-                var current = new BABYLON.Vector3(positions[indices[index] * 3], positions[indices[index] * 3 + 1], positions[indices[index] * 3 + 2]);
-                minimum = BABYLON.Vector3.Minimize(current, minimum);
-                maximum = BABYLON.Vector3.Maximize(current, maximum);
+                var offset = indices[index];
+                var x = positions[offset];
+                var y = positions[offset + 1];
+                var z = positions[offset + 2];
+                minimum.minimizeInPlaceFromFloats(x, y, z);
+                maximum.maximizeInPlaceFromFloats(x, y, z);
             }
             if (bias) {
                 minimum.x -= minimum.x * bias.x + bias.y;
@@ -9503,10 +9520,12 @@ var BABYLON;
             if (!stride) {
                 stride = 3;
             }
-            for (var index = start; index < start + count; index++) {
-                var current = new BABYLON.Vector3(positions[index * stride], positions[index * stride + 1], positions[index * stride + 2]);
-                minimum = BABYLON.Vector3.Minimize(current, minimum);
-                maximum = BABYLON.Vector3.Maximize(current, maximum);
+            for (var index = start, offset = start * stride; index < start + count; index++, offset += stride) {
+                var x = positions[offset];
+                var y = positions[offset + 1];
+                var z = positions[offset + 2];
+                minimum.minimizeInPlaceFromFloats(x, y, z);
+                maximum.maximizeInPlaceFromFloats(x, y, z);
             }
             if (bias) {
                 minimum.x -= minimum.x * bias.x + bias.y;
@@ -18262,6 +18281,8 @@ var BABYLON;
             this._worldMatrix = BABYLON.Matrix.Identity();
             /** @hidden */
             this._worldMatrixDeterminant = 0;
+            /** @hidden */
+            this._sceneRootNodesIndex = -1;
             this._animationPropertiesOverride = null;
             /**
             * An event triggered when the mesh is disposed
@@ -18274,7 +18295,7 @@ var BABYLON;
             this._scene = (scene || BABYLON.Engine.LastCreatedScene);
             this.uniqueId = this._scene.getUniqueId();
             this._initCache();
-            this._scene.rootNodes.push(this);
+            this.addToSceneRootNodes();
         }
         /**
          * Add a new node constructor
@@ -18325,8 +18346,7 @@ var BABYLON;
                         this._parentNode._children.splice(index, 1);
                     }
                     if (!parent) {
-                        // Need to add this node to the rootNodes
-                        this._scene.rootNodes.push(this);
+                        this.addToSceneRootNodes();
                     }
                 }
                 // Store new parent
@@ -18338,11 +18358,7 @@ var BABYLON;
                     }
                     this._parentNode._children.push(this);
                     if (!previousParentNode) {
-                        // Need to remove from rootNodes
-                        var rootNodeIndex = this._scene.rootNodes.indexOf(this);
-                        if (rootNodeIndex > -1) {
-                            this._scene.rootNodes.splice(rootNodeIndex, 1);
-                        }
+                        this.removeFromSceneRootNodes();
                     }
                 }
                 // Enabled state
@@ -18351,6 +18367,22 @@ var BABYLON;
             enumerable: true,
             configurable: true
         });
+        Node.prototype.addToSceneRootNodes = function () {
+            if (this._sceneRootNodesIndex === -1) {
+                this._sceneRootNodesIndex = this._scene.rootNodes.length;
+                this._scene.rootNodes.push(this);
+            }
+        };
+        Node.prototype.removeFromSceneRootNodes = function () {
+            if (this._sceneRootNodesIndex !== -1) {
+                var rootNodes = this._scene.rootNodes;
+                var lastIdx = rootNodes.length - 1;
+                rootNodes[this._sceneRootNodesIndex] = rootNodes[lastIdx];
+                rootNodes[this._sceneRootNodesIndex]._sceneRootNodesIndex = this._sceneRootNodesIndex;
+                this._scene.rootNodes.pop();
+                this._sceneRootNodesIndex = -1;
+            }
+        };
         Object.defineProperty(Node.prototype, "animationPropertiesOverride", {
             /**
              * Gets or sets the animation properties override
@@ -18798,10 +18830,7 @@ var BABYLON;
                 }
             }
             if (!this.parent) {
-                var rootNodeIndex = this._scene.rootNodes.indexOf(this);
-                if (rootNodeIndex > -1) {
-                    this._scene.rootNodes.splice(rootNodeIndex, 1);
-                }
+                this.removeFromSceneRootNodes();
             }
             else {
                 this.parent = null;
@@ -39709,10 +39738,15 @@ var BABYLON;
              *  Gets or sets the Bias Vector to apply on the bounding elements (box/sphere), the max extend is computed as v += v * bias.x + bias.y, the min is computed as v -= v * bias.x + bias.y
              */
             set: function (value) {
-                if (this._boundingBias && this._boundingBias.equals(value)) {
-                    return;
+                if (this._boundingBias) {
+                    if (this._boundingBias.equals(value)) {
+                        return;
+                    }
+                    this._boundingBias.copyFrom(value);
+                }
+                else {
+                    this._boundingBias = value.clone();
                 }
-                this._boundingBias = value.clone();
                 this._updateBoundingInfo(true, null);
             },
             enumerable: true,
@@ -59253,6 +59287,7 @@ var BABYLON;
          * @param gradient defines the gradient to use (between 0 and 1)
          * @param color1 defines the color to affect to the specified gradient
          * @param color2 defines an additional color used to define a range ([color, color2]) with main color to pick the final color from
+         * @returns this particle system
          */
         ParticleSystem.prototype.addColorGradient = function (gradient, color1, color2) {
             if (!this._colorGradients) {
@@ -59277,6 +59312,7 @@ var BABYLON;
         /**
          * Remove a specific color gradient
          * @param gradient defines the gradient to remove
+         * @returns this particle system
          */
         ParticleSystem.prototype.removeColorGradient = function (gradient) {
             if (!this._colorGradients) {
@@ -59777,6 +59813,7 @@ var BABYLON;
             }
             return attributeNamesOrOptions;
         };
+        /** @hidden */
         ParticleSystem._GetEffectCreationOptions = function (isAnimationSheetEnabled) {
             if (isAnimationSheetEnabled === void 0) { isAnimationSheetEnabled = false; }
             var effectCreationOption = ["invView", "view", "projection", "vClipPlane", "vClipPlane2", "vClipPlane3", "vClipPlane4", "textureMask", "translationPivot", "eyePosition"];
@@ -59785,6 +59822,7 @@ var BABYLON;
             }
             return effectCreationOption;
         };
+        /** @hidden */
         ParticleSystem.prototype._getEffect = function (blendMode) {
             if (this._customEffect) {
                 return this._customEffect;
@@ -68137,11 +68175,11 @@ var BABYLON;
                 path3D = storage.path3D.update(path);
                 pathArray = tubePathArray(path, path3D, storage.pathArray, radius, storage.tessellation, radiusFunction, storage.cap, arc);
                 instance = MeshBuilder.CreateRibbon("", { pathArray: pathArray, instance: instance });
-                instance._creationDataStorage = new BABYLON._CreationDataStorage();
-                instance._creationDataStorage.path3D = path3D;
-                instance._creationDataStorage.pathArray = pathArray;
-                instance._creationDataStorage.arc = arc;
-                instance._creationDataStorage.radius = radius;
+                // Update mode, no need to recreate the storage.
+                storage.path3D = path3D;
+                storage.pathArray = pathArray;
+                storage.arc = arc;
+                storage.radius = radius;
                 return instance;
             }
             // tube creation
@@ -82144,13 +82182,31 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /**
+     * PostProcessRenderPipelineManager class
+     * @see https://doc.babylonjs.com/how_to/how_to_use_postprocessrenderpipeline
+     */
     var PostProcessRenderPipelineManager = /** @class */ (function () {
+        /**
+         * Initializes a PostProcessRenderPipelineManager
+         * @see https://doc.babylonjs.com/how_to/how_to_use_postprocessrenderpipeline
+         */
         function PostProcessRenderPipelineManager() {
             this._renderPipelines = {};
         }
+        /**
+         * Adds a pipeline to the manager
+         * @param renderPipeline The pipeline to add
+         */
         PostProcessRenderPipelineManager.prototype.addPipeline = function (renderPipeline) {
             this._renderPipelines[renderPipeline._name] = renderPipeline;
         };
+        /**
+         * Attaches a camera to the pipeline
+         * @param renderPipelineName The name of the pipeline to attach to
+         * @param cameras the camera to attach
+         * @param unique if the camera can be attached multiple times to the pipeline
+         */
         PostProcessRenderPipelineManager.prototype.attachCamerasToRenderPipeline = function (renderPipelineName, cameras, unique) {
             if (unique === void 0) { unique = false; }
             var renderPipeline = this._renderPipelines[renderPipelineName];
@@ -82159,6 +82215,11 @@ var BABYLON;
             }
             renderPipeline._attachCameras(cameras, unique);
         };
+        /**
+         * Detaches a camera from the pipeline
+         * @param renderPipelineName The name of the pipeline to detach from
+         * @param cameras the camera to detach
+         */
         PostProcessRenderPipelineManager.prototype.detachCamerasFromRenderPipeline = function (renderPipelineName, cameras) {
             var renderPipeline = this._renderPipelines[renderPipelineName];
             if (!renderPipeline) {
@@ -82166,6 +82227,12 @@ var BABYLON;
             }
             renderPipeline._detachCameras(cameras);
         };
+        /**
+         * Enables an effect by name on a pipeline
+         * @param renderPipelineName the name of the pipeline to enable the effect in
+         * @param renderEffectName the name of the effect to enable
+         * @param cameras the cameras that the effect should be enabled on
+         */
         PostProcessRenderPipelineManager.prototype.enableEffectInPipeline = function (renderPipelineName, renderEffectName, cameras) {
             var renderPipeline = this._renderPipelines[renderPipelineName];
             if (!renderPipeline) {
@@ -82173,6 +82240,12 @@ var BABYLON;
             }
             renderPipeline._enableEffect(renderEffectName, cameras);
         };
+        /**
+         * Disables an effect by name on a pipeline
+         * @param renderPipelineName the name of the pipeline to disable the effect in
+         * @param renderEffectName the name of the effect to disable
+         * @param cameras the cameras that the effect should be disabled on
+         */
         PostProcessRenderPipelineManager.prototype.disableEffectInPipeline = function (renderPipelineName, renderEffectName, cameras) {
             var renderPipeline = this._renderPipelines[renderPipelineName];
             if (!renderPipeline) {
@@ -82180,6 +82253,9 @@ var BABYLON;
             }
             renderPipeline._disableEffect(renderEffectName, cameras);
         };
+        /**
+         * Updates the state of all contained render pipelines and disposes of any non supported pipelines
+         */
         PostProcessRenderPipelineManager.prototype.update = function () {
             for (var renderPipelineName in this._renderPipelines) {
                 if (this._renderPipelines.hasOwnProperty(renderPipelineName)) {
@@ -82203,6 +82279,9 @@ var BABYLON;
                 }
             }
         };
+        /**
+         * Disposes of the manager and pipelines
+         */
         PostProcessRenderPipelineManager.prototype.dispose = function () {
             for (var renderPipelineName in this._renderPipelines) {
                 if (this._renderPipelines.hasOwnProperty(renderPipelineName)) {
@@ -82464,7 +82543,16 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /**
+     * PostProcessRenderPipeline
+     * @see https://doc.babylonjs.com/how_to/how_to_use_postprocessrenderpipeline
+     */
     var PostProcessRenderPipeline = /** @class */ (function () {
+        /**
+         * Initializes a PostProcessRenderPipeline
+         * @param engine engine to add the pipeline to
+         * @param name name of the pipeline
+         */
         function PostProcessRenderPipeline(engine, name) {
             this.engine = engine;
             this._name = name;
@@ -82472,10 +82560,17 @@ var BABYLON;
             this._renderEffectsForIsolatedPass = new Array();
             this._cameras = [];
         }
+        /**
+         * "PostProcessRenderPipeline"
+         * @returns "PostProcessRenderPipeline"
+         */
         PostProcessRenderPipeline.prototype.getClassName = function () {
             return "PostProcessRenderPipeline";
         };
         Object.defineProperty(PostProcessRenderPipeline.prototype, "isSupported", {
+            /**
+             * If all the render effects in the pipeline are support
+             */
             get: function () {
                 for (var renderEffectName in this._renderEffects) {
                     if (this._renderEffects.hasOwnProperty(renderEffectName)) {
@@ -82489,6 +82584,10 @@ var BABYLON;
             enumerable: true,
             configurable: true
         });
+        /**
+         * Adds an effect to the pipeline
+         * @param renderEffect the effect to add
+         */
         PostProcessRenderPipeline.prototype.addEffect = function (renderEffect) {
             this._renderEffects[renderEffect._name] = renderEffect;
         };
@@ -82504,6 +82603,7 @@ var BABYLON;
             }
             renderEffects._enable(BABYLON.Tools.MakeArray(cameras || this._cameras));
         };
+        /** @hidden */
         PostProcessRenderPipeline.prototype._disableEffect = function (renderEffectName, cameras) {
             var renderEffects = this._renderEffects[renderEffectName];
             if (!renderEffects) {
@@ -82584,6 +82684,9 @@ var BABYLON;
             }
             return false;
         };
+        /**
+         * Disposes of the pipeline
+         */
         PostProcessRenderPipeline.prototype.dispose = function () {
             // Must be implemented by children 
         };
@@ -84051,9 +84154,15 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /**
+     * Standard rendering pipeline
+     * Default pipeline should be used going forward but the standard pipeline will be kept for backwards compatibility.
+     * @see https://doc.babylonjs.com/how_to/using_standard_rendering_pipeline
+     */
     var StandardRenderingPipeline = /** @class */ (function (_super) {
         __extends(StandardRenderingPipeline, _super);
         /**
+         * Default pipeline should be used going forward but the standard pipeline will be kept for backwards compatibility.
          * @constructor
          * @param {string} name - The rendering pipeline name
          * @param {BABYLON.Scene} scene - The scene linked to this pipeline
@@ -86108,10 +86217,12 @@ var BABYLON;
              */
             _this.SharpenPostProcessId = "SharpenPostProcessEffect";
             /**
+             * @ignore
              * ID of the image processing post process;
              */
             _this.ImageProcessingPostProcessId = "ImageProcessingPostProcessEffect";
             /**
+             * @ignore
              * ID of the Fast Approximate Anti-Aliasing post process;
              */
             _this.FxaaPostProcessId = "FxaaPostProcessEffect";
@@ -88124,9 +88235,33 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /**
+     * Post process which applies a refractin texture
+     * @see https://doc.babylonjs.com/how_to/how_to_use_postprocesses#refraction
+     */
     var RefractionPostProcess = /** @class */ (function (_super) {
         __extends(RefractionPostProcess, _super);
-        function RefractionPostProcess(name, refractionTextureUrl, color, depth, colorLevel, options, camera, samplingMode, engine, reusable) {
+        /**
+         * Initializes the RefractionPostProcess
+         * @see https://doc.babylonjs.com/how_to/how_to_use_postprocesses#refraction
+         * @param name The name of the effect.
+         * @param refractionTextureUrl Url of the refraction texture to use
+         * @param color the base color of the refraction (used to taint the rendering)
+         * @param depth simulated refraction depth
+         * @param colorLevel the coefficient of the base color (0 to remove base color tainting)
+         * @param camera The camera to apply the render pass to.
+         * @param options The required width/height ratio to downsize to before computing the render pass.
+         * @param samplingMode The sampling mode to be used when computing the pass. (default: 0)
+         * @param engine The engine which the post process will be applied. (default: current engine)
+         * @param reusable If the post process can be reused on the same frame. (default: false)
+         */
+        function RefractionPostProcess(name, refractionTextureUrl, 
+        /** the base color of the refraction (used to taint the rendering) */
+        color, 
+        /** simulated refraction depth */
+        depth, 
+        /** the coefficient of the base color (0 to remove base color tainting) */
+        colorLevel, options, camera, samplingMode, engine, reusable) {
             var _this = _super.call(this, name, "refraction", ["baseColor", "depth", "colorLevel"], ["refractionSampler"], options, camera, samplingMode, engine, reusable) || this;
             _this.color = color;
             _this.depth = depth;
@@ -88162,6 +88297,10 @@ var BABYLON;
             configurable: true
         });
         // Methods
+        /**
+         * Disposes of the post process
+         * @param camera Camera to dispose post process on
+         */
         RefractionPostProcess.prototype.dispose = function (camera) {
             if (this._refTexture && this._ownRefractionTexture) {
                 this._refTexture.dispose();
@@ -88179,10 +88318,26 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /**
+     * Post process used to render in black and white
+     */
     var BlackAndWhitePostProcess = /** @class */ (function (_super) {
         __extends(BlackAndWhitePostProcess, _super);
+        /**
+         * Creates a black and white post process
+         * @see https://doc.babylonjs.com/how_to/how_to_use_postprocesses#black-and-white
+         * @param name The name of the effect.
+         * @param options The required width/height ratio to downsize to before computing the render pass.
+         * @param camera The camera to apply the render pass to.
+         * @param samplingMode The sampling mode to be used when computing the pass. (default: 0)
+         * @param engine The engine which the post process will be applied. (default: current engine)
+         * @param reusable If the post process can be reused on the same frame. (default: false)
+         */
         function BlackAndWhitePostProcess(name, options, camera, samplingMode, engine, reusable) {
             var _this = _super.call(this, name, "blackAndWhite", ["degree"], null, options, camera, samplingMode, engine, reusable) || this;
+            /**
+             * Linear about to convert he result to black and white (default: 1)
+             */
             _this.degree = 1;
             _this.onApplyObservable.add(function (effect) {
                 effect.setFloat("degree", _this.degree);
@@ -88264,9 +88419,24 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /**
+     * Applies a kernel filter to the image
+     */
     var FilterPostProcess = /** @class */ (function (_super) {
         __extends(FilterPostProcess, _super);
-        function FilterPostProcess(name, kernelMatrix, options, camera, samplingMode, engine, reusable) {
+        /**
+         *
+         * @param name The name of the effect.
+         * @param kernelMatrix The matrix to be applied to the image
+         * @param options The required width/height ratio to downsize to before computing the render pass.
+         * @param camera The camera to apply the render pass to.
+         * @param samplingMode The sampling mode to be used when computing the pass. (default: 0)
+         * @param engine The engine which the post process will be applied. (default: current engine)
+         * @param reusable If the post process can be reused on the same frame. (default: false)
+         */
+        function FilterPostProcess(name, 
+        /** The matrix to be applied to the image */
+        kernelMatrix, options, camera, samplingMode, engine, reusable) {
             var _this = _super.call(this, name, "filter", ["kernelMatrix"], null, options, camera, samplingMode, engine, reusable) || this;
             _this.kernelMatrix = kernelMatrix;
             _this.onApply = function (effect) {
@@ -88780,8 +88950,20 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /**
+     * DisplayPassPostProcess which produces an output the same as it's input
+     */
     var DisplayPassPostProcess = /** @class */ (function (_super) {
         __extends(DisplayPassPostProcess, _super);
+        /**
+         * Creates the DisplayPassPostProcess
+         * @param name The name of the effect.
+         * @param options The required width/height ratio to downsize to before computing the render pass.
+         * @param camera The camera to apply the render pass to.
+         * @param samplingMode The sampling mode to be used when computing the pass. (default: 0)
+         * @param engine The engine which the post process will be applied. (default: current engine)
+         * @param reusable If the post process can be reused on the same frame. (default: false)
+         */
         function DisplayPassPostProcess(name, options, camera, samplingMode, engine, reusable) {
             return _super.call(this, name, "displayPass", ["passSampler"], ["passSampler"], options, camera, samplingMode, engine, reusable) || this;
         }
@@ -88795,8 +88977,23 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /**
+     * Extracts highlights from the image
+     * @see https://doc.babylonjs.com/how_to/how_to_use_postprocesses
+     */
     var HighlightsPostProcess = /** @class */ (function (_super) {
         __extends(HighlightsPostProcess, _super);
+        /**
+         * Extracts highlights from the image
+         * @see https://doc.babylonjs.com/how_to/how_to_use_postprocesses
+         * @param name The name of the effect.
+         * @param options The required width/height ratio to downsize to before computing the render pass.
+         * @param camera The camera to apply the render pass to.
+         * @param samplingMode The sampling mode to be used when computing the pass. (default: 0)
+         * @param engine The engine which the post process will be applied. (default: current engine)
+         * @param reusable If the post process can be reused on the same frame. (default: false)
+         * @param textureType Type of texture for the post process (default: Engine.TEXTURETYPE_UNSIGNED_INT)
+         */
         function HighlightsPostProcess(name, options, camera, samplingMode, engine, reusable, textureType) {
             if (textureType === void 0) { textureType = BABYLON.Engine.TEXTURETYPE_UNSIGNED_INT; }
             return _super.call(this, name, "highlights", null, null, options, camera, samplingMode, engine, reusable, null, textureType) || this;
@@ -88816,6 +89013,10 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /**
+     * ImageProcessingPostProcess
+     * @see https://doc.babylonjs.com/how_to/how_to_use_postprocesses#imageprocessing
+     */
     var ImageProcessingPostProcess = /** @class */ (function (_super) {
         __extends(ImageProcessingPostProcess, _super);
         function ImageProcessingPostProcess(name, options, camera, samplingMode, engine, reusable, textureType, imageProcessingConfiguration) {
@@ -89188,6 +89389,10 @@ var BABYLON;
             enumerable: true,
             configurable: true
         });
+        /**
+         *  "ImageProcessingPostProcess"
+         * @returns "ImageProcessingPostProcess"
+         */
         ImageProcessingPostProcess.prototype.getClassName = function () {
             return "ImageProcessingPostProcess";
         };
@@ -101288,25 +101493,57 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /**
+     * Octrees are a really powerful data structure that can quickly select entities based on space coordinates.
+     * @see https://doc.babylonjs.com/how_to/optimizing_your_scene_with_octrees
+     */
     var Octree = /** @class */ (function () {
-        function Octree(creationFunc, maxBlockCapacity, maxDepth) {
+        /**
+         * Creates a octree
+         * @see https://doc.babylonjs.com/how_to/optimizing_your_scene_with_octrees
+         * @param creationFunc function to be used to instatiate the octree
+         * @param maxBlockCapacity defines the maximum number of meshes you want on your octree's leaves (default: 64)
+         * @param maxDepth defines the maximum depth (sub-levels) for your octree. Default value is 2, which means 8 8 8 = 512 blocks :) (This parameter takes precedence over capacity.)
+         */
+        function Octree(creationFunc, maxBlockCapacity, 
+        /** Defines the maximum depth (sub-levels) for your octree. Default value is 2, which means 8 8 8 = 512 blocks :) (This parameter takes precedence over capacity.) */
+        maxDepth) {
             if (maxDepth === void 0) { maxDepth = 2; }
             this.maxDepth = maxDepth;
+            /**
+             * Content stored in the octree
+             */
             this.dynamicContent = new Array();
             this._maxBlockCapacity = maxBlockCapacity || 64;
             this._selectionContent = new BABYLON.SmartArrayNoDuplicate(1024);
             this._creationFunc = creationFunc;
         }
         // Methods
+        /**
+         * Updates the octree by adding blocks for the passed in meshes within the min and max world parameters
+         * @param worldMin worldMin for the octree blocks var blockSize = new Vector3((worldMax.x - worldMin.x) / 2, (worldMax.y - worldMin.y) / 2, (worldMax.z - worldMin.z) / 2);
+         * @param worldMax worldMax for the octree blocks var blockSize = new Vector3((worldMax.x - worldMin.x) / 2, (worldMax.y - worldMin.y) / 2, (worldMax.z - worldMin.z) / 2);
+         * @param entries meshes to be added to the octree blocks
+         */
         Octree.prototype.update = function (worldMin, worldMax, entries) {
             Octree._CreateBlocks(worldMin, worldMax, entries, this._maxBlockCapacity, 0, this.maxDepth, this, this._creationFunc);
         };
+        /**
+         * Adds a mesh to the octree
+         * @param entry Mesh to add to the octree
+         */
         Octree.prototype.addMesh = function (entry) {
             for (var index = 0; index < this.blocks.length; index++) {
                 var block = this.blocks[index];
                 block.addEntry(entry);
             }
         };
+        /**
+         * Selects an array of meshes within the frustum
+         * @param frustumPlanes The frustum planes to use which will select all meshes within it
+         * @param allowDuplicate If duplicate objects are allowed in the resulting object array
+         * @returns array of meshes within the frustum
+         */
         Octree.prototype.select = function (frustumPlanes, allowDuplicate) {
             this._selectionContent.reset();
             for (var index = 0; index < this.blocks.length; index++) {
@@ -101321,6 +101558,13 @@ var BABYLON;
             }
             return this._selectionContent;
         };
+        /**
+         * Test if the octree intersect with the given bounding sphere and if yes, then add its content to the selection array
+         * @param sphereCenter defines the bounding sphere center
+         * @param sphereRadius defines the bounding sphere radius
+         * @param allowDuplicate defines if the selection array can contains duplicated entries
+         * @returns an array of objects that intersect the sphere
+         */
         Octree.prototype.intersects = function (sphereCenter, sphereRadius, allowDuplicate) {
             this._selectionContent.reset();
             for (var index = 0; index < this.blocks.length; index++) {
@@ -101335,6 +101579,11 @@ var BABYLON;
             }
             return this._selectionContent;
         };
+        /**
+        * Test if the octree intersect with the given ray and if yes, then add its content to resulting array
+         * @param ray defines the ray to test with
+         * @returns array of intersected objects
+         */
         Octree.prototype.intersectsRay = function (ray) {
             this._selectionContent.reset();
             for (var index = 0; index < this.blocks.length; index++) {
@@ -101344,6 +101593,9 @@ var BABYLON;
             this._selectionContent.concatWithNoDuplicate(this.dynamicContent);
             return this._selectionContent;
         };
+        /**
+         * @hidden
+         */
         Octree._CreateBlocks = function (worldMin, worldMax, entries, maxBlockCapacity, currentDepth, maxDepth, target, creationFunc) {
             target.blocks = new Array();
             var blockSize = new BABYLON.Vector3((worldMax.x - worldMin.x) / 2, (worldMax.y - worldMin.y) / 2, (worldMax.z - worldMin.z) / 2);
@@ -101360,12 +101612,18 @@ var BABYLON;
                 }
             }
         };
+        /**
+         * Adds a mesh into the octree block if it intersects the block
+         */
         Octree.CreationFuncForMeshes = function (entry, block) {
             var boundingInfo = entry.getBoundingInfo();
             if (!entry.isBlocked && boundingInfo.boundingBox.intersectsMinMax(block.minPoint, block.maxPoint)) {
                 block.entries.push(entry);
             }
         };
+        /**
+         * Adds a submesh into the octree block if it intersects the block
+         */
         Octree.CreationFuncForSubMeshes = function (entry, block) {
             var boundingInfo = entry.getBoundingInfo();
             if (boundingInfo.boundingBox.intersectsMinMax(block.minPoint, block.maxPoint)) {
@@ -101922,8 +102180,20 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /**
+     * StereoscopicInterlacePostProcess used to render stereo views from a rigged camera
+     */
     var StereoscopicInterlacePostProcess = /** @class */ (function (_super) {
         __extends(StereoscopicInterlacePostProcess, _super);
+        /**
+         * Initializes a StereoscopicInterlacePostProcess
+         * @param name The name of the effect.
+         * @param rigCameras The rig cameras to be appled to the post process
+         * @param isStereoscopicHoriz If the rendered results are horizontal or verticle
+         * @param samplingMode The sampling mode to be used when computing the pass. (default: 0)
+         * @param engine The engine which the post process will be applied. (default: current engine)
+         * @param reusable If the post process can be reused on the same frame. (default: false)
+         */
         function StereoscopicInterlacePostProcess(name, rigCameras, isStereoscopicHoriz, samplingMode, engine, reusable) {
             var _this = _super.call(this, name, "stereoscopicInterlace", ['stepSize'], ['camASampler'], 1, rigCameras[1], samplingMode, engine, reusable, isStereoscopicHoriz ? "#define IS_STEREOSCOPIC_HORIZ 1" : undefined) || this;
             _this._passedProcess = rigCameras[0]._rigPostProcess;
@@ -102114,8 +102384,18 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /**
+     * VRDistortionCorrectionPostProcess used for mobile VR
+     */
     var VRDistortionCorrectionPostProcess = /** @class */ (function (_super) {
         __extends(VRDistortionCorrectionPostProcess, _super);
+        /**
+         * Initializes the VRDistortionCorrectionPostProcess
+         * @param name The name of the effect.
+         * @param camera The camera to apply the render pass to.
+         * @param isRightEye If this is for the right eye distortion
+         * @param vrMetrics All the required metrics for the VR camera
+         */
         function VRDistortionCorrectionPostProcess(name, camera, isRightEye, vrMetrics) {
             var _this = _super.call(this, name, "vrDistortionCorrection", [
                 'LensCenter',
@@ -115016,7 +115296,8 @@ var BABYLON;
         /**
          * Static function used to export a particle system to a ParticleSystemSet variable.
          * Please note that the emitter shape is not exported
-         * @param system defines the particle systems to export
+         * @param systems defines the particle systems to export
+         * @returns the created particle system set
          */
         ParticleHelper.ExportSet = function (systems) {
             var set = new BABYLON.ParticleSystemSet();

File diff ditekan karena terlalu besar
+ 1 - 1
dist/preview release/babylon.worker.js


+ 325 - 44
dist/preview release/es6.js

@@ -3181,13 +3181,7 @@ var BABYLON;
          * @returns the current updated Vector3
          */
         Vector3.prototype.minimizeInPlace = function (other) {
-            if (other.x < this.x)
-                this.x = other.x;
-            if (other.y < this.y)
-                this.y = other.y;
-            if (other.z < this.z)
-                this.z = other.z;
-            return this;
+            return this.minimizeInPlaceFromFloats(other.x, other.y, other.z);
         };
         /**
          * Updates the current Vector3 with the maximal coordinate values between its and the given vector ones.
@@ -3195,12 +3189,32 @@ var BABYLON;
          * @returns the current updated Vector3
          */
         Vector3.prototype.maximizeInPlace = function (other) {
-            if (other.x > this.x)
-                this.x = other.x;
-            if (other.y > this.y)
-                this.y = other.y;
-            if (other.z > this.z)
-                this.z = other.z;
+            return this.maximizeInPlaceFromFloats(other.x, other.y, other.z);
+        };
+        /**
+         * Updates the current Vector3 with the minimal coordinate values between its and the given coordinates
+         * @param x defines the x coordinate of the operand
+         * @param y defines the y coordinate of the operand
+         * @param z defines the z coordinate of the operand
+         * @returns the current updated Vector3
+         */
+        Vector3.prototype.minimizeInPlaceFromFloats = function (x, y, z) {
+            this.x = Math.min(this.x, x);
+            this.y = Math.min(this.y, y);
+            this.z = Math.min(this.z, z);
+            return this;
+        };
+        /**
+         * Updates the current Vector3 with the maximal coordinate values between its and the given coordinates.
+         * @param x defines the x coordinate of the operand
+         * @param y defines the y coordinate of the operand
+         * @param z defines the z coordinate of the operand
+         * @returns the current updated Vector3
+         */
+        Vector3.prototype.maximizeInPlaceFromFloats = function (x, y, z) {
+            this.x = Math.max(this.x, x);
+            this.y = Math.max(this.y, y);
+            this.z = Math.max(this.z, z);
             return this;
         };
         Object.defineProperty(Vector3.prototype, "isNonUniform", {
@@ -9470,9 +9484,12 @@ var BABYLON;
             var minimum = new BABYLON.Vector3(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE);
             var maximum = new BABYLON.Vector3(-Number.MAX_VALUE, -Number.MAX_VALUE, -Number.MAX_VALUE);
             for (var index = indexStart; index < indexStart + indexCount; index++) {
-                var current = new BABYLON.Vector3(positions[indices[index] * 3], positions[indices[index] * 3 + 1], positions[indices[index] * 3 + 2]);
-                minimum = BABYLON.Vector3.Minimize(current, minimum);
-                maximum = BABYLON.Vector3.Maximize(current, maximum);
+                var offset = indices[index];
+                var x = positions[offset];
+                var y = positions[offset + 1];
+                var z = positions[offset + 2];
+                minimum.minimizeInPlaceFromFloats(x, y, z);
+                maximum.maximizeInPlaceFromFloats(x, y, z);
             }
             if (bias) {
                 minimum.x -= minimum.x * bias.x + bias.y;
@@ -9503,10 +9520,12 @@ var BABYLON;
             if (!stride) {
                 stride = 3;
             }
-            for (var index = start; index < start + count; index++) {
-                var current = new BABYLON.Vector3(positions[index * stride], positions[index * stride + 1], positions[index * stride + 2]);
-                minimum = BABYLON.Vector3.Minimize(current, minimum);
-                maximum = BABYLON.Vector3.Maximize(current, maximum);
+            for (var index = start, offset = start * stride; index < start + count; index++, offset += stride) {
+                var x = positions[offset];
+                var y = positions[offset + 1];
+                var z = positions[offset + 2];
+                minimum.minimizeInPlaceFromFloats(x, y, z);
+                maximum.maximizeInPlaceFromFloats(x, y, z);
             }
             if (bias) {
                 minimum.x -= minimum.x * bias.x + bias.y;
@@ -18262,6 +18281,8 @@ var BABYLON;
             this._worldMatrix = BABYLON.Matrix.Identity();
             /** @hidden */
             this._worldMatrixDeterminant = 0;
+            /** @hidden */
+            this._sceneRootNodesIndex = -1;
             this._animationPropertiesOverride = null;
             /**
             * An event triggered when the mesh is disposed
@@ -18274,7 +18295,7 @@ var BABYLON;
             this._scene = (scene || BABYLON.Engine.LastCreatedScene);
             this.uniqueId = this._scene.getUniqueId();
             this._initCache();
-            this._scene.rootNodes.push(this);
+            this.addToSceneRootNodes();
         }
         /**
          * Add a new node constructor
@@ -18325,8 +18346,7 @@ var BABYLON;
                         this._parentNode._children.splice(index, 1);
                     }
                     if (!parent) {
-                        // Need to add this node to the rootNodes
-                        this._scene.rootNodes.push(this);
+                        this.addToSceneRootNodes();
                     }
                 }
                 // Store new parent
@@ -18338,11 +18358,7 @@ var BABYLON;
                     }
                     this._parentNode._children.push(this);
                     if (!previousParentNode) {
-                        // Need to remove from rootNodes
-                        var rootNodeIndex = this._scene.rootNodes.indexOf(this);
-                        if (rootNodeIndex > -1) {
-                            this._scene.rootNodes.splice(rootNodeIndex, 1);
-                        }
+                        this.removeFromSceneRootNodes();
                     }
                 }
                 // Enabled state
@@ -18351,6 +18367,22 @@ var BABYLON;
             enumerable: true,
             configurable: true
         });
+        Node.prototype.addToSceneRootNodes = function () {
+            if (this._sceneRootNodesIndex === -1) {
+                this._sceneRootNodesIndex = this._scene.rootNodes.length;
+                this._scene.rootNodes.push(this);
+            }
+        };
+        Node.prototype.removeFromSceneRootNodes = function () {
+            if (this._sceneRootNodesIndex !== -1) {
+                var rootNodes = this._scene.rootNodes;
+                var lastIdx = rootNodes.length - 1;
+                rootNodes[this._sceneRootNodesIndex] = rootNodes[lastIdx];
+                rootNodes[this._sceneRootNodesIndex]._sceneRootNodesIndex = this._sceneRootNodesIndex;
+                this._scene.rootNodes.pop();
+                this._sceneRootNodesIndex = -1;
+            }
+        };
         Object.defineProperty(Node.prototype, "animationPropertiesOverride", {
             /**
              * Gets or sets the animation properties override
@@ -18798,10 +18830,7 @@ var BABYLON;
                 }
             }
             if (!this.parent) {
-                var rootNodeIndex = this._scene.rootNodes.indexOf(this);
-                if (rootNodeIndex > -1) {
-                    this._scene.rootNodes.splice(rootNodeIndex, 1);
-                }
+                this.removeFromSceneRootNodes();
             }
             else {
                 this.parent = null;
@@ -39709,10 +39738,15 @@ var BABYLON;
              *  Gets or sets the Bias Vector to apply on the bounding elements (box/sphere), the max extend is computed as v += v * bias.x + bias.y, the min is computed as v -= v * bias.x + bias.y
              */
             set: function (value) {
-                if (this._boundingBias && this._boundingBias.equals(value)) {
-                    return;
+                if (this._boundingBias) {
+                    if (this._boundingBias.equals(value)) {
+                        return;
+                    }
+                    this._boundingBias.copyFrom(value);
+                }
+                else {
+                    this._boundingBias = value.clone();
                 }
-                this._boundingBias = value.clone();
                 this._updateBoundingInfo(true, null);
             },
             enumerable: true,
@@ -59253,6 +59287,7 @@ var BABYLON;
          * @param gradient defines the gradient to use (between 0 and 1)
          * @param color1 defines the color to affect to the specified gradient
          * @param color2 defines an additional color used to define a range ([color, color2]) with main color to pick the final color from
+         * @returns this particle system
          */
         ParticleSystem.prototype.addColorGradient = function (gradient, color1, color2) {
             if (!this._colorGradients) {
@@ -59277,6 +59312,7 @@ var BABYLON;
         /**
          * Remove a specific color gradient
          * @param gradient defines the gradient to remove
+         * @returns this particle system
          */
         ParticleSystem.prototype.removeColorGradient = function (gradient) {
             if (!this._colorGradients) {
@@ -59777,6 +59813,7 @@ var BABYLON;
             }
             return attributeNamesOrOptions;
         };
+        /** @hidden */
         ParticleSystem._GetEffectCreationOptions = function (isAnimationSheetEnabled) {
             if (isAnimationSheetEnabled === void 0) { isAnimationSheetEnabled = false; }
             var effectCreationOption = ["invView", "view", "projection", "vClipPlane", "vClipPlane2", "vClipPlane3", "vClipPlane4", "textureMask", "translationPivot", "eyePosition"];
@@ -59785,6 +59822,7 @@ var BABYLON;
             }
             return effectCreationOption;
         };
+        /** @hidden */
         ParticleSystem.prototype._getEffect = function (blendMode) {
             if (this._customEffect) {
                 return this._customEffect;
@@ -68137,11 +68175,11 @@ var BABYLON;
                 path3D = storage.path3D.update(path);
                 pathArray = tubePathArray(path, path3D, storage.pathArray, radius, storage.tessellation, radiusFunction, storage.cap, arc);
                 instance = MeshBuilder.CreateRibbon("", { pathArray: pathArray, instance: instance });
-                instance._creationDataStorage = new BABYLON._CreationDataStorage();
-                instance._creationDataStorage.path3D = path3D;
-                instance._creationDataStorage.pathArray = pathArray;
-                instance._creationDataStorage.arc = arc;
-                instance._creationDataStorage.radius = radius;
+                // Update mode, no need to recreate the storage.
+                storage.path3D = path3D;
+                storage.pathArray = pathArray;
+                storage.arc = arc;
+                storage.radius = radius;
                 return instance;
             }
             // tube creation
@@ -82144,13 +82182,31 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /**
+     * PostProcessRenderPipelineManager class
+     * @see https://doc.babylonjs.com/how_to/how_to_use_postprocessrenderpipeline
+     */
     var PostProcessRenderPipelineManager = /** @class */ (function () {
+        /**
+         * Initializes a PostProcessRenderPipelineManager
+         * @see https://doc.babylonjs.com/how_to/how_to_use_postprocessrenderpipeline
+         */
         function PostProcessRenderPipelineManager() {
             this._renderPipelines = {};
         }
+        /**
+         * Adds a pipeline to the manager
+         * @param renderPipeline The pipeline to add
+         */
         PostProcessRenderPipelineManager.prototype.addPipeline = function (renderPipeline) {
             this._renderPipelines[renderPipeline._name] = renderPipeline;
         };
+        /**
+         * Attaches a camera to the pipeline
+         * @param renderPipelineName The name of the pipeline to attach to
+         * @param cameras the camera to attach
+         * @param unique if the camera can be attached multiple times to the pipeline
+         */
         PostProcessRenderPipelineManager.prototype.attachCamerasToRenderPipeline = function (renderPipelineName, cameras, unique) {
             if (unique === void 0) { unique = false; }
             var renderPipeline = this._renderPipelines[renderPipelineName];
@@ -82159,6 +82215,11 @@ var BABYLON;
             }
             renderPipeline._attachCameras(cameras, unique);
         };
+        /**
+         * Detaches a camera from the pipeline
+         * @param renderPipelineName The name of the pipeline to detach from
+         * @param cameras the camera to detach
+         */
         PostProcessRenderPipelineManager.prototype.detachCamerasFromRenderPipeline = function (renderPipelineName, cameras) {
             var renderPipeline = this._renderPipelines[renderPipelineName];
             if (!renderPipeline) {
@@ -82166,6 +82227,12 @@ var BABYLON;
             }
             renderPipeline._detachCameras(cameras);
         };
+        /**
+         * Enables an effect by name on a pipeline
+         * @param renderPipelineName the name of the pipeline to enable the effect in
+         * @param renderEffectName the name of the effect to enable
+         * @param cameras the cameras that the effect should be enabled on
+         */
         PostProcessRenderPipelineManager.prototype.enableEffectInPipeline = function (renderPipelineName, renderEffectName, cameras) {
             var renderPipeline = this._renderPipelines[renderPipelineName];
             if (!renderPipeline) {
@@ -82173,6 +82240,12 @@ var BABYLON;
             }
             renderPipeline._enableEffect(renderEffectName, cameras);
         };
+        /**
+         * Disables an effect by name on a pipeline
+         * @param renderPipelineName the name of the pipeline to disable the effect in
+         * @param renderEffectName the name of the effect to disable
+         * @param cameras the cameras that the effect should be disabled on
+         */
         PostProcessRenderPipelineManager.prototype.disableEffectInPipeline = function (renderPipelineName, renderEffectName, cameras) {
             var renderPipeline = this._renderPipelines[renderPipelineName];
             if (!renderPipeline) {
@@ -82180,6 +82253,9 @@ var BABYLON;
             }
             renderPipeline._disableEffect(renderEffectName, cameras);
         };
+        /**
+         * Updates the state of all contained render pipelines and disposes of any non supported pipelines
+         */
         PostProcessRenderPipelineManager.prototype.update = function () {
             for (var renderPipelineName in this._renderPipelines) {
                 if (this._renderPipelines.hasOwnProperty(renderPipelineName)) {
@@ -82203,6 +82279,9 @@ var BABYLON;
                 }
             }
         };
+        /**
+         * Disposes of the manager and pipelines
+         */
         PostProcessRenderPipelineManager.prototype.dispose = function () {
             for (var renderPipelineName in this._renderPipelines) {
                 if (this._renderPipelines.hasOwnProperty(renderPipelineName)) {
@@ -82464,7 +82543,16 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /**
+     * PostProcessRenderPipeline
+     * @see https://doc.babylonjs.com/how_to/how_to_use_postprocessrenderpipeline
+     */
     var PostProcessRenderPipeline = /** @class */ (function () {
+        /**
+         * Initializes a PostProcessRenderPipeline
+         * @param engine engine to add the pipeline to
+         * @param name name of the pipeline
+         */
         function PostProcessRenderPipeline(engine, name) {
             this.engine = engine;
             this._name = name;
@@ -82472,10 +82560,17 @@ var BABYLON;
             this._renderEffectsForIsolatedPass = new Array();
             this._cameras = [];
         }
+        /**
+         * "PostProcessRenderPipeline"
+         * @returns "PostProcessRenderPipeline"
+         */
         PostProcessRenderPipeline.prototype.getClassName = function () {
             return "PostProcessRenderPipeline";
         };
         Object.defineProperty(PostProcessRenderPipeline.prototype, "isSupported", {
+            /**
+             * If all the render effects in the pipeline are support
+             */
             get: function () {
                 for (var renderEffectName in this._renderEffects) {
                     if (this._renderEffects.hasOwnProperty(renderEffectName)) {
@@ -82489,6 +82584,10 @@ var BABYLON;
             enumerable: true,
             configurable: true
         });
+        /**
+         * Adds an effect to the pipeline
+         * @param renderEffect the effect to add
+         */
         PostProcessRenderPipeline.prototype.addEffect = function (renderEffect) {
             this._renderEffects[renderEffect._name] = renderEffect;
         };
@@ -82504,6 +82603,7 @@ var BABYLON;
             }
             renderEffects._enable(BABYLON.Tools.MakeArray(cameras || this._cameras));
         };
+        /** @hidden */
         PostProcessRenderPipeline.prototype._disableEffect = function (renderEffectName, cameras) {
             var renderEffects = this._renderEffects[renderEffectName];
             if (!renderEffects) {
@@ -82584,6 +82684,9 @@ var BABYLON;
             }
             return false;
         };
+        /**
+         * Disposes of the pipeline
+         */
         PostProcessRenderPipeline.prototype.dispose = function () {
             // Must be implemented by children 
         };
@@ -84051,9 +84154,15 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /**
+     * Standard rendering pipeline
+     * Default pipeline should be used going forward but the standard pipeline will be kept for backwards compatibility.
+     * @see https://doc.babylonjs.com/how_to/using_standard_rendering_pipeline
+     */
     var StandardRenderingPipeline = /** @class */ (function (_super) {
         __extends(StandardRenderingPipeline, _super);
         /**
+         * Default pipeline should be used going forward but the standard pipeline will be kept for backwards compatibility.
          * @constructor
          * @param {string} name - The rendering pipeline name
          * @param {BABYLON.Scene} scene - The scene linked to this pipeline
@@ -86108,10 +86217,12 @@ var BABYLON;
              */
             _this.SharpenPostProcessId = "SharpenPostProcessEffect";
             /**
+             * @ignore
              * ID of the image processing post process;
              */
             _this.ImageProcessingPostProcessId = "ImageProcessingPostProcessEffect";
             /**
+             * @ignore
              * ID of the Fast Approximate Anti-Aliasing post process;
              */
             _this.FxaaPostProcessId = "FxaaPostProcessEffect";
@@ -88124,9 +88235,33 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /**
+     * Post process which applies a refractin texture
+     * @see https://doc.babylonjs.com/how_to/how_to_use_postprocesses#refraction
+     */
     var RefractionPostProcess = /** @class */ (function (_super) {
         __extends(RefractionPostProcess, _super);
-        function RefractionPostProcess(name, refractionTextureUrl, color, depth, colorLevel, options, camera, samplingMode, engine, reusable) {
+        /**
+         * Initializes the RefractionPostProcess
+         * @see https://doc.babylonjs.com/how_to/how_to_use_postprocesses#refraction
+         * @param name The name of the effect.
+         * @param refractionTextureUrl Url of the refraction texture to use
+         * @param color the base color of the refraction (used to taint the rendering)
+         * @param depth simulated refraction depth
+         * @param colorLevel the coefficient of the base color (0 to remove base color tainting)
+         * @param camera The camera to apply the render pass to.
+         * @param options The required width/height ratio to downsize to before computing the render pass.
+         * @param samplingMode The sampling mode to be used when computing the pass. (default: 0)
+         * @param engine The engine which the post process will be applied. (default: current engine)
+         * @param reusable If the post process can be reused on the same frame. (default: false)
+         */
+        function RefractionPostProcess(name, refractionTextureUrl, 
+        /** the base color of the refraction (used to taint the rendering) */
+        color, 
+        /** simulated refraction depth */
+        depth, 
+        /** the coefficient of the base color (0 to remove base color tainting) */
+        colorLevel, options, camera, samplingMode, engine, reusable) {
             var _this = _super.call(this, name, "refraction", ["baseColor", "depth", "colorLevel"], ["refractionSampler"], options, camera, samplingMode, engine, reusable) || this;
             _this.color = color;
             _this.depth = depth;
@@ -88162,6 +88297,10 @@ var BABYLON;
             configurable: true
         });
         // Methods
+        /**
+         * Disposes of the post process
+         * @param camera Camera to dispose post process on
+         */
         RefractionPostProcess.prototype.dispose = function (camera) {
             if (this._refTexture && this._ownRefractionTexture) {
                 this._refTexture.dispose();
@@ -88179,10 +88318,26 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /**
+     * Post process used to render in black and white
+     */
     var BlackAndWhitePostProcess = /** @class */ (function (_super) {
         __extends(BlackAndWhitePostProcess, _super);
+        /**
+         * Creates a black and white post process
+         * @see https://doc.babylonjs.com/how_to/how_to_use_postprocesses#black-and-white
+         * @param name The name of the effect.
+         * @param options The required width/height ratio to downsize to before computing the render pass.
+         * @param camera The camera to apply the render pass to.
+         * @param samplingMode The sampling mode to be used when computing the pass. (default: 0)
+         * @param engine The engine which the post process will be applied. (default: current engine)
+         * @param reusable If the post process can be reused on the same frame. (default: false)
+         */
         function BlackAndWhitePostProcess(name, options, camera, samplingMode, engine, reusable) {
             var _this = _super.call(this, name, "blackAndWhite", ["degree"], null, options, camera, samplingMode, engine, reusable) || this;
+            /**
+             * Linear about to convert he result to black and white (default: 1)
+             */
             _this.degree = 1;
             _this.onApplyObservable.add(function (effect) {
                 effect.setFloat("degree", _this.degree);
@@ -88264,9 +88419,24 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /**
+     * Applies a kernel filter to the image
+     */
     var FilterPostProcess = /** @class */ (function (_super) {
         __extends(FilterPostProcess, _super);
-        function FilterPostProcess(name, kernelMatrix, options, camera, samplingMode, engine, reusable) {
+        /**
+         *
+         * @param name The name of the effect.
+         * @param kernelMatrix The matrix to be applied to the image
+         * @param options The required width/height ratio to downsize to before computing the render pass.
+         * @param camera The camera to apply the render pass to.
+         * @param samplingMode The sampling mode to be used when computing the pass. (default: 0)
+         * @param engine The engine which the post process will be applied. (default: current engine)
+         * @param reusable If the post process can be reused on the same frame. (default: false)
+         */
+        function FilterPostProcess(name, 
+        /** The matrix to be applied to the image */
+        kernelMatrix, options, camera, samplingMode, engine, reusable) {
             var _this = _super.call(this, name, "filter", ["kernelMatrix"], null, options, camera, samplingMode, engine, reusable) || this;
             _this.kernelMatrix = kernelMatrix;
             _this.onApply = function (effect) {
@@ -88780,8 +88950,20 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /**
+     * DisplayPassPostProcess which produces an output the same as it's input
+     */
     var DisplayPassPostProcess = /** @class */ (function (_super) {
         __extends(DisplayPassPostProcess, _super);
+        /**
+         * Creates the DisplayPassPostProcess
+         * @param name The name of the effect.
+         * @param options The required width/height ratio to downsize to before computing the render pass.
+         * @param camera The camera to apply the render pass to.
+         * @param samplingMode The sampling mode to be used when computing the pass. (default: 0)
+         * @param engine The engine which the post process will be applied. (default: current engine)
+         * @param reusable If the post process can be reused on the same frame. (default: false)
+         */
         function DisplayPassPostProcess(name, options, camera, samplingMode, engine, reusable) {
             return _super.call(this, name, "displayPass", ["passSampler"], ["passSampler"], options, camera, samplingMode, engine, reusable) || this;
         }
@@ -88795,8 +88977,23 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /**
+     * Extracts highlights from the image
+     * @see https://doc.babylonjs.com/how_to/how_to_use_postprocesses
+     */
     var HighlightsPostProcess = /** @class */ (function (_super) {
         __extends(HighlightsPostProcess, _super);
+        /**
+         * Extracts highlights from the image
+         * @see https://doc.babylonjs.com/how_to/how_to_use_postprocesses
+         * @param name The name of the effect.
+         * @param options The required width/height ratio to downsize to before computing the render pass.
+         * @param camera The camera to apply the render pass to.
+         * @param samplingMode The sampling mode to be used when computing the pass. (default: 0)
+         * @param engine The engine which the post process will be applied. (default: current engine)
+         * @param reusable If the post process can be reused on the same frame. (default: false)
+         * @param textureType Type of texture for the post process (default: Engine.TEXTURETYPE_UNSIGNED_INT)
+         */
         function HighlightsPostProcess(name, options, camera, samplingMode, engine, reusable, textureType) {
             if (textureType === void 0) { textureType = BABYLON.Engine.TEXTURETYPE_UNSIGNED_INT; }
             return _super.call(this, name, "highlights", null, null, options, camera, samplingMode, engine, reusable, null, textureType) || this;
@@ -88816,6 +89013,10 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /**
+     * ImageProcessingPostProcess
+     * @see https://doc.babylonjs.com/how_to/how_to_use_postprocesses#imageprocessing
+     */
     var ImageProcessingPostProcess = /** @class */ (function (_super) {
         __extends(ImageProcessingPostProcess, _super);
         function ImageProcessingPostProcess(name, options, camera, samplingMode, engine, reusable, textureType, imageProcessingConfiguration) {
@@ -89188,6 +89389,10 @@ var BABYLON;
             enumerable: true,
             configurable: true
         });
+        /**
+         *  "ImageProcessingPostProcess"
+         * @returns "ImageProcessingPostProcess"
+         */
         ImageProcessingPostProcess.prototype.getClassName = function () {
             return "ImageProcessingPostProcess";
         };
@@ -101288,25 +101493,57 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /**
+     * Octrees are a really powerful data structure that can quickly select entities based on space coordinates.
+     * @see https://doc.babylonjs.com/how_to/optimizing_your_scene_with_octrees
+     */
     var Octree = /** @class */ (function () {
-        function Octree(creationFunc, maxBlockCapacity, maxDepth) {
+        /**
+         * Creates a octree
+         * @see https://doc.babylonjs.com/how_to/optimizing_your_scene_with_octrees
+         * @param creationFunc function to be used to instatiate the octree
+         * @param maxBlockCapacity defines the maximum number of meshes you want on your octree's leaves (default: 64)
+         * @param maxDepth defines the maximum depth (sub-levels) for your octree. Default value is 2, which means 8 8 8 = 512 blocks :) (This parameter takes precedence over capacity.)
+         */
+        function Octree(creationFunc, maxBlockCapacity, 
+        /** Defines the maximum depth (sub-levels) for your octree. Default value is 2, which means 8 8 8 = 512 blocks :) (This parameter takes precedence over capacity.) */
+        maxDepth) {
             if (maxDepth === void 0) { maxDepth = 2; }
             this.maxDepth = maxDepth;
+            /**
+             * Content stored in the octree
+             */
             this.dynamicContent = new Array();
             this._maxBlockCapacity = maxBlockCapacity || 64;
             this._selectionContent = new BABYLON.SmartArrayNoDuplicate(1024);
             this._creationFunc = creationFunc;
         }
         // Methods
+        /**
+         * Updates the octree by adding blocks for the passed in meshes within the min and max world parameters
+         * @param worldMin worldMin for the octree blocks var blockSize = new Vector3((worldMax.x - worldMin.x) / 2, (worldMax.y - worldMin.y) / 2, (worldMax.z - worldMin.z) / 2);
+         * @param worldMax worldMax for the octree blocks var blockSize = new Vector3((worldMax.x - worldMin.x) / 2, (worldMax.y - worldMin.y) / 2, (worldMax.z - worldMin.z) / 2);
+         * @param entries meshes to be added to the octree blocks
+         */
         Octree.prototype.update = function (worldMin, worldMax, entries) {
             Octree._CreateBlocks(worldMin, worldMax, entries, this._maxBlockCapacity, 0, this.maxDepth, this, this._creationFunc);
         };
+        /**
+         * Adds a mesh to the octree
+         * @param entry Mesh to add to the octree
+         */
         Octree.prototype.addMesh = function (entry) {
             for (var index = 0; index < this.blocks.length; index++) {
                 var block = this.blocks[index];
                 block.addEntry(entry);
             }
         };
+        /**
+         * Selects an array of meshes within the frustum
+         * @param frustumPlanes The frustum planes to use which will select all meshes within it
+         * @param allowDuplicate If duplicate objects are allowed in the resulting object array
+         * @returns array of meshes within the frustum
+         */
         Octree.prototype.select = function (frustumPlanes, allowDuplicate) {
             this._selectionContent.reset();
             for (var index = 0; index < this.blocks.length; index++) {
@@ -101321,6 +101558,13 @@ var BABYLON;
             }
             return this._selectionContent;
         };
+        /**
+         * Test if the octree intersect with the given bounding sphere and if yes, then add its content to the selection array
+         * @param sphereCenter defines the bounding sphere center
+         * @param sphereRadius defines the bounding sphere radius
+         * @param allowDuplicate defines if the selection array can contains duplicated entries
+         * @returns an array of objects that intersect the sphere
+         */
         Octree.prototype.intersects = function (sphereCenter, sphereRadius, allowDuplicate) {
             this._selectionContent.reset();
             for (var index = 0; index < this.blocks.length; index++) {
@@ -101335,6 +101579,11 @@ var BABYLON;
             }
             return this._selectionContent;
         };
+        /**
+        * Test if the octree intersect with the given ray and if yes, then add its content to resulting array
+         * @param ray defines the ray to test with
+         * @returns array of intersected objects
+         */
         Octree.prototype.intersectsRay = function (ray) {
             this._selectionContent.reset();
             for (var index = 0; index < this.blocks.length; index++) {
@@ -101344,6 +101593,9 @@ var BABYLON;
             this._selectionContent.concatWithNoDuplicate(this.dynamicContent);
             return this._selectionContent;
         };
+        /**
+         * @hidden
+         */
         Octree._CreateBlocks = function (worldMin, worldMax, entries, maxBlockCapacity, currentDepth, maxDepth, target, creationFunc) {
             target.blocks = new Array();
             var blockSize = new BABYLON.Vector3((worldMax.x - worldMin.x) / 2, (worldMax.y - worldMin.y) / 2, (worldMax.z - worldMin.z) / 2);
@@ -101360,12 +101612,18 @@ var BABYLON;
                 }
             }
         };
+        /**
+         * Adds a mesh into the octree block if it intersects the block
+         */
         Octree.CreationFuncForMeshes = function (entry, block) {
             var boundingInfo = entry.getBoundingInfo();
             if (!entry.isBlocked && boundingInfo.boundingBox.intersectsMinMax(block.minPoint, block.maxPoint)) {
                 block.entries.push(entry);
             }
         };
+        /**
+         * Adds a submesh into the octree block if it intersects the block
+         */
         Octree.CreationFuncForSubMeshes = function (entry, block) {
             var boundingInfo = entry.getBoundingInfo();
             if (boundingInfo.boundingBox.intersectsMinMax(block.minPoint, block.maxPoint)) {
@@ -101922,8 +102180,20 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /**
+     * StereoscopicInterlacePostProcess used to render stereo views from a rigged camera
+     */
     var StereoscopicInterlacePostProcess = /** @class */ (function (_super) {
         __extends(StereoscopicInterlacePostProcess, _super);
+        /**
+         * Initializes a StereoscopicInterlacePostProcess
+         * @param name The name of the effect.
+         * @param rigCameras The rig cameras to be appled to the post process
+         * @param isStereoscopicHoriz If the rendered results are horizontal or verticle
+         * @param samplingMode The sampling mode to be used when computing the pass. (default: 0)
+         * @param engine The engine which the post process will be applied. (default: current engine)
+         * @param reusable If the post process can be reused on the same frame. (default: false)
+         */
         function StereoscopicInterlacePostProcess(name, rigCameras, isStereoscopicHoriz, samplingMode, engine, reusable) {
             var _this = _super.call(this, name, "stereoscopicInterlace", ['stepSize'], ['camASampler'], 1, rigCameras[1], samplingMode, engine, reusable, isStereoscopicHoriz ? "#define IS_STEREOSCOPIC_HORIZ 1" : undefined) || this;
             _this._passedProcess = rigCameras[0]._rigPostProcess;
@@ -102114,8 +102384,18 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /**
+     * VRDistortionCorrectionPostProcess used for mobile VR
+     */
     var VRDistortionCorrectionPostProcess = /** @class */ (function (_super) {
         __extends(VRDistortionCorrectionPostProcess, _super);
+        /**
+         * Initializes the VRDistortionCorrectionPostProcess
+         * @param name The name of the effect.
+         * @param camera The camera to apply the render pass to.
+         * @param isRightEye If this is for the right eye distortion
+         * @param vrMetrics All the required metrics for the VR camera
+         */
         function VRDistortionCorrectionPostProcess(name, camera, isRightEye, vrMetrics) {
             var _this = _super.call(this, name, "vrDistortionCorrection", [
                 'LensCenter',
@@ -115016,7 +115296,8 @@ var BABYLON;
         /**
          * Static function used to export a particle system to a ParticleSystemSet variable.
          * Please note that the emitter shape is not exported
-         * @param system defines the particle systems to export
+         * @param systems defines the particle systems to export
+         * @returns the created particle system set
          */
         ParticleHelper.ExportSet = function (systems) {
             var set = new BABYLON.ParticleSystemSet();

File diff ditekan karena terlalu besar
+ 1 - 1
dist/preview release/gui/babylon.gui.min.js.map


File diff ditekan karena terlalu besar
+ 1 - 1
dist/preview release/inspector/babylon.inspector.bundle.js.map


File diff ditekan karena terlalu besar
+ 1939 - 3989
dist/preview release/typedocValidationBaseline.json


+ 19 - 56
dist/preview release/viewer/babylon.viewer.d.ts

@@ -70,57 +70,6 @@ declare module BabylonViewer {
     export let viewerGlobals: ViewerGlobals;
 }
 declare module BabylonViewer {
-    /**
-        * The viewer manager is the container for all viewers currently registered on this page.
-        * It is possible to have more than one viewer on a single page.
-        */
-    export class ViewerManager {
-            /**
-                * A callback that will be triggered when a new viewer was added
-                */
-            onViewerAdded: (viewer: AbstractViewer) => void;
-            /**
-                * Will notify when a new viewer was added
-                */
-            onViewerAddedObservable: BABYLON.Observable<AbstractViewer>;
-            /**
-                * Will notify when a viewer was removed (disposed)
-                */
-            onViewerRemovedObservable: BABYLON.Observable<string>;
-            constructor();
-            /**
-                * Adding a new viewer to the viewer manager and start tracking it.
-                * @param viewer the viewer to add
-                */
-            addViewer(viewer: AbstractViewer): void;
-            /**
-                * remove a viewer from the viewer manager
-                * @param viewer the viewer to remove
-                */
-            removeViewer(viewer: AbstractViewer): void;
-            /**
-                * Get a viewer by its baseId (if the container element has an ID, it is the this is. if not, a random id was assigned)
-                * @param id the id of the HTMl element (or the viewer's, if none provided)
-                */
-            getViewerById(id: string): AbstractViewer;
-            /**
-                * Get a viewer using a container element
-                * @param element the HTML element to search viewers associated with
-                */
-            getViewerByHTMLElement(element: HTMLElement): AbstractViewer | undefined;
-            /**
-                * Get a promise that will fullfil when this viewer was initialized.
-                * Since viewer initialization and template injection is asynchronous, using the promise will guaranty that
-                * you will get the viewer after everything was already configured.
-                * @param id the viewer id to find
-                */
-            getViewerPromiseById(id: string): Promise<AbstractViewer>;
-            /**
-                * dispose the manager and all of its associated viewers
-                */
-            dispose(): void;
-    }
-    export let viewerManager: ViewerManager;
 }
 declare module BabylonViewer {
     /**
@@ -168,11 +117,11 @@ declare module BabylonViewer {
                 * Mainly used for help and errors
                 * @param subScreen the name of the subScreen. Those can be defined in the configuration object
                 */
-            showOverlayScreen(subScreen: string): Promise<string> | Promise<Template>;
+            showOverlayScreen(subScreen: string): Promise<Template> | Promise<string>;
             /**
                 * Hide the overlay screen.
                 */
-            hideOverlayScreen(): Promise<string> | Promise<Template>;
+            hideOverlayScreen(): Promise<Template> | Promise<string>;
             /**
                 * show the viewer (in case it was hidden)
                 *
@@ -189,11 +138,11 @@ declare module BabylonViewer {
                 * Show the loading screen.
                 * The loading screen can be configured using the configuration object
                 */
-            showLoadingScreen(): Promise<string> | Promise<Template>;
+            showLoadingScreen(): Promise<Template> | Promise<string>;
             /**
                 * Hide the loading screen
                 */
-            hideLoadingScreen(): Promise<string> | Promise<Template>;
+            hideLoadingScreen(): Promise<Template> | Promise<string>;
             dispose(): void;
             protected _onConfigurationLoaded(configuration: ViewerConfiguration): void;
     }
@@ -924,7 +873,7 @@ declare module BabylonViewer {
       * @param name the name of the custom optimizer configuration
       * @param upgrade set to true if you want to upgrade optimizer and false if you want to degrade
       */
-    export function getCustomOptimizerByName(name: string, upgrade?: boolean): (sceneManager: SceneManager) => boolean;
+    export function getCustomOptimizerByName(name: string, upgrade?: boolean): typeof extendedUpgrade;
     export function registerCustomOptimizer(name: string, optimizer: (sceneManager: SceneManager) => boolean): void;
 }
 declare module BabylonViewer {
@@ -1558,6 +1507,20 @@ declare module BabylonViewer {
     export function addLoaderPlugin(name: string, plugin: ILoaderPlugin): void;
 }
 declare module BabylonViewer {
+    /**
+        * A custom upgrade-oriented function configuration for the scene optimizer.
+        *
+        * @param viewer the viewer to optimize
+        */
+    export function extendedUpgrade(sceneManager: SceneManager): boolean;
+    /**
+        * A custom degrade-oriented function configuration for the scene optimizer.
+        *
+        * @param viewer the viewer to optimize
+        */
+    export function extendedDegrade(sceneManager: SceneManager): boolean;
+}
+declare module BabylonViewer {
 }
 declare module BabylonViewer {
     export interface IEnvironmentMapConfiguration {

File diff ditekan karena terlalu besar
+ 1 - 1
dist/preview release/viewer/babylon.viewer.js


File diff ditekan karena terlalu besar
+ 3 - 3
dist/preview release/viewer/babylon.viewer.max.js


+ 23 - 58
dist/preview release/viewer/babylon.viewer.module.d.ts

@@ -94,59 +94,7 @@ declare module 'babylonjs-viewer/configuration/globals' {
 }
 
 declare module 'babylonjs-viewer/viewer/viewerManager' {
-    import { Observable } from 'babylonjs';
-    import { AbstractViewer } from 'babylonjs-viewer/viewer/viewer';
-    /**
-        * The viewer manager is the container for all viewers currently registered on this page.
-        * It is possible to have more than one viewer on a single page.
-        */
-    export class ViewerManager {
-            /**
-                * A callback that will be triggered when a new viewer was added
-                */
-            onViewerAdded: (viewer: AbstractViewer) => void;
-            /**
-                * Will notify when a new viewer was added
-                */
-            onViewerAddedObservable: Observable<AbstractViewer>;
-            /**
-                * Will notify when a viewer was removed (disposed)
-                */
-            onViewerRemovedObservable: Observable<string>;
-            constructor();
-            /**
-                * Adding a new viewer to the viewer manager and start tracking it.
-                * @param viewer the viewer to add
-                */
-            addViewer(viewer: AbstractViewer): void;
-            /**
-                * remove a viewer from the viewer manager
-                * @param viewer the viewer to remove
-                */
-            removeViewer(viewer: AbstractViewer): void;
-            /**
-                * Get a viewer by its baseId (if the container element has an ID, it is the this is. if not, a random id was assigned)
-                * @param id the id of the HTMl element (or the viewer's, if none provided)
-                */
-            getViewerById(id: string): AbstractViewer;
-            /**
-                * Get a viewer using a container element
-                * @param element the HTML element to search viewers associated with
-                */
-            getViewerByHTMLElement(element: HTMLElement): AbstractViewer | undefined;
-            /**
-                * Get a promise that will fullfil when this viewer was initialized.
-                * Since viewer initialization and template injection is asynchronous, using the promise will guaranty that
-                * you will get the viewer after everything was already configured.
-                * @param id the viewer id to find
-                */
-            getViewerPromiseById(id: string): Promise<AbstractViewer>;
-            /**
-                * dispose the manager and all of its associated viewers
-                */
-            dispose(): void;
-    }
-    export let viewerManager: ViewerManager;
+    
 }
 
 declare module 'babylonjs-viewer/viewer/defaultViewer' {
@@ -200,11 +148,11 @@ declare module 'babylonjs-viewer/viewer/defaultViewer' {
                 * Mainly used for help and errors
                 * @param subScreen the name of the subScreen. Those can be defined in the configuration object
                 */
-            showOverlayScreen(subScreen: string): Promise<string> | Promise<Template>;
+            showOverlayScreen(subScreen: string): Promise<Template> | Promise<string>;
             /**
                 * Hide the overlay screen.
                 */
-            hideOverlayScreen(): Promise<string> | Promise<Template>;
+            hideOverlayScreen(): Promise<Template> | Promise<string>;
             /**
                 * show the viewer (in case it was hidden)
                 *
@@ -221,11 +169,11 @@ declare module 'babylonjs-viewer/viewer/defaultViewer' {
                 * Show the loading screen.
                 * The loading screen can be configured using the configuration object
                 */
-            showLoadingScreen(): Promise<string> | Promise<Template>;
+            showLoadingScreen(): Promise<Template> | Promise<string>;
             /**
                 * Hide the loading screen
                 */
-            hideLoadingScreen(): Promise<string> | Promise<Template>;
+            hideLoadingScreen(): Promise<Template> | Promise<string>;
             dispose(): void;
             protected _onConfigurationLoaded(configuration: ViewerConfiguration): void;
     }
@@ -985,13 +933,14 @@ declare module 'babylonjs-viewer/templating/viewerTemplatePlugin' {
 }
 
 declare module 'babylonjs-viewer/optimizer/custom' {
+    import { extendedUpgrade } from "babylonjs-viewer/optimizer/custom/extended";
     import { SceneManager } from "babylonjs-viewer/managers/sceneManager";
     /**
       *
       * @param name the name of the custom optimizer configuration
       * @param upgrade set to true if you want to upgrade optimizer and false if you want to degrade
       */
-    export function getCustomOptimizerByName(name: string, upgrade?: boolean): (sceneManager: SceneManager) => boolean;
+    export function getCustomOptimizerByName(name: string, upgrade?: boolean): typeof extendedUpgrade;
     export function registerCustomOptimizer(name: string, optimizer: (sceneManager: SceneManager) => boolean): void;
 }
 
@@ -1662,6 +1611,22 @@ declare module 'babylonjs-viewer/loader/plugins' {
     export function addLoaderPlugin(name: string, plugin: ILoaderPlugin): void;
 }
 
+declare module 'babylonjs-viewer/optimizer/custom/extended' {
+    import { SceneManager } from 'babylonjs-viewer/managers/sceneManager';
+    /**
+        * A custom upgrade-oriented function configuration for the scene optimizer.
+        *
+        * @param viewer the viewer to optimize
+        */
+    export function extendedUpgrade(sceneManager: SceneManager): boolean;
+    /**
+        * A custom degrade-oriented function configuration for the scene optimizer.
+        *
+        * @param viewer the viewer to optimize
+        */
+    export function extendedDegrade(sceneManager: SceneManager): boolean;
+}
+
 declare module 'babylonjs-viewer/configuration/interfaces' {
     export * from 'babylonjs-viewer/configuration/interfaces/cameraConfiguration';
     export * from 'babylonjs-viewer/configuration/interfaces/colorGradingConfiguration';

+ 5 - 5
src/Mesh/babylon.meshBuilder.ts

@@ -1032,11 +1032,11 @@
                 path3D =  storage.path3D.update(path);
                 pathArray = tubePathArray(path, path3D, storage.pathArray, radius, storage.tessellation, radiusFunction, storage.cap, arc);
                 instance = MeshBuilder.CreateRibbon("", { pathArray: pathArray, instance: instance });
-                instance._creationDataStorage = new _CreationDataStorage();
-                instance._creationDataStorage.path3D = path3D;
-                instance._creationDataStorage.pathArray = pathArray;
-                instance._creationDataStorage.arc = arc;
-                instance._creationDataStorage.radius = radius;
+                // Update mode, no need to recreate the storage.
+                storage.path3D = path3D;
+                storage.pathArray = pathArray;
+                storage.arc = arc;
+                storage.radius = radius;
 
                 return instance;
             }