David Catuhe 7 年之前
父节点
当前提交
101670cae4

文件差异内容过多而无法显示
+ 24270 - 24698
Playground/babylon.d.txt


文件差异内容过多而无法显示
+ 6578 - 6565
dist/preview release/babylon.d.ts


文件差异内容过多而无法显示
+ 24 - 24
dist/preview release/babylon.js


+ 121 - 77
dist/preview release/babylon.max.js

@@ -1222,6 +1222,20 @@ var BABYLON;
             return this;
             return this;
         };
         };
         /**
         /**
+         * This function will add a new shader to the shader store
+         * @param name the name of the shader
+         * @param pixelShader optional pixel shader content
+         * @param vertexShader optional vertex shader content
+         */
+        Effect.RegisterShader = function (name, pixelShader, vertexShader) {
+            if (pixelShader) {
+                Effect.ShadersStore[name + "PixelShader"] = pixelShader;
+            }
+            if (vertexShader) {
+                Effect.ShadersStore[name + "VertexShader"] = vertexShader;
+            }
+        };
+        /**
          * Resets the cache of effects.
          * Resets the cache of effects.
          */
          */
         Effect.ResetCache = function () {
         Effect.ResetCache = function () {
@@ -15527,6 +15541,10 @@ var BABYLON;
                     var lodIndex = minLODIndex + (maxLODIndex - minLODIndex) * roughness;
                     var lodIndex = minLODIndex + (maxLODIndex - minLODIndex) * roughness;
                     var mipmapIndex = Math.round(Math.min(Math.max(lodIndex, 0), maxLODIndex));
                     var mipmapIndex = Math.round(Math.min(Math.max(lodIndex, 0), maxLODIndex));
                     var glTextureFromLod = new BABYLON.InternalTexture(_this, BABYLON.InternalTexture.DATASOURCE_TEMP);
                     var glTextureFromLod = new BABYLON.InternalTexture(_this, BABYLON.InternalTexture.DATASOURCE_TEMP);
+                    glTextureFromLod.type = texture.type;
+                    glTextureFromLod.format = texture.format;
+                    glTextureFromLod.width = Math.pow(2, Math.max(BABYLON.Scalar.Log2(width) - mipmapIndex, 0));
+                    glTextureFromLod.height = glTextureFromLod.width;
                     glTextureFromLod.isCube = true;
                     glTextureFromLod.isCube = true;
                     _this._bindTextureDirectly(gl.TEXTURE_CUBE_MAP, glTextureFromLod, true);
                     _this._bindTextureDirectly(gl.TEXTURE_CUBE_MAP, glTextureFromLod, true);
                     gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
                     gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
@@ -15537,7 +15555,7 @@ var BABYLON;
                         var info = loadData.info;
                         var info = loadData.info;
                         var data = loadData.data;
                         var data = loadData.data;
                         _this._unpackFlipY(info.isCompressed);
                         _this._unpackFlipY(info.isCompressed);
-                        BABYLON.DDSTools.UploadDDSLevels(_this, texture, data, info, true, 6, mipmapIndex);
+                        BABYLON.DDSTools.UploadDDSLevels(_this, glTextureFromLod, data, info, true, 6, mipmapIndex);
                     }
                     }
                     else {
                     else {
                         BABYLON.Tools.Warn("DDS is the only prefiltered cube map supported so far.");
                         BABYLON.Tools.Warn("DDS is the only prefiltered cube map supported so far.");
@@ -71448,7 +71466,7 @@ var BABYLON;
                 // Create XHR
                 // Create XHR
                 var xhr = new XMLHttpRequest();
                 var xhr = new XMLHttpRequest();
                 var fileData;
                 var fileData;
-                xhr.open("GET", url, true);
+                xhr.open("GET", url + "?" + Date.now(), true);
                 if (useArrayBuffer) {
                 if (useArrayBuffer) {
                     xhr.responseType = "arraybuffer";
                     xhr.responseType = "arraybuffer";
                 }
                 }
@@ -88503,7 +88521,7 @@ var BABYLON;
             engine._setCubeMapTextureParams(loadMipmap);
             engine._setCubeMapTextureParams(loadMipmap);
             texture.isReady = true;
             texture.isReady = true;
             if (onLoad) {
             if (onLoad) {
-                onLoad({ isDDS: true, width: texture.width, info: info, imgs: imgs, texture: texture });
+                onLoad({ isDDS: true, width: texture.width, info: info, data: imgs, texture: texture });
             }
             }
         };
         };
         /**
         /**
@@ -89745,7 +89763,10 @@ var BABYLON;
                         else if (!_this._pointerCaptures[pointerEvent_1.pointerId] && (utilityScenePick.distance < originalScenePick.distance || originalScenePick.distance === 0)) {
                         else if (!_this._pointerCaptures[pointerEvent_1.pointerId] && (utilityScenePick.distance < originalScenePick.distance || originalScenePick.distance === 0)) {
                             // We pick something in utility scene or the pick in utility is closer than the one in main scene
                             // We pick something in utility scene or the pick in utility is closer than the one in main scene
                             _this._notifyObservers(prePointerInfo, utilityScenePick, pointerEvent_1);
                             _this._notifyObservers(prePointerInfo, utilityScenePick, pointerEvent_1);
-                            prePointerInfo.skipOnPointerObservable = utilityScenePick.distance > 0;
+                            // If a previous utility layer set this, do not unset this
+                            if (!prePointerInfo.skipOnPointerObservable) {
+                                prePointerInfo.skipOnPointerObservable = utilityScenePick.distance > 0;
+                            }
                         }
                         }
                         else if (!_this._pointerCaptures[pointerEvent_1.pointerId] && (utilityScenePick.distance > originalScenePick.distance)) {
                         else if (!_this._pointerCaptures[pointerEvent_1.pointerId] && (utilityScenePick.distance > originalScenePick.distance)) {
                             // We have a pick in both scenes but main is closer than utility
                             // We have a pick in both scenes but main is closer than utility
@@ -90693,43 +90714,10 @@ var BABYLON;
              */
              */
             this._updateScale = true;
             this._updateScale = true;
             this._interactionsEnabled = true;
             this._interactionsEnabled = true;
+            this._tempVector = new BABYLON.Vector3();
             this._rootMesh = new BABYLON.Mesh("gizmoRootNode", gizmoLayer.utilityLayerScene);
             this._rootMesh = new BABYLON.Mesh("gizmoRootNode", gizmoLayer.utilityLayerScene);
-            var tempVector = new BABYLON.Vector3();
             this._beforeRenderObserver = this.gizmoLayer.utilityLayerScene.onBeforeRenderObservable.add(function () {
             this._beforeRenderObserver = this.gizmoLayer.utilityLayerScene.onBeforeRenderObservable.add(function () {
-                if (_this.attachedMesh) {
-                    if (_this.updateGizmoRotationToMatchAttachedMesh) {
-                        if (!_this._rootMesh.rotationQuaternion) {
-                            _this._rootMesh.rotationQuaternion = BABYLON.Quaternion.RotationYawPitchRoll(_this._rootMesh.rotation.y, _this._rootMesh.rotation.x, _this._rootMesh.rotation.z);
-                        }
-                        // Remove scaling before getting rotation matrix to get rotation matrix unmodified by scale
-                        tempVector.copyFrom(_this.attachedMesh.scaling);
-                        if (_this.attachedMesh.scaling.x < 0) {
-                            _this.attachedMesh.scaling.x *= -1;
-                        }
-                        if (_this.attachedMesh.scaling.y < 0) {
-                            _this.attachedMesh.scaling.y *= -1;
-                        }
-                        if (_this.attachedMesh.scaling.z < 0) {
-                            _this.attachedMesh.scaling.z *= -1;
-                        }
-                        _this.attachedMesh.computeWorldMatrix().getRotationMatrixToRef(_this._tmpMatrix);
-                        _this.attachedMesh.scaling.copyFrom(tempVector);
-                        _this.attachedMesh.computeWorldMatrix();
-                        BABYLON.Quaternion.FromRotationMatrixToRef(_this._tmpMatrix, _this._rootMesh.rotationQuaternion);
-                    }
-                    if (_this.updateGizmoPositionToMatchAttachedMesh) {
-                        _this._rootMesh.position.copyFrom(_this.attachedMesh.absolutePosition);
-                    }
-                    if (_this._updateScale && _this.gizmoLayer.utilityLayerScene.activeCamera && _this.attachedMesh) {
-                        var cameraPosition = _this.gizmoLayer.utilityLayerScene.activeCamera.position;
-                        if (_this.gizmoLayer.utilityLayerScene.activeCamera.devicePosition) {
-                            cameraPosition = _this.gizmoLayer.utilityLayerScene.activeCamera.devicePosition;
-                        }
-                        _this._rootMesh.position.subtractToRef(cameraPosition, tempVector);
-                        var dist = tempVector.length() / _this._scaleFactor;
-                        _this._rootMesh.scaling.set(dist, dist, dist);
-                    }
-                }
+                _this._update();
             });
             });
             this.attachedMesh = null;
             this.attachedMesh = null;
         }
         }
@@ -90766,6 +90754,46 @@ var BABYLON;
         Gizmo.prototype._attachedMeshChanged = function (value) {
         Gizmo.prototype._attachedMeshChanged = function (value) {
         };
         };
         /**
         /**
+         * @hidden
+         * Updates the gizmo to match the attached mesh's position/rotation
+         */
+        Gizmo.prototype._update = function () {
+            if (this.attachedMesh) {
+                if (this.updateGizmoRotationToMatchAttachedMesh) {
+                    if (!this._rootMesh.rotationQuaternion) {
+                        this._rootMesh.rotationQuaternion = BABYLON.Quaternion.RotationYawPitchRoll(this._rootMesh.rotation.y, this._rootMesh.rotation.x, this._rootMesh.rotation.z);
+                    }
+                    // Remove scaling before getting rotation matrix to get rotation matrix unmodified by scale
+                    this._tempVector.copyFrom(this.attachedMesh.scaling);
+                    if (this.attachedMesh.scaling.x < 0) {
+                        this.attachedMesh.scaling.x *= -1;
+                    }
+                    if (this.attachedMesh.scaling.y < 0) {
+                        this.attachedMesh.scaling.y *= -1;
+                    }
+                    if (this.attachedMesh.scaling.z < 0) {
+                        this.attachedMesh.scaling.z *= -1;
+                    }
+                    this.attachedMesh.computeWorldMatrix().getRotationMatrixToRef(this._tmpMatrix);
+                    this.attachedMesh.scaling.copyFrom(this._tempVector);
+                    this.attachedMesh.computeWorldMatrix();
+                    BABYLON.Quaternion.FromRotationMatrixToRef(this._tmpMatrix, this._rootMesh.rotationQuaternion);
+                }
+                if (this.updateGizmoPositionToMatchAttachedMesh) {
+                    this._rootMesh.position.copyFrom(this.attachedMesh.absolutePosition);
+                }
+                if (this._updateScale && this.gizmoLayer.utilityLayerScene.activeCamera && this.attachedMesh) {
+                    var cameraPosition = this.gizmoLayer.utilityLayerScene.activeCamera.position;
+                    if (this.gizmoLayer.utilityLayerScene.activeCamera.devicePosition) {
+                        cameraPosition = this.gizmoLayer.utilityLayerScene.activeCamera.devicePosition;
+                    }
+                    this._rootMesh.position.subtractToRef(cameraPosition, this._tempVector);
+                    var dist = this._tempVector.length() / this._scaleFactor;
+                    this._rootMesh.scaling.set(dist, dist, dist);
+                }
+            }
+        };
+        /**
          * Disposes of the gizmo
          * Disposes of the gizmo
          */
          */
         Gizmo.prototype.dispose = function () {
         Gizmo.prototype.dispose = function () {
@@ -90818,8 +90846,9 @@ var BABYLON;
             hoverMaterial.emissiveColor = color.add(new BABYLON.Color3(0.2, 0.2, 0.2));
             hoverMaterial.emissiveColor = color.add(new BABYLON.Color3(0.2, 0.2, 0.2));
             // Build mesh on root node
             // Build mesh on root node
             var arrow = new BABYLON.AbstractMesh("", gizmoLayer.utilityLayerScene);
             var arrow = new BABYLON.AbstractMesh("", gizmoLayer.utilityLayerScene);
-            var arrowMesh = BABYLON.MeshBuilder.CreateCylinder("yPosMesh", { diameterTop: 0, height: 2, tessellation: 96 }, gizmoLayer.utilityLayerScene);
-            var arrowTail = BABYLON.MeshBuilder.CreateCylinder("yPosMesh", { diameter: 0.015, height: 0.3, tessellation: 96 }, gizmoLayer.utilityLayerScene);
+            var arrowMesh = BABYLON.MeshBuilder.CreateCylinder("yPosMesh", { diameterTop: 0, height: 1.5, diameterBottom: 0.75, tessellation: 96 }, gizmoLayer.utilityLayerScene);
+            var arrowTail = BABYLON.MeshBuilder.CreateLines("yPosMesh", { points: [new BABYLON.Vector3(0, 0, 0), new BABYLON.Vector3(0, 1.5, 0)] }, gizmoLayer.utilityLayerScene);
+            arrowTail.color = coloredMaterial.emissiveColor;
             arrow.addChild(arrowMesh);
             arrow.addChild(arrowMesh);
             arrow.addChild(arrowTail);
             arrow.addChild(arrowTail);
             // Position arrow pointing in its drag axis
             // Position arrow pointing in its drag axis
@@ -90827,9 +90856,9 @@ var BABYLON;
             arrowMesh.material = coloredMaterial;
             arrowMesh.material = coloredMaterial;
             arrowMesh.rotation.x = Math.PI / 2;
             arrowMesh.rotation.x = Math.PI / 2;
             arrowMesh.position.z += 0.3;
             arrowMesh.position.z += 0.3;
+            arrowTail.scaling.scaleInPlace(0.2);
             arrowTail.rotation.x = Math.PI / 2;
             arrowTail.rotation.x = Math.PI / 2;
             arrowTail.material = coloredMaterial;
             arrowTail.material = coloredMaterial;
-            arrowTail.position.z += 0.15;
             arrow.lookAt(_this._rootMesh.position.subtract(dragAxis));
             arrow.lookAt(_this._rootMesh.position.subtract(dragAxis));
             _this._rootMesh.addChild(arrow);
             _this._rootMesh.addChild(arrow);
             var currentSnapDragDistance = 0;
             var currentSnapDragDistance = 0;
@@ -90863,16 +90892,14 @@ var BABYLON;
                 if (_this._customMeshSet) {
                 if (_this._customMeshSet) {
                     return;
                     return;
                 }
                 }
-                if (pointerInfo.pickInfo && (_this._rootMesh.getChildMeshes().indexOf(pointerInfo.pickInfo.pickedMesh) != -1)) {
-                    _this._rootMesh.getChildMeshes().forEach(function (m) {
-                        m.material = hoverMaterial;
-                    });
-                }
-                else {
-                    _this._rootMesh.getChildMeshes().forEach(function (m) {
-                        m.material = coloredMaterial;
-                    });
-                }
+                var isHovered = pointerInfo.pickInfo && (_this._rootMesh.getChildMeshes().indexOf(pointerInfo.pickInfo.pickedMesh) != -1);
+                var material = isHovered ? hoverMaterial : coloredMaterial;
+                _this._rootMesh.getChildMeshes().forEach(function (m) {
+                    m.material = material;
+                    if (m.color) {
+                        m.color = material.emissiveColor;
+                    }
+                });
             });
             });
             return _this;
             return _this;
         }
         }
@@ -90934,8 +90961,9 @@ var BABYLON;
             hoverMaterial.emissiveColor = color.add(new BABYLON.Color3(0.2, 0.2, 0.2));
             hoverMaterial.emissiveColor = color.add(new BABYLON.Color3(0.2, 0.2, 0.2));
             // Build mesh on root node
             // Build mesh on root node
             var arrow = new BABYLON.AbstractMesh("", gizmoLayer.utilityLayerScene);
             var arrow = new BABYLON.AbstractMesh("", gizmoLayer.utilityLayerScene);
