David Catuhe 6 years ago
parent
commit
d4ff7dcfec

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


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


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


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

@@ -59442,12 +59442,14 @@ var BABYLON;
             // get the difference of the two closest points
             var qtc = BABYLON.Tmp.Vector3[4];
             v.scaleToRef(tc, qtc);
-            var dP = BABYLON.Tmp.Vector3[5];
-            u.scaleToRef(sc, dP);
-            dP.addInPlace(w).subtractInPlace(qtc); // = S1(sc) - S2(tc)
+            var qsc = BABYLON.Tmp.Vector3[5];
+            u.scaleToRef(sc, qsc);
+            qsc.addInPlace(w);
+            var dP = BABYLON.Tmp.Vector3[6];
+            qsc.subtractToRef(qtc, dP); // = S1(sc) - S2(tc)
             var isIntersected = (tc > 0) && (tc <= this.length) && (dP.lengthSquared() < (threshold * threshold)); // return intersection result
             if (isIntersected) {
-                return qtc.length();
+                return qsc.length();
             }
             return -1;
         };
@@ -104305,9 +104307,6 @@ var BABYLON;
                             rotateSpheres[index].lookAt(BABYLON.Vector3.Cross(BABYLON.Vector3.Forward(), rotateSpheres[index].position.normalizeToNew()).normalizeToNew().add(rotateSpheres[index].position));
                         }
                         if (this.fixedDragMeshScreenSize) {
-                            this._rootMesh.computeWorldMatrix();
-                            this._rotateSpheresParent.computeWorldMatrix();
-                            rotateSpheres[index].computeWorldMatrix();
                             rotateSpheres[index].absolutePosition.subtractToRef(this.gizmoLayer.utilityLayerScene.activeCamera.position, this._tmpVector);
                             var distanceFromCamera = this.rotationSphereSize * this._tmpVector.length() / this.fixedDragMeshScreenSizeDistanceFactor;
                             rotateSpheres[index].scaling.set(distanceFromCamera, distanceFromCamera, distanceFromCamera);
@@ -104329,9 +104328,6 @@ var BABYLON;
                             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));
                             if (this.fixedDragMeshScreenSize) {
-                                this._rootMesh.computeWorldMatrix();
-                                this._scaleBoxesParent.computeWorldMatrix();
-                                scaleBoxes[index].computeWorldMatrix();
                                 scaleBoxes[index].absolutePosition.subtractToRef(this.gizmoLayer.utilityLayerScene.activeCamera.position, this._tmpVector);
                                 var distanceFromCamera = this.scaleBoxSize * this._tmpVector.length() / this.fixedDragMeshScreenSizeDistanceFactor;
                                 scaleBoxes[index].scaling.set(distanceFromCamera, distanceFromCamera, distanceFromCamera);

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

@@ -59409,12 +59409,14 @@ var BABYLON;
             // get the difference of the two closest points
             var qtc = BABYLON.Tmp.Vector3[4];
             v.scaleToRef(tc, qtc);
-            var dP = BABYLON.Tmp.Vector3[5];
-            u.scaleToRef(sc, dP);
-            dP.addInPlace(w).subtractInPlace(qtc); // = S1(sc) - S2(tc)
+            var qsc = BABYLON.Tmp.Vector3[5];
+            u.scaleToRef(sc, qsc);
+            qsc.addInPlace(w);
+            var dP = BABYLON.Tmp.Vector3[6];
+            qsc.subtractToRef(qtc, dP); // = S1(sc) - S2(tc)
             var isIntersected = (tc > 0) && (tc <= this.length) && (dP.lengthSquared() < (threshold * threshold)); // return intersection result
             if (isIntersected) {
-                return qtc.length();
+                return qsc.length();
             }
             return -1;
         };
