David Catuhe 6 年之前
父节点
当前提交
b32ed63b9a

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


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


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


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

@@ -104190,6 +104190,10 @@ var BABYLON;
                 if (_this.attachedMesh && !_this._existingMeshScale.equals(_this.attachedMesh.scaling)) {
                     _this.updateBoundingBox();
                 }
+                else if (_this.fixedDragMeshScreenSize) {
+                    _this._updateRotationSpheres();
+                    _this._updateScaleBoxes();
+                }
             });
             _this.updateBoundingBox();
             return _this;
@@ -104272,7 +104276,14 @@ var BABYLON;
                 this.attachedMesh.rotationQuaternion.copyFrom(this._tmpQuaternion);
                 this.attachedMesh.position.copyFrom(this._tmpVector);
             }
-            // Update rotation sphere locations
+            this._updateRotationSpheres();
+            this._updateScaleBoxes();
+            if (this.attachedMesh) {
+                this._existingMeshScale.copyFrom(this.attachedMesh.scaling);
+                BoundingBoxGizmo._RestorePivotPoint(this.attachedMesh);
+            }
+        };
+        BoundingBoxGizmo.prototype._updateRotationSpheres = function () {
             var rotateSpheres = this._rotateSpheresParent.getChildMeshes();
             for (var i = 0; i < 3; i++) {
                 for (var j = 0; j < 2; j++) {
@@ -104307,7 +104318,8 @@ var BABYLON;
                     }
                 }
             }
-            // Update scale box locations
+        };
+        BoundingBoxGizmo.prototype._updateScaleBoxes = function () {
             var scaleBoxes = this._scaleBoxesParent.getChildMeshes();
             for (var i = 0; i < 2; i++) {
                 for (var j = 0; j < 2; j++) {
@@ -104331,10 +104343,6 @@ var BABYLON;
                     }
                 }
             }
