David Catuhe 7 سال پیش
والد
کامیت
a8de472f63

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 6878 - 6878
Playground/babylon.d.txt


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 6886 - 6886
dist/preview release/babylon.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 1
dist/preview release/babylon.js


+ 12 - 2
dist/preview release/babylon.max.js

@@ -9284,6 +9284,9 @@ var BABYLON;
          * content of this file is added into a new script element, attached to the DOM (body element)
          */
         Tools.LoadScript = function (scriptUrl, onSuccess, onError) {
+            if (!Tools.IsWindowObjectExist()) {
+                return;
+            }
             var head = document.getElementsByTagName('head')[0];
             var script = document.createElement('script');
             script.type = 'text/javascript';
@@ -33323,6 +33326,9 @@ var BABYLON;
             serializationObject.instances = [];
             for (var index = 0; index < this.instances.length; index++) {
                 var instance = this.instances[index];
+                if (instance.doNotSerialize) {
+                    continue;
+                }
                 var serializationInstance = {
                     name: instance.name,
                     id: instance.id,
@@ -72181,8 +72187,6 @@ var BABYLON;
         };
         FilesInput.prototype.loadFiles = function (event) {
             var _this = this;
-            if (this._startingProcessingFilesCallback)
-                this._startingProcessingFilesCallback();
             // Handling data transfer via drag'n'drop
             if (event && event.dataTransfer && event.dataTransfer.files) {
                 this._filesToLoad = event.dataTransfer.files;
@@ -72191,6 +72195,12 @@ var BABYLON;
             if (event && event.target && event.target.files) {
                 this._filesToLoad = event.target.files;
             }
+            if (!this._filesToLoad || this._filesToLoad.length === 0) {
+                return;
+            }
+            if (this._startingProcessingFilesCallback) {
+                this._startingProcessingFilesCallback(this._filesToLoad);
+            }
             if (this._filesToLoad && this._filesToLoad.length > 0) {
                 var files_1 = new Array();
                 var folders = [];

+ 12 - 2
dist/preview release/babylon.no-module.max.js

@@ -9251,6 +9251,9 @@ var BABYLON;
          * content of this file is added into a new script element, attached to the DOM (body element)
          */
         Tools.LoadScript = function (scriptUrl, onSuccess, onError) {
+            if (!Tools.IsWindowObjectExist()) {
+                return;
+            }
             var head = document.getElementsByTagName('head')[0];
             var script = document.createElement('script');
             script.type = 'text/javascript';
@@ -33290,6 +33293,9 @@ var BABYLON;
             serializationObject.instances = [];
             for (var index = 0; index < this.instances.length; index++) {
                 var instance = this.instances[index];
+                if (instance.doNotSerialize) {
+                    continue;
+                }
                 var serializationInstance = {
                     name: instance.name,
                     id: instance.id,
@@ -72148,8 +72154,6 @@ var BABYLON;
         };
         FilesInput.prototype.loadFiles = function (event) {
             var _this = this;
-            if (this._startingProcessingFilesCallback)
-                this._startingProcessingFilesCallback();
             // Handling data transfer via drag'n'drop
             if (event && event.dataTransfer && event.dataTransfer.files) {
                 this._filesToLoad = event.dataTransfer.files;
@@ -72158,6 +72162,12 @@ var BABYLON;
             if (event && event.target && event.target.files) {
                 this._filesToLoad = event.target.files;
             }
+            if (!this._filesToLoad || this._filesToLoad.length === 0) {
+                return;
+            }
+            if (this._startingProcessingFilesCallback) {
+                this._startingProcessingFilesCallback(this._filesToLoad);
+            }
             if (this._filesToLoad && this._filesToLoad.length > 0) {
                 var files_1 = new Array();
                 var folders = [];

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 1
dist/preview release/babylon.worker.js


+ 12 - 2
dist/preview release/es6.js

@@ -9251,6 +9251,9 @@ var BABYLON;
          * content of this file is added into a new script element, attached to the DOM (body element)
          */
         Tools.LoadScript = function (scriptUrl, onSuccess, onError) {
+            if (!Tools.IsWindowObjectExist()) {
+                return;
+            }
             var head = document.getElementsByTagName('head')[0];
             var script = document.createElement('script');
             script.type = 'text/javascript';
@@ -33290,6 +33293,9 @@ var BABYLON;
             serializationObject.instances = [];
             for (var index = 0; index < this.instances.length; index++) {
                 var instance = this.instances[index];
+                if (instance.doNotSerialize) {
+                    continue;
+                }
                 var serializationInstance = {
                     name: instance.name,
                     id: instance.id,
@@ -72148,8 +72154,6 @@ var BABYLON;
         };
         FilesInput.prototype.loadFiles = function (event) {
             var _this = this;
-            if (this._startingProcessingFilesCallback)
-                this._startingProcessingFilesCallback();
             // Handling data transfer via drag'n'drop
             if (event && event.dataTransfer && event.dataTransfer.files) {
                 this._filesToLoad = event.dataTransfer.files;
@@ -72158,6 +72162,12 @@ var BABYLON;
             if (event && event.target && event.target.files) {
                 this._filesToLoad = event.target.files;
             }
+            if (!this._filesToLoad || this._filesToLoad.length === 0) {
+                return;
+            }
+            if (this._startingProcessingFilesCallback) {
+                this._startingProcessingFilesCallback(this._filesToLoad);
+            }
             if (this._filesToLoad && this._filesToLoad.length > 0) {
                 var files_1 = new Array();
                 var folders = [];

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 2 - 2
dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 1
dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.min.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 2 - 2
dist/preview release/postProcessesLibrary/babylonjs.postProcess.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 1
dist/preview release/postProcessesLibrary/babylonjs.postProcess.min.js


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

@@ -1728,6 +1728,37 @@ declare module BabylonViewer {
     }
 }
 declare module BabylonViewer {
+    export interface ICameraConfiguration {
+        position?: {
+            x: number;
+            y: number;
+            z: number;
+        };
+        rotation?: {
+            x: number;
+            y: number;
+            z: number;
+            w: number;
+        };
+        fov?: number;
+        fovMode?: number;
+        minZ?: number;
+        maxZ?: number;
+        inertia?: number;
+        exposure?: number;
+        pinchPrecision?: number;
+        behaviors?: {
+            [name: string]: boolean | number | ICameraBehaviorConfiguration;
+        };
+        disableCameraControl?: boolean;
+        disableCtrlForPanning?: boolean;
+        disableAutoFocus?: boolean;
+        [propName: string]: any;
+    }
+    export interface ICameraBehaviorConfiguration {
+        type: number;
+        [propName: string]: any;
+    }
 }
 declare module BabylonViewer {
     /**

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 1
dist/preview release/viewer/babylon.viewer.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 1
dist/preview release/viewer/babylon.viewer.max.js


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

@@ -1872,7 +1872,37 @@ declare module 'babylonjs-viewer/loader/plugins/extendedMaterialLoaderPlugin' {
 }
 
 declare module 'babylonjs-viewer/configuration/interfaces/cameraConfiguration' {
-    
+    export interface ICameraConfiguration {
+        position?: {
+            x: number;
+            y: number;
+            z: number;
+        };
+        rotation?: {
+            x: number;
+            y: number;
+            z: number;
+            w: number;
+        };
+        fov?: number;
+        fovMode?: number;
+        minZ?: number;
+        maxZ?: number;
+        inertia?: number;
+        exposure?: number;
+        pinchPrecision?: number;
+        behaviors?: {
+            [name: string]: boolean | number | ICameraBehaviorConfiguration;
+        };
+        disableCameraControl?: boolean;
+        disableCtrlForPanning?: boolean;
+        disableAutoFocus?: boolean;
+        [propName: string]: any;
+    }
+    export interface ICameraBehaviorConfiguration {
+        type: number;
+        [propName: string]: any;
+    }
 }
 
 declare module 'babylonjs-viewer/configuration/interfaces/colorGradingConfiguration' {

+ 1 - 1
localDev/index.html

@@ -77,7 +77,7 @@
                     if (typeof createEngine !== "undefined") {
                         engine = createEngine();
                     } else {
-                        engine = new BABYLON.Engine(canvas, true, { disableTracker: true, stencil: true, disableWebGL2Support: false, preserveDrawingBuffer: true });
+                        engine = new BABYLON.Engine(canvas, true, { stencil: true, disableWebGL2Support: false, preserveDrawingBuffer: true });
                     }
 
                     BABYLONDEVTOOLS.Loader.debugShortcut(engine);

+ 0 - 17
src/Engine/babylon.engine.ts

@@ -193,10 +193,6 @@
          * If this event happens when this parameter is true, you will have to reload the page to restore rendering
          */
         doNotHandleContextLost?: boolean;
-        /**
-         * Defines if the telemetry tracker should be ignored
-         */
-        disableTracker?: boolean;
     }
 
     /**
@@ -1113,19 +1109,6 @@
                 options.stencil = this._gl.getContextAttributes().stencil;
             }
 
-            // Telemetry
-            if (!options.disableTracker || (Tools.IsWindowObjectExist() && location.hostname !== "localhost")) {
-                Tools.LoadScript("https://www.googletagmanager.com/gtag/js?id=UA-41767310-4", () => {
-                    let uncheckedWindow = (<any>window);
-                    uncheckedWindow.dataLayer = uncheckedWindow.dataLayer || [];
-                    function gtag(property: string, value: any) {
-                        uncheckedWindow.dataLayer.push(arguments);
-                    }
-                    gtag('js', new Date());                  
-                    gtag('config', 'UA-41767310-4'); 
-                });
-            }
-
             // Viewport
             var limitDeviceRatio = options.limitDeviceRatio || window.devicePixelRatio || 1.0;
             this._hardwareScalingLevel = adaptToDeviceRatio ? 1.0 / Math.min(limitDeviceRatio, window.devicePixelRatio || 1.0) : 1.0;