Browse Source

update dependencies and built viewer (no minified ATM)

Raanan Weber 7 years ago
parent
commit
37223d100d
4 changed files with 20 additions and 20 deletions
  1. 1 1
      Viewer/dist/basicExample.html
  2. 10 8
      Viewer/dist/viewer.js
  3. 0 2
      Viewer/dist/viewer.min.js
  4. 9 9
      Viewer/package.json

+ 1 - 1
Viewer/dist/basicExample.html

@@ -15,7 +15,7 @@
     </head>
 
     <body>
-        <babylon model="https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/BoomBox/glTF/BoomBox.gltf" default-viewer="true"></babylon>
+        <babylon model="https://ugcorigin.s-microsoft.com/12/2e77b8e3-0000-0000-7a48-6505db2f0ef9/952/1507210650644.gltf" default-viewer="true"></babylon>
         <script src="viewer.js"></script>
     </body>
 

+ 10 - 8
Viewer/dist/viewer.js

@@ -73071,6 +73071,8 @@ var AbstractViewer = (function () {
         window.addEventListener('resize', function () {
             _this.engine.resize();
         });
+        var scale = Math.max(0.5, 1 / (window.devicePixelRatio || 2));
+        this.engine.setHardwareScalingLevel(scale);
         return Promise.resolve(this.engine);
     };
     AbstractViewer.prototype.initScene = function () {
@@ -75866,7 +75868,11 @@ var DefaultViewer = (function (_super) {
         return _super !== null && _super.apply(this, arguments) || this;
     }
     DefaultViewer.prototype.initScene = function () {
-        return _super.prototype.initScene.call(this);
+        var _this = this;
+        return _super.prototype.initScene.call(this).then(function () {
+            _this.scene.createDefaultCameraOrLight(true, true, true);
+            return _this.scene;
+        });
     };
     DefaultViewer.prototype.onTemplatesLoaded = function () {
         this.showLoadingScreen();
@@ -75884,16 +75890,12 @@ var DefaultViewer = (function (_super) {
         this.containerElement.style.display = 'flex';
     };
     DefaultViewer.prototype.initCameras = function () {
-        var camera = new BABYLON.ArcRotateCamera("camera", 4.712, 1.571, 0.05, BABYLON.Vector3.Zero(), this.scene);
-        camera.attachControl(this.engine.getRenderingCanvas(), true);
-        camera.wheelPrecision = 100.0;
-        camera.minZ = 0.01;
-        camera.maxZ = 1000;
-        camera.useFramingBehavior = true;
+        this.scene.imageProcessingConfiguration.exposure = 1.4;
+        this.scene.imageProcessingConfiguration.contrast = 1.66;
+        this.scene.imageProcessingConfiguration.toneMappingEnabled = true;
         return Promise.resolve(this.scene);
     };
     DefaultViewer.prototype.initLights = function () {
-        var light = new babylonjs_1.HemisphericLight("light1", new babylonjs_1.Vector3(0, 1, 0), this.scene);
         return Promise.resolve(this.scene);
     };
     DefaultViewer.prototype.loadModel = function (model) {

File diff suppressed because it is too large
+ 0 - 2
Viewer/dist/viewer.min.js


+ 9 - 9
Viewer/package.json

@@ -22,26 +22,26 @@
     },
     "homepage": "https://github.com/BabylonJS/Babylon.js#readme",
     "devDependencies": {
-        "@types/node": "^8.0.34",
+        "@types/node": "^8.0.44",
         "base64-image-loader": "^1.2.0",
         "html-loader": "^0.5.1",
         "json-loader": "^0.5.7",
         "ts-loader": "^2.3.7",
         "typescript": "^2.5.3",
         "uglifyjs-webpack-plugin": "^1.0.0-beta.3",
-        "webpack": "^3.6.0",
+        "webpack": "^3.8.1",
         "webpack-dev-server": "^2.9.2"
     },
     "dependencies": {
-        "babylonjs": "^3.1.0-alpha3.5",
-        "babylonjs-loaders": "^3.1.0-alpha3.5",
-        "babylonjs-materials": "^3.1.0-alpha3.5",
-        "babylonjs-post-process": "^3.1.0-alpha3.5",
-        "babylonjs-procedural-textures": "^3.1.0-alpha3.5",
+        "babylonjs": "^3.1.0-alpha3.6",
+        "babylonjs-loaders": "^3.1.0-alpha3.6",
+        "babylonjs-materials": "^3.1.0-alpha3.6",
+        "babylonjs-post-process": "^3.1.0-alpha3.6",
+        "babylonjs-procedural-textures": "^3.1.0-alpha3.6",
         "es6-promise": "^4.1.1",
-        "handlebars": "^4.0.10",
+        "handlebars": "^4.0.11",
         "lodash": "^4.17.4",
         "lodash.merge": "^4.6.0",
         "promise-polyfill": "^6.0.2"
     }
-}
+}