-            if (this.attachedMesh) {
-                this._existingMeshScale.copyFrom(this.attachedMesh.scaling);
-                BoundingBoxGizmo._RestorePivotPoint(this.attachedMesh);
-            }
         };
         /**
          * Enables rotation on the specified axis and disables rotation on the others

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

@@ -104157,6 +104157,10 @@ var BABYLON;
                 if (_this.attachedMesh && !_this._existingMeshScale.equals(_this.attachedMesh.scaling)) {
                     _this.updateBoundingBox();
                 }
+                else if (_this.fixedDragMeshScreenSize) {
+                    _this._updateRotationSpheres();
+                    _this._updateScaleBoxes();
+                }
             });
             _this.updateBoundingBox();
             return _this;
@@ -104239,7 +104243,14 @@ var BABYLON;
                 this.attachedMesh.rotationQuaternion.copyFrom(this._tmpQuaternion);
                 this.attachedMesh.position.copyFrom(this._tmpVector);
             }
-            // Update rotation sphere locations
+            this._updateRotationSpheres();
+            this._updateScaleBoxes();
+            if (this.attachedMesh) {
+                this._existingMeshScale.copyFrom(this.attachedMesh.scaling);
+                BoundingBoxGizmo._RestorePivotPoint(this.attachedMesh);
+            }
+        };
+        BoundingBoxGizmo.prototype._updateRotationSpheres = function () {
             var rotateSpheres = this._rotateSpheresParent.getChildMeshes();
             for (var i = 0; i < 3; i++) {
                 for (var j = 0; j < 2; j++) {
@@ -104274,7 +104285,8 @@ var BABYLON;
                     }
                 }
             }
-            // Update scale box locations
+        };
+        BoundingBoxGizmo.prototype._updateScaleBoxes = function () {
             var scaleBoxes = this._scaleBoxesParent.getChildMeshes();
             for (var i = 0; i < 2; i++) {
                 for (var j = 0; j < 2; j++) {
@@ -104298,10 +104310,6 @@ var BABYLON;
                     }
                 }
             }
-            if (this.attachedMesh) {
-                this._existingMeshScale.copyFrom(this.attachedMesh.scaling);
-                BoundingBoxGizmo._RestorePivotPoint(this.attachedMesh);
-            }
         };
         /**
          * Enables rotation on the specified axis and disables rotation on the others

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


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

@@ -104157,6 +104157,10 @@ var BABYLON;
                 if (_this.attachedMesh && !_this._existingMeshScale.equals(_this.attachedMesh.scaling)) {
                     _this.updateBoundingBox();
                 }
+                else if (_this.fixedDragMeshScreenSize) {
+                    _this._updateRotationSpheres();
+                    _this._updateScaleBoxes();
+                }
             });
             _this.updateBoundingBox();
             return _this;
@@ -104239,7 +104243,14 @@ var BABYLON;
                 this.attachedMesh.rotationQuaternion.copyFrom(this._tmpQuaternion);
                 this.attachedMesh.position.copyFrom(this._tmpVector);
             }
-            // Update rotation sphere locations
+            this._updateRotationSpheres();
+            this._updateScaleBoxes();
+            if (this.attachedMesh) {
+                this._existingMeshScale.copyFrom(this.attachedMesh.scaling);
+                BoundingBoxGizmo._RestorePivotPoint(this.attachedMesh);
+            }
+        };
+        BoundingBoxGizmo.prototype._updateRotationSpheres = function () {
             var rotateSpheres = this._rotateSpheresParent.getChildMeshes();
             for (var i = 0; i < 3; i++) {
                 for (var j = 0; j < 2; j++) {
@@ -104274,7 +104285,8 @@ var BABYLON;
                     }
                 }
             }
-            // Update scale box locations
+        };
+        BoundingBoxGizmo.prototype._updateScaleBoxes = function () {
             var scaleBoxes = this._scaleBoxesParent.getChildMeshes();
             for (var i = 0; i < 2; i++) {
                 for (var j = 0; j < 2; j++) {
@@ -104298,10 +104310,6 @@ var BABYLON;
                     }
                 }
             }
-            if (this.attachedMesh) {
-                this._existingMeshScale.copyFrom(this.attachedMesh.scaling);
-                BoundingBoxGizmo._RestorePivotPoint(this.attachedMesh);
-            }
         };
         /**
          * Enables rotation on the specified axis and disables rotation on the others

+ 2 - 2
dist/preview release/loaders/babylon.glTF2FileLoader.js

@@ -1273,7 +1273,7 @@ var BABYLON;
                 var name = node.name || "node" + node.index;
                 if (primitives.length === 1) {
                     var primitive = mesh.primitives[0];
-                    promises.push(this._loadMeshPrimitiveAsync(context + "/primitives/" + primitive.index + "}", name, node, mesh, primitive, function (babylonMesh) {
+                    promises.push(this._loadMeshPrimitiveAsync(context + "/primitives/" + primitive.index, name, node, mesh, primitive, function (babylonMesh) {
                         node._babylonTransformNode = babylonMesh;
                     }));
                 }
@@ -1282,7 +1282,7 @@ var BABYLON;
                     node._babylonTransformNode = babylonTransformNode_1;
                     for (var _i = 0, primitives_1 = primitives; _i < primitives_1.length; _i++) {
                         var primitive = primitives_1[_i];
-                        promises.push(this._loadMeshPrimitiveAsync(context + "/primitives/" + primitive.index + "}", name + "_primitive" + primitive.index, node, mesh, primitive, function (babylonMesh) {
+                        promises.push(this._loadMeshPrimitiveAsync(context + "/primitives/" + primitive.index, name + "_primitive" + primitive.index, node, mesh, primitive, function (babylonMesh) {
                             babylonMesh.parent = babylonTransformNode_1;
                             node._primitiveBabylonMeshes = node._primitiveBabylonMeshes || [];
                             node._primitiveBabylonMeshes.push(babylonMesh);

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


+ 2 - 2
dist/preview release/loaders/babylon.glTFFileLoader.js

@@ -3481,7 +3481,7 @@ var BABYLON;
                 var name = node.name || "node" + node.index;
                 if (primitives.length === 1) {
                     var primitive = mesh.primitives[0];
-                    promises.push(this._loadMeshPrimitiveAsync(context + "/primitives/" + primitive.index + "}", name, node, mesh, primitive, function (babylonMesh) {
+                    promises.push(this._loadMeshPrimitiveAsync(context + "/primitives/" + primitive.index, name, node, mesh, primitive, function (babylonMesh) {
                         node._babylonTransformNode = babylonMesh;
                     }));
                 }
@@ -3490,7 +3490,7 @@ var BABYLON;
                     node._babylonTransformNode = babylonTransformNode_1;
                     for (var _i = 0, primitives_1 = primitives; _i < primitives_1.length; _i++) {
                         var primitive = primitives_1[_i];
-                        promises.push(this._loadMeshPrimitiveAsync(context + "/primitives/" + primitive.index + "}", name + "_primitive" + primitive.index, node, mesh, primitive, function (babylonMesh) {
+                        promises.push(this._loadMeshPrimitiveAsync(context + "/primitives/" + primitive.index, name + "_primitive" + primitive.index, node, mesh, primitive, function (babylonMesh) {
                             babylonMesh.parent = babylonTransformNode_1;
                             node._primitiveBabylonMeshes = node._primitiveBabylonMeshes || [];
                             node._primitiveBabylonMeshes.push(babylonMesh);

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


+ 2 - 2
dist/preview release/loaders/babylonjs.loaders.js

@@ -4543,7 +4543,7 @@ var BABYLON;
                 var name = node.name || "node" + node.index;
                 if (primitives.length === 1) {
                     var primitive = mesh.primitives[0];
-                    promises.push(this._loadMeshPrimitiveAsync(context + "/primitives/" + primitive.index + "}", name, node, mesh, primitive, function (babylonMesh) {
+                    promises.push(this._loadMeshPrimitiveAsync(context + "/primitives/" + primitive.index, name, node, mesh, primitive, function (babylonMesh) {
                         node._babylonTransformNode = babylonMesh;
                     }));
                 }
@@ -4552,7 +4552,7 @@ var BABYLON;
                     node._babylonTransformNode = babylonTransformNode_1;
                     for (var _i = 0, primitives_1 = primitives; _i < primitives_1.length; _i++) {
                         var primitive = primitives_1[_i];
-                        promises.push(this._loadMeshPrimitiveAsync(context + "/primitives/" + primitive.index + "}", name + "_primitive" + primitive.index, node, mesh, primitive, function (babylonMesh) {
+                        promises.push(this._loadMeshPrimitiveAsync(context + "/primitives/" + primitive.index, name + "_primitive" + primitive.index, node, mesh, primitive, function (babylonMesh) {
                             babylonMesh.parent = babylonTransformNode_1;
                             node._primitiveBabylonMeshes = node._primitiveBabylonMeshes || [];
                             node._primitiveBabylonMeshes.push(babylonMesh);

文件差异内容过多而无法显示
+ 1 - 1
dist/preview release/loaders/babylonjs.loaders.min.js


+ 5 - 43
dist/preview release/viewer/babylon.viewer.d.ts

@@ -168,11 +168,11 @@ declare module BabylonViewer {
                 * Mainly used for help and errors
                 * @param subScreen the name of the subScreen. Those can be defined in the configuration object
                 */
