David Catuhe 7 lat temu
rodzic
commit
02ad390871
31 zmienionych plików z 12774 dodań i 12784 usunięć
  1. 2214 2214
      Playground/babylon.d.txt
  2. 2969 2969
      dist/preview release/babylon.d.ts
  3. 43 43
      dist/preview release/babylon.js
  4. 8 10
      dist/preview release/babylon.max.js
  5. 44 44
      dist/preview release/babylon.worker.js
  6. 7325 7325
      dist/preview release/customConfigurations/minimalGLTFViewer/babylon.d.ts
  7. 46 46
      dist/preview release/customConfigurations/minimalGLTFViewer/babylon.js
  8. 8 10
      dist/preview release/customConfigurations/minimalGLTFViewer/babylon.max.js
  9. 8 10
      dist/preview release/customConfigurations/minimalGLTFViewer/es6.js
  10. 8 10
      dist/preview release/es6.js
  11. 3 3
      dist/preview release/gui/babylon.gui.min.js
  12. 4 4
      dist/preview release/inspector/babylon.inspector.bundle.js
  13. 3 3
      dist/preview release/inspector/babylon.inspector.min.js
  14. 2 2
      dist/preview release/loaders/babylon.glTF1FileLoader.min.js
  15. 2 2
      dist/preview release/loaders/babylon.glTF2FileLoader.min.js
  16. 3 3
      dist/preview release/loaders/babylon.glTFFileLoader.min.js
  17. 1 1
      dist/preview release/loaders/babylon.objFileLoader.min.js
  18. 3 3
      dist/preview release/loaders/babylonjs.loaders.min.js
  19. 1 1
      dist/preview release/materialsLibrary/babylon.customMaterial.min.js
  20. 1 1
      dist/preview release/materialsLibrary/babylon.shadowOnlyMaterial.min.js
  21. 1 1
      dist/preview release/materialsLibrary/babylon.waterMaterial.min.js
  22. 3 3
      dist/preview release/materialsLibrary/babylonjs.materials.min.js
  23. 1 1
      dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.min.js
  24. 1 1
      dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.min.js
  25. 1 1
      dist/preview release/postProcessesLibrary/babylonjs.postProcess.min.js
  26. 3 3
      dist/preview release/serializers/babylon.glTF2Serializer.js
  27. 1 1
      dist/preview release/serializers/babylon.glTF2Serializer.min.js
  28. 3 3
      dist/preview release/serializers/babylonjs.serializers.js
  29. 1 1
      dist/preview release/serializers/babylonjs.serializers.min.js
  30. 55 55
      dist/preview release/viewer/babylon.viewer.js
  31. 8 10
      dist/preview release/viewer/babylon.viewer.max.js

Plik diff jest za duży
+ 2214 - 2214
Playground/babylon.d.txt


Plik diff jest za duży
+ 2969 - 2969
dist/preview release/babylon.d.ts


Plik diff jest za duży
+ 43 - 43
dist/preview release/babylon.js


+ 8 - 10
dist/preview release/babylon.max.js

@@ -68286,7 +68286,6 @@ var BABYLON;
         /**
          * Creates a new instance of @see CircleOfConfusionPostProcess
          * @param name The name of the effect.
-         * @param scene The scene the effect belongs to.
          * @param depthTexture The depth texture of the scene to compute the circle of confusion.
          * @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.
@@ -68295,7 +68294,7 @@ var BABYLON;
          * @param reusable If the post process can be reused on the same frame. (default: false)
          * @param textureType Type of textures used when performing the post process. (default: 0)
          */