-            var arrowMesh = BABYLON.MeshBuilder.CreateBox("yPosMesh", { size: 0.5 }, gizmoLayer.utilityLayerScene);
-            var arrowTail = BABYLON.MeshBuilder.CreateCylinder("yPosMesh", { diameter: 0.015, height: 0.3, tessellation: 96 }, gizmoLayer.utilityLayerScene);
+            var arrowMesh = BABYLON.MeshBuilder.CreateBox("yPosMesh", { size: 0.4 }, gizmoLayer.utilityLayerScene);
+            var arrowTail = BABYLON.MeshBuilder.CreateLines("yPosMesh", { points: [new BABYLON.Vector3(0, 0, 0), new BABYLON.Vector3(0, 1.5, 0)] }, gizmoLayer.utilityLayerScene);
+            arrowTail.color = coloredMaterial.emissiveColor;
             arrow.addChild(arrowMesh);
             arrow.addChild(arrowMesh);
             arrow.addChild(arrowTail);
             arrow.addChild(arrowTail);
             // Position arrow pointing in its drag axis
             // Position arrow pointing in its drag axis
@@ -90943,9 +90971,9 @@ var BABYLON;
             arrowMesh.material = coloredMaterial;
             arrowMesh.material = coloredMaterial;
             arrowMesh.rotation.x = Math.PI / 2;
             arrowMesh.rotation.x = Math.PI / 2;
             arrowMesh.position.z += 0.3;
             arrowMesh.position.z += 0.3;
+            arrowTail.scaling.scaleInPlace(0.2);
             arrowTail.rotation.x = Math.PI / 2;
             arrowTail.rotation.x = Math.PI / 2;
             arrowTail.material = coloredMaterial;
             arrowTail.material = coloredMaterial;
-            arrowTail.position.z += 0.15;
             arrow.lookAt(_this._rootMesh.position.subtract(dragAxis));
             arrow.lookAt(_this._rootMesh.position.subtract(dragAxis));
             _this._rootMesh.addChild(arrow);
             _this._rootMesh.addChild(arrow);
             // Add drag behavior to handle events when the gizmo is dragged
             // Add drag behavior to handle events when the gizmo is dragged
@@ -90986,16 +91014,14 @@ var BABYLON;
                 if (_this._customMeshSet) {
                 if (_this._customMeshSet) {
                     return;
                     return;
                 }
                 }
-                if (pointerInfo.pickInfo && (_this._rootMesh.getChildMeshes().indexOf(pointerInfo.pickInfo.pickedMesh) != -1)) {
-                    _this._rootMesh.getChildMeshes().forEach(function (m) {
-                        m.material = hoverMaterial;
-                    });
-                }
-                else {
-                    _this._rootMesh.getChildMeshes().forEach(function (m) {
-                        m.material = coloredMaterial;
-                    });
-                }
+                var isHovered = pointerInfo.pickInfo && (_this._rootMesh.getChildMeshes().indexOf(pointerInfo.pickInfo.pickedMesh) != -1);
+                var material = isHovered ? hoverMaterial : coloredMaterial;
+                _this._rootMesh.getChildMeshes().forEach(function (m) {
+                    m.material = material;
+                    if (m.color) {
+                        m.color = material.emissiveColor;
+                    }
+                });
             });
             });
             return _this;
             return _this;
         }
         }
@@ -91057,7 +91083,16 @@ var BABYLON;
             hoverMaterial.emissiveColor = color.add(new BABYLON.Color3(0.2, 0.2, 0.2));
             hoverMaterial.emissiveColor = color.add(new BABYLON.Color3(0.2, 0.2, 0.2));
             // Build mesh on root node
             // Build mesh on root node
             var parentMesh = new BABYLON.AbstractMesh("", gizmoLayer.utilityLayerScene);
             var parentMesh = new BABYLON.AbstractMesh("", gizmoLayer.utilityLayerScene);
-            var rotationMesh = BABYLON.Mesh.CreateTorus("torus", 3, 0.15, 20, gizmoLayer.utilityLayerScene, false);
+            // Create circle out of lines
+            var tessellation = 20;
+            var radius = 2;
+            var points = new Array();
+            for (var i = 0; i < tessellation; i++) {
+                var radian = (2 * Math.PI) * (i / (tessellation - 1));
+                points.push(new BABYLON.Vector3(radius * Math.sin(radian), 0, radius * Math.cos(radian)));
+            }
+            var rotationMesh = BABYLON.Mesh.CreateLines("", points, gizmoLayer.utilityLayerScene);
+            rotationMesh.color = coloredMaterial.emissiveColor;
             // Position arrow pointing in its drag axis
             // Position arrow pointing in its drag axis
             rotationMesh.scaling.scaleInPlace(0.1);
             rotationMesh.scaling.scaleInPlace(0.1);
             rotationMesh.material = coloredMaterial;
             rotationMesh.material = coloredMaterial;
@@ -91146,16 +91181,14 @@ var BABYLON;
                 if (_this._customMeshSet) {
                 if (_this._customMeshSet) {
                     return;
                     return;
                 }
                 }
-                if (pointerInfo.pickInfo && (_this._rootMesh.getChildMeshes().indexOf(pointerInfo.pickInfo.pickedMesh) != -1)) {
-                    _this._rootMesh.getChildMeshes().forEach(function (m) {
-                        m.material = hoverMaterial;
-                    });
-                }
-                else {
-                    _this._rootMesh.getChildMeshes().forEach(function (m) {
-                        m.material = coloredMaterial;
-                    });
-                }
+                var isHovered = pointerInfo.pickInfo && (_this._rootMesh.getChildMeshes().indexOf(pointerInfo.pickInfo.pickedMesh) != -1);
+                var material = isHovered ? hoverMaterial : coloredMaterial;
+                _this._rootMesh.getChildMeshes().forEach(function (m) {
+                    m.material = material;
+                    if (m.color) {
+                        m.color = material.emissiveColor;
+                    }
+                });
             });
             });
             return _this;
             return _this;
         }
         }
@@ -91489,6 +91522,8 @@ var BABYLON;
                         var dragAxis = worldDragDirection.subtract(toSub).normalizeToNew();
                         var dragAxis = worldDragDirection.subtract(toSub).normalizeToNew();
                         // project drag delta on to the resulting drag axis and rotate based on that
                         // project drag delta on to the resulting drag axis and rotate based on that
                         var projectDist = -BABYLON.Vector3.Dot(dragAxis, event.delta);
                         var projectDist = -BABYLON.Vector3.Dot(dragAxis, event.delta);