-            showOverlayScreen(subScreen: string): Promise<Template> | Promise<string>;
+            showOverlayScreen(subScreen: string): Promise<string> | Promise<Template>;
             /**
                 * Hide the overlay screen.
                 */
-            hideOverlayScreen(): Promise<Template> | Promise<string>;
+            hideOverlayScreen(): Promise<string> | Promise<Template>;
             /**
                 * show the viewer (in case it was hidden)
                 *
@@ -189,11 +189,11 @@ declare module BabylonViewer {
                 * Show the loading screen.
                 * The loading screen can be configured using the configuration object
                 */
-            showLoadingScreen(): Promise<Template> | Promise<string>;
+            showLoadingScreen(): Promise<string> | Promise<Template>;
             /**
                 * Hide the loading screen
                 */
-            hideLoadingScreen(): Promise<Template> | Promise<string>;
+            hideLoadingScreen(): Promise<string> | Promise<Template>;
             dispose(): void;
             protected _onConfigurationLoaded(configuration: ViewerConfiguration): void;
     }
@@ -924,7 +924,7 @@ declare module BabylonViewer {
       * @param name the name of the custom optimizer configuration
       * @param upgrade set to true if you want to upgrade optimizer and false if you want to degrade
       */
-    export function getCustomOptimizerByName(name: string, upgrade?: boolean): typeof extendedUpgrade;
+    export function getCustomOptimizerByName(name: string, upgrade?: boolean): (sceneManager: SceneManager) => boolean;
     export function registerCustomOptimizer(name: string, optimizer: (sceneManager: SceneManager) => boolean): void;
 }
 declare module BabylonViewer {
@@ -1558,20 +1558,6 @@ declare module BabylonViewer {
     export function addLoaderPlugin(name: string, plugin: ILoaderPlugin): void;
 }
 declare module BabylonViewer {
-    /**
-        * A custom upgrade-oriented function configuration for the scene optimizer.
-        *
-        * @param viewer the viewer to optimize
-        */
-    export function extendedUpgrade(sceneManager: SceneManager): boolean;
-    /**
-        * A custom degrade-oriented function configuration for the scene optimizer.
-        *
-        * @param viewer the viewer to optimize
-        */
-    export function extendedDegrade(sceneManager: SceneManager): boolean;
-}
-declare module BabylonViewer {
 }
 declare module BabylonViewer {
     export interface IEnvironmentMapConfiguration {
@@ -1879,30 +1865,6 @@ 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 {

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


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


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

@@ -200,11 +200,11 @@ declare module 'babylonjs-viewer/viewer/defaultViewer' {
                 * Mainly used for help and errors
                 * @param subScreen the name of the subScreen. Those can be defined in the configuration object
                 */
-            showOverlayScreen(subScreen: string): Promise<Template> | Promise<string>;
+            showOverlayScreen(subScreen: string): Promise<string> | Promise<Template>;
             /**
                 * Hide the overlay screen.
                 */
-            hideOverlayScreen(): Promise<Template> | Promise<string>;
+            hideOverlayScreen(): Promise<string> | Promise<Template>;
             /**
                 * show the viewer (in case it was hidden)
                 *
@@ -221,11 +221,11 @@ declare module 'babylonjs-viewer/viewer/defaultViewer' {
                 * Show the loading screen.
                 * The loading screen can be configured using the configuration object
                 */
-            showLoadingScreen(): Promise<Template> | Promise<string>;
+            showLoadingScreen(): Promise<string> | Promise<Template>;
             /**
                 * Hide the loading screen
                 */
-            hideLoadingScreen(): Promise<Template> | Promise<string>;
+            hideLoadingScreen(): Promise<string> | Promise<Template>;
             dispose(): void;
             protected _onConfigurationLoaded(configuration: ViewerConfiguration): void;
     }
@@ -985,14 +985,13 @@ declare module 'babylonjs-viewer/templating/viewerTemplatePlugin' {
 }
 
 declare module 'babylonjs-viewer/optimizer/custom' {
-    import { extendedUpgrade } from "babylonjs-viewer/optimizer/custom/extended";
     import { SceneManager } from "babylonjs-viewer/managers/sceneManager";
     /**
       *
       * @param name the name of the custom optimizer configuration
       * @param upgrade set to true if you want to upgrade optimizer and false if you want to degrade
       */
-    export function getCustomOptimizerByName(name: string, upgrade?: boolean): typeof extendedUpgrade;
+    export function getCustomOptimizerByName(name: string, upgrade?: boolean): (sceneManager: SceneManager) => boolean;
     export function registerCustomOptimizer(name: string, optimizer: (sceneManager: SceneManager) => boolean): void;
 }
 
@@ -1663,22 +1662,6 @@ declare module 'babylonjs-viewer/loader/plugins' {
     export function addLoaderPlugin(name: string, plugin: ILoaderPlugin): void;
 }
 
-declare module 'babylonjs-viewer/optimizer/custom/extended' {
-    import { SceneManager } from 'babylonjs-viewer/managers/sceneManager';
-    /**
-        * A custom upgrade-oriented function configuration for the scene optimizer.
-        *
-        * @param viewer the viewer to optimize
-        */
-    export function extendedUpgrade(sceneManager: SceneManager): boolean;
-    /**
-        * A custom degrade-oriented function configuration for the scene optimizer.
-        *
-        * @param viewer the viewer to optimize
-        */
-    export function extendedDegrade(sceneManager: SceneManager): boolean;
-}
-
 declare module 'babylonjs-viewer/configuration/interfaces' {
     export * from 'babylonjs-viewer/configuration/interfaces/cameraConfiguration';
     export * from 'babylonjs-viewer/configuration/interfaces/colorGradingConfiguration';
@@ -2030,30 +2013,7 @@ 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' {