David Catuhe 7 years ago
parent
commit
a68b36de01

File diff suppressed because it is too large
+ 14131 - 17259
Playground/babylon.d.txt


File diff suppressed because it is too large
+ 15735 - 15735
dist/preview release/babylon.d.ts


File diff suppressed because it is too large
+ 4 - 4
dist/preview release/babylon.js


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

@@ -31105,8 +31105,15 @@ var BABYLON;
                         var subMesh = _a[_i];
                         var effectiveMaterial = subMesh.getMaterial();
                         if (effectiveMaterial) {
-                            if (!effectiveMaterial.isReadyForSubMesh(this, subMesh, hardwareInstancedRendering)) {
-                                return false;
+                            if (effectiveMaterial.storeEffectOnSubMeshes) {
+                                if (!effectiveMaterial.isReadyForSubMesh(this, subMesh, hardwareInstancedRendering)) {
+                                    return false;
+                                }
+                            }
+                            else {
+                                if (!effectiveMaterial.isReady(this, hardwareInstancedRendering)) {
+                                    return false;
+                                }
                             }
                         }
                     }
@@ -96671,7 +96678,7 @@ var BABYLON;
                 return;
             }
             if (this._options.skyboxTexture instanceof BABYLON.BaseTexture) {
-                this._skyboxMaterial.reflectionTexture = this._skyboxTexture;
+                this._skyboxMaterial.reflectionTexture = this._options.skyboxTexture;
                 return;
             }
             this._skyboxTexture = new BABYLON.CubeTexture(this._options.skyboxTexture, this._scene, undefined, undefined, undefined, undefined, this._errorHandler);

+ 10 - 3
dist/preview release/babylon.no-module.max.js

@@ -31072,8 +31072,15 @@ var BABYLON;
                         var subMesh = _a[_i];
                         var effectiveMaterial = subMesh.getMaterial();
                         if (effectiveMaterial) {
-                            if (!effectiveMaterial.isReadyForSubMesh(this, subMesh, hardwareInstancedRendering)) {
-                                return false;
+                            if (effectiveMaterial.storeEffectOnSubMeshes) {
+                                if (!effectiveMaterial.isReadyForSubMesh(this, subMesh, hardwareInstancedRendering)) {
+                                    return false;
+                                }
+                            }
+                            else {
+                                if (!effectiveMaterial.isReady(this, hardwareInstancedRendering)) {
+                                    return false;
+                                }
                             }
                         }
                     }
@@ -96638,7 +96645,7 @@ var BABYLON;
                 return;
             }
             if (this._options.skyboxTexture instanceof BABYLON.BaseTexture) {
-                this._skyboxMaterial.reflectionTexture = this._skyboxTexture;
+                this._skyboxMaterial.reflectionTexture = this._options.skyboxTexture;
                 return;
             }
             this._skyboxTexture = new BABYLON.CubeTexture(this._options.skyboxTexture, this._scene, undefined, undefined, undefined, undefined, this._errorHandler);

File diff suppressed because it is too large
+ 4 - 4
dist/preview release/babylon.worker.js


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

@@ -31072,8 +31072,15 @@ var BABYLON;
                         var subMesh = _a[_i];
                         var effectiveMaterial = subMesh.getMaterial();
                         if (effectiveMaterial) {
-                            if (!effectiveMaterial.isReadyForSubMesh(this, subMesh, hardwareInstancedRendering)) {
-                                return false;
+                            if (effectiveMaterial.storeEffectOnSubMeshes) {
+                                if (!effectiveMaterial.isReadyForSubMesh(this, subMesh, hardwareInstancedRendering)) {
+                                    return false;
+                                }
+                            }
+                            else {
+                                if (!effectiveMaterial.isReady(this, hardwareInstancedRendering)) {
+                                    return false;
+                                }
                             }
                         }
                     }
@@ -96638,7 +96645,7 @@ var BABYLON;
                 return;
             }
             if (this._options.skyboxTexture instanceof BABYLON.BaseTexture) {
-                this._skyboxMaterial.reflectionTexture = this._skyboxTexture;
+                this._skyboxMaterial.reflectionTexture = this._options.skyboxTexture;
                 return;
             }
             this._skyboxTexture = new BABYLON.CubeTexture(this._options.skyboxTexture, this._scene, undefined, undefined, undefined, undefined, this._errorHandler);