+                        // Make rotation relative to size of mesh.
+                        projectDist = (projectDist / _this._boundingDimensions.length()) * _this._anchorMesh.scaling.length();
                         // Rotate based on axis
                         // Rotate based on axis
                         if (!_this.attachedMesh.rotationQuaternion) {
                         if (!_this.attachedMesh.rotationQuaternion) {
                             _this.attachedMesh.rotationQuaternion = BABYLON.Quaternion.RotationYawPitchRoll(_this.attachedMesh.rotation.y, _this.attachedMesh.rotation.x, _this.attachedMesh.rotation.z);
                             _this.attachedMesh.rotationQuaternion = BABYLON.Quaternion.RotationYawPitchRoll(_this.attachedMesh.rotation.y, _this.attachedMesh.rotation.x, _this.attachedMesh.rotation.z);
@@ -91548,7 +91583,8 @@ var BABYLON;
                         _dragBehavior.onDragObservable.add(function (event) {
                         _dragBehavior.onDragObservable.add(function (event) {
                             _this.onDragObservable.notifyObservers({});
                             _this.onDragObservable.notifyObservers({});
                             if (_this.attachedMesh) {
                             if (_this.attachedMesh) {
-                                var deltaScale = new BABYLON.Vector3(event.dragDistance, event.dragDistance, event.dragDistance);
+                                var relativeDragDistance = (event.dragDistance / _this._boundingDimensions.length()) * _this._anchorMesh.scaling.length();
+                                var deltaScale = new BABYLON.Vector3(relativeDragDistance, relativeDragDistance, relativeDragDistance);
                                 deltaScale.scaleInPlace(_this._scaleDragSpeed);
                                 deltaScale.scaleInPlace(_this._scaleDragSpeed);
                                 _this.updateBoundingBox();
                                 _this.updateBoundingBox();
                                 // Scale from the position of the opposite corner                   
                                 // Scale from the position of the opposite corner                   
@@ -91634,6 +91670,7 @@ var BABYLON;
          * Updates the bounding box information for the Gizmo
          * Updates the bounding box information for the Gizmo
          */
          */
         BoundingBoxGizmo.prototype.updateBoundingBox = function () {
         BoundingBoxGizmo.prototype.updateBoundingBox = function () {
+            this._update();
             if (this.attachedMesh) {
             if (this.attachedMesh) {
                 // Rotate based on axis
                 // Rotate based on axis
                 if (!this.attachedMesh.rotationQuaternion) {
                 if (!this.attachedMesh.rotationQuaternion) {
@@ -91685,6 +91722,9 @@ var BABYLON;
                             rotateSpheres[index].lookAt(BABYLON.Vector3.Cross(BABYLON.Vector3.Forward(), rotateSpheres[index].position.normalizeToNew()).normalizeToNew().add(rotateSpheres[index].position));
                             rotateSpheres[index].lookAt(BABYLON.Vector3.Cross(BABYLON.Vector3.Forward(), rotateSpheres[index].position.normalizeToNew()).normalizeToNew().add(rotateSpheres[index].position));
                         }
                         }
                         if (this.fixedDragMeshScreenSize) {
                         if (this.fixedDragMeshScreenSize) {
+                            this._rootMesh.computeWorldMatrix();
+                            this._rotateSpheresParent.computeWorldMatrix();
+                            rotateSpheres[index].computeWorldMatrix();
                             rotateSpheres[index].absolutePosition.subtractToRef(this.gizmoLayer.utilityLayerScene.activeCamera.position, this._tmpVector);
                             rotateSpheres[index].absolutePosition.subtractToRef(this.gizmoLayer.utilityLayerScene.activeCamera.position, this._tmpVector);
                             var distanceFromCamera = this.rotationSphereSize * this._tmpVector.length() / this.fixedDragMeshScreenSizeDistanceFactor;
                             var distanceFromCamera = this.rotationSphereSize * this._tmpVector.length() / this.fixedDragMeshScreenSizeDistanceFactor;
                             rotateSpheres[index].scaling.set(distanceFromCamera, distanceFromCamera, distanceFromCamera);
                             rotateSpheres[index].scaling.set(distanceFromCamera, distanceFromCamera, distanceFromCamera);
@@ -91705,6 +91745,9 @@ var BABYLON;
                             scaleBoxes[index].position.set(this._boundingDimensions.x * i, this._boundingDimensions.y * j, this._boundingDimensions.z * k);
                             scaleBoxes[index].position.set(this._boundingDimensions.x * i, this._boundingDimensions.y * j, this._boundingDimensions.z * k);
                             scaleBoxes[index].position.addInPlace(new BABYLON.Vector3(-this._boundingDimensions.x / 2, -this._boundingDimensions.y / 2, -this._boundingDimensions.z / 2));
                             scaleBoxes[index].position.addInPlace(new BABYLON.Vector3(-this._boundingDimensions.x / 2, -this._boundingDimensions.y / 2, -this._boundingDimensions.z / 2));
                             if (this.fixedDragMeshScreenSize) {
                             if (this.fixedDragMeshScreenSize) {
+                                this._rootMesh.computeWorldMatrix();
+                                this._scaleBoxesParent.computeWorldMatrix();
+                                scaleBoxes[index].computeWorldMatrix();
                                 scaleBoxes[index].absolutePosition.subtractToRef(this.gizmoLayer.utilityLayerScene.activeCamera.position, this._tmpVector);
                                 scaleBoxes[index].absolutePosition.subtractToRef(this.gizmoLayer.utilityLayerScene.activeCamera.position, this._tmpVector);
                                 var distanceFromCamera = this.scaleBoxSize * this._tmpVector.length() / this.fixedDragMeshScreenSizeDistanceFactor;
                                 var distanceFromCamera = this.scaleBoxSize * this._tmpVector.length() / this.fixedDragMeshScreenSizeDistanceFactor;
                                 scaleBoxes[index].scaling.set(distanceFromCamera, distanceFromCamera, distanceFromCamera);
                                 scaleBoxes[index].scaling.set(distanceFromCamera, distanceFromCamera, distanceFromCamera);
@@ -91978,6 +92021,7 @@ var BABYLON;
                     gizmo.dispose();
                     gizmo.dispose();
                 }
                 }
             }
             }
+            this._dragBehavior.detach();
             this._gizmoLayer.dispose();
             this._gizmoLayer.dispose();
         };
         };
         return GizmoManager;
         return GizmoManager;

+ 121 - 77
dist/preview release/babylon.no-module.max.js

@@ -1189,6 +1189,20 @@ var BABYLON;
             return this;
             return this;
         };
         };
         /**
         /**
+         * This function will add a new shader to the shader store
+         * @param name the name of the shader
+         * @param pixelShader optional pixel shader content
+         * @param vertexShader optional vertex shader content
+         */
+        Effect.RegisterShader = function (name, pixelShader, vertexShader) {
+            if (pixelShader) {
+                Effect.ShadersStore[name + "PixelShader"] = pixelShader;
+            }
+            if (vertexShader) {
+                Effect.ShadersStore[name + "VertexShader"] = vertexShader;
+            }
+        };
+        /**
          * Resets the cache of effects.
          * Resets the cache of effects.
          */
          */
         Effect.ResetCache = function () {
         Effect.ResetCache = function () {
@@ -15494,6 +15508,10 @@ var BABYLON;
                     var lodIndex = minLODIndex + (maxLODIndex - minLODIndex) * roughness;
                     var lodIndex = minLODIndex + (maxLODIndex - minLODIndex) * roughness;
                     var mipmapIndex = Math.round(Math.min(Math.max(lodIndex, 0), maxLODIndex));
                     var mipmapIndex = Math.round(Math.min(Math.max(lodIndex, 0), maxLODIndex));
                     var glTextureFromLod = new BABYLON.InternalTexture(_this, BABYLON.InternalTexture.DATASOURCE_TEMP);
                     var glTextureFromLod = new BABYLON.InternalTexture(_this, BABYLON.InternalTexture.DATASOURCE_TEMP);
+                    glTextureFromLod.type = texture.type;
+                    glTextureFromLod.format = texture.format;
+                    glTextureFromLod.width = Math.pow(2, Math.max(BABYLON.Scalar.Log2(width) - mipmapIndex, 0));
+                    glTextureFromLod.height = glTextureFromLod.width;
                     glTextureFromLod.isCube = true;
                     glTextureFromLod.isCube = true;
                     _this._bindTextureDirectly(gl.TEXTURE_CUBE_MAP, glTextureFromLod, true);
                     _this._bindTextureDirectly(gl.TEXTURE_CUBE_MAP, glTextureFromLod, true);
                     gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
                     gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
@@ -15504,7 +15522,7 @@ var BABYLON;
                         var info = loadData.info;
                         var info = loadData.info;
                         var data = loadData.data;
                         var data = loadData.data;
                         _this._unpackFlipY(info.isCompressed);
                         _this._unpackFlipY(info.isCompressed);
-                        BABYLON.DDSTools.UploadDDSLevels(_this, texture, data, info, true, 6, mipmapIndex);
+                        BABYLON.DDSTools.UploadDDSLevels(_this, glTextureFromLod, data, info, true, 6, mipmapIndex);
                     }
                     }
                     else {
                     else {
                         BABYLON.Tools.Warn("DDS is the only prefiltered cube map supported so far.");
                         BABYLON.Tools.Warn("DDS is the only prefiltered cube map supported so far.");
@@ -71415,7 +71433,7 @@ var BABYLON;
                 // Create XHR
                 // Create XHR
                 var xhr = new XMLHttpRequest();
                 var xhr = new XMLHttpRequest();
                 var fileData;
                 var fileData;
-                xhr.open("GET", url, true);
+                xhr.open("GET", url + "?" + Date.now(), true);
                 if (useArrayBuffer) {
                 if (useArrayBuffer) {
                     xhr.responseType = "arraybuffer";
                     xhr.responseType = "arraybuffer";
                 }
                 }
@@ -88470,7 +88488,7 @@ var BABYLON;
             engine._setCubeMapTextureParams(loadMipmap);
             engine._setCubeMapTextureParams(loadMipmap);
             texture.isReady = true;
             texture.isReady = true;
             if (onLoad) {
             if (onLoad) {
-                onLoad({ isDDS: true, width: texture.width, info: info, imgs: imgs, texture: texture });
+                onLoad({ isDDS: true, width: texture.width, info: info, data: imgs, texture: texture });
             }
             }
         };
         };
         /**
         /**
@@ -89712,7 +89730,10 @@ var BABYLON;
                         else if (!_this._pointerCaptures[pointerEvent_1.pointerId] && (utilityScenePick.distance < originalScenePick.distance || originalScenePick.distance === 0)) {
                         else if (!_this._pointerCaptures[pointerEvent_1.pointerId] && (utilityScenePick.distance < originalScenePick.distance || originalScenePick.distance === 0)) {
                             // We pick something in utility scene or the pick in utility is closer than the one in main scene
                             // We pick something in utility scene or the pick in utility is closer than the one in main scene
                             _this._notifyObservers(prePointerInfo, utilityScenePick, pointerEvent_1);
                             _this._notifyObservers(prePointerInfo, utilityScenePick, pointerEvent_1);
-                            prePointerInfo.skipOnPointerObservable = utilityScenePick.distance > 0;
+                            // If a previous utility layer set this, do not unset this
+                            if (!prePointerInfo.skipOnPointerObservable) {
+                                prePointerInfo.skipOnPointerObservable = utilityScenePick.distance > 0;
+                            }
                         }
                         }
                         else if (!_this._pointerCaptures[pointerEvent_1.pointerId] && (utilityScenePick.distance > originalScenePick.distance)) {
                         else if (!_this._pointerCaptures[pointerEvent_1.pointerId] && (utilityScenePick.distance > originalScenePick.distance)) {
                             // We have a pick in both scenes but main is closer than utility
                             // We have a pick in both scenes but main is closer than utility
@@ -90660,43 +90681,10 @@ var BABYLON;
              */
              */
             this._updateScale = true;
             this._updateScale = true;
             this._interactionsEnabled = true;
             this._interactionsEnabled = true;
+            this._tempVector = new BABYLON.Vector3();
             this._rootMesh = new BABYLON.Mesh("gizmoRootNode", gizmoLayer.utilityLayerScene);
             this._rootMesh = new BABYLON.Mesh("gizmoRootNode", gizmoLayer.utilityLayerScene);
-            var tempVector = new BABYLON.Vector3();
             this._beforeRenderObserver = this.gizmoLayer.utilityLayerScene.onBeforeRenderObservable.add(function () {
             this._beforeRenderObserver = this.gizmoLayer.utilityLayerScene.onBeforeRenderObservable.add(function () {
-                if (_this.attachedMesh) {
-                    if (_this.updateGizmoRotationToMatchAttachedMesh) {
-                        if (!_this._rootMesh.rotationQuaternion) {
-                            _this._rootMesh.rotationQuaternion = BABYLON.Quaternion.RotationYawPitchRoll(_this._rootMesh.rotation.y, _this._rootMesh.rotation.x, _this._rootMesh.rotation.z);
-                        }
-                        // Remove scaling before getting rotation matrix to get rotation matrix unmodified by scale
-                        tempVector.copyFrom(_this.attachedMesh.scaling);
-                        if (_this.attachedMesh.scaling.x < 0) {
-                            _this.attachedMesh.scaling.x *= -1;
-                        }
-                        if (_this.attachedMesh.scaling.y < 0) {
-                            _this.attachedMesh.scaling.y *= -1;
-                        }
-                        if (_this.attachedMesh.scaling.z < 0) {
-                            _this.attachedMesh.scaling.z *= -1;
-                        }
-                        _this.attachedMesh.computeWorldMatrix().getRotationMatrixToRef(_this._tmpMatrix);
-                        _this.attachedMesh.scaling.copyFrom(tempVector);
-                        _this.attachedMesh.computeWorldMatrix();
-                        BABYLON.Quaternion.FromRotationMatrixToRef(_this._tmpMatrix, _this._rootMesh.rotationQuaternion);
-                    }
-                    if (_this.updateGizmoPositionToMatchAttachedMesh) {
-                        _this._rootMesh.position.copyFrom(_this.attachedMesh.absolutePosition);
-                    }
-                    if (_this._updateScale && _this.gizmoLayer.utilityLayerScene.activeCamera && _this.attachedMesh) {
-                        var cameraPosition = _this.gizmoLayer.utilityLayerScene.activeCamera.position;
-                        if (_this.gizmoLayer.utilityLayerScene.activeCamera.devicePosition) {
-                            cameraPosition = _this.gizmoLayer.utilityLayerScene.activeCamera.devicePosition;
-                        }
-                        _this._rootMesh.position.subtractToRef(cameraPosition, tempVector);
-                        var dist = tempVector.length() / _this._scaleFactor;
-                        _this._rootMesh.scaling.set(dist, dist, dist);
-                    }
-                }
+                _this._update();
             });
             });
             this.attachedMesh = null;
             this.attachedMesh = null;
         }
         }
@@ -90733,6 +90721,46 @@ var BABYLON;
         Gizmo.prototype._attachedMeshChanged = function (value) {
         Gizmo.prototype._attachedMeshChanged = function (value) {
         };
         };
         /**
         /**
+         * @hidden
+         * Updates the gizmo to match the attached mesh's position/rotation
+         */
+        Gizmo.prototype._update = function () {
+            if (this.attachedMesh) {
+                if (this.updateGizmoRotationToMatchAttachedMesh) {
+                    if (!this._rootMesh.rotationQuaternion) {
+                        this._rootMesh.rotationQuaternion = BABYLON.Quaternion.RotationYawPitchRoll(this._rootMesh.rotation.y, this._rootMesh.rotation.x, this._rootMesh.rotation.z);
+                    }
+                    // Remove scaling before getting rotation matrix to get rotation matrix unmodified by scale
+                    this._tempVector.copyFrom(this.attachedMesh.scaling);
+                    if (this.attachedMesh.scaling.x < 0) {
+                        this.attachedMesh.scaling.x *= -1;
+                    }
+                    if (this.attachedMesh.scaling.y < 0) {
+                        this.attachedMesh.scaling.y *= -1;
+                    }
+                    if (this.attachedMesh.scaling.z < 0) {
+                        this.attachedMesh.scaling.z *= -1;
+                    }
+                    this.attachedMesh.computeWorldMatrix().getRotationMatrixToRef(this._tmpMatrix);
+                    this.attachedMesh.scaling.copyFrom(this._tempVector);
+                    this.attachedMesh.computeWorldMatrix();
+                    BABYLON.Quaternion.FromRotationMatrixToRef(this._tmpMatrix, this._rootMesh.rotationQuaternion);
+                }
+                if (this.updateGizmoPositionToMatchAttachedMesh) {
+                    this._rootMesh.position.copyFrom(this.attachedMesh.absolutePosition);
+                }
+                if (this._updateScale && this.gizmoLayer.utilityLayerScene.activeCamera && this.attachedMesh) {
+                    var cameraPosition = this.gizmoLayer.utilityLayerScene.activeCamera.position;
+                    if (this.gizmoLayer.utilityLayerScene.activeCamera.devicePosition) {
+                        cameraPosition = this.gizmoLayer.utilityLayerScene.activeCamera.devicePosition;
+                    }
+                    this._rootMesh.position.subtractToRef(cameraPosition, this._tempVector);
+                    var dist = this._tempVector.length() / this._scaleFactor;
+                    this._rootMesh.scaling.set(dist, dist, dist);
+                }
+            }
+        };
+        /**
          * Disposes of the gizmo
          * Disposes of the gizmo
          */
          */
         Gizmo.prototype.dispose = function () {
         Gizmo.prototype.dispose = function () {
@@ -90785,8 +90813,9 @@ var BABYLON;
             hoverMaterial.emissiveColor = color.add(new BABYLON.Color3(0.2, 0.2, 0.2));
             hoverMaterial.emissiveColor = color.add(new BABYLON.Color3(0.2, 0.2, 0.2));
             // Build mesh on root node
             // Build mesh on root node
             var arrow = new BABYLON.AbstractMesh("", gizmoLayer.utilityLayerScene);
             var arrow = new BABYLON.AbstractMesh("", gizmoLayer.utilityLayerScene);
-            var arrowMesh = BABYLON.MeshBuilder.CreateCylinder("yPosMesh", { diameterTop: 0, height: 2, tessellation: 96 }, gizmoLayer.utilityLayerScene);
-            var arrowTail = BABYLON.MeshBuilder.CreateCylinder("yPosMesh", { diameter: 0.015, height: 0.3, tessellation: 96 }, gizmoLayer.utilityLayerScene);
+            var arrowMesh = BABYLON.MeshBuilder.CreateCylinder("yPosMesh", { diameterTop: 0, height: 1.5, diameterBottom: 0.75, tessellation: 96 }, gizmoLayer.utilityLayerScene);
+            var arrowTail = BABYLON.MeshBuilder.CreateLines("yPosMesh", { points: [new BABYLON.Vector3(0, 0, 0), new BABYLON.Vector3(0, 1.5, 0)] }, gizmoLayer.utilityLayerScene);
+            arrowTail.color = coloredMaterial.emissiveColor;
             arrow.addChild(arrowMesh);
             arrow.addChild(arrowMesh);
             arrow.addChild(arrowTail);
             arrow.addChild(arrowTail);
             // Position arrow pointing in its drag axis
             // Position arrow pointing in its drag axis
@@ -90794,9 +90823,9 @@ var BABYLON;
             arrowMesh.material = coloredMaterial;
             arrowMesh.material = coloredMaterial;
             arrowMesh.rotation.x = Math.PI / 2;
             arrowMesh.rotation.x = Math.PI / 2;
             arrowMesh.position.z += 0.3;
             arrowMesh.position.z += 0.3;
+            arrowTail.scaling.scaleInPlace(0.2);
             arrowTail.rotation.x = Math.PI / 2;
             arrowTail.rotation.x = Math.PI / 2;
             arrowTail.material = coloredMaterial;
             arrowTail.material = coloredMaterial;
-            arrowTail.position.z += 0.15;
             arrow.lookAt(_this._rootMesh.position.subtract(dragAxis));
             arrow.lookAt(_this._rootMesh.position.subtract(dragAxis));
             _this._rootMesh.addChild(arrow);
             _this._rootMesh.addChild(arrow);
             var currentSnapDragDistance = 0;
             var currentSnapDragDistance = 0;
@@ -90830,16 +90859,14 @@ var BABYLON;
                 if (_this._customMeshSet) {
                 if (_this._customMeshSet) {
                     return;
                     return;
                 }
                 }
-                if (pointerInfo.pickInfo && (_this._rootMesh.getChildMeshes().indexOf(pointerInfo.pickInfo.pickedMesh) != -1)) {
-                    _this._rootMesh.getChildMeshes().forEach(function (m) {
-                        m.material = hoverMaterial;
-                    });
-                }
-                else {
-                    _this._rootMesh.getChildMeshes().forEach(function (m) {
-                        m.material = coloredMaterial;
-                    });
-                }
+                var isHovered = pointerInfo.pickInfo && (_this._rootMesh.getChildMeshes().indexOf(pointerInfo.pickInfo.pickedMesh) != -1);
+                var material = isHovered ? hoverMaterial : coloredMaterial;
+                _this._rootMesh.getChildMeshes().forEach(function (m) {
+                    m.material = material;
+                    if (m.color) {
+                        m.color = material.emissiveColor;
+                    }
+                });
             });
             });
             return _this;
             return _this;
         }
         }
@@ -90901,8 +90928,9 @@ var BABYLON;
             hoverMaterial.emissiveColor = color.add(new BABYLON.Color3(0.2, 0.2, 0.2));
             hoverMaterial.emissiveColor = color.add(new BABYLON.Color3(0.2, 0.2, 0.2));
             // Build mesh on root node
             // Build mesh on root node
             var arrow = new BABYLON.AbstractMesh("", gizmoLayer.utilityLayerScene);
             var arrow = new BABYLON.AbstractMesh("", gizmoLayer.utilityLayerScene);
-            var arrowMesh = BABYLON.MeshBuilder.CreateBox("yPosMesh", { size: 0.5 }, gizmoLayer.utilityLayerScene);
-            var arrowTail = BABYLON.MeshBuilder.CreateCylinder("yPosMesh", { diameter: 0.015, height: 0.3, tessellation: 96 }, gizmoLayer.utilityLayerScene);
+            var arrowMesh = BABYLON.MeshBuilder.CreateBox("yPosMesh", { size: 0.4 }, gizmoLayer.utilityLayerScene);
+            var arrowTail = BABYLON.MeshBuilder.CreateLines("yPosMesh", { points: [new BABYLON.Vector3(0, 0, 0), new BABYLON.Vector3(0, 1.5, 0)] }, gizmoLayer.utilityLayerScene);
+            arrowTail.color = coloredMaterial.emissiveColor;
             arrow.addChild(arrowMesh);
             arrow.addChild(arrowMesh);
             arrow.addChild(arrowTail);
             arrow.addChild(arrowTail);
             // Position arrow pointing in its drag axis
             // Position arrow pointing in its drag axis
@@ -90910,9 +90938,9 @@ var BABYLON;
             arrowMesh.material = coloredMaterial;
             arrowMesh.material = coloredMaterial;
             arrowMesh.rotation.x = Math.PI / 2;
             arrowMesh.rotation.x = Math.PI / 2;
             arrowMesh.position.z += 0.3;
             arrowMesh.position.z += 0.3;
+            arrowTail.scaling.scaleInPlace(0.2);
             arrowTail.rotation.x = Math.PI / 2;
             arrowTail.rotation.x = Math.PI / 2;
             arrowTail.material = coloredMaterial;
             arrowTail.material = coloredMaterial;
-            arrowTail.position.z += 0.15;
             arrow.lookAt(_this._rootMesh.position.subtract(dragAxis));
             arrow.lookAt(_this._rootMesh.position.subtract(dragAxis));
             _this._rootMesh.addChild(arrow);
             _this._rootMesh.addChild(arrow);
             // Add drag behavior to handle events when the gizmo is dragged
             // Add drag behavior to handle events when the gizmo is dragged
@@ -90953,16 +90981,14 @@ var BABYLON;
                 if (_this._customMeshSet) {
                 if (_this._customMeshSet) {
                     return;
                     return;
                 }
                 }
-                if (pointerInfo.pickInfo && (_this._rootMesh.getChildMeshes().indexOf(pointerInfo.pickInfo.pickedMesh) != -1)) {
-                    _this._rootMesh.getChildMeshes().forEach(function (m) {
-                        m.material = hoverMaterial;
-                    });
-                }
-                else {
-                    _this._rootMesh.getChildMeshes().forEach(function (m) {
-                        m.material = coloredMaterial;
-                    });
-                }
+                var isHovered = pointerInfo.pickInfo && (_this._rootMesh.getChildMeshes().indexOf(pointerInfo.pickInfo.pickedMesh) != -1);
+                var material = isHovered ? hoverMaterial : coloredMaterial;
+                _this._rootMesh.getChildMeshes().forEach(function (m) {
+                    m.material = material;
+                    if (m.color) {
+                        m.color = material.emissiveColor;
+                    }
+                });
             });
             });
             return _this;
             return _this;
         }
         }