-        function CircleOfConfusionPostProcess(name, scene, depthTexture, options, camera, samplingMode, engine, reusable, textureType) {
+        function CircleOfConfusionPostProcess(name, depthTexture, options, camera, samplingMode, engine, reusable, textureType) {
             if (textureType === void 0) { textureType = BABYLON.Engine.TEXTURETYPE_UNSIGNED_INT; }
             var _this = _super.call(this, name, "circleOfConfusion", ["cameraMinMaxZ", "focusDistance", "cocPrecalculation"], ["depthSampler"], options, camera, samplingMode, engine, reusable, null, textureType) || this;
             /**
@@ -68321,9 +68320,7 @@ var BABYLON;
                 var cocPrecalculation = ((aperture * _this.focalLength) / ((_this.focusDistance - _this.focalLength))); // * ((this.focusDistance - pixelDistance)/pixelDistance) [This part is done in shader]
                 effect.setFloat('focusDistance', _this.focusDistance);
                 effect.setFloat('cocPrecalculation', cocPrecalculation);
-                if (scene.activeCamera) {
-                    effect.setFloat2('cameraMinMaxZ', scene.activeCamera.minZ, scene.activeCamera.maxZ);
-                }
+                effect.setFloat2('cameraMinMaxZ', depthTexture.activeCamera.minZ, depthTexture.activeCamera.maxZ);
             });
             return _this;
         }
@@ -68404,16 +68401,15 @@ var BABYLON;
         /**
          * Creates a new instance of @see DepthOfFieldEffect
          * @param scene The scene the effect belongs to.
+         * @param depthTexture The depth texture of the scene to compute the circle of confusion.
          * @param pipelineTextureType The type of texture to be used when performing the post processing.
          */
-        function DepthOfFieldEffect(scene, blurLevel, pipelineTextureType) {
+        function DepthOfFieldEffect(scene, depthTexture, blurLevel, pipelineTextureType) {
             if (blurLevel === void 0) { blurLevel = DepthOfFieldEffectBlurLevel.Low; }
             if (pipelineTextureType === void 0) { pipelineTextureType = 0; }
             var _this = _super.call(this, scene.getEngine(), "depth of field", function () {
-                // Enable and get current depth map
-                var depthMap = scene.enableDepthRenderer().getDepthMap();
                 // Circle of confusion value for each pixel is used to determine how much to blur that pixel
-                _this._circleOfConfusion = new BABYLON.CircleOfConfusionPostProcess("circleOfConfusion", scene, depthMap, 1, null, BABYLON.Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, pipelineTextureType);
+                _this._circleOfConfusion = new BABYLON.CircleOfConfusionPostProcess("circleOfConfusion", depthTexture, 1, null, BABYLON.Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, pipelineTextureType);
                 // Capture circle of confusion texture
                 _this._depthOfFieldPass = new BABYLON.PassPostProcess("depthOfFieldPass", 1.0, null, BABYLON.Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, pipelineTextureType);
                 _this._depthOfFieldPass.autoClear = false;
@@ -68777,7 +68773,9 @@ var BABYLON;
             this._disposePostProcesses();
             this._reset();
             if (this.depthOfFieldEnabled) {
-                this.depthOfField = new BABYLON.DepthOfFieldEffect(this._scene, this._depthOfFieldBlurLevel, this._defaultPipelineTextureType);
+                // Enable and get current depth map
+                var depthTexture = this._scene.enableDepthRenderer(this._cameras[0]).getDepthMap();
+                this.depthOfField = new BABYLON.DepthOfFieldEffect(this._scene, depthTexture, this._depthOfFieldBlurLevel, this._defaultPipelineTextureType);
                 this.addEffect(this.depthOfField);
             }
             if (this.bloomEnabled) {

Plik diff jest za duży
+ 44 - 44
dist/preview release/babylon.worker.js


Plik diff jest za duży
+ 7325 - 7325
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.d.ts


Plik diff jest za duży
+ 46 - 46
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.js


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

@@ -67603,7 +67603,6 @@ var BABYLON;
         /**
          * Creates a new instance of @see CircleOfConfusionPostProcess
          * @param name The name of the effect.
-         * @param scene The scene the effect belongs to.
          * @param depthTexture The depth texture of the scene to compute the circle of confusion.
          * @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.
@@ -67612,7 +67611,7 @@ var BABYLON;
          * @param reusable If the post process can be reused on the same frame. (default: false)
          * @param textureType Type of textures used when performing the post process. (default: 0)
          */
-        function CircleOfConfusionPostProcess(name, scene, depthTexture, options, camera, samplingMode, engine, reusable, textureType) {
+        function CircleOfConfusionPostProcess(name, depthTexture, options, camera, samplingMode, engine, reusable, textureType) {
             if (textureType === void 0) { textureType = BABYLON.Engine.TEXTURETYPE_UNSIGNED_INT; }
             var _this = _super.call(this, name, "circleOfConfusion", ["cameraMinMaxZ", "focusDistance", "cocPrecalculation"], ["depthSampler"], options, camera, samplingMode, engine, reusable, null, textureType) || this;
             /**
@@ -67638,9 +67637,7 @@ var BABYLON;
                 var cocPrecalculation = ((aperture * _this.focalLength) / ((_this.focusDistance - _this.focalLength))); // * ((this.focusDistance - pixelDistance)/pixelDistance) [This part is done in shader]
                 effect.setFloat('focusDistance', _this.focusDistance);
                 effect.setFloat('cocPrecalculation', cocPrecalculation);
-                if (scene.activeCamera) {
-                    effect.setFloat2('cameraMinMaxZ', scene.activeCamera.minZ, scene.activeCamera.maxZ);
-                }
+                effect.setFloat2('cameraMinMaxZ', depthTexture.activeCamera.minZ, depthTexture.activeCamera.maxZ);
             });
             return _this;
         }
@@ -67721,16 +67718,15 @@ var BABYLON;
         /**
          * Creates a new instance of @see DepthOfFieldEffect
          * @param scene The scene the effect belongs to.
+         * @param depthTexture The depth texture of the scene to compute the circle of confusion.
          * @param pipelineTextureType The type of texture to be used when performing the post processing.
          */
-        function DepthOfFieldEffect(scene, blurLevel, pipelineTextureType) {
+        function DepthOfFieldEffect(scene, depthTexture, blurLevel, pipelineTextureType) {
             if (blurLevel === void 0) { blurLevel = DepthOfFieldEffectBlurLevel.Low; }
             if (pipelineTextureType === void 0) { pipelineTextureType = 0; }
             var _this = _super.call(this, scene.getEngine(), "depth of field", function () {
-                // Enable and get current depth map
-                var depthMap = scene.enableDepthRenderer().getDepthMap();
                 // Circle of confusion value for each pixel is used to determine how much to blur that pixel
-                _this._circleOfConfusion = new BABYLON.CircleOfConfusionPostProcess("circleOfConfusion", scene, depthMap, 1, null, BABYLON.Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, pipelineTextureType);
+                _this._circleOfConfusion = new BABYLON.CircleOfConfusionPostProcess("circleOfConfusion", depthTexture, 1, null, BABYLON.Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, pipelineTextureType);
                 // Capture circle of confusion texture
                 _this._depthOfFieldPass = new BABYLON.PassPostProcess("depthOfFieldPass", 1.0, null, BABYLON.Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, pipelineTextureType);
                 _this._depthOfFieldPass.autoClear = false;
@@ -68094,7 +68090,9 @@ var BABYLON;
             this._disposePostProcesses();
             this._reset();
             if (this.depthOfFieldEnabled) {
-                this.depthOfField = new BABYLON.DepthOfFieldEffect(this._scene, this._depthOfFieldBlurLevel, this._defaultPipelineTextureType);
+                // Enable and get current depth map
+                var depthTexture = this._scene.enableDepthRenderer(this._cameras[0]).getDepthMap();
+                this.depthOfField = new BABYLON.DepthOfFieldEffect(this._scene, depthTexture, this._depthOfFieldBlurLevel, this._defaultPipelineTextureType);
                 this.addEffect(this.depthOfField);
             }
             if (this.bloomEnabled) {

+ 8 - 10
dist/preview release/customConfigurations/minimalGLTFViewer/es6.js

@@ -67589,7 +67589,6 @@ var BABYLON;
         /**
          * Creates a new instance of @see CircleOfConfusionPostProcess
          * @param name The name of the effect.
-         * @param scene The scene the effect belongs to.
          * @param depthTexture The depth texture of the scene to compute the circle of confusion.
          * @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.
@@ -67598,7 +67597,7 @@ var BABYLON;
          * @param reusable If the post process can be reused on the same frame. (default: false)
          * @param textureType Type of textures used when performing the post process. (default: 0)
          */
-        function CircleOfConfusionPostProcess(name, scene, depthTexture, options, camera, samplingMode, engine, reusable, textureType) {
+        function CircleOfConfusionPostProcess(name, depthTexture, options, camera, samplingMode, engine, reusable, textureType) {
             if (textureType === void 0) { textureType = BABYLON.Engine.TEXTURETYPE_UNSIGNED_INT; }
             var _this = _super.call(this, name, "circleOfConfusion", ["cameraMinMaxZ", "focusDistance", "cocPrecalculation"], ["depthSampler"], options, camera, samplingMode, engine, reusable, null, textureType) || this;
             /**
@@ -67624,9 +67623,7 @@ var BABYLON;
                 var cocPrecalculation = ((aperture * _this.focalLength) / ((_this.focusDistance - _this.focalLength))); // * ((this.focusDistance - pixelDistance)/pixelDistance) [This part is done in shader]
                 effect.setFloat('focusDistance', _this.focusDistance);
                 effect.setFloat('cocPrecalculation', cocPrecalculation);
-                if (scene.activeCamera) {
-                    effect.setFloat2('cameraMinMaxZ', scene.activeCamera.minZ, scene.activeCamera.maxZ);
-                }
+                effect.setFloat2('cameraMinMaxZ', depthTexture.activeCamera.minZ, depthTexture.activeCamera.maxZ);
             });
             return _this;
         }
@@ -67707,16 +67704,15 @@ var BABYLON;
         /**
          * Creates a new instance of @see DepthOfFieldEffect
          * @param scene The scene the effect belongs to.
+         * @param depthTexture The depth texture of the scene to compute the circle of confusion.
          * @param pipelineTextureType The type of texture to be used when performing the post processing.
          */
-        function DepthOfFieldEffect(scene, blurLevel, pipelineTextureType) {
+        function DepthOfFieldEffect(scene, depthTexture, blurLevel, pipelineTextureType) {
             if (blurLevel === void 0) { blurLevel = DepthOfFieldEffectBlurLevel.Low; }
             if (pipelineTextureType === void 0) { pipelineTextureType = 0; }
             var _this = _super.call(this, scene.getEngine(), "depth of field", function () {
-                // Enable and get current depth map
-                var depthMap = scene.enableDepthRenderer().getDepthMap();
                 // Circle of confusion value for each pixel is used to determine how much to blur that pixel
-                _this._circleOfConfusion = new BABYLON.CircleOfConfusionPostProcess("circleOfConfusion", scene, depthMap, 1, null, BABYLON.Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, pipelineTextureType);
+                _this._circleOfConfusion = new BABYLON.CircleOfConfusionPostProcess("circleOfConfusion", depthTexture, 1, null, BABYLON.Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, pipelineTextureType);
                 // Capture circle of confusion texture
                 _this._depthOfFieldPass = new BABYLON.PassPostProcess("depthOfFieldPass", 1.0, null, BABYLON.Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, pipelineTextureType);
                 _this._depthOfFieldPass.autoClear = false;
@@ -68080,7 +68076,9 @@ var BABYLON;
             this._disposePostProcesses();
             this._reset();
             if (this.depthOfFieldEnabled) {
-                this.depthOfField = new BABYLON.DepthOfFieldEffect(this._scene, this._depthOfFieldBlurLevel, this._defaultPipelineTextureType);
+                // Enable and get current depth map
+                var depthTexture = this._scene.enableDepthRenderer(this._cameras[0]).getDepthMap();
+                this.depthOfField = new BABYLON.DepthOfFieldEffect(this._scene, depthTexture, this._depthOfFieldBlurLevel, this._defaultPipelineTextureType);
                 this.addEffect(this.depthOfField);
             }
             if (this.bloomEnabled) {

+ 8 - 10
dist/preview release/es6.js

@@ -68272,7 +68272,6 @@ var BABYLON;
         /**
          * Creates a new instance of @see CircleOfConfusionPostProcess
          * @param name The name of the effect.
-         * @param scene The scene the effect belongs to.
          * @param depthTexture The depth texture of the scene to compute the circle of confusion.
          * @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.
@@ -68281,7 +68280,7 @@ var BABYLON;
          * @param reusable If the post process can be reused on the same frame. (default: false)
          * @param textureType Type of textures used when performing the post process. (default: 0)
          */
-        function CircleOfConfusionPostProcess(name, scene, depthTexture, options, camera, samplingMode, engine, reusable, textureType) {
+        function CircleOfConfusionPostProcess(name, depthTexture, options, camera, samplingMode, engine, reusable, textureType) {
             if (textureType === void 0) { textureType = BABYLON.Engine.TEXTURETYPE_UNSIGNED_INT; }
             var _this = _super.call(this, name, "circleOfConfusion", ["cameraMinMaxZ", "focusDistance", "cocPrecalculation"], ["depthSampler"], options, camera, samplingMode, engine, reusable, null, textureType) || this;
             /**
@@ -68307,9 +68306,7 @@ var BABYLON;
                 var cocPrecalculation = ((aperture * _this.focalLength) / ((_this.focusDistance - _this.focalLength))); // * ((this.focusDistance - pixelDistance)/pixelDistance) [This part is done in shader]
                 effect.setFloat('focusDistance', _this.focusDistance);
                 effect.setFloat('cocPrecalculation', cocPrecalculation);
-                if (scene.activeCamera) {
-                    effect.setFloat2('cameraMinMaxZ', scene.activeCamera.minZ, scene.activeCamera.maxZ);
-                }
+                effect.setFloat2('cameraMinMaxZ', depthTexture.activeCamera.minZ, depthTexture.activeCamera.maxZ);
             });
             return _this;
         }
@@ -68390,16 +68387,15 @@ var BABYLON;
         /**
          * Creates a new instance of @see DepthOfFieldEffect
          * @param scene The scene the effect belongs to.
+         * @param depthTexture The depth texture of the scene to compute the circle of confusion.
          * @param pipelineTextureType The type of texture to be used when performing the post processing.
          */
-        function DepthOfFieldEffect(scene, blurLevel, pipelineTextureType) {
+        function DepthOfFieldEffect(scene, depthTexture, blurLevel, pipelineTextureType) {
             if (blurLevel === void 0) { blurLevel = DepthOfFieldEffectBlurLevel.Low; }
             if (pipelineTextureType === void 0) { pipelineTextureType = 0; }
             var _this = _super.call(this, scene.getEngine(), "depth of field", function () {
-                // Enable and get current depth map
-                var depthMap = scene.enableDepthRenderer().getDepthMap();
                 // Circle of confusion value for each pixel is used to determine how much to blur that pixel
-                _this._circleOfConfusion = new BABYLON.CircleOfConfusionPostProcess("circleOfConfusion", scene, depthMap, 1, null, BABYLON.Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, pipelineTextureType);
+                _this._circleOfConfusion = new BABYLON.CircleOfConfusionPostProcess("circleOfConfusion", depthTexture, 1, null, BABYLON.Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, pipelineTextureType);
                 // Capture circle of confusion texture
                 _this._depthOfFieldPass = new BABYLON.PassPostProcess("depthOfFieldPass", 1.0, null, BABYLON.Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, pipelineTextureType);
                 _this._depthOfFieldPass.autoClear = false;
@@ -68763,7 +68759,9 @@ var BABYLON;
             this._disposePostProcesses();
             this._reset();
             if (this.depthOfFieldEnabled) {
-                this.depthOfField = new BABYLON.DepthOfFieldEffect(this._scene, this._depthOfFieldBlurLevel, this._defaultPipelineTextureType);
+                // Enable and get current depth map
+                var depthTexture = this._scene.enableDepthRenderer(this._cameras[0]).getDepthMap();
+                this.depthOfField = new BABYLON.DepthOfFieldEffect(this._scene, depthTexture, this._depthOfFieldBlurLevel, this._defaultPipelineTextureType);
                 this.addEffect(this.depthOfField);
             }
             if (this.bloomEnabled) {

Plik diff jest za duży
+ 3 - 3
dist/preview release/gui/babylon.gui.min.js


Plik diff jest za duży
+ 4 - 4
dist/preview release/inspector/babylon.inspector.bundle.js


Plik diff jest za duży
+ 3 - 3
dist/preview release/inspector/babylon.inspector.min.js


Plik diff jest za duży
+ 2 - 2
dist/preview release/loaders/babylon.glTF1FileLoader.min.js


Plik diff jest za duży
+ 2 - 2
dist/preview release/loaders/babylon.glTF2FileLoader.min.js


Plik diff jest za duży
+ 3 - 3
dist/preview release/loaders/babylon.glTFFileLoader.min.js


Plik diff jest za duży
+ 1 - 1
dist/preview release/loaders/babylon.objFileLoader.min.js


Plik diff jest za duży
+ 3 - 3
dist/preview release/loaders/babylonjs.loaders.min.js


Plik diff jest za duży
+ 1 - 1
dist/preview release/materialsLibrary/babylon.customMaterial.min.js


Plik diff jest za duży
+ 1 - 1
dist/preview release/materialsLibrary/babylon.shadowOnlyMaterial.min.js


Plik diff jest za duży
+ 1 - 1
dist/preview release/materialsLibrary/babylon.waterMaterial.min.js


Plik diff jest za duży
+ 3 - 3
dist/preview release/materialsLibrary/babylonjs.materials.min.js


Plik diff jest za duży
+ 1 - 1
dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.min.js


Plik diff jest za duży
+ 1 - 1
dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.min.js


Plik diff jest za duży
+ 1 - 1
dist/preview release/postProcessesLibrary/babylonjs.postProcess.min.js


+ 3 - 3
dist/preview release/serializers/babylon.glTF2Serializer.js

@@ -147,7 +147,7 @@ var BABYLON;
                 if (vertexCount) {
                     for (var i = vertexStart; i < end; ++i) {
                         var indexOffset = positionStrideSize * i;
-                        var position = new BABYLON.Vector3(positions[indexOffset], positions[indexOffset + 1], positions[indexOffset + 2]);
+                        var position = BABYLON.Vector3.FromArray(positions, indexOffset);
                         var vector = this.convertToRightHandedSystem ? _Exporter.GetRightHandedVector3(position).asArray() : position.asArray();
                         for (var j = 0; j < positionStrideSize; ++j) {
                             var num = vector[j];
@@ -204,11 +204,11 @@ var BABYLON;
                     var index = k * strideSize;
                     var vector = [];
                     if (vertexBufferKind === BABYLON.VertexBuffer.PositionKind || vertexBufferKind === BABYLON.VertexBuffer.NormalKind) {
-                        var vertexData = new BABYLON.Vector3(meshAttributeArray[index], meshAttributeArray[index + 1], meshAttributeArray[index + 2]);
+                        var vertexData = BABYLON.Vector3.FromArray(meshAttributeArray, index);
                         vector = this.convertToRightHandedSystem ? _Exporter.GetRightHandedVector3(vertexData).asArray() : vertexData.asArray();
                     }
                     else if (vertexBufferKind === BABYLON.VertexBuffer.TangentKind || vertexBufferKind === BABYLON.VertexBuffer.ColorKind) {
-                        var vertexData = new BABYLON.Vector4(meshAttributeArray[index], meshAttributeArray[index + 1], meshAttributeArray[index + 2], meshAttributeArray[index + 3]);
+                        var vertexData = BABYLON.Vector4.FromArray(meshAttributeArray, index);
                         vector = (this.convertToRightHandedSystem && !(vertexBufferKind === BABYLON.VertexBuffer.ColorKind)) ? _Exporter.GetRightHandedVector4(vertexData).asArray() : vertexData.asArray();
                     }
                     else if (vertexBufferKind === BABYLON.VertexBuffer.UVKind || vertexBufferKind === BABYLON.VertexBuffer.UV2Kind) {

Plik diff jest za duży
+ 1 - 1
dist/preview release/serializers/babylon.glTF2Serializer.min.js


+ 3 - 3
dist/preview release/serializers/babylonjs.serializers.js

@@ -291,7 +291,7 @@ var BABYLON;
                 if (vertexCount) {
                     for (var i = vertexStart; i < end; ++i) {
                         var indexOffset = positionStrideSize * i;
-                        var position = new BABYLON.Vector3(positions[indexOffset], positions[indexOffset + 1], positions[indexOffset + 2]);
+                        var position = BABYLON.Vector3.FromArray(positions, indexOffset);
                         var vector = this.convertToRightHandedSystem ? _Exporter.GetRightHandedVector3(position).asArray() : position.asArray();
                         for (var j = 0; j < positionStrideSize; ++j) {
                             var num = vector[j];
@@ -348,11 +348,11 @@ var BABYLON;
                     var index = k * strideSize;
                     var vector = [];
                     if (vertexBufferKind === BABYLON.VertexBuffer.PositionKind || vertexBufferKind === BABYLON.VertexBuffer.NormalKind) {
-                        var vertexData = new BABYLON.Vector3(meshAttributeArray[index], meshAttributeArray[index + 1], meshAttributeArray[index + 2]);
+                        var vertexData = BABYLON.Vector3.FromArray(meshAttributeArray, index);
                         vector = this.convertToRightHandedSystem ? _Exporter.GetRightHandedVector3(vertexData).asArray() : vertexData.asArray();
                     }
                     else if (vertexBufferKind === BABYLON.VertexBuffer.TangentKind || vertexBufferKind === BABYLON.VertexBuffer.ColorKind) {
-                        var vertexData = new BABYLON.Vector4(meshAttributeArray[index], meshAttributeArray[index + 1], meshAttributeArray[index + 2], meshAttributeArray[index + 3]);
+                        var vertexData = BABYLON.Vector4.FromArray(meshAttributeArray, index);
                         vector = (this.convertToRightHandedSystem && !(vertexBufferKind === BABYLON.VertexBuffer.ColorKind)) ? _Exporter.GetRightHandedVector4(vertexData).asArray() : vertexData.asArray();
                     }
                     else if (vertexBufferKind === BABYLON.VertexBuffer.UVKind || vertexBufferKind === BABYLON.VertexBuffer.UV2Kind) {

Plik diff jest za duży
+ 1 - 1
dist/preview release/serializers/babylonjs.serializers.min.js


Plik diff jest za duży
+ 55 - 55
dist/preview release/viewer/babylon.viewer.js


+ 8 - 10
dist/preview release/viewer/babylon.viewer.max.js

@@ -68356,7 +68356,6 @@ var BABYLON;
         /**
          * Creates a new instance of @see CircleOfConfusionPostProcess
          * @param name The name of the effect.
-         * @param scene The scene the effect belongs to.
          * @param depthTexture The depth texture of the scene to compute the circle of confusion.
          * @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.
@@ -68365,7 +68364,7 @@ var BABYLON;
          * @param reusable If the post process can be reused on the same frame. (default: false)
          * @param textureType Type of textures used when performing the post process. (default: 0)
          */
-        function CircleOfConfusionPostProcess(name, scene, depthTexture, options, camera, samplingMode, engine, reusable, textureType) {
+        function CircleOfConfusionPostProcess(name, depthTexture, options, camera, samplingMode, engine, reusable, textureType) {
             if (textureType === void 0) { textureType = BABYLON.Engine.TEXTURETYPE_UNSIGNED_INT; }
             var _this = _super.call(this, name, "circleOfConfusion", ["cameraMinMaxZ", "focusDistance", "cocPrecalculation"], ["depthSampler"], options, camera, samplingMode, engine, reusable, null, textureType) || this;
             /**
@@ -68391,9 +68390,7 @@ var BABYLON;
                 var cocPrecalculation = ((aperture * _this.focalLength) / ((_this.focusDistance - _this.focalLength))); // * ((this.focusDistance - pixelDistance)/pixelDistance) [This part is done in shader]
                 effect.setFloat('focusDistance', _this.focusDistance);
                 effect.setFloat('cocPrecalculation', cocPrecalculation);
-                if (scene.activeCamera) {
-                    effect.setFloat2('cameraMinMaxZ', scene.activeCamera.minZ, scene.activeCamera.maxZ);
-                }
+                effect.setFloat2('cameraMinMaxZ', depthTexture.activeCamera.minZ, depthTexture.activeCamera.maxZ);
             });
             return _this;
         }
@@ -68474,16 +68471,15 @@ var BABYLON;
         /**
          * Creates a new instance of @see DepthOfFieldEffect
          * @param scene The scene the effect belongs to.
+         * @param depthTexture The depth texture of the scene to compute the circle of confusion.
          * @param pipelineTextureType The type of texture to be used when performing the post processing.
          */
-        function DepthOfFieldEffect(scene, blurLevel, pipelineTextureType) {
+        function DepthOfFieldEffect(scene, depthTexture, blurLevel, pipelineTextureType) {
             if (blurLevel === void 0) { blurLevel = DepthOfFieldEffectBlurLevel.Low; }
             if (pipelineTextureType === void 0) { pipelineTextureType = 0; }
             var _this = _super.call(this, scene.getEngine(), "depth of field", function () {
-                // Enable and get current depth map
-                var depthMap = scene.enableDepthRenderer().getDepthMap();
                 // Circle of confusion value for each pixel is used to determine how much to blur that pixel
-                _this._circleOfConfusion = new BABYLON.CircleOfConfusionPostProcess("circleOfConfusion", scene, depthMap, 1, null, BABYLON.Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, pipelineTextureType);
+                _this._circleOfConfusion = new BABYLON.CircleOfConfusionPostProcess("circleOfConfusion", depthTexture, 1, null, BABYLON.Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, pipelineTextureType);
                 // Capture circle of confusion texture
                 _this._depthOfFieldPass = new BABYLON.PassPostProcess("depthOfFieldPass", 1.0, null, BABYLON.Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, pipelineTextureType);
                 _this._depthOfFieldPass.autoClear = false;
@@ -68847,7 +68843,9 @@ var BABYLON;
             this._disposePostProcesses();
             this._reset();
             if (this.depthOfFieldEnabled) {
-                this.depthOfField = new BABYLON.DepthOfFieldEffect(this._scene, this._depthOfFieldBlurLevel, this._defaultPipelineTextureType);
+                // Enable and get current depth map
+                var depthTexture = this._scene.enableDepthRenderer(this._cameras[0]).getDepthMap();
+                this.depthOfField = new BABYLON.DepthOfFieldEffect(this._scene, depthTexture, this._depthOfFieldBlurLevel, this._defaultPipelineTextureType);
                 this.addEffect(this.depthOfField);
             }
             if (this.bloomEnabled) {