File diff suppressed because it is too large
+ 4 - 4
dist/preview release/viewer/babylon.viewer.js


+ 16 - 23
dist/preview release/viewer/babylon.viewer.max.js

@@ -31193,8 +31193,15 @@ var BABYLON;
                         var subMesh = _a[_i];
                         var effectiveMaterial = subMesh.getMaterial();
                         if (effectiveMaterial) {
-                            if (!effectiveMaterial.isReadyForSubMesh(this, subMesh, hardwareInstancedRendering)) {
-                                return false;
+                            if (effectiveMaterial.storeEffectOnSubMeshes) {
+                                if (!effectiveMaterial.isReadyForSubMesh(this, subMesh, hardwareInstancedRendering)) {
+                                    return false;
+                                }
+                            }
+                            else {
+                                if (!effectiveMaterial.isReady(this, hardwareInstancedRendering)) {
+                                    return false;
+                                }
                             }
                         }
                     }
@@ -96759,7 +96766,7 @@ var BABYLON;
                 return;
             }
             if (this._options.skyboxTexture instanceof BABYLON.BaseTexture) {
-                this._skyboxMaterial.reflectionTexture = this._skyboxTexture;
+                this._skyboxMaterial.reflectionTexture = this._options.skyboxTexture;
                 return;
             }
             this._skyboxTexture = new BABYLON.CubeTexture(this._options.skyboxTexture, this._scene, undefined, undefined, undefined, undefined, this._errorHandler);