@@ -91024,7 +91050,16 @@ var BABYLON;
             hoverMaterial.emissiveColor = color.add(new BABYLON.Color3(0.2, 0.2, 0.2));
             hoverMaterial.emissiveColor = color.add(new BABYLON.Color3(0.2, 0.2, 0.2));
             // Build mesh on root node
             // Build mesh on root node
             var parentMesh = new BABYLON.AbstractMesh("", gizmoLayer.utilityLayerScene);
             var parentMesh = new BABYLON.AbstractMesh("", gizmoLayer.utilityLayerScene);
-            var rotationMesh = BABYLON.Mesh.CreateTorus("torus", 3, 0.15, 20, gizmoLayer.utilityLayerScene, false);
+            // Create circle out of lines
+            var tessellation = 20;
+            var radius = 2;
+            var points = new Array();
+            for (var i = 0; i < tessellation; i++) {
+                var radian = (2 * Math.PI) * (i / (tessellation - 1));
+                points.push(new BABYLON.Vector3(radius * Math.sin(radian), 0, radius * Math.cos(radian)));
+            }
+            var rotationMesh = BABYLON.Mesh.CreateLines("", points, gizmoLayer.utilityLayerScene);
+            rotationMesh.color = coloredMaterial.emissiveColor;
             // Position arrow pointing in its drag axis
             // Position arrow pointing in its drag axis
             rotationMesh.scaling.scaleInPlace(0.1);
             rotationMesh.scaling.scaleInPlace(0.1);
             rotationMesh.material = coloredMaterial;
             rotationMesh.material = coloredMaterial;
@@ -91113,16 +91148,14 @@ var BABYLON;
                 if (_this._customMeshSet) {
                 if (_this._customMeshSet) {
                     return;
                     return;
                 }
                 }
-                if (pointerInfo.pickInfo && (_this._rootMesh.getChildMeshes().indexOf(pointerInfo.pickInfo.pickedMesh) != -1)) {
-                    _this._rootMesh.getChildMeshes().forEach(function (m) {
-                        m.material = hoverMaterial;
-                    });
-                }
-                else {
-                    _this._rootMesh.getChildMeshes().forEach(function (m) {
-                        m.material = coloredMaterial;
-                    });
-                }
+                var isHovered = pointerInfo.pickInfo && (_this._rootMesh.getChildMeshes().indexOf(pointerInfo.pickInfo.pickedMesh) != -1);
+                var material = isHovered ? hoverMaterial : coloredMaterial;
+                _this._rootMesh.getChildMeshes().forEach(function (m) {
+                    m.material = material;
+                    if (m.color) {
+                        m.color = material.emissiveColor;
+                    }
+                });
             });
             });
             return _this;
             return _this;
         }
         }
@@ -91456,6 +91489,8 @@ var BABYLON;
                         var dragAxis = worldDragDirection.subtract(toSub).normalizeToNew();
                         var dragAxis = worldDragDirection.subtract(toSub).normalizeToNew();
                         // project drag delta on to the resulting drag axis and rotate based on that
                         // project drag delta on to the resulting drag axis and rotate based on that
                         var projectDist = -BABYLON.Vector3.Dot(dragAxis, event.delta);
                         var projectDist = -BABYLON.Vector3.Dot(dragAxis, event.delta);
+                        // Make rotation relative to size of mesh.
+                        projectDist = (projectDist / _this._boundingDimensions.length()) * _this._anchorMesh.scaling.length();
                         // Rotate based on axis
                         // Rotate based on axis
                         if (!_this.attachedMesh.rotationQuaternion) {
                         if (!_this.attachedMesh.rotationQuaternion) {
                             _this.attachedMesh.rotationQuaternion = BABYLON.Quaternion.RotationYawPitchRoll(_this.attachedMesh.rotation.y, _this.attachedMesh.rotation.x, _this.attachedMesh.rotation.z);
                             _this.attachedMesh.rotationQuaternion = BABYLON.Quaternion.RotationYawPitchRoll(_this.attachedMesh.rotation.y, _this.attachedMesh.rotation.x, _this.attachedMesh.rotation.z);
@@ -91515,7 +91550,8 @@ var BABYLON;
                         _dragBehavior.onDragObservable.add(function (event) {
                         _dragBehavior.onDragObservable.add(function (event) {
                             _this.onDragObservable.notifyObservers({});
                             _this.onDragObservable.notifyObservers({});
                             if (_this.attachedMesh) {
                             if (_this.attachedMesh) {
-                                var deltaScale = new BABYLON.Vector3(event.dragDistance, event.dragDistance, event.dragDistance);
+                                var relativeDragDistance = (event.dragDistance / _this._boundingDimensions.length()) * _this._anchorMesh.scaling.length();
+                                var deltaScale = new BABYLON.Vector3(relativeDragDistance, relativeDragDistance, relativeDragDistance);
                                 deltaScale.scaleInPlace(_this._scaleDragSpeed);
                                 deltaScale.scaleInPlace(_this._scaleDragSpeed);
                                 _this.updateBoundingBox();
                                 _this.updateBoundingBox();
                                 // Scale from the position of the opposite corner                   
                                 // Scale from the position of the opposite corner                   
@@ -91601,6 +91637,7 @@ var BABYLON;
          * Updates the bounding box information for the Gizmo
          * Updates the bounding box information for the Gizmo
          */
          */
         BoundingBoxGizmo.prototype.updateBoundingBox = function () {
         BoundingBoxGizmo.prototype.updateBoundingBox = function () {
+            this._update();
             if (this.attachedMesh) {
             if (this.attachedMesh) {
                 // Rotate based on axis
                 // Rotate based on axis
                 if (!this.attachedMesh.rotationQuaternion) {
                 if (!this.attachedMesh.rotationQuaternion) {
@@ -91652,6 +91689,9 @@ var BABYLON;
                             rotateSpheres[index].lookAt(BABYLON.Vector3.Cross(BABYLON.Vector3.Forward(), rotateSpheres[index].position.normalizeToNew()).normalizeToNew().add(rotateSpheres[index].position));
                             rotateSpheres[index].lookAt(BABYLON.Vector3.Cross(BABYLON.Vector3.Forward(), rotateSpheres[index].position.normalizeToNew()).normalizeToNew().add(rotateSpheres[index].position));
                         }
                         }
                         if (this.fixedDragMeshScreenSize) {
                         if (this.fixedDragMeshScreenSize) {
+                            this._rootMesh.computeWorldMatrix();
+                            this._rotateSpheresParent.computeWorldMatrix();
+                            rotateSpheres[index].computeWorldMatrix();
                             rotateSpheres[index].absolutePosition.subtractToRef(this.gizmoLayer.utilityLayerScene.activeCamera.position, this._tmpVector);
                             rotateSpheres[index].absolutePosition.subtractToRef(this.gizmoLayer.utilityLayerScene.activeCamera.position, this._tmpVector);
                             var distanceFromCamera = this.rotationSphereSize * this._tmpVector.length() / this.fixedDragMeshScreenSizeDistanceFactor;
                             var distanceFromCamera = this.rotationSphereSize * this._tmpVector.length() / this.fixedDragMeshScreenSizeDistanceFactor;
                             rotateSpheres[index].scaling.set(distanceFromCamera, distanceFromCamera, distanceFromCamera);
                             rotateSpheres[index].scaling.set(distanceFromCamera, distanceFromCamera, distanceFromCamera);
@@ -91672,6 +91712,9 @@ var BABYLON;
                             scaleBoxes[index].position.set(this._boundingDimensions.x * i, this._boundingDimensions.y * j, this._boundingDimensions.z * k);
                             scaleBoxes[index].position.set(this._boundingDimensions.x * i, this._boundingDimensions.y * j, this._boundingDimensions.z * k);
                             scaleBoxes[index].position.addInPlace(new BABYLON.Vector3(-this._boundingDimensions.x / 2, -this._boundingDimensions.y / 2, -this._boundingDimensions.z / 2));
                             scaleBoxes[index].position.addInPlace(new BABYLON.Vector3(-this._boundingDimensions.x / 2, -this._boundingDimensions.y / 2, -this._boundingDimensions.z / 2));
                             if (this.fixedDragMeshScreenSize) {
                             if (this.fixedDragMeshScreenSize) {
+                                this._rootMesh.computeWorldMatrix();
+                                this._scaleBoxesParent.computeWorldMatrix();
+                                scaleBoxes[index].computeWorldMatrix();
                                 scaleBoxes[index].absolutePosition.subtractToRef(this.gizmoLayer.utilityLayerScene.activeCamera.position, this._tmpVector);
                                 scaleBoxes[index].absolutePosition.subtractToRef(this.gizmoLayer.utilityLayerScene.activeCamera.position, this._tmpVector);
                                 var distanceFromCamera = this.scaleBoxSize * this._tmpVector.length() / this.fixedDragMeshScreenSizeDistanceFactor;
                                 var distanceFromCamera = this.scaleBoxSize * this._tmpVector.length() / this.fixedDragMeshScreenSizeDistanceFactor;
                                 scaleBoxes[index].scaling.set(distanceFromCamera, distanceFromCamera, distanceFromCamera);
                                 scaleBoxes[index].scaling.set(distanceFromCamera, distanceFromCamera, distanceFromCamera);
@@ -91945,6 +91988,7 @@ var BABYLON;
                     gizmo.dispose();
                     gizmo.dispose();
                 }
                 }
             }
             }
+            this._dragBehavior.detach();
             this._gizmoLayer.dispose();
             this._gizmoLayer.dispose();
         };
         };
         return GizmoManager;
         return GizmoManager;

文件差异内容过多而无法显示
+ 24 - 24
dist/preview release/babylon.worker.js


+ 121 - 77
dist/preview release/es6.js

@@ -1189,6 +1189,20 @@ var BABYLON;
             return this;
             return this;
         };
         };
         /**
         /**
+         * This function will add a new shader to the shader store
+         * @param name the name of the shader
+         * @param pixelShader optional pixel shader content
+         * @param vertexShader optional vertex shader content
+         */
+        Effect.RegisterShader = function (name, pixelShader, vertexShader) {
+            if (pixelShader) {
+                Effect.ShadersStore[name + "PixelShader"] = pixelShader;
+            }
+            if (vertexShader) {
+                Effect.ShadersStore[name + "VertexShader"] = vertexShader;
+            }
+        };
+        /**
          * Resets the cache of effects.
          * Resets the cache of effects.
          */
          */
         Effect.ResetCache = function () {
         Effect.ResetCache = function () {
@@ -15494,6 +15508,10 @@ var BABYLON;
                     var lodIndex = minLODIndex + (maxLODIndex - minLODIndex) * roughness;
                     var lodIndex = minLODIndex + (maxLODIndex - minLODIndex) * roughness;
                     var mipmapIndex = Math.round(Math.min(Math.max(lodIndex, 0), maxLODIndex));
                     var mipmapIndex = Math.round(Math.min(Math.max(lodIndex, 0), maxLODIndex));
                     var glTextureFromLod = new BABYLON.InternalTexture(_this, BABYLON.InternalTexture.DATASOURCE_TEMP);
                     var glTextureFromLod = new BABYLON.InternalTexture(_this, BABYLON.InternalTexture.DATASOURCE_TEMP);
+                    glTextureFromLod.type = texture.type;
+                    glTextureFromLod.format = texture.format;
+                    glTextureFromLod.width = Math.pow(2, Math.max(BABYLON.Scalar.Log2(width) - mipmapIndex, 0));
+                    glTextureFromLod.height = glTextureFromLod.width;
                     glTextureFromLod.isCube = true;
                     glTextureFromLod.isCube = true;
                     _this._bindTextureDirectly(gl.TEXTURE_CUBE_MAP, glTextureFromLod, true);
                     _this._bindTextureDirectly(gl.TEXTURE_CUBE_MAP, glTextureFromLod, true);
                     gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
                     gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
@@ -15504,7 +15522,7 @@ var BABYLON;
                         var info = loadData.info;
                         var info = loadData.info;
                         var data = loadData.data;
                         var data = loadData.data;
                         _this._unpackFlipY(info.isCompressed);
                         _this._unpackFlipY(info.isCompressed);
-                        BABYLON.DDSTools.UploadDDSLevels(_this, texture, data, info, true, 6, mipmapIndex);
+                        BABYLON.DDSTools.UploadDDSLevels(_this, glTextureFromLod, data, info, true, 6, mipmapIndex);
                     }
                     }
                     else {
                     else {
                         BABYLON.Tools.Warn("DDS is the only prefiltered cube map supported so far.");
                         BABYLON.Tools.Warn("DDS is the only prefiltered cube map supported so far.");
@@ -71415,7 +71433,7 @@ var BABYLON;
                 // Create XHR
                 // Create XHR
                 var xhr = new XMLHttpRequest();
                 var xhr = new XMLHttpRequest();
                 var fileData;
                 var fileData;
-                xhr.open("GET", url, true);
+                xhr.open("GET", url + "?" + Date.now(), true);
                 if (useArrayBuffer) {
                 if (useArrayBuffer) {
                     xhr.responseType = "arraybuffer";
                     xhr.responseType = "arraybuffer";
                 }
                 }
@@ -88470,7 +88488,7 @@ var BABYLON;
             engine._setCubeMapTextureParams(loadMipmap);
             engine._setCubeMapTextureParams(loadMipmap);
             texture.isReady = true;
             texture.isReady = true;
             if (onLoad) {
             if (onLoad) {
-                onLoad({ isDDS: true, width: texture.width, info: info, imgs: imgs, texture: texture });
+                onLoad({ isDDS: true, width: texture.width, info: info, data: imgs, texture: texture });
             }
             }
         };
         };
         /**
         /**
@@ -89712,7 +89730,10 @@ var BABYLON;
                         else if (!_this._pointerCaptures[pointerEvent_1.pointerId] && (utilityScenePick.distance < originalScenePick.distance || originalScenePick.distance === 0)) {
                         else if (!_this._pointerCaptures[pointerEvent_1.pointerId] && (utilityScenePick.distance < originalScenePick.distance || originalScenePick.distance === 0)) {
                             // We pick something in utility scene or the pick in utility is closer than the one in main scene
                             // We pick something in utility scene or the pick in utility is closer than the one in main scene
                             _this._notifyObservers(prePointerInfo, utilityScenePick, pointerEvent_1);
                             _this._notifyObservers(prePointerInfo, utilityScenePick, pointerEvent_1);
-                            prePointerInfo.skipOnPointerObservable = utilityScenePick.distance > 0;
+                            // If a previous utility layer set this, do not unset this
+                            if (!prePointerInfo.skipOnPointerObservable) {
+                                prePointerInfo.skipOnPointerObservable = utilityScenePick.distance > 0;
+                            }
                         }
                         }
                         else if (!_this._pointerCaptures[pointerEvent_1.pointerId] && (utilityScenePick.distance > originalScenePick.distance)) {
                         else if (!_this._pointerCaptures[pointerEvent_1.pointerId] && (utilityScenePick.distance > originalScenePick.distance)) {
                             // We have a pick in both scenes but main is closer than utility
                             // We have a pick in both scenes but main is closer than utility
@@ -90660,43 +90681,10 @@ var BABYLON;
              */
              */
             this._updateScale = true;
             this._updateScale = true;
             this._interactionsEnabled = true;
             this._interactionsEnabled = true;
+            this._tempVector = new BABYLON.Vector3();
             this._rootMesh = new BABYLON.Mesh("gizmoRootNode", gizmoLayer.utilityLayerScene);
             this._rootMesh = new BABYLON.Mesh("gizmoRootNode", gizmoLayer.utilityLayerScene);
-            var tempVector = new BABYLON.Vector3();
             this._beforeRenderObserver = this.gizmoLayer.utilityLayerScene.onBeforeRenderObservable.add(function () {
             this._beforeRenderObserver = this.gizmoLayer.utilityLayerScene.onBeforeRenderObservable.add(function () {
-                if (_this.attachedMesh) {
-                    if (_this.updateGizmoRotationToMatchAttachedMesh) {
-                        if (!_this._rootMesh.rotationQuaternion) {
-                            _this._rootMesh.rotationQuaternion = BABYLON.Quaternion.RotationYawPitchRoll(_this._rootMesh.rotation.y, _this._rootMesh.rotation.x, _this._rootMesh.rotation.z);
-                        }
-                        // Remove scaling before getting rotation matrix to get rotation matrix unmodified by scale
-                        tempVector.copyFrom(_this.attachedMesh.scaling);
-                        if (_this.attachedMesh.scaling.x < 0) {
-                            _this.attachedMesh.scaling.x *= -1;
-                        }
-                        if (_this.attachedMesh.scaling.y < 0) {
-                            _this.attachedMesh.scaling.y *= -1;
-                        }
-                        if (_this.attachedMesh.scaling.z < 0) {
-                            _this.attachedMesh.scaling.z *= -1;
-                        }
-                        _this.attachedMesh.computeWorldMatrix().getRotationMatrixToRef(_this._tmpMatrix);
-                        _this.attachedMesh.scaling.copyFrom(tempVector);
-                        _this.attachedMesh.computeWorldMatrix();
-                        BABYLON.Quaternion.FromRotationMatrixToRef(_this._tmpMatrix, _this._rootMesh.rotationQuaternion);
-                    }
-                    if (_this.updateGizmoPositionToMatchAttachedMesh) {
-                        _this._rootMesh.position.copyFrom(_this.attachedMesh.absolutePosition);
-                    }
-                    if (_this._updateScale && _this.gizmoLayer.utilityLayerScene.activeCamera && _this.attachedMesh) {
-                        var cameraPosition = _this.gizmoLayer.utilityLayerScene.activeCamera.position;
-                        if (_this.gizmoLayer.utilityLayerScene.activeCamera.devicePosition) {
-                            cameraPosition = _this.gizmoLayer.utilityLayerScene.activeCamera.devicePosition;
-                        }
-                        _this._rootMesh.position.subtractToRef(cameraPosition, tempVector);
-                        var dist = tempVector.length() / _this._scaleFactor;
-                        _this._rootMesh.scaling.set(dist, dist, dist);
-                    }
-                }
+                _this._update();
             });
             });
             this.attachedMesh = null;
             this.attachedMesh = null;
         }
         }
@@ -90733,6 +90721,46 @@ var BABYLON;
         Gizmo.prototype._attachedMeshChanged = function (value) {
         Gizmo.prototype._attachedMeshChanged = function (value) {
         };
         };
         /**
         /**
+         * @hidden
+         * Updates the gizmo to match the attached mesh's position/rotation
+         */
+        Gizmo.prototype._update = function () {
+            if (this.attachedMesh) {
+                if (this.updateGizmoRotationToMatchAttachedMesh) {
+                    if (!this._rootMesh.rotationQuaternion) {
+                        this._rootMesh.rotationQuaternion = BABYLON.Quaternion.RotationYawPitchRoll(this._rootMesh.rotation.y, this._rootMesh.rotation.x, this._rootMesh.rotation.z);
+                    }
+                    // Remove scaling before getting rotation matrix to get rotation matrix unmodified by scale
+                    this._tempVector.copyFrom(this.attachedMesh.scaling);
+                    if (this.attachedMesh.scaling.x < 0) {
+                        this.attachedMesh.scaling.x *= -1;
+                    }
+                    if (this.attachedMesh.scaling.y < 0) {
+                        this.attachedMesh.scaling.y *= -1;
+                    }
+                    if (this.attachedMesh.scaling.z < 0) {
+                        this.attachedMesh.scaling.z *= -1;
+                    }
+                    this.attachedMesh.computeWorldMatrix().getRotationMatrixToRef(this._tmpMatrix);
+                    this.attachedMesh.scaling.copyFrom(this._tempVector);
+                    this.attachedMesh.computeWorldMatrix();
+                    BABYLON.Quaternion.FromRotationMatrixToRef(this._tmpMatrix, this._rootMesh.rotationQuaternion);
+                }
+                if (this.updateGizmoPositionToMatchAttachedMesh) {
+                    this._rootMesh.position.copyFrom(this.attachedMesh.absolutePosition);
+                }
+                if (this._updateScale && this.gizmoLayer.utilityLayerScene.activeCamera && this.attachedMesh) {
+                    var cameraPosition = this.gizmoLayer.utilityLayerScene.activeCamera.position;
+                    if (this.gizmoLayer.utilityLayerScene.activeCamera.devicePosition) {
+                        cameraPosition = this.gizmoLayer.utilityLayerScene.activeCamera.devicePosition;
+                    }
+                    this._rootMesh.position.subtractToRef(cameraPosition, this._tempVector);
+                    var dist = this._tempVector.length() / this._scaleFactor;
+                    this._rootMesh.scaling.set(dist, dist, dist);
+                }
+            }
+        };
+        /**
          * Disposes of the gizmo
          * Disposes of the gizmo
          */
          */
         Gizmo.prototype.dispose = function () {
         Gizmo.prototype.dispose = function () {
@@ -90785,8 +90813,9 @@ var BABYLON;
             hoverMaterial.emissiveColor = color.add(new BABYLON.Color3(0.2, 0.2, 0.2));
             hoverMaterial.emissiveColor = color.add(new BABYLON.Color3(0.2, 0.2, 0.2));
             // Build mesh on root node
             // Build mesh on root node
             var arrow = new BABYLON.AbstractMesh("", gizmoLayer.utilityLayerScene);
             var arrow = new BABYLON.AbstractMesh("", gizmoLayer.utilityLayerScene);
-            var arrowMesh = BABYLON.MeshBuilder.CreateCylinder("yPosMesh", { diameterTop: 0, height: 2, tessellation: 96 }, gizmoLayer.utilityLayerScene);
-            var arrowTail = BABYLON.MeshBuilder.CreateCylinder("yPosMesh", { diameter: 0.015, height: 0.3, tessellation: 96 }, gizmoLayer.utilityLayerScene);
+            var arrowMesh = BABYLON.MeshBuilder.CreateCylinder("yPosMesh", { diameterTop: 0, height: 1.5, diameterBottom: 0.75, tessellation: 96 }, gizmoLayer.utilityLayerScene);
+            var arrowTail = BABYLON.MeshBuilder.CreateLines("yPosMesh", { points: [new BABYLON.Vector3(0, 0, 0), new BABYLON.Vector3(0, 1.5, 0)] }, gizmoLayer.utilityLayerScene);
+            arrowTail.color = coloredMaterial.emissiveColor;
             arrow.addChild(arrowMesh);
             arrow.addChild(arrowMesh);
             arrow.addChild(arrowTail);
             arrow.addChild(arrowTail);
             // Position arrow pointing in its drag axis
             // Position arrow pointing in its drag axis
@@ -90794,9 +90823,9 @@ var BABYLON;
             arrowMesh.material = coloredMaterial;
             arrowMesh.material = coloredMaterial;
             arrowMesh.rotation.x = Math.PI / 2;
             arrowMesh.rotation.x = Math.PI / 2;
             arrowMesh.position.z += 0.3;
             arrowMesh.position.z += 0.3;
+            arrowTail.scaling.scaleInPlace(0.2);
             arrowTail.rotation.x = Math.PI / 2;
             arrowTail.rotation.x = Math.PI / 2;
             arrowTail.material = coloredMaterial;
             arrowTail.material = coloredMaterial;
-            arrowTail.position.z += 0.15;
             arrow.lookAt(_this._rootMesh.position.subtract(dragAxis));
             arrow.lookAt(_this._rootMesh.position.subtract(dragAxis));
             _this._rootMesh.addChild(arrow);
             _this._rootMesh.addChild(arrow);
             var currentSnapDragDistance = 0;
             var currentSnapDragDistance = 0;
@@ -90830,16 +90859,14 @@ var BABYLON;
                 if (_this._customMeshSet) {
                 if (_this._customMeshSet) {
                     return;
                     return;
                 }
                 }
-                if (pointerInfo.pickInfo && (_this._rootMesh.getChildMeshes().indexOf(pointerInfo.pickInfo.pickedMesh) != -1)) {
-                    _this._rootMesh.getChildMeshes().forEach(function (m) {
-                        m.material = hoverMaterial;
-                    });
-                }
-                else {
-                    _this._rootMesh.getChildMeshes().forEach(function (m) {
-                        m.material = coloredMaterial;
-                    });
-                }
+                var isHovered = pointerInfo.pickInfo && (_this._rootMesh.getChildMeshes().indexOf(pointerInfo.pickInfo.pickedMesh) != -1);
+                var material = isHovered ? hoverMaterial : coloredMaterial;
+                _this._rootMesh.getChildMeshes().forEach(function (m) {
+                    m.material = material;
+                    if (m.color) {
+                        m.color = material.emissiveColor;
+                    }
+                });
             });
             });
             return _this;
             return _this;
         }
         }
@@ -90901,8 +90928,9 @@ var BABYLON;
             hoverMaterial.emissiveColor = color.add(new BABYLON.Color3(0.2, 0.2, 0.2));
             hoverMaterial.emissiveColor = color.add(new BABYLON.Color3(0.2, 0.2, 0.2));
             // Build mesh on root node
             // Build mesh on root node
             var arrow = new BABYLON.AbstractMesh("", gizmoLayer.utilityLayerScene);
             var arrow = new BABYLON.AbstractMesh("", gizmoLayer.utilityLayerScene);
-            var arrowMesh = BABYLON.MeshBuilder.CreateBox("yPosMesh", { size: 0.5 }, gizmoLayer.utilityLayerScene);
-            var arrowTail = BABYLON.MeshBuilder.CreateCylinder("yPosMesh", { diameter: 0.015, height: 0.3, tessellation: 96 }, gizmoLayer.utilityLayerScene);
+            var arrowMesh = BABYLON.MeshBuilder.CreateBox("yPosMesh", { size: 0.4 }, gizmoLayer.utilityLayerScene);
+            var arrowTail = BABYLON.MeshBuilder.CreateLines("yPosMesh", { points: [new BABYLON.Vector3(0, 0, 0), new BABYLON.Vector3(0, 1.5, 0)] }, gizmoLayer.utilityLayerScene);
+            arrowTail.color = coloredMaterial.emissiveColor;
             arrow.addChild(arrowMesh);
             arrow.addChild(arrowMesh);
             arrow.addChild(arrowTail);
             arrow.addChild(arrowTail);
             // Position arrow pointing in its drag axis
             // Position arrow pointing in its drag axis
@@ -90910,9 +90938,9 @@ var BABYLON;
             arrowMesh.material = coloredMaterial;
             arrowMesh.material = coloredMaterial;
             arrowMesh.rotation.x = Math.PI / 2;
             arrowMesh.rotation.x = Math.PI / 2;
             arrowMesh.position.z += 0.3;
             arrowMesh.position.z += 0.3;
+            arrowTail.scaling.scaleInPlace(0.2);
             arrowTail.rotation.x = Math.PI / 2;
             arrowTail.rotation.x = Math.PI / 2;
             arrowTail.material = coloredMaterial;
             arrowTail.material = coloredMaterial;
-            arrowTail.position.z += 0.15;
             arrow.lookAt(_this._rootMesh.position.subtract(dragAxis));
             arrow.lookAt(_this._rootMesh.position.subtract(dragAxis));
             _this._rootMesh.addChild(arrow);
             _this._rootMesh.addChild(arrow);
             // Add drag behavior to handle events when the gizmo is dragged
             // Add drag behavior to handle events when the gizmo is dragged
@@ -90953,16 +90981,14 @@ var BABYLON;
                 if (_this._customMeshSet) {
                 if (_this._customMeshSet) {
                     return;
                     return;
                 }
                 }
-                if (pointerInfo.pickInfo && (_this._rootMesh.getChildMeshes().indexOf(pointerInfo.pickInfo.pickedMesh) != -1)) {
-                    _this._rootMesh.getChildMeshes().forEach(function (m) {
-                        m.material = hoverMaterial;
-                    });
-                }
-                else {
-                    _this._rootMesh.getChildMeshes().forEach(function (m) {
-                        m.material = coloredMaterial;
-                    });
-                }
+                var isHovered = pointerInfo.pickInfo && (_this._rootMesh.getChildMeshes().indexOf(pointerInfo.pickInfo.pickedMesh) != -1);
+                var material = isHovered ? hoverMaterial : coloredMaterial;
+                _this._rootMesh.getChildMeshes().forEach(function (m) {
+                    m.material = material;
+                    if (m.color) {
+                        m.color = material.emissiveColor;
+                    }
+                });
             });
             });
             return _this;
             return _this;
         }
         }
