David Catuhe 7 سال پیش
والد
کامیت
16165a3d6e

+ 40 - 35
Playground/babylon.d.txt

@@ -10627,6 +10627,11 @@ declare module BABYLON {
          * @param updatable.
          */
         createNormals(updatable: boolean): void;
+        /**
+         * Align the mesh with a normal.
+         * Returns the mesh.
+         */
+        alignWithNormal(normal: BABYLON.Vector3, upDirection?: BABYLON.Vector3): AbstractMesh;
 
     }
 }
@@ -12608,7 +12613,7 @@ declare module BABYLON {
          * The parameter `lines` is an array of lines, each line being an array of successive Vector3.
          * The optional parameter `instance` is an instance of an existing LineSystem object to be updated with the passed `lines` parameter. The way to update it is the same than for
          * The optional parameter `colors` is an array of line colors, each line colors being an array of successive Color4, one per line point.
-         * The optional parameter `useVertexAlpha' is to be set to `true` (default `false`) when the alpha value from the former `Color4` array must be used.
+         * The optional parameter `useVertexAlpha' is to be set to `false` (default `true`) when you don't need the alpha blending (faster).
          * updating a simple Line mesh, you just need to update every line in the `lines` array : http://doc.babylonjs.com/tutorials/How_to_dynamically_morph_a_mesh#lines-and-dashedlines
          * When updating an instance, remember that only line point positions can change, not the number of points, neither the number of lines.
          * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created.
@@ -12628,7 +12633,7 @@ declare module BABYLON {
          * The parameter `points` is an array successive Vector3.
          * The optional parameter `instance` is an instance of an existing LineMesh object to be updated with the passed `points` parameter : http://doc.babylonjs.com/tutorials/How_to_dynamically_morph_a_mesh#lines-and-dashedlines
          * The optional parameter `colors` is an array of successive Color4, one per line point.
-         * The optional parameter `useVertexAlpha' is to be set to `true` (default `false`) when the alpha value from the former `Color4` array must be used.
+         * The optional parameter `useVertexAlpha' is to be set to `false` (default `true`) when you don't need alpha blending (faster).
          * When updating an instance, remember that only point positions can change, not the number of points.
          * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created.
          */
@@ -14378,7 +14383,7 @@ declare module BABYLON {
          * Disposes the radialSphere.
          * @param {bolean} force
          */
-        cleanup(force?: boolean): void;
+        dispose(force?: boolean): void;
         /*** Helpers ***/
 
 
@@ -14420,7 +14425,7 @@ declare module BABYLON {
          * Disposes the radialSphere.
          * @param {bolean} force
          */
-        cleanup(force?: boolean): void;
+        dispose(force?: boolean): void;
 
     }
     interface PhysicsGravitationalFieldEventData {
@@ -14744,36 +14749,6 @@ declare module BABYLON {
 }
 
 declare module BABYLON {
-    class ReflectionProbe {
-        name: string;
-
-
-
-
-
-
-
-        invertYAxis: boolean;
-        position: Vector3;
-        constructor(name: string, size: number, scene: Scene, generateMipMaps?: boolean);
-        samples: number;
-        refreshRate: number;
-        getScene(): Scene;
-        readonly cubeTexture: RenderTargetTexture;
-        readonly renderList: Nullable<AbstractMesh[]>;
-        attachToMesh(mesh: AbstractMesh): void;
-        /**
-         * Specifies whether or not the stencil and depth buffer are cleared between two rendering groups.
-         *
-         * @param renderingGroupId The rendering group id corresponding to its index
-         * @param autoClearDepthStencil Automatically clears depth and stencil between groups if true.
-         */
-        setRenderingAutoClearDepthStencil(renderingGroupId: number, autoClearDepthStencil: boolean): void;
-        dispose(): void;
-    }
-}
-
-declare module BABYLON {
     class AnaglyphPostProcess extends PostProcess {
 
         constructor(name: string, options: number | PostProcessOptions, rigCameras: Camera[], samplingMode?: number, engine?: Engine, reusable?: boolean);
@@ -15025,7 +15000,7 @@ declare module BABYLON {
          * Defines cache preventing GC.
          */
 
-        constructor(name: string, options: number | PostProcessOptions, camera?: Nullable<Camera>, samplingMode?: number, engine?: Engine, reusable?: boolean, textureType?: number);
+        constructor(name: string, options: number | PostProcessOptions, camera?: Nullable<Camera>, samplingMode?: number, engine?: Engine, reusable?: boolean, textureType?: number, imageProcessingConfiguration?: ImageProcessingConfiguration);
         getClassName(): string;
 
         dispose(camera?: Camera): void;
@@ -15287,6 +15262,36 @@ declare module BABYLON {
 }
 
 declare module BABYLON {
+    class ReflectionProbe {
+        name: string;
+
+
+
+
+
+
+
+        invertYAxis: boolean;
+        position: Vector3;
+        constructor(name: string, size: number, scene: Scene, generateMipMaps?: boolean);
+        samples: number;
+        refreshRate: number;
+        getScene(): Scene;
+        readonly cubeTexture: RenderTargetTexture;
+        readonly renderList: Nullable<AbstractMesh[]>;
+        attachToMesh(mesh: AbstractMesh): void;
+        /**
+         * Specifies whether or not the stencil and depth buffer are cleared between two rendering groups.
+         *
+         * @param renderingGroupId The rendering group id corresponding to its index
+         * @param autoClearDepthStencil Automatically clears depth and stencil between groups if true.
+         */
+        setRenderingAutoClearDepthStencil(renderingGroupId: number, autoClearDepthStencil: boolean): void;
+        dispose(): void;
+    }
+}
+
+declare module BABYLON {
     class BoundingBoxRenderer {
         frontColor: Color3;
         backColor: Color3;

+ 40 - 35
dist/preview release/babylon.d.ts

@@ -10704,6 +10704,11 @@ declare module BABYLON {
          * @param updatable.
          */
         createNormals(updatable: boolean): void;
+        /**
+         * Align the mesh with a normal.
+         * Returns the mesh.
+         */
+        alignWithNormal(normal: BABYLON.Vector3, upDirection?: BABYLON.Vector3): AbstractMesh;
         protected checkOcclusionQuery(): void;
     }
 }
@@ -12696,7 +12701,7 @@ declare module BABYLON {
          * The parameter `lines` is an array of lines, each line being an array of successive Vector3.
          * The optional parameter `instance` is an instance of an existing LineSystem object to be updated with the passed `lines` parameter. The way to update it is the same than for
          * The optional parameter `colors` is an array of line colors, each line colors being an array of successive Color4, one per line point.
-         * The optional parameter `useVertexAlpha' is to be set to `true` (default `false`) when the alpha value from the former `Color4` array must be used.
+         * The optional parameter `useVertexAlpha' is to be set to `false` (default `true`) when you don't need the alpha blending (faster).
          * updating a simple Line mesh, you just need to update every line in the `lines` array : http://doc.babylonjs.com/tutorials/How_to_dynamically_morph_a_mesh#lines-and-dashedlines
          * When updating an instance, remember that only line point positions can change, not the number of points, neither the number of lines.
          * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created.
@@ -12716,7 +12721,7 @@ declare module BABYLON {
          * The parameter `points` is an array successive Vector3.
          * The optional parameter `instance` is an instance of an existing LineMesh object to be updated with the passed `points` parameter : http://doc.babylonjs.com/tutorials/How_to_dynamically_morph_a_mesh#lines-and-dashedlines
          * The optional parameter `colors` is an array of successive Color4, one per line point.
-         * The optional parameter `useVertexAlpha' is to be set to `true` (default `false`) when the alpha value from the former `Color4` array must be used.
+         * The optional parameter `useVertexAlpha' is to be set to `false` (default `true`) when you don't need alpha blending (faster).
          * When updating an instance, remember that only point positions can change, not the number of points.
          * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created.
          */
@@ -14484,7 +14489,7 @@ declare module BABYLON {
          * Disposes the radialSphere.
          * @param {bolean} force
          */
-        cleanup(force?: boolean): void;
+        dispose(force?: boolean): void;
         /*** Helpers ***/
         private _prepareRadialSphere();
         private _intersectsWithRadialSphere(impostor, origin, radius);
@@ -14526,7 +14531,7 @@ declare module BABYLON {
          * Disposes the radialSphere.
          * @param {bolean} force
          */
-        cleanup(force?: boolean): void;
+        dispose(force?: boolean): void;
         private _tick();
     }
     interface PhysicsGravitationalFieldEventData {
@@ -14852,36 +14857,6 @@ declare module BABYLON {
 }
 
 declare module BABYLON {
-    class ReflectionProbe {
-        name: string;
-        private _scene;
-        private _renderTargetTexture;
-        private _projectionMatrix;
-        private _viewMatrix;
-        private _target;
-        private _add;
-        private _attachedMesh;
-        invertYAxis: boolean;
-        position: Vector3;
-        constructor(name: string, size: number, scene: Scene, generateMipMaps?: boolean);
-        samples: number;
-        refreshRate: number;
-        getScene(): Scene;
-        readonly cubeTexture: RenderTargetTexture;
-        readonly renderList: Nullable<AbstractMesh[]>;
-        attachToMesh(mesh: AbstractMesh): void;
-        /**
-         * Specifies whether or not the stencil and depth buffer are cleared between two rendering groups.
-         *
-         * @param renderingGroupId The rendering group id corresponding to its index
-         * @param autoClearDepthStencil Automatically clears depth and stencil between groups if true.
-         */
-        setRenderingAutoClearDepthStencil(renderingGroupId: number, autoClearDepthStencil: boolean): void;
-        dispose(): void;
-    }
-}
-
-declare module BABYLON {
     class AnaglyphPostProcess extends PostProcess {
         private _passedProcess;
         constructor(name: string, options: number | PostProcessOptions, rigCameras: Camera[], samplingMode?: number, engine?: Engine, reusable?: boolean);
@@ -15133,7 +15108,7 @@ declare module BABYLON {
          * Defines cache preventing GC.
          */
         private _defines;
-        constructor(name: string, options: number | PostProcessOptions, camera?: Nullable<Camera>, samplingMode?: number, engine?: Engine, reusable?: boolean, textureType?: number);
+        constructor(name: string, options: number | PostProcessOptions, camera?: Nullable<Camera>, samplingMode?: number, engine?: Engine, reusable?: boolean, textureType?: number, imageProcessingConfiguration?: ImageProcessingConfiguration);
         getClassName(): string;
         protected _updateParameters(): void;
         dispose(camera?: Camera): void;
@@ -15409,6 +15384,36 @@ declare module BABYLON {
 }
 
 declare module BABYLON {
+    class ReflectionProbe {
+        name: string;
+        private _scene;
+        private _renderTargetTexture;
+        private _projectionMatrix;
+        private _viewMatrix;
+        private _target;
+        private _add;
+        private _attachedMesh;
+        invertYAxis: boolean;
+        position: Vector3;
+        constructor(name: string, size: number, scene: Scene, generateMipMaps?: boolean);
+        samples: number;
+        refreshRate: number;
+        getScene(): Scene;
+        readonly cubeTexture: RenderTargetTexture;
+        readonly renderList: Nullable<AbstractMesh[]>;
+        attachToMesh(mesh: AbstractMesh): void;
+        /**
+         * Specifies whether or not the stencil and depth buffer are cleared between two rendering groups.
+         *
+         * @param renderingGroupId The rendering group id corresponding to its index
+         * @param autoClearDepthStencil Automatically clears depth and stencil between groups if true.
+         */
+        setRenderingAutoClearDepthStencil(renderingGroupId: number, autoClearDepthStencil: boolean): void;
+        dispose(): void;
+    }
+}
+
+declare module BABYLON {
     class BoundingBoxRenderer {
         frontColor: Color3;
         backColor: Color3;

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 40 - 40
dist/preview release/babylon.js


+ 71 - 29
dist/preview release/babylon.max.js

@@ -10447,7 +10447,7 @@ var BABYLON;
                 if (!hostingScene) {
                     hostingScene = _this.scenes[_this.scenes.length - 1];
                 }
-                hostingScene.postProcessManager.directRender([_this._rescalePostProcess], rtt);
+                hostingScene.postProcessManager.directRender([_this._rescalePostProcess], rtt, true);
                 _this._bindTextureDirectly(_this._gl.TEXTURE_2D, destination);
                 _this._gl.copyTexImage2D(_this._gl.TEXTURE_2D, 0, internalFormat, 0, 0, destination.width, destination.height, 0);
                 _this.unBindFramebuffer(rtt);
@@ -15600,6 +15600,26 @@ var BABYLON;
             BABYLON.VertexData.ComputeNormals(positions, indices, normals, { useRightHandedSystem: this.getScene().useRightHandedSystem });
             this.setVerticesData(BABYLON.VertexBuffer.NormalKind, normals, updatable);
         };
+        /**
+         * Align the mesh with a normal.
+         * Returns the mesh.
+         */
+        AbstractMesh.prototype.alignWithNormal = function (normal, upDirection) {
+            if (!upDirection) {
+                upDirection = BABYLON.Axis.Y;
+            }
+            var axisX = BABYLON.Tmp.Vector3[0];
+            var axisZ = BABYLON.Tmp.Vector3[1];
+            BABYLON.Vector3.CrossToRef(upDirection, normal, axisZ);
+            BABYLON.Vector3.CrossToRef(normal, axisZ, axisX);
+            if (this.rotationQuaternion) {
+                BABYLON.Quaternion.RotationQuaternionFromAxisToRef(axisX, normal, axisZ, this.rotationQuaternion);
+            }
+            else {
+                BABYLON.Vector3.RotationFromAxisToRef(axisX, normal, axisZ, this.rotation);
+            }
+            return this;
+        };
         AbstractMesh.prototype.checkOcclusionQuery = function () {
             var engine = this.getEngine();
             if (engine.webGLVersion < 2 || this.occlusionType === AbstractMesh.OCCLUSION_TYPE_NONE) {
@@ -47413,14 +47433,16 @@ var BABYLON;
             var options = {
                 attributes: [BABYLON.VertexBuffer.PositionKind],
                 uniforms: ["world", "viewProjection"],
-                needAlphaBlending: false,
+                needAlphaBlending: true,
                 defines: defines
             };
+            if (useVertexAlpha === false) {
+                options.needAlphaBlending = false;
+            }
             if (!useVertexColor) {
                 options.uniforms.push("color");
             }
             else {
-                options.needAlphaBlending = (useVertexAlpha) ? true : false;
                 options.defines.push("#define VERTEXCOLOR");
                 options.attributes.push(BABYLON.VertexBuffer.ColorKind);
             }
@@ -48376,7 +48398,7 @@ var BABYLON;
          * The parameter `lines` is an array of lines, each line being an array of successive Vector3.
          * The optional parameter `instance` is an instance of an existing LineSystem object to be updated with the passed `lines` parameter. The way to update it is the same than for
          * The optional parameter `colors` is an array of line colors, each line colors being an array of successive Color4, one per line point.
-         * The optional parameter `useVertexAlpha' is to be set to `true` (default `false`) when the alpha value from the former `Color4` array must be used.
+         * The optional parameter `useVertexAlpha' is to be set to `false` (default `true`) when you don't need the alpha blending (faster).
          * updating a simple Line mesh, you just need to update every line in the `lines` array : http://doc.babylonjs.com/tutorials/How_to_dynamically_morph_a_mesh#lines-and-dashedlines
          * When updating an instance, remember that only line point positions can change, not the number of points, neither the number of lines.
          * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created.
@@ -48432,7 +48454,7 @@ var BABYLON;
          * The parameter `points` is an array successive Vector3.
          * The optional parameter `instance` is an instance of an existing LineMesh object to be updated with the passed `points` parameter : http://doc.babylonjs.com/tutorials/How_to_dynamically_morph_a_mesh#lines-and-dashedlines
          * The optional parameter `colors` is an array of successive Color4, one per line point.
-         * The optional parameter `useVertexAlpha' is to be set to `true` (default `false`) when the alpha value from the former `Color4` array must be used.
+         * The optional parameter `useVertexAlpha' is to be set to `false` (default `true`) when you don't need alpha blending (faster).
          * When updating an instance, remember that only point positions can change, not the number of points.
          * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created.
          */
@@ -60323,6 +60345,9 @@ var BABYLON;
                 this.addEffect(new BABYLON.PostProcessRenderEffect(engine, this.FxaaPostProcessId, function () { return _this.fxaa; }, true));
                 this.fxaa.autoClear = !this.bloomEnabled && (!this._hdr || !this.imageProcessing);
             }
+            else if (this._hdr && this.imageProcessing) {
+                this.finalMerge = this.imageProcessing;
+            }
             else {
                 this.finalMerge = new BABYLON.PassPostProcess("finalMerge", 1.0, null, BABYLON.Texture.BILINEAR_SAMPLINGMODE, engine, false, this._defaultPipelineTextureType);
                 this.addEffect(new BABYLON.PostProcessRenderEffect(engine, this.FinalMergePostProcessId, function () { return _this.finalMerge; }, true));
@@ -61233,7 +61258,7 @@ var BABYLON;
 (function (BABYLON) {
     var ImageProcessingPostProcess = /** @class */ (function (_super) {
         __extends(ImageProcessingPostProcess, _super);
-        function ImageProcessingPostProcess(name, options, camera, samplingMode, engine, reusable, textureType) {
+        function ImageProcessingPostProcess(name, options, camera, samplingMode, engine, reusable, textureType, imageProcessingConfiguration) {
             if (camera === void 0) { camera = null; }
             if (textureType === void 0) { textureType = BABYLON.Engine.TEXTURETYPE_UNSIGNED_INT; }
             var _this = _super.call(this, name, "imageProcessing", [], [], options, camera, samplingMode, engine, reusable, null, textureType, "postprocess", null, true) || this;
@@ -61257,9 +61282,17 @@ var BABYLON;
                 IMAGEPROCESSINGPOSTPROCESS: false,
                 EXPOSURE: false,
             };
-            // Setup the default processing configuration to the scene.
-            _this._attachImageProcessingConfiguration(null, true);
-            _this.imageProcessingConfiguration.applyByPostProcess = true;
+            // Setup the configuration as forced by the constructor. This would then not force the 
+            // scene materials output in linear space and let untouched the default forward pass.
+            if (imageProcessingConfiguration) {
+                _this._attachImageProcessingConfiguration(imageProcessingConfiguration, true);
+                _this.imageProcessingConfiguration.applyByPostProcess = false;
+                _this.fromLinearSpace = false;
+            }
+            else {
+                _this._attachImageProcessingConfiguration(null, true);
+                _this.imageProcessingConfiguration.applyByPostProcess = true;
+            }
             _this.onApply = function (effect) {
                 _this.imageProcessingConfiguration.bind(effect, _this.aspectRatio);
             };
@@ -67410,7 +67443,7 @@ var BABYLON;
                 }
                 impostor.applyImpulse(impostorForceAndContactPoint.force, impostorForceAndContactPoint.contactPoint);
             });
-            event.cleanup(false);
+            event.dispose(false);
             return event;
         };
         /**
@@ -67437,7 +67470,7 @@ var BABYLON;
                 }
                 impostor.applyForce(impostorForceAndContactPoint.force, impostorForceAndContactPoint.contactPoint);
             });
-            event.cleanup(false);
+            event.dispose(false);
             return event;
         };
         /**
@@ -67457,7 +67490,7 @@ var BABYLON;
                 return null;
             }
             var event = new PhysicsGravitationalFieldEvent(this, this._scene, origin, radius, strength, falloff);
-            event.cleanup(false);
+            event.dispose(false);
             return event;
         };
         return PhysicsHelper;
@@ -67521,7 +67554,7 @@ var BABYLON;
          * Disposes the radialSphere.
          * @param {bolean} force
          */
-        PhysicsRadialExplosionEvent.prototype.cleanup = function (force) {
+        PhysicsRadialExplosionEvent.prototype.dispose = function (force) {
             var _this = this;
             if (force === void 0) { force = true; }
             if (force) {
@@ -67594,7 +67627,7 @@ var BABYLON;
          * Disposes the radialSphere.
          * @param {bolean} force
          */
-        PhysicsGravitationalFieldEvent.prototype.cleanup = function (force) {
+        PhysicsGravitationalFieldEvent.prototype.dispose = function (force) {
             var _this = this;
             if (force === void 0) { force = true; }
             if (force) {
@@ -71958,7 +71991,6 @@ var BABYLON;
                 if (!this._webVRpresenting) {
                     this._webVRCamera.position = this._position;
                     this._scene.activeCamera = this._webVRCamera;
-                    this._scene.imageProcessingConfiguration.isEnabled = true;
                 }
             }
             else {
@@ -71986,7 +72018,6 @@ var BABYLON;
             }
             this._deviceOrientationCamera.position = this._position;
             this._scene.activeCamera = this._deviceOrientationCamera;
-            this._scene.imageProcessingConfiguration.isEnabled = false;
             if (this._canvas) {
                 this._scene.activeCamera.attachControl(this._canvas);
             }
@@ -72021,11 +72052,18 @@ var BABYLON;
                 this._enableTeleportationOnController(this._webVRCamera.rightController);
             }
             this._scene.gamepadManager.onGamepadConnectedObservable.add(function (pad) { return _this._onNewGamepadConnected(pad); });
-            this._postProcessMove = new BABYLON.ImageProcessingPostProcess("postProcessMove", 1.0, this._webVRCamera);
+            // Creates an image processing post process for the vignette not relying
+            // on the main scene configuration for image processing to reduce setup and spaces 
+            // (gamma/linear) conflicts.
+            var imageProcessingConfiguration = new BABYLON.ImageProcessingConfiguration();
+            imageProcessingConfiguration.vignetteColor = new BABYLON.Color4(0, 0, 0, 0);
+            this._postProcessMove = new BABYLON.ImageProcessingPostProcess("postProcessMove", 1.0, this._webVRCamera, undefined, undefined, undefined, undefined, imageProcessingConfiguration);
+            // Force recompilation of the postprocess to be ready before hand and not block the animation.
+            // Simply touching the property forces recompilation of the effect.
+            this._postProcessMove.imageProcessingConfiguration.vignetteEnabled = true;
+            // Go back to default (both variants would be compiled).
+            this._postProcessMove.imageProcessingConfiguration.vignetteEnabled = false;
             this._passProcessMove = new BABYLON.PassPostProcess("pass", 1.0, this._webVRCamera);
-            this._scene.imageProcessingConfiguration.vignetteColor = new BABYLON.Color4(0, 0, 0, 0);
-            this._scene.imageProcessingConfiguration.vignetteEnabled = true;
-            this._scene.imageProcessingConfiguration.isEnabled = false;
             this._createGazeTracker();
             this._createTeleportationCircles();
             this.meshSelectionPredicate = function (mesh) {
@@ -72288,11 +72326,11 @@ var BABYLON;
             animationPP2.setKeys(vignetteStretchKeys);
             animationPP2.setEasingFunction(easingFunction);
             this._postProcessMove.animations.push(animationPP2);
-            this._scene.imageProcessingConfiguration.vignetteWeight = 0;
-            this._scene.imageProcessingConfiguration.vignetteStretch = 0;
-            this._scene.imageProcessingConfiguration.vignetteEnabled = true;
+            this._postProcessMove.imageProcessingConfiguration.vignetteWeight = 0;
+            this._postProcessMove.imageProcessingConfiguration.vignetteStretch = 0;
+            this._postProcessMove.imageProcessingConfiguration.vignetteEnabled = true;
             this._scene.beginAnimation(this._postProcessMove, 0, 6, false, 1, function () {
-                _this._scene.imageProcessingConfiguration.vignetteEnabled = false;
+                _this._postProcessMove.imageProcessingConfiguration.vignetteEnabled = false;
             });
             this._scene.beginAnimation(this.currentVRCamera, 0, 6, false, 1);
         };
@@ -72372,11 +72410,11 @@ var BABYLON;
             });
             animationPP2.setKeys(vignetteStretchKeys);
             this._postProcessMove.animations.push(animationPP2);
-            this._scene.imageProcessingConfiguration.vignetteWeight = 8;
-            this._scene.imageProcessingConfiguration.vignetteStretch = 10;
-            this._scene.imageProcessingConfiguration.vignetteEnabled = true;
+            this._postProcessMove.imageProcessingConfiguration.vignetteWeight = 8;
+            this._postProcessMove.imageProcessingConfiguration.vignetteStretch = 10;
+            this._postProcessMove.imageProcessingConfiguration.vignetteEnabled = true;
             this._scene.beginAnimation(this._postProcessMove, 0, 11, false, 1, function () {
-                _this._scene.imageProcessingConfiguration.vignetteEnabled = false;
+                _this._postProcessMove.imageProcessingConfiguration.vignetteEnabled = false;
             });
             this._scene.beginAnimation(this.currentVRCamera, 0, 11, false, 1);
         };
@@ -79004,10 +79042,12 @@ var BABYLON;
          * Setup the ground according to the specified options.
          */
         EnvironmentHelper.prototype._setupGround = function (sceneSize) {
+            var _this = this;
             if (!this._ground) {
                 this._ground = BABYLON.Mesh.CreatePlane("BackgroundPlane", sceneSize.groundSize, this._scene);
                 this._ground.rotation.x = Math.PI / 2; // Face up by default.
                 this._ground.parent = this._rootMesh;
+                this._ground.onDisposeObservable.add(function () { _this._ground = null; });
             }
             this._ground.receiveShadows = this._options.enableGroundShadow;
         };
@@ -79092,8 +79132,10 @@ var BABYLON;
          * Setup the skybox according to the specified options.
          */
         EnvironmentHelper.prototype._setupSkybox = function (sceneSize) {
+            var _this = this;
             if (!this._skybox) {
                 this._skybox = BABYLON.Mesh.CreateBox("BackgroundSkybox", sceneSize.skyboxSize, this._scene, undefined, BABYLON.Mesh.BACKSIDE);
+                this._skybox.onDisposeObservable.add(function () { _this._skybox = null; });
             }
             this._skybox.parent = this._rootMesh;
         };
@@ -79144,7 +79186,7 @@ var BABYLON;
             if (this._skyboxMaterial) {
                 this._skyboxMaterial.dispose(true, true);
             }
-            this._rootMesh.dispose(true);
+            this._rootMesh.dispose(false);
         };
         /**
          * Default ground texture URL.

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 40 - 40
dist/preview release/babylon.worker.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 602 - 602
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 5 - 5
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.js


+ 12 - 10
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.max.js

@@ -10447,7 +10447,7 @@ var BABYLON;
                 if (!hostingScene) {
                     hostingScene = _this.scenes[_this.scenes.length - 1];
                 }
-                hostingScene.postProcessManager.directRender([_this._rescalePostProcess], rtt);
+                hostingScene.postProcessManager.directRender([_this._rescalePostProcess], rtt, true);
                 _this._bindTextureDirectly(_this._gl.TEXTURE_2D, destination);
                 _this._gl.copyTexImage2D(_this._gl.TEXTURE_2D, 0, internalFormat, 0, 0, destination.width, destination.height, 0);
                 _this.unBindFramebuffer(rtt);
@@ -47279,14 +47279,16 @@ var BABYLON;
             var options = {
                 attributes: [BABYLON.VertexBuffer.PositionKind],
                 uniforms: ["world", "viewProjection"],
-                needAlphaBlending: false,
+                needAlphaBlending: true,
                 defines: defines
             };
+            if (useVertexAlpha === false) {
+                options.needAlphaBlending = false;
+            }
             if (!useVertexColor) {
                 options.uniforms.push("color");
             }
             else {
-                options.needAlphaBlending = (useVertexAlpha) ? true : false;
                 options.defines.push("#define VERTEXCOLOR");
                 options.attributes.push(BABYLON.VertexBuffer.ColorKind);
             }
@@ -48242,7 +48244,7 @@ var BABYLON;
          * The parameter `lines` is an array of lines, each line being an array of successive Vector3.
          * The optional parameter `instance` is an instance of an existing LineSystem object to be updated with the passed `lines` parameter. The way to update it is the same than for
          * The optional parameter `colors` is an array of line colors, each line colors being an array of successive Color4, one per line point.
-         * The optional parameter `useVertexAlpha' is to be set to `true` (default `false`) when the alpha value from the former `Color4` array must be used.
+         * The optional parameter `useVertexAlpha' is to be set to `false` (default `true`) when you don't need the alpha blending (faster).
          * updating a simple Line mesh, you just need to update every line in the `lines` array : http://doc.babylonjs.com/tutorials/How_to_dynamically_morph_a_mesh#lines-and-dashedlines
          * When updating an instance, remember that only line point positions can change, not the number of points, neither the number of lines.
          * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created.
@@ -48298,7 +48300,7 @@ var BABYLON;
          * The parameter `points` is an array successive Vector3.
          * The optional parameter `instance` is an instance of an existing LineMesh object to be updated with the passed `points` parameter : http://doc.babylonjs.com/tutorials/How_to_dynamically_morph_a_mesh#lines-and-dashedlines
          * The optional parameter `colors` is an array of successive Color4, one per line point.
-         * The optional parameter `useVertexAlpha' is to be set to `true` (default `false`) when the alpha value from the former `Color4` array must be used.
+         * The optional parameter `useVertexAlpha' is to be set to `false` (default `true`) when you don't need alpha blending (faster).
          * When updating an instance, remember that only point positions can change, not the number of points.
          * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created.
          */
@@ -67287,7 +67289,7 @@ var BABYLON;
                 }
                 impostor.applyImpulse(impostorForceAndContactPoint.force, impostorForceAndContactPoint.contactPoint);
             });
-            event.cleanup(false);
+            event.dispose(false);
             return event;
         };
         /**
@@ -67314,7 +67316,7 @@ var BABYLON;
                 }
                 impostor.applyForce(impostorForceAndContactPoint.force, impostorForceAndContactPoint.contactPoint);
             });
-            event.cleanup(false);
+            event.dispose(false);
             return event;
         };
         /**
@@ -67334,7 +67336,7 @@ var BABYLON;
                 return null;
             }
             var event = new PhysicsGravitationalFieldEvent(this, this._scene, origin, radius, strength, falloff);
-            event.cleanup(false);
+            event.dispose(false);
             return event;
         };
         return PhysicsHelper;
@@ -67398,7 +67400,7 @@ var BABYLON;
          * Disposes the radialSphere.
          * @param {bolean} force
          */
-        PhysicsRadialExplosionEvent.prototype.cleanup = function (force) {
+        PhysicsRadialExplosionEvent.prototype.dispose = function (force) {
             var _this = this;
             if (force === void 0) { force = true; }
             if (force) {
@@ -67471,7 +67473,7 @@ var BABYLON;
          * Disposes the radialSphere.
          * @param {bolean} force
          */
-        PhysicsGravitationalFieldEvent.prototype.cleanup = function (force) {
+        PhysicsGravitationalFieldEvent.prototype.dispose = function (force) {
             var _this = this;
             if (force === void 0) { force = true; }
             if (force) {

+ 1 - 1
src/Engine/babylon.engine.ts

@@ -3181,7 +3181,7 @@
                 if (!hostingScene) {
                     hostingScene = this.scenes[this.scenes.length - 1];
                 }
-                hostingScene.postProcessManager.directRender([this._rescalePostProcess], rtt);
+                hostingScene.postProcessManager.directRender([this._rescalePostProcess], rtt, true);
 
                 this._bindTextureDirectly(this._gl.TEXTURE_2D, destination);
                 this._gl.copyTexImage2D(this._gl.TEXTURE_2D, 0, internalFormat, 0, 0, destination.width, destination.height, 0);