@@ -100234,7 +100241,6 @@ module.exports = "SHARE";
 
 var __decorate=this&&this.__decorate||function(e,t,r,c){var o,f=arguments.length,n=f<3?t:null===c?c=Object.getOwnPropertyDescriptor(t,r):c;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,c);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(n=(f<3?o(n):f>3?o(t,r,n):o(t,r))||n);return f>3&&n&&Object.defineProperty(t,r,n),n};
 var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var n in o)o.hasOwnProperty(n)&&(t[n]=o[n])};return function(o,n){function r(){this.constructor=o}t(o,n),o.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();
-"use strict";
 
 var BABYLON;
 (function (BABYLON) {
@@ -100406,7 +100412,6 @@ var BABYLON;
 
 //# sourceMappingURL=babylon.stlFileLoader.js.map
 
-"use strict";
 
 var BABYLON;
 (function (BABYLON) {
@@ -100609,6 +100614,7 @@ var BABYLON;
                     url += value;
                 }
             }
+            // Not from input file.
             else {
                 url += value;
             }
@@ -101206,7 +101212,6 @@ var BABYLON;
 
 //# sourceMappingURL=babylon.objFileLoader.js.map
 
-"use strict";
 
 var BABYLON;
 (function (BABYLON) {
@@ -101680,7 +101685,6 @@ var BABYLON;
 
 //# sourceMappingURL=babylon.glTFFileLoader.js.map
 
-"use strict";
 
 var BABYLON;
 (function (BABYLON) {
@@ -101778,7 +101782,6 @@ var BABYLON;
 
 //# sourceMappingURL=babylon.glTFLoaderInterfaces.js.map
 
-"use strict";
 
 var BABYLON;
 (function (BABYLON) {
@@ -101967,11 +101970,11 @@ var BABYLON;
                     // For each frame
                     for (var j = 0; j < bufferInput.length; j++) {
                         var value = null;
-                        if (targetPath === "rotationQuaternion") {
+                        if (targetPath === "rotationQuaternion") { // VEC4
                             value = BABYLON.Quaternion.FromArray([bufferOutput[arrayOffset], bufferOutput[arrayOffset + 1], bufferOutput[arrayOffset + 2], bufferOutput[arrayOffset + 3]]);
                             arrayOffset += 4;
                         }
-                        else {
+                        else { // Position and scaling are VEC3
                             value = BABYLON.Vector3.FromArray([bufferOutput[arrayOffset], bufferOutput[arrayOffset + 1], bufferOutput[arrayOffset + 2]]);
                             arrayOffset += 3;
                         }
@@ -102459,6 +102462,7 @@ var BABYLON;
                 var newMesh = importMesh(gltfRuntime, node, node.mesh ? [node.mesh] : node.meshes, id, node.babylonNode);
                 lastNode = newMesh;
             }
+            // Lights
             else if (node.light && !node.babylonNode && !gltfRuntime.importOnlyMeshes) {
                 var light = gltfRuntime.lights[node.light];
                 if (light) {
@@ -102506,6 +102510,7 @@ var BABYLON;
                     }
                 }
             }
+            // Cameras
             else if (node.camera && !node.babylonNode && !gltfRuntime.importOnlyMeshes) {
                 var camera = gltfRuntime.cameras[node.camera];
                 if (camera) {
@@ -102691,6 +102696,7 @@ var BABYLON;
                 if (type === GLTF1.EParameterType.SAMPLER_2D) {
                     GLTF1.GLTFLoaderExtension.LoadTextureAsync(gltfRuntime, material.values ? value : uniform.value, onLoadTexture(unif), function () { return onLoadTexture(null); });
                 }
+                // Others
                 else {
                     if (uniform.value && GLTF1.GLTFUtils.SetUniform(shaderMaterial, unif, material.values ? value : uniform.value, type)) {
                         // Static uniform
@@ -103282,7 +103288,6 @@ var BABYLON;
 
 //# sourceMappingURL=babylon.glTFLoader.js.map
 
-"use strict";
 
 var BABYLON;
 (function (BABYLON) {
@@ -103518,7 +103523,6 @@ var BABYLON;
 
 //# sourceMappingURL=babylon.glTFLoaderUtils.js.map
 
-"use strict";
 
 var BABYLON;
 (function (BABYLON) {
@@ -103667,7 +103671,6 @@ var BABYLON;
 
 //# sourceMappingURL=babylon.glTFLoaderExtension.js.map
 
-"use strict";
 
 
 var BABYLON;
@@ -103736,7 +103739,6 @@ var BABYLON;
 
 //# sourceMappingURL=babylon.glTFBinaryExtension.js.map
 
-"use strict";
 
 
 var BABYLON;
@@ -103860,7 +103862,6 @@ var BABYLON;
 
 //# sourceMappingURL=babylon.glTFMaterialsCommonExtension.js.map
 
-"use strict";
 
 var BABYLON;
 (function (BABYLON) {
@@ -103884,13 +103885,11 @@ var BABYLON;
 
 //# sourceMappingURL=babylon.glTFLoaderUtilities.js.map
 
-"use strict";
 
 
 
 //# sourceMappingURL=babylon.glTFLoaderInterfaces.js.map
 
-"use strict";
 
 var BABYLON;
 (function (BABYLON) {
@@ -105252,7 +105251,6 @@ var BABYLON;
 
 //# sourceMappingURL=babylon.glTFLoader.js.map
 
-"use strict";
 
 var BABYLON;
 (function (BABYLON) {
@@ -105326,7 +105324,6 @@ var BABYLON;
 
 //# sourceMappingURL=babylon.glTFLoaderExtension.js.map
 
-"use strict";
 
 
 var BABYLON;
@@ -105488,7 +105485,6 @@ var BABYLON;
 
 //# sourceMappingURL=MSFT_lod.js.map
 
-"use strict";
 
 
 var BABYLON;
@@ -105578,7 +105574,6 @@ var BABYLON;
 
 //# sourceMappingURL=KHR_draco_mesh_compression.js.map
 
-"use strict";
 
 
 var BABYLON;
@@ -105656,7 +105651,6 @@ var BABYLON;
 
 //# sourceMappingURL=KHR_materials_pbrSpecularGlossiness.js.map
 
-"use strict";
 
 
 var BABYLON;
@@ -105734,7 +105728,6 @@ var BABYLON;
 
 //# sourceMappingURL=KHR_materials_unlit.js.map
 
-"use strict";
 
 
 var BABYLON;