@@ -104272,9 +104274,6 @@ var BABYLON;
                             rotateSpheres[index].lookAt(BABYLON.Vector3.Cross(BABYLON.Vector3.Forward(), rotateSpheres[index].position.normalizeToNew()).normalizeToNew().add(rotateSpheres[index].position));
                         }
                         if (this.fixedDragMeshScreenSize) {
-                            this._rootMesh.computeWorldMatrix();
-                            this._rotateSpheresParent.computeWorldMatrix();
-                            rotateSpheres[index].computeWorldMatrix();
                             rotateSpheres[index].absolutePosition.subtractToRef(this.gizmoLayer.utilityLayerScene.activeCamera.position, this._tmpVector);
                             var distanceFromCamera = this.rotationSphereSize * this._tmpVector.length() / this.fixedDragMeshScreenSizeDistanceFactor;
                             rotateSpheres[index].scaling.set(distanceFromCamera, distanceFromCamera, distanceFromCamera);
@@ -104296,9 +104295,6 @@ var BABYLON;
                             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));
                             if (this.fixedDragMeshScreenSize) {
-                                this._rootMesh.computeWorldMatrix();
-                                this._scaleBoxesParent.computeWorldMatrix();
-                                scaleBoxes[index].computeWorldMatrix();
                                 scaleBoxes[index].absolutePosition.subtractToRef(this.gizmoLayer.utilityLayerScene.activeCamera.position, this._tmpVector);
                                 var distanceFromCamera = this.scaleBoxSize * this._tmpVector.length() / this.fixedDragMeshScreenSizeDistanceFactor;
                                 scaleBoxes[index].scaling.set(distanceFromCamera, distanceFromCamera, distanceFromCamera);

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


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

@@ -59409,12 +59409,14 @@ var BABYLON;
             // get the difference of the two closest points
             var qtc = BABYLON.Tmp.Vector3[4];
             v.scaleToRef(tc, qtc);
-            var dP = BABYLON.Tmp.Vector3[5];
-            u.scaleToRef(sc, dP);
-            dP.addInPlace(w).subtractInPlace(qtc); // = S1(sc) - S2(tc)
+            var qsc = BABYLON.Tmp.Vector3[5];
+            u.scaleToRef(sc, qsc);
+            qsc.addInPlace(w);
+            var dP = BABYLON.Tmp.Vector3[6];
+            qsc.subtractToRef(qtc, dP); // = S1(sc) - S2(tc)
             var isIntersected = (tc > 0) && (tc <= this.length) && (dP.lengthSquared() < (threshold * threshold)); // return intersection result
             if (isIntersected) {
-                return qtc.length();
+                return qsc.length();
             }
             return -1;
         };
@@ -104272,9 +104274,6 @@ var BABYLON;
                             rotateSpheres[index].lookAt(BABYLON.Vector3.Cross(BABYLON.Vector3.Forward(), rotateSpheres[index].position.normalizeToNew()).normalizeToNew().add(rotateSpheres[index].position));
                         }
                         if (this.fixedDragMeshScreenSize) {
-                            this._rootMesh.computeWorldMatrix();
-                            this._rotateSpheresParent.computeWorldMatrix();
-                            rotateSpheres[index].computeWorldMatrix();
                             rotateSpheres[index].absolutePosition.subtractToRef(this.gizmoLayer.utilityLayerScene.activeCamera.position, this._tmpVector);
                             var distanceFromCamera = this.rotationSphereSize * this._tmpVector.length() / this.fixedDragMeshScreenSizeDistanceFactor;
                             rotateSpheres[index].scaling.set(distanceFromCamera, distanceFromCamera, distanceFromCamera);
@@ -104296,9 +104295,6 @@ var BABYLON;
                             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));
                             if (this.fixedDragMeshScreenSize) {
-                                this._rootMesh.computeWorldMatrix();
-                                this._scaleBoxesParent.computeWorldMatrix();
-                                scaleBoxes[index].computeWorldMatrix();
                                 scaleBoxes[index].absolutePosition.subtractToRef(this.gizmoLayer.utilityLayerScene.activeCamera.position, this._tmpVector);
                                 var distanceFromCamera = this.scaleBoxSize * this._tmpVector.length() / this.fixedDragMeshScreenSizeDistanceFactor;
                                 scaleBoxes[index].scaling.set(distanceFromCamera, distanceFromCamera, distanceFromCamera);

+ 24 - 0
dist/preview release/viewer/babylon.viewer.d.ts

@@ -1865,6 +1865,30 @@ declare module BabylonViewer {
     }
 }
 declare module BabylonViewer {
+    export interface IGroundConfiguration {
+        size?: number;
+        receiveShadows?: boolean;
+        shadowLevel?: number;
+        shadowOnly?: boolean;
+        mirror?: boolean | {
+            sizeRatio?: number;
+            blurKernel?: number;
+            amount?: number;
+            fresnelWeight?: number;
+            fallOffDistance?: number;
+            textureType?: number;
+        };
+        texture?: string;
+        color?: {
+            r: number;
+            g: number;
+            b: number;
+        };
+        opacity?: number;
+        material?: {
+            [propName: string]: any;
+        };
+    }
 }
 declare module BabylonViewer {
     export interface IImageProcessingConfiguration {

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


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


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

@@ -2013,7 +2013,30 @@ declare module 'babylonjs-viewer/configuration/interfaces/defaultRenderingPipeli
 }
 
 declare module 'babylonjs-viewer/configuration/interfaces/groundConfiguration' {
-    
+    export interface IGroundConfiguration {
+        size?: number;
+        receiveShadows?: boolean;
+        shadowLevel?: number;
+        shadowOnly?: boolean;
+        mirror?: boolean | {
+            sizeRatio?: number;
+            blurKernel?: number;
+            amount?: number;
+            fresnelWeight?: number;
+            fallOffDistance?: number;
+            textureType?: number;
+        };
+        texture?: string;
+        color?: {
+            r: number;
+            g: number;
+            b: number;
+        };
+        opacity?: number;
+        material?: {
+            [propName: string]: any;
+        };
+    }
 }
 
 declare module 'babylonjs-viewer/configuration/interfaces/imageProcessingConfiguration' {