@@ -91024,7 +91050,16 @@ var BABYLON;
             hoverMaterial.emissiveColor = color.add(new BABYLON.Color3(0.2, 0.2, 0.2));
             hoverMaterial.emissiveColor = color.add(new BABYLON.Color3(0.2, 0.2, 0.2));
             // Build mesh on root node
             // Build mesh on root node
             var parentMesh = new BABYLON.AbstractMesh("", gizmoLayer.utilityLayerScene);
             var parentMesh = new BABYLON.AbstractMesh("", gizmoLayer.utilityLayerScene);
-            var rotationMesh = BABYLON.Mesh.CreateTorus("torus", 3, 0.15, 20, gizmoLayer.utilityLayerScene, false);
+            // Create circle out of lines
+            var tessellation = 20;
+            var radius = 2;
+            var points = new Array();
+            for (var i = 0; i < tessellation; i++) {
+                var radian = (2 * Math.PI) * (i / (tessellation - 1));
+                points.push(new BABYLON.Vector3(radius * Math.sin(radian), 0, radius * Math.cos(radian)));
+            }
+            var rotationMesh = BABYLON.Mesh.CreateLines("", points, gizmoLayer.utilityLayerScene);
+            rotationMesh.color = coloredMaterial.emissiveColor;
             // Position arrow pointing in its drag axis
             // Position arrow pointing in its drag axis
             rotationMesh.scaling.scaleInPlace(0.1);
             rotationMesh.scaling.scaleInPlace(0.1);
             rotationMesh.material = coloredMaterial;
             rotationMesh.material = coloredMaterial;
@@ -91113,16 +91148,14 @@ var BABYLON;
                 if (_this._customMeshSet) {
                 if (_this._customMeshSet) {
                     return;
                     return;
                 }
                 }
-                if (pointerInfo.pickInfo && (_this._rootMesh.getChildMeshes().indexOf(pointerInfo.pickInfo.pickedMesh) != -1)) {
-                    _this._rootMesh.getChildMeshes().forEach(function (m) {
-                        m.material = hoverMaterial;
-                    });
-                }
-                else {
-                    _this._rootMesh.getChildMeshes().forEach(function (m) {
-                        m.material = coloredMaterial;
-                    });
-                }
+                var isHovered = pointerInfo.pickInfo && (_this._rootMesh.getChildMeshes().indexOf(pointerInfo.pickInfo.pickedMesh) != -1);
+                var material = isHovered ? hoverMaterial : coloredMaterial;
+                _this._rootMesh.getChildMeshes().forEach(function (m) {
+                    m.material = material;
+                    if (m.color) {
+                        m.color = material.emissiveColor;
+                    }
+                });
             });
             });
             return _this;
             return _this;
         }
         }
@@ -91456,6 +91489,8 @@ var BABYLON;
                         var dragAxis = worldDragDirection.subtract(toSub).normalizeToNew();
                         var dragAxis = worldDragDirection.subtract(toSub).normalizeToNew();
                         // project drag delta on to the resulting drag axis and rotate based on that
                         // project drag delta on to the resulting drag axis and rotate based on that
                         var projectDist = -BABYLON.Vector3.Dot(dragAxis, event.delta);
                         var projectDist = -BABYLON.Vector3.Dot(dragAxis, event.delta);
+                        // Make rotation relative to size of mesh.
+                        projectDist = (projectDist / _this._boundingDimensions.length()) * _this._anchorMesh.scaling.length();
                         // Rotate based on axis
                         // Rotate based on axis
                         if (!_this.attachedMesh.rotationQuaternion) {
                         if (!_this.attachedMesh.rotationQuaternion) {
                             _this.attachedMesh.rotationQuaternion = BABYLON.Quaternion.RotationYawPitchRoll(_this.attachedMesh.rotation.y, _this.attachedMesh.rotation.x, _this.attachedMesh.rotation.z);
                             _this.attachedMesh.rotationQuaternion = BABYLON.Quaternion.RotationYawPitchRoll(_this.attachedMesh.rotation.y, _this.attachedMesh.rotation.x, _this.attachedMesh.rotation.z);
@@ -91515,7 +91550,8 @@ var BABYLON;
                         _dragBehavior.onDragObservable.add(function (event) {
                         _dragBehavior.onDragObservable.add(function (event) {
                             _this.onDragObservable.notifyObservers({});
                             _this.onDragObservable.notifyObservers({});
                             if (_this.attachedMesh) {
                             if (_this.attachedMesh) {
-                                var deltaScale = new BABYLON.Vector3(event.dragDistance, event.dragDistance, event.dragDistance);
+                                var relativeDragDistance = (event.dragDistance / _this._boundingDimensions.length()) * _this._anchorMesh.scaling.length();
+                                var deltaScale = new BABYLON.Vector3(relativeDragDistance, relativeDragDistance, relativeDragDistance);
                                 deltaScale.scaleInPlace(_this._scaleDragSpeed);
                                 deltaScale.scaleInPlace(_this._scaleDragSpeed);
                                 _this.updateBoundingBox();
                                 _this.updateBoundingBox();
                                 // Scale from the position of the opposite corner                   
                                 // Scale from the position of the opposite corner                   
@@ -91601,6 +91637,7 @@ var BABYLON;
          * Updates the bounding box information for the Gizmo
          * Updates the bounding box information for the Gizmo
          */
          */
         BoundingBoxGizmo.prototype.updateBoundingBox = function () {
         BoundingBoxGizmo.prototype.updateBoundingBox = function () {
+            this._update();
             if (this.attachedMesh) {
             if (this.attachedMesh) {
                 // Rotate based on axis
                 // Rotate based on axis
                 if (!this.attachedMesh.rotationQuaternion) {
                 if (!this.attachedMesh.rotationQuaternion) {
@@ -91652,6 +91689,9 @@ var BABYLON;
                             rotateSpheres[index].lookAt(BABYLON.Vector3.Cross(BABYLON.Vector3.Forward(), rotateSpheres[index].position.normalizeToNew()).normalizeToNew().add(rotateSpheres[index].position));
                             rotateSpheres[index].lookAt(BABYLON.Vector3.Cross(BABYLON.Vector3.Forward(), rotateSpheres[index].position.normalizeToNew()).normalizeToNew().add(rotateSpheres[index].position));
                         }
                         }
                         if (this.fixedDragMeshScreenSize) {
                         if (this.fixedDragMeshScreenSize) {
+                            this._rootMesh.computeWorldMatrix();
+                            this._rotateSpheresParent.computeWorldMatrix();
+                            rotateSpheres[index].computeWorldMatrix();
                             rotateSpheres[index].absolutePosition.subtractToRef(this.gizmoLayer.utilityLayerScene.activeCamera.position, this._tmpVector);
                             rotateSpheres[index].absolutePosition.subtractToRef(this.gizmoLayer.utilityLayerScene.activeCamera.position, this._tmpVector);
                             var distanceFromCamera = this.rotationSphereSize * this._tmpVector.length() / this.fixedDragMeshScreenSizeDistanceFactor;
                             var distanceFromCamera = this.rotationSphereSize * this._tmpVector.length() / this.fixedDragMeshScreenSizeDistanceFactor;
                             rotateSpheres[index].scaling.set(distanceFromCamera, distanceFromCamera, distanceFromCamera);
                             rotateSpheres[index].scaling.set(distanceFromCamera, distanceFromCamera, distanceFromCamera);
@@ -91672,6 +91712,9 @@ var BABYLON;
                             scaleBoxes[index].position.set(this._boundingDimensions.x * i, this._boundingDimensions.y * j, this._boundingDimensions.z * k);
                             scaleBoxes[index].position.set(this._boundingDimensions.x * i, this._boundingDimensions.y * j, this._boundingDimensions.z * k);
                             scaleBoxes[index].position.addInPlace(new BABYLON.Vector3(-this._boundingDimensions.x / 2, -this._boundingDimensions.y / 2, -this._boundingDimensions.z / 2));
                             scaleBoxes[index].position.addInPlace(new BABYLON.Vector3(-this._boundingDimensions.x / 2, -this._boundingDimensions.y / 2, -this._boundingDimensions.z / 2));
                             if (this.fixedDragMeshScreenSize) {
                             if (this.fixedDragMeshScreenSize) {
+                                this._rootMesh.computeWorldMatrix();
+                                this._scaleBoxesParent.computeWorldMatrix();
+                                scaleBoxes[index].computeWorldMatrix();
                                 scaleBoxes[index].absolutePosition.subtractToRef(this.gizmoLayer.utilityLayerScene.activeCamera.position, this._tmpVector);
                                 scaleBoxes[index].absolutePosition.subtractToRef(this.gizmoLayer.utilityLayerScene.activeCamera.position, this._tmpVector);
                                 var distanceFromCamera = this.scaleBoxSize * this._tmpVector.length() / this.fixedDragMeshScreenSizeDistanceFactor;
                                 var distanceFromCamera = this.scaleBoxSize * this._tmpVector.length() / this.fixedDragMeshScreenSizeDistanceFactor;
                                 scaleBoxes[index].scaling.set(distanceFromCamera, distanceFromCamera, distanceFromCamera);
                                 scaleBoxes[index].scaling.set(distanceFromCamera, distanceFromCamera, distanceFromCamera);
@@ -91945,6 +91988,7 @@ var BABYLON;
                     gizmo.dispose();
                     gizmo.dispose();
                 }
                 }
             }
             }
+            this._dragBehavior.detach();
             this._gizmoLayer.dispose();
             this._gizmoLayer.dispose();
         };
         };
         return GizmoManager;
         return GizmoManager;

文件差异内容过多而无法显示
+ 2319 - 2665
dist/preview release/gui/babylon.gui.d.ts


文件差异内容过多而无法显示
+ 2 - 5
dist/preview release/gui/babylon.gui.min.js


文件差异内容过多而无法显示
+ 1 - 0
dist/preview release/gui/babylon.gui.min.js.map


文件差异内容过多而无法显示
+ 2517 - 2670
dist/preview release/gui/babylon.gui.module.d.ts


文件差异内容过多而无法显示
+ 2 - 5
dist/preview release/inspector/babylon.inspector.bundle.js


文件差异内容过多而无法显示
+ 1 - 0
dist/preview release/inspector/babylon.inspector.bundle.js.map


文件差异内容过多而无法显示
+ 1038 - 1385
dist/preview release/inspector/babylon.inspector.d.ts


文件差异内容过多而无法显示
+ 1328 - 0
dist/preview release/inspector/babylon.inspector.module.d.ts


+ 33 - 199
dist/preview release/viewer/babylon.viewer.d.ts

@@ -2,46 +2,25 @@
 /// <reference path="./babylon.glTF2Interface.d.ts"/>
 /// <reference path="./babylon.glTF2Interface.d.ts"/>
 /// <reference path="./babylonjs.loaders.d.ts"/>
 /// <reference path="./babylonjs.loaders.d.ts"/>
 declare module "babylonjs-loaders"{ export=BABYLON;}
 declare module "babylonjs-loaders"{ export=BABYLON;}
-
 // Generated by dts-bundle v0.7.3
 // Generated by dts-bundle v0.7.3
 // Dependencies for this module:
 // Dependencies for this module:
-//   ../../../../Tools/Gulp/babylonjs
-//   ../../../../Tools/Gulp/babylonjs-loaders
-
+//   ../../../../../Tools/Gulp/babylonjs
+//   ../../../../../Tools/Gulp/babylonjs-loaders
 declare module BabylonViewer {
 declare module BabylonViewer {
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
     /**
     /**
         * BabylonJS Viewer
         * BabylonJS Viewer
         *
         *
         * An HTML-Based viewer for 3D models, based on BabylonJS and its extensions.
         * An HTML-Based viewer for 3D models, based on BabylonJS and its extensions.
         */
         */
-    
-    
     import 'pepjs';
     import 'pepjs';
-    
     let disableInit: boolean;
     let disableInit: boolean;
     /**
     /**
         * Dispose all viewers currently registered
         * Dispose all viewers currently registered
         */
         */
     function disposeAll(): void;
     function disposeAll(): void;
     const Version: string;
     const Version: string;
-    
-    export * from 'babylonjs-viewer/configuration';
 }
 }
-
 declare module BabylonViewer {
 declare module BabylonViewer {
-    
     /**
     /**
         * This is the mapper's interface. Implement this function to create your own mapper and register it at the mapper manager
         * This is the mapper's interface. Implement this function to create your own mapper and register it at the mapper manager
         */
         */
@@ -83,7 +62,6 @@ declare module BabylonViewer {
         */
         */
     export let mapperManager: MapperManager;
     export let mapperManager: MapperManager;
 }
 }
-
 declare module BabylonViewer {
 declare module BabylonViewer {
     export class ViewerGlobals {
     export class ViewerGlobals {
         disableInit: boolean;
         disableInit: boolean;
@@ -92,10 +70,7 @@ declare module BabylonViewer {
     }
     }
     export let viewerGlobals: ViewerGlobals;
     export let viewerGlobals: ViewerGlobals;
 }
 }
-
 declare module BabylonViewer {
 declare module BabylonViewer {
-    
-    
     /**
     /**
         * The viewer manager is the container for all viewers currently registered on this page.
         * 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.
         * It is possible to have more than one viewer on a single page.
@@ -148,13 +123,7 @@ declare module BabylonViewer {
     }
     }
     export let viewerManager: ViewerManager;
     export let viewerManager: ViewerManager;
 }
 }
-
 declare module BabylonViewer {
 declare module BabylonViewer {
-    
-    
-    
-    
-    
     /**
     /**
         * The Default viewer is the default implementation of the AbstractViewer.
         * The Default viewer is the default implementation of the AbstractViewer.
         * It uses the templating system to render a new canvas and controls.
         * It uses the templating system to render a new canvas and controls.
@@ -230,17 +199,7 @@ declare module BabylonViewer {
             protected _onConfigurationLoaded(configuration: ViewerConfiguration): void;
             protected _onConfigurationLoaded(configuration: ViewerConfiguration): void;
     }
     }
 }
 }
-
 declare module BabylonViewer {
 declare module BabylonViewer {
-    
-    
-    
-    
-    
-    
-    
-    
-    
     /**
     /**
         * The AbstractViewr is the center of Babylon's viewer.
         * The AbstractViewr is the center of Babylon's viewer.
         * It is the basic implementation of the default viewer and is responsible of loading and showing the model and the templates
         * It is the basic implementation of the default viewer and is responsible of loading and showing the model and the templates
@@ -359,8 +318,8 @@ declare module BabylonViewer {
                 */
                 */
             isCanvasInDOM(): boolean;
             isCanvasInDOM(): boolean;
             /**
             /**
-                * Set the viewer's background rendering flag.
-                */
+             * Set the viewer's background rendering flag.
+             */
             renderInBackground: boolean;
             renderInBackground: boolean;
             /**
             /**
                 * Get the configuration object. This is a reference only.
                 * Get the configuration object. This is a reference only.
@@ -468,9 +427,7 @@ declare module BabylonViewer {
             protected _injectCustomShaders(): void;
             protected _injectCustomShaders(): void;
     }
     }
 }
 }
-
 declare module BabylonViewer {
 declare module BabylonViewer {
-    
     /**
     /**
         * The data structure of a telemetry event.
         * The data structure of a telemetry event.
         */
         */
@@ -515,13 +472,7 @@ declare module BabylonViewer {
     }
     }
     export const telemetryManager: TelemetryManager;
     export const telemetryManager: TelemetryManager;
 }
 }
-
 declare module BabylonViewer {
 declare module BabylonViewer {
-    
-    
-    
-    
-    
     /**
     /**
         * An instance of the class is in charge of loading the model correctly.
         * An instance of the class is in charge of loading the model correctly.
         * This class will continously be expended with tasks required from the specific loaders Babylon has.
         * This class will continously be expended with tasks required from the specific loaders Babylon has.
@@ -554,14 +505,7 @@ declare module BabylonViewer {
             dispose(): void;
             dispose(): void;
     }
     }
 }
 }
-
 declare module BabylonViewer {
 declare module BabylonViewer {
-    
-    
-    
-    
-    
-    
     /**
     /**
         * The current state of the model
         * The current state of the model
         */
         */
@@ -573,7 +517,7 @@ declare module BabylonViewer {
             ENTRYDONE = 4,
             ENTRYDONE = 4,
             COMPLETE = 5,
             COMPLETE = 5,
             CANCELED = 6,
             CANCELED = 6,
-            ERROR = 7,
+            ERROR = 7
     }
     }
     /**
     /**
         * The viewer model is a container for all assets representing a sngle loaded model.
         * The viewer model is a container for all assets representing a sngle loaded model.
@@ -638,8 +582,8 @@ declare module BabylonViewer {
             shadowsRenderedAfterLoad: boolean;
             shadowsRenderedAfterLoad: boolean;
             getViewerId(): string | undefined;
             getViewerId(): string | undefined;
             /**
             /**
-                * Set whether this model is enabled or not.
-                */
+             * Set whether this model is enabled or not.
+             */
             enabled: boolean;
             enabled: boolean;
             loaderDone: boolean;
             loaderDone: boolean;
             /**
             /**
@@ -655,9 +599,9 @@ declare module BabylonViewer {
                 */
                 */
             readonly meshes: BABYLON.AbstractMesh[];
             readonly meshes: BABYLON.AbstractMesh[];
             /**
             /**
-                * (Re-)set the model's entire configuration
-                * @param newConfiguration the new configuration to replace the new one
-                */
+             * (Re-)set the model's entire configuration
+             * @param newConfiguration the new configuration to replace the new one
+             */
             configuration: IModelConfiguration;
             configuration: IModelConfiguration;
             /**
             /**
                 * Update the current configuration with new values.
                 * Update the current configuration with new values.
@@ -719,15 +663,13 @@ declare module BabylonViewer {
             dispose(): void;
             dispose(): void;
     }
     }
 }
 }
-
 declare module BabylonViewer {
 declare module BabylonViewer {
-    
     /**
     /**
         * BABYLON.Animation play mode enum - is the animation looping or playing once
         * BABYLON.Animation play mode enum - is the animation looping or playing once
         */
         */
     export const enum AnimationPlayMode {
     export const enum AnimationPlayMode {
             ONCE = 0,
             ONCE = 0,
-            LOOP = 1,
+            LOOP = 1
     }
     }
     /**
     /**
         * An enum representing the current state of an animation object
         * An enum representing the current state of an animation object
@@ -737,7 +679,7 @@ declare module BabylonViewer {
             PLAYING = 1,
             PLAYING = 1,
             PAUSED = 2,
             PAUSED = 2,
             STOPPED = 3,
             STOPPED = 3,
-            ENDED = 4,
+            ENDED = 4
     }
     }
     /**
     /**
         * The different type of easing functions available
         * The different type of easing functions available
@@ -754,7 +696,7 @@ declare module BabylonViewer {
             QuadraticEase = 8,
             QuadraticEase = 8,
             QuarticEase = 9,
             QuarticEase = 9,
             QuinticEase = 10,
             QuinticEase = 10,
-            SineEase = 11,
+            SineEase = 11
     }
     }
     /**
     /**
         * Defines a simple animation to be applied to a model (scale).
         * Defines a simple animation to be applied to a model (scale).
@@ -867,8 +809,8 @@ declare module BabylonViewer {
                 */
                 */
             readonly state: AnimationState;
             readonly state: AnimationState;
             /**
             /**
-                * Sets the speed ratio to use for all animations
-                */
+             * Sets the speed ratio to use for all animations
+             */
             speedRatio: number;
             speedRatio: number;
             /**
             /**
                 * Get the max numbers of frame available in the animation group
                 * Get the max numbers of frame available in the animation group
@@ -888,10 +830,10 @@ declare module BabylonViewer {
                 */
                 */
             readonly fps: number;
             readonly fps: number;
             /**
             /**
-                * Set the play mode.
-                * If the animation is played, it will continue playing at least once more, depending on the new play mode set.
-                * If the animation is not set, the will be initialized and will wait for the user to start playing it.
-                */
+             * Set the play mode.
+             * If the animation is played, it will continue playing at least once more, depending on the new play mode set.
+             * If the animation is not set, the will be initialized and will wait for the user to start playing it.
+             */
             playMode: AnimationPlayMode;
             playMode: AnimationPlayMode;
             /**
             /**
                 * Reset the animation group
                 * Reset the animation group
@@ -925,11 +867,7 @@ declare module BabylonViewer {
             dispose(): void;
             dispose(): void;
     }
     }
 }
 }
-
 declare module BabylonViewer {
 declare module BabylonViewer {
-    
-    
-    
     /**
     /**
       * This interface defines the structure of a loader plugin.
       * This interface defines the structure of a loader plugin.
       * Any of those functions will be called if (!) the loader supports those callbacks.
       * Any of those functions will be called if (!) the loader supports those callbacks.
@@ -948,9 +886,7 @@ declare module BabylonViewer {
         onComplete?: () => void;
         onComplete?: () => void;
     }
     }
 }
 }
-
 declare module BabylonViewer {
 declare module BabylonViewer {
-    
     export interface IViewerTemplatePlugin {
     export interface IViewerTemplatePlugin {
         readonly templateName: string;
         readonly templateName: string;
         readonly eventsToAttach?: Array<string>;
         readonly eventsToAttach?: Array<string>;
@@ -972,9 +908,7 @@ declare module BabylonViewer {
         protected _generateHTMLElement(template: Template): Element | DocumentFragment;
         protected _generateHTMLElement(template: Template): Element | DocumentFragment;
     }
     }
 }
 }
-
 declare module BabylonViewer {
 declare module BabylonViewer {
-    
     /**
     /**
       *
       *
       * @param name the name of the custom optimizer configuration
       * @param name the name of the custom optimizer configuration
@@ -983,7 +917,6 @@ declare module BabylonViewer {
     export function getCustomOptimizerByName(name: string, upgrade?: boolean): (sceneManager: SceneManager) => boolean;
     export function getCustomOptimizerByName(name: string, upgrade?: boolean): (sceneManager: SceneManager) => boolean;
     export function registerCustomOptimizer(name: string, optimizer: (sceneManager: SceneManager) => boolean): void;
     export function registerCustomOptimizer(name: string, optimizer: (sceneManager: SceneManager) => boolean): void;
 }
 }
-
 declare module BabylonViewer {
 declare module BabylonViewer {
     /**
     /**
         * Will attach an init function the the DOMContentLoaded event.
         * Will attach an init function the the DOMContentLoaded event.
@@ -997,16 +930,9 @@ declare module BabylonViewer {
         */
         */
     export function InitTags(selector?: string): void;
     export function InitTags(selector?: string): void;
 }
 }
-
 declare module BabylonViewer {
 declare module BabylonViewer {
-    export * from 'babylonjs-viewer/configuration/configuration';
-    export * from 'babylonjs-viewer/configuration/interfaces';
 }
 }
-
 declare module BabylonViewer {
 declare module BabylonViewer {
-    
-    
-    
     export function getConfigurationKey(key: string, configObject: any): any;
     export function getConfigurationKey(key: string, configObject: any): any;
     export interface ViewerConfiguration {
     export interface ViewerConfiguration {
             version?: string;
             version?: string;
@@ -1101,11 +1027,7 @@ declare module BabylonViewer {
             };
             };
     }
     }
 }
 }
-
 declare module BabylonViewer {
 declare module BabylonViewer {
-    
-    
-    
     /**
     /**
         * The object sent when an event is triggered
         * The object sent when an event is triggered
         */
         */
@@ -1270,10 +1192,7 @@ declare module BabylonViewer {
             dispose(): void;
             dispose(): void;
     }
     }
 }
 }
-
 declare module BabylonViewer {
 declare module BabylonViewer {
-    
-    
     export class ConfigurationContainer {
     export class ConfigurationContainer {
         configuration: ViewerConfiguration;
         configuration: ViewerConfiguration;
         viewerId: string;
         viewerId: string;
@@ -1282,9 +1201,7 @@ declare module BabylonViewer {
         scene?: BABYLON.Scene;
         scene?: BABYLON.Scene;
     }
     }
 }
 }
-
 declare module BabylonViewer {
 declare module BabylonViewer {
-    
     /**
     /**
         * The configuration loader will load the configuration object from any source and will use the defined mapper to
         * The configuration loader will load the configuration object from any source and will use the defined mapper to
         * parse the object and return a conform ViewerConfiguration.
         * parse the object and return a conform ViewerConfiguration.
@@ -1307,10 +1224,7 @@ declare module BabylonViewer {
             dispose(): void;
             dispose(): void;
     }
     }
 }
 }
-
 declare module BabylonViewer {
 declare module BabylonViewer {
-    
-    
     export class ObservablesManager {
     export class ObservablesManager {
             /**
             /**
                 * Will notify when the scene was initialized
                 * Will notify when the scene was initialized
@@ -1365,15 +1279,7 @@ declare module BabylonViewer {
             dispose(): void;
             dispose(): void;
     }
     }
 }
 }
-
 declare module BabylonViewer {
 declare module BabylonViewer {
-    
-    
-    
-    
-    
-    
-    
     /**
     /**
         * This interface describes the structure of the variable sent with the configuration observables of the scene manager.
         * This interface describes the structure of the variable sent with the configuration observables of the scene manager.
         * O - the type of object we are dealing with (Light, BABYLON.ArcRotateCamera, BABYLON.Scene, etc')
         * O - the type of object we are dealing with (Light, BABYLON.ArcRotateCamera, BABYLON.Scene, etc')
@@ -1471,17 +1377,17 @@ declare module BabylonViewer {
             animationBlendingEnabled: boolean;
             animationBlendingEnabled: boolean;
             readonly observablesManager: ObservablesManager | undefined;
             readonly observablesManager: ObservablesManager | undefined;
             /**
             /**
-                * Should shadows be rendered every frame, or only once and stop.
-                * This can be used to optimize a scene.
-                *
-                * Not that the shadows will NOT disapear but will remain in place.
-                * @param process if true shadows will be updated once every frame. if false they will stop being updated.
-                */
+             * Should shadows be rendered every frame, or only once and stop.
+             * This can be used to optimize a scene.
+             *
+             * Not that the shadows will NOT disapear but will remain in place.
+             * @param process if true shadows will be updated once every frame. if false they will stop being updated.
+             */
             processShadows: boolean;
             processShadows: boolean;
             groundEnabled: boolean;
             groundEnabled: boolean;
             /**
             /**
-                * sets wether the reflection is disabled.
-                */
+             * sets wether the reflection is disabled.
+             */
             groundMirrorEnabled: boolean;
             groundMirrorEnabled: boolean;
             defaultRenderingPipelineEnabled: boolean;
             defaultRenderingPipelineEnabled: boolean;
             /**
             /**
@@ -1554,9 +1460,7 @@ declare module BabylonViewer {
             dispose(): void;
             dispose(): void;
     }
     }
 }
 }
-
 declare module BabylonViewer {
 declare module BabylonViewer {
-    
     export interface IModelConfiguration {
     export interface IModelConfiguration {
             id?: string;
             id?: string;
             url?: string;
             url?: string;
@@ -1622,14 +1526,7 @@ declare module BabylonViewer {
             };
             };
     }
     }
 }
 }
-
 declare module BabylonViewer {
 declare module BabylonViewer {
-    
-    
-    
-    
-    
-    
     /**
     /**
         * Get a loader plugin according to its name.
         * Get a loader plugin according to its name.
         * The plugin will be cached and will be reused if called for again.
         * The plugin will be cached and will be reused if called for again.
@@ -1642,25 +1539,8 @@ declare module BabylonViewer {
         */
         */
     export function addLoaderPlugin(name: string, plugin: ILoaderPlugin): void;
     export function addLoaderPlugin(name: string, plugin: ILoaderPlugin): void;
 }
 }
-
 declare module BabylonViewer {
 declare module BabylonViewer {
-    export * from 'babylonjs-viewer/configuration/interfaces/cameraConfiguration';
-    export * from 'babylonjs-viewer/configuration/interfaces/colorGradingConfiguration';
-    export * from 'babylonjs-viewer/configuration/interfaces/defaultRenderingPipelineConfiguration';
-    export * from 'babylonjs-viewer/configuration/interfaces/groundConfiguration';
-    export * from 'babylonjs-viewer/configuration/interfaces/imageProcessingConfiguration';
-    export * from 'babylonjs-viewer/configuration/interfaces/lightConfiguration';
-    export * from 'babylonjs-viewer/configuration/interfaces/modelAnimationConfiguration';
-    export * from 'babylonjs-viewer/configuration/interfaces/modelConfiguration';
-    export * from 'babylonjs-viewer/configuration/interfaces/observersConfiguration';
-    export * from 'babylonjs-viewer/configuration/interfaces/sceneConfiguration';
-    export * from 'babylonjs-viewer/configuration/interfaces/sceneOptimizerConfiguration';
-    export * from 'babylonjs-viewer/configuration/interfaces/skyboxConfiguration';
-    export * from 'babylonjs-viewer/configuration/interfaces/templateConfiguration';
-    export * from 'babylonjs-viewer/configuration/interfaces/vrConfiguration';
-    export * from 'babylonjs-viewer/configuration/interfaces/environmentMapConfiguration';
 }
 }
-
 declare module BabylonViewer {
 declare module BabylonViewer {
     export interface IEnvironmentMapConfiguration {
     export interface IEnvironmentMapConfiguration {
             /**
             /**
@@ -1685,9 +1565,7 @@ declare module BabylonViewer {
             };
             };
     }
     }
 }
 }
-
 declare module BabylonViewer {
 declare module BabylonViewer {
-    
     /**
     /**
         * The EventManager is in charge of registering user interctions with the viewer.
         * The EventManager is in charge of registering user interctions with the viewer.
         * It is used in the TemplateManager
         * It is used in the TemplateManager
@@ -1720,10 +1598,7 @@ declare module BabylonViewer {
             dispose(): void;
             dispose(): void;
     }
     }
 }
 }
-
 declare module BabylonViewer {
 declare module BabylonViewer {
-    
-    
     /**
     /**
         * The ViewerLabs class will hold functions that are not (!) backwards compatible.
         * The ViewerLabs class will hold functions that are not (!) backwards compatible.
         * The APIs in all labs-related classes and configuration  might change.
         * The APIs in all labs-related classes and configuration  might change.
@@ -1771,7 +1646,6 @@ declare module BabylonViewer {
             rotateShadowLight(shadowLight: BABYLON.ShadowLight, amount: number, point?: BABYLON.Vector3, axis?: BABYLON.Vector3, target?: BABYLON.Vector3): void;
             rotateShadowLight(shadowLight: BABYLON.ShadowLight, amount: number, point?: BABYLON.Vector3, axis?: BABYLON.Vector3, target?: BABYLON.Vector3): void;
     }
     }
 }
 }
-
 declare module BabylonViewer {
 declare module BabylonViewer {
     /**
     /**
         * Defines an animation to be applied to a model (translation, scale or rotation).
         * Defines an animation to be applied to a model (translation, scale or rotation).
@@ -1800,11 +1674,7 @@ declare module BabylonViewer {
             easingMode?: number;
             easingMode?: number;
     }
     }
 }
 }
-
 declare module BabylonViewer {
 declare module BabylonViewer {
-    
-    
-    
     export class TelemetryLoaderPlugin implements ILoaderPlugin {
     export class TelemetryLoaderPlugin implements ILoaderPlugin {
         onInit(loader: BABYLON.ISceneLoaderPlugin | BABYLON.ISceneLoaderPluginAsync, model: ViewerModel): void;
         onInit(loader: BABYLON.ISceneLoaderPlugin | BABYLON.ISceneLoaderPluginAsync, model: ViewerModel): void;
         onLoaded(model: ViewerModel): void;
         onLoaded(model: ViewerModel): void;
@@ -1812,12 +1682,7 @@ declare module BabylonViewer {
         onComplete(): void;
         onComplete(): void;
     }
     }
 }
 }
-
 declare module BabylonViewer {
 declare module BabylonViewer {
-    
-    
-    
-    
     /**
     /**
       * A loder plugin to use MSFT_lod extension correctly (glTF)
       * A loder plugin to use MSFT_lod extension correctly (glTF)
       */
       */
@@ -1826,11 +1691,7 @@ declare module BabylonViewer {
         onExtensionLoaded(extension: BABYLON.IGLTFLoaderExtension): void;
         onExtensionLoaded(extension: BABYLON.IGLTFLoaderExtension): void;
     }
     }
 }
 }
-
 declare module BabylonViewer {
 declare module BabylonViewer {
-    
-    
-    
     /**
     /**
       * Force-apply material configuration right after a material was loaded.
       * Force-apply material configuration right after a material was loaded.
       */
       */
@@ -1839,10 +1700,7 @@ declare module BabylonViewer {
         onMaterialLoaded(material: BABYLON.Material): void;
         onMaterialLoaded(material: BABYLON.Material): void;
     }
     }
 }
 }
-
 declare module BabylonViewer {
 declare module BabylonViewer {
-    
-    
     /**
     /**
       * A (PBR) material will be extended using this function.
       * A (PBR) material will be extended using this function.
       * This function will hold extra default configuration for the viewer, if not implemented in Babylon itself.
       * This function will hold extra default configuration for the viewer, if not implemented in Babylon itself.
@@ -1851,7 +1709,6 @@ declare module BabylonViewer {
         onMaterialLoaded(baseMaterial: BABYLON.Material): void;
         onMaterialLoaded(baseMaterial: BABYLON.Material): void;
     }
     }
 }
 }
-
 declare module BabylonViewer {
 declare module BabylonViewer {
     export interface ICameraConfiguration {
     export interface ICameraConfiguration {
         position?: {
         position?: {
@@ -1885,7 +1742,6 @@ declare module BabylonViewer {
         [propName: string]: any;
         [propName: string]: any;
     }
     }
 }
 }
-
 declare module BabylonViewer {
 declare module BabylonViewer {
     /**
     /**
         * The Color Grading Configuration groups the different settings used to define the color grading used in the viewer.
         * The Color Grading Configuration groups the different settings used to define the color grading used in the viewer.
@@ -1969,9 +1825,7 @@ declare module BabylonViewer {
             exposureHighlights: number;
             exposureHighlights: number;
     }
     }
 }
 }
-
 declare module BabylonViewer {
 declare module BabylonViewer {
-    
     export interface IDefaultRenderingPipelineConfiguration {
     export interface IDefaultRenderingPipelineConfiguration {
         sharpenEnabled?: boolean;
         sharpenEnabled?: boolean;
         bloomEnabled?: boolean;
         bloomEnabled?: boolean;
@@ -1992,7 +1846,6 @@ declare module BabylonViewer {
         glowLayerEnabled?: boolean;
         glowLayerEnabled?: boolean;
     }
     }
 }
 }
-
 declare module BabylonViewer {
 declare module BabylonViewer {
     export interface IGroundConfiguration {
     export interface IGroundConfiguration {
         size?: number;
         size?: number;
@@ -2019,7 +1872,6 @@ declare module BabylonViewer {
         };
         };
     }
     }
 }
 }
-
 declare module BabylonViewer {
 declare module BabylonViewer {
     export interface IImageProcessingConfiguration {
     export interface IImageProcessingConfiguration {
         colorGradingEnabled?: boolean;
         colorGradingEnabled?: boolean;
@@ -2065,7 +1917,6 @@ declare module BabylonViewer {
         isEnabled?: boolean;
         isEnabled?: boolean;
     }
     }
 }
 }
-
 declare module BabylonViewer {
 declare module BabylonViewer {
     export interface ILightConfiguration {
     export interface ILightConfiguration {
         type: number;
         type: number;
@@ -2128,7 +1979,6 @@ declare module BabylonViewer {
         };
         };
     }
     }
 }
 }
-
 declare module BabylonViewer {
 declare module BabylonViewer {
     export interface IObserversConfiguration {
     export interface IObserversConfiguration {
         onEngineInit?: string;
         onEngineInit?: string;
@@ -2136,11 +1986,7 @@ declare module BabylonViewer {
         onModelLoaded?: string;
         onModelLoaded?: string;
     }
     }
 }
 }
-
 declare module BabylonViewer {
 declare module BabylonViewer {
-    
-    
-    
     export interface ISceneConfiguration {
     export interface ISceneConfiguration {
             debug?: boolean;
             debug?: boolean;
             clearColor?: {
             clearColor?: {
@@ -2189,7 +2035,6 @@ declare module BabylonViewer {
             assetsRootURL?: string;
             assetsRootURL?: string;
     }
     }
 }
 }
-
 declare module BabylonViewer {
 declare module BabylonViewer {
     export interface ISceneOptimizerConfiguration {
     export interface ISceneOptimizerConfiguration {
         targetFrameRate?: number;
         targetFrameRate?: number;
@@ -2215,9 +2060,7 @@ declare module BabylonViewer {
         step?: number;
         step?: number;
     }
     }
 }
 }
-
 declare module BabylonViewer {
 declare module BabylonViewer {
-    
     export interface ISkyboxConfiguration {
     export interface ISkyboxConfiguration {
         cubeTexture?: {
         cubeTexture?: {
             noMipMap?: boolean;
             noMipMap?: boolean;
@@ -2239,7 +2082,6 @@ declare module BabylonViewer {
         infiniteDistance?: boolean;
         infiniteDistance?: boolean;
     }
     }
 }
 }
-
 declare module BabylonViewer {
 declare module BabylonViewer {
     /**
     /**
         * A single template configuration object
         * A single template configuration object
@@ -2309,9 +2151,7 @@ declare module BabylonViewer {
             };
             };
     }
     }
 }
 }
-
 declare module BabylonViewer {
 declare module BabylonViewer {
-    
     export interface IVRConfiguration {
     export interface IVRConfiguration {
         disabled?: boolean;
         disabled?: boolean;
         objectScaleFactor?: number;
         objectScaleFactor?: number;
@@ -2328,10 +2168,7 @@ declare module BabylonViewer {
         };
         };
     }
     }
 }
 }
-
 declare module BabylonViewer {
 declare module BabylonViewer {
-    
-    
     /**
     /**
         * Spherical polynomial coefficients (counter part to spherical harmonic coefficients used in shader irradiance calculation)
         * Spherical polynomial coefficients (counter part to spherical harmonic coefficients used in shader irradiance calculation)
         * @ignoreChildren
         * @ignoreChildren
@@ -2437,9 +2274,7 @@ declare module BabylonViewer {
             static Parse(arrayBuffer: ArrayBuffer): PBREnvironment;
             static Parse(arrayBuffer: ArrayBuffer): PBREnvironment;
     }
     }
 }
 }
-
 declare module BabylonViewer {
 declare module BabylonViewer {
-    
     /**
     /**
         * WebGL Pixel Formats
         * WebGL Pixel Formats
         */
         */
@@ -2449,7 +2284,7 @@ declare module BabylonViewer {
             RGB = 6407,
             RGB = 6407,
             RGBA = 6408,
             RGBA = 6408,
             LUMINANCE = 6409,
             LUMINANCE = 6409,
-            LUMINANCE_ALPHA = 6410,
+            LUMINANCE_ALPHA = 6410
     }
     }
     /**
     /**
         * WebGL Pixel Types
         * WebGL Pixel Types
@@ -2458,14 +2293,14 @@ declare module BabylonViewer {
             UNSIGNED_BYTE = 5121,
             UNSIGNED_BYTE = 5121,
             UNSIGNED_SHORT_4_4_4_4 = 32819,
             UNSIGNED_SHORT_4_4_4_4 = 32819,
             UNSIGNED_SHORT_5_5_5_1 = 32820,
             UNSIGNED_SHORT_5_5_5_1 = 32820,
-            UNSIGNED_SHORT_5_6_5 = 33635,
+            UNSIGNED_SHORT_5_6_5 = 33635
     }
     }
     /**
     /**
         * WebGL Texture Magnification Filter
         * WebGL Texture Magnification Filter
         */
         */
     export const enum TextureMagFilter {
     export const enum TextureMagFilter {
             NEAREST = 9728,
             NEAREST = 9728,
-            LINEAR = 9729,
+            LINEAR = 9729
     }
     }
     /**
     /**
         * WebGL Texture Minification Filter
         * WebGL Texture Minification Filter
@@ -2476,7 +2311,7 @@ declare module BabylonViewer {
             NEAREST_MIPMAP_NEAREST = 9984,
             NEAREST_MIPMAP_NEAREST = 9984,
             LINEAR_MIPMAP_NEAREST = 9985,
             LINEAR_MIPMAP_NEAREST = 9985,
             NEAREST_MIPMAP_LINEAR = 9986,
             NEAREST_MIPMAP_LINEAR = 9986,
-            LINEAR_MIPMAP_LINEAR = 9987,
+            LINEAR_MIPMAP_LINEAR = 9987
     }
     }
     /**
     /**
         * WebGL Texture Wrap Modes
         * WebGL Texture Wrap Modes
@@ -2484,7 +2319,7 @@ declare module BabylonViewer {
     export const enum TextureWrapMode {
     export const enum TextureWrapMode {
             REPEAT = 10497,
             REPEAT = 10497,
             CLAMP_TO_EDGE = 33071,
             CLAMP_TO_EDGE = 33071,
-            MIRRORED_REPEAT = 33648,
+            MIRRORED_REPEAT = 33648
     }
     }
     /**
     /**
         * Raw texture data and descriptor sufficient for WebGL texture upload
         * Raw texture data and descriptor sufficient for WebGL texture upload
@@ -2619,5 +2454,4 @@ declare module BabylonViewer {
                 */
                 */
             static EnvironmentLODOffset: number;
             static EnvironmentLODOffset: number;
     }
     }
-}
-
+}

文件差异内容过多而无法显示
+ 55 - 75
dist/preview release/viewer/babylon.viewer.js


文件差异内容过多而无法显示
+ 23 - 125476
dist/preview release/viewer/babylon.viewer.max.js


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

@@ -5,8 +5,8 @@ declare module "babylonjs-loaders"{ export=BABYLON;}
 
 
 // Generated by dts-bundle v0.7.3
 // Generated by dts-bundle v0.7.3
 // Dependencies for this module:
 // Dependencies for this module:
-//   ../../../../Tools/Gulp/babylonjs
-//   ../../../../Tools/Gulp/babylonjs-loaders
+//   ../../../../../Tools/Gulp/babylonjs
+//   ../../../../../Tools/Gulp/babylonjs-loaders
 
 
 declare module 'babylonjs-viewer' {
 declare module 'babylonjs-viewer' {
     import { mapperManager } from 'babylonjs-viewer/configuration/mappers';
     import { mapperManager } from 'babylonjs-viewer/configuration/mappers';
@@ -359,8 +359,8 @@ declare module 'babylonjs-viewer/viewer/viewer' {
                 */
                 */
             isCanvasInDOM(): boolean;
             isCanvasInDOM(): boolean;
             /**
             /**
-                * Set the viewer's background rendering flag.
-                */
+             * Set the viewer's background rendering flag.
+             */
             renderInBackground: boolean;
             renderInBackground: boolean;
             /**
             /**
                 * Get the configuration object. This is a reference only.
                 * Get the configuration object. This is a reference only.
@@ -573,7 +573,7 @@ declare module 'babylonjs-viewer/model/viewerModel' {
             ENTRYDONE = 4,
             ENTRYDONE = 4,
             COMPLETE = 5,
             COMPLETE = 5,
             CANCELED = 6,
             CANCELED = 6,
-            ERROR = 7,
+            ERROR = 7
     }
     }
     /**
     /**
         * The viewer model is a container for all assets representing a sngle loaded model.
         * The viewer model is a container for all assets representing a sngle loaded model.
@@ -638,8 +638,8 @@ declare module 'babylonjs-viewer/model/viewerModel' {
             shadowsRenderedAfterLoad: boolean;
             shadowsRenderedAfterLoad: boolean;
             getViewerId(): string | undefined;
             getViewerId(): string | undefined;
             /**
             /**
-                * Set whether this model is enabled or not.
-                */
+             * Set whether this model is enabled or not.
+             */
             enabled: boolean;
             enabled: boolean;
             loaderDone: boolean;
             loaderDone: boolean;
             /**
             /**
@@ -655,9 +655,9 @@ declare module 'babylonjs-viewer/model/viewerModel' {
                 */
                 */
             readonly meshes: AbstractMesh[];
             readonly meshes: AbstractMesh[];
             /**
             /**
-                * (Re-)set the model's entire configuration
-                * @param newConfiguration the new configuration to replace the new one
-                */
+             * (Re-)set the model's entire configuration
+             * @param newConfiguration the new configuration to replace the new one
+             */
             configuration: IModelConfiguration;
             configuration: IModelConfiguration;
             /**
             /**
                 * Update the current configuration with new values.
                 * Update the current configuration with new values.
@@ -727,7 +727,7 @@ declare module 'babylonjs-viewer/model/modelAnimation' {
         */
         */
     export const enum AnimationPlayMode {
     export const enum AnimationPlayMode {
             ONCE = 0,
             ONCE = 0,
-            LOOP = 1,
+            LOOP = 1
     }
     }
     /**
     /**
         * An enum representing the current state of an animation object
         * An enum representing the current state of an animation object
@@ -737,7 +737,7 @@ declare module 'babylonjs-viewer/model/modelAnimation' {
             PLAYING = 1,
             PLAYING = 1,
             PAUSED = 2,
             PAUSED = 2,
             STOPPED = 3,
             STOPPED = 3,
-            ENDED = 4,
+            ENDED = 4
     }
     }
     /**
     /**
         * The different type of easing functions available
         * The different type of easing functions available
@@ -754,7 +754,7 @@ declare module 'babylonjs-viewer/model/modelAnimation' {
             QuadraticEase = 8,
             QuadraticEase = 8,
             QuarticEase = 9,
             QuarticEase = 9,
             QuinticEase = 10,
             QuinticEase = 10,
-            SineEase = 11,
+            SineEase = 11
     }
     }
     /**
     /**
         * Defines a simple animation to be applied to a model (scale).
         * Defines a simple animation to be applied to a model (scale).
@@ -867,8 +867,8 @@ declare module 'babylonjs-viewer/model/modelAnimation' {
                 */
                 */
             readonly state: AnimationState;
             readonly state: AnimationState;
             /**
             /**
-                * Sets the speed ratio to use for all animations
-                */
+             * Sets the speed ratio to use for all animations
+             */
             speedRatio: number;
             speedRatio: number;
             /**
             /**
                 * Get the max numbers of frame available in the animation group
                 * Get the max numbers of frame available in the animation group
@@ -888,10 +888,10 @@ declare module 'babylonjs-viewer/model/modelAnimation' {
                 */
                 */
             readonly fps: number;
             readonly fps: number;
             /**
             /**
-                * Set the play mode.
-                * If the animation is played, it will continue playing at least once more, depending on the new play mode set.
-                * If the animation is not set, the will be initialized and will wait for the user to start playing it.
-                */
+             * Set the play mode.
+             * If the animation is played, it will continue playing at least once more, depending on the new play mode set.
+             * If the animation is not set, the will be initialized and will wait for the user to start playing it.
+             */
             playMode: AnimationPlayMode;
             playMode: AnimationPlayMode;
             /**
             /**
                 * Reset the animation group
                 * Reset the animation group
@@ -1471,17 +1471,17 @@ declare module 'babylonjs-viewer/managers/sceneManager' {
             animationBlendingEnabled: boolean;
             animationBlendingEnabled: boolean;
             readonly observablesManager: ObservablesManager | undefined;
             readonly observablesManager: ObservablesManager | undefined;
             /**
             /**
-                * Should shadows be rendered every frame, or only once and stop.
-                * This can be used to optimize a scene.
-                *
-                * Not that the shadows will NOT disapear but will remain in place.
-                * @param process if true shadows will be updated once every frame. if false they will stop being updated.
-                */
+             * Should shadows be rendered every frame, or only once and stop.
+             * This can be used to optimize a scene.
+             *
+             * Not that the shadows will NOT disapear but will remain in place.
+             * @param process if true shadows will be updated once every frame. if false they will stop being updated.
+             */
             processShadows: boolean;
             processShadows: boolean;
             groundEnabled: boolean;
             groundEnabled: boolean;
             /**
             /**
-                * sets wether the reflection is disabled.
-                */
+             * sets wether the reflection is disabled.
+             */
             groundMirrorEnabled: boolean;
             groundMirrorEnabled: boolean;
             defaultRenderingPipelineEnabled: boolean;
             defaultRenderingPipelineEnabled: boolean;
             /**
             /**
@@ -2449,7 +2449,7 @@ declare module 'babylonjs-viewer/labs/texture' {
             RGB = 6407,
             RGB = 6407,
             RGBA = 6408,
             RGBA = 6408,
             LUMINANCE = 6409,
             LUMINANCE = 6409,
-            LUMINANCE_ALPHA = 6410,
+            LUMINANCE_ALPHA = 6410
     }
     }
     /**
     /**
         * WebGL Pixel Types
         * WebGL Pixel Types
@@ -2458,14 +2458,14 @@ declare module 'babylonjs-viewer/labs/texture' {
             UNSIGNED_BYTE = 5121,
             UNSIGNED_BYTE = 5121,
             UNSIGNED_SHORT_4_4_4_4 = 32819,
             UNSIGNED_SHORT_4_4_4_4 = 32819,
             UNSIGNED_SHORT_5_5_5_1 = 32820,
             UNSIGNED_SHORT_5_5_5_1 = 32820,
-            UNSIGNED_SHORT_5_6_5 = 33635,
+            UNSIGNED_SHORT_5_6_5 = 33635
     }
     }
     /**
     /**
         * WebGL Texture Magnification Filter
         * WebGL Texture Magnification Filter
         */
         */
     export const enum TextureMagFilter {
     export const enum TextureMagFilter {
             NEAREST = 9728,
             NEAREST = 9728,
-            LINEAR = 9729,
+            LINEAR = 9729
     }
     }
     /**
     /**
         * WebGL Texture Minification Filter
         * WebGL Texture Minification Filter
@@ -2476,7 +2476,7 @@ declare module 'babylonjs-viewer/labs/texture' {
             NEAREST_MIPMAP_NEAREST = 9984,
             NEAREST_MIPMAP_NEAREST = 9984,
             LINEAR_MIPMAP_NEAREST = 9985,
             LINEAR_MIPMAP_NEAREST = 9985,
             NEAREST_MIPMAP_LINEAR = 9986,
             NEAREST_MIPMAP_LINEAR = 9986,
-            LINEAR_MIPMAP_LINEAR = 9987,
+            LINEAR_MIPMAP_LINEAR = 9987
     }
     }
     /**
     /**
         * WebGL Texture Wrap Modes
         * WebGL Texture Wrap Modes
@@ -2484,7 +2484,7 @@ declare module 'babylonjs-viewer/labs/texture' {
     export const enum TextureWrapMode {
     export const enum TextureWrapMode {
             REPEAT = 10497,
             REPEAT = 10497,
             CLAMP_TO_EDGE = 33071,
             CLAMP_TO_EDGE = 33071,
-            MIRRORED_REPEAT = 33648,
+            MIRRORED_REPEAT = 33648
     }
     }
     /**
     /**
         * Raw texture data and descriptor sufficient for WebGL texture upload
         * Raw texture data and descriptor sufficient for WebGL texture upload