Raanan Weber преди 7 години
родител
ревизия
7f57e796f8
променени са 96 файла, в които са добавени 190 реда и са изтрити 3301 реда
  1. 0 15
      Viewer/acorn
  2. 0 7
      Viewer/acorn.cmd
  3. 0 15
      Viewer/ansi-html
  4. 0 7
      Viewer/ansi-html.cmd
  5. 0 15
      Viewer/atob
  6. 0 7
      Viewer/atob.cmd
  7. 1 0
      Viewer/dist/assets/ycone2.babylon
  8. 126 11
      Viewer/dist/basicExample.html
  9. 0 15
      Viewer/errno
  10. 0 7
      Viewer/errno.cmd
  11. 0 15
      Viewer/esparse
  12. 0 7
      Viewer/esparse.cmd
  13. 0 15
      Viewer/esvalidate
  14. 0 7
      Viewer/esvalidate.cmd
  15. 0 15
      Viewer/handlebars
  16. 0 7
      Viewer/handlebars.cmd
  17. 0 15
      Viewer/he
  18. 0 7
      Viewer/he.cmd
  19. 0 15
      Viewer/html-minifier
  20. 0 7
      Viewer/html-minifier.cmd
  21. 0 15
      Viewer/import-local-fixture
  22. 0 7
      Viewer/import-local-fixture.cmd
  23. 0 15
      Viewer/internal-ip
  24. 0 7
      Viewer/internal-ip.cmd
  25. 0 15
      Viewer/json5
  26. 0 7
      Viewer/json5.cmd
  27. 0 15
      Viewer/miller-rabin
  28. 0 7
      Viewer/miller-rabin.cmd
  29. 0 15
      Viewer/mime
  30. 0 7
      Viewer/mime.cmd
  31. 0 15
      Viewer/mkdirp
  32. 0 7
      Viewer/mkdirp.cmd
  33. 0 15
      Viewer/multicast-dns
  34. 0 7
      Viewer/multicast-dns.cmd
  35. 0 15
      Viewer/rimraf
  36. 0 7
      Viewer/rimraf.cmd
  37. 0 15
      Viewer/semver
  38. 0 7
      Viewer/semver.cmd
  39. 0 15
      Viewer/sha.js
  40. 0 7
      Viewer/sha.js.cmd
  41. 0 532
      Viewer/src/configuration/configuration.d.ts
  42. 0 8
      Viewer/src/configuration/configurationCompatibility.d.ts
  43. 0 5
      Viewer/src/configuration/globals.d.ts
  44. 0 1
      Viewer/src/configuration/index.d.ts
  45. 0 26
      Viewer/src/configuration/loader.d.ts
  46. 0 42
      Viewer/src/configuration/mappers.d.ts
  47. 0 6
      Viewer/src/configuration/types/default.d.ts
  48. 0 5
      Viewer/src/configuration/types/environmentMap.d.ts
  49. 0 6
      Viewer/src/configuration/types/extended.d.ts
  50. 0 13
      Viewer/src/configuration/types/index.d.ts
  51. 0 6
      Viewer/src/configuration/types/minimal.d.ts
  52. 0 9
      Viewer/src/configuration/types/shadowLight.d.ts
  53. 0 35
      Viewer/src/eventManager.d.ts
  54. 0 24
      Viewer/src/helper.d.ts
  55. 0 28
      Viewer/src/index.d.ts
  56. 0 11
      Viewer/src/initializer.d.ts
  57. 0 5
      Viewer/src/interfaces.d.ts
  58. 0 126
      Viewer/src/labs/environmentSerializer.d.ts
  59. 0 181
      Viewer/src/labs/texture.d.ts
  60. 0 50
      Viewer/src/labs/viewerLabs.d.ts
  61. 0 40
      Viewer/src/loader/modelLoader.d.ts
  62. 0 11
      Viewer/src/loader/plugins/applyMaterialConfig.d.ts
  63. 0 9
      Viewer/src/loader/plugins/extendedMaterialLoaderPlugin.d.ts
  64. 0 8
      Viewer/src/loader/plugins/index.d.ts
  65. 0 20
      Viewer/src/loader/plugins/loaderPlugin.d.ts
  66. 0 11
      Viewer/src/loader/plugins/minecraftLoaderPlugin.d.ts
  67. 0 12
      Viewer/src/loader/plugins/msftLodLoaderPlugin.d.ts
  68. 0 12
      Viewer/src/loader/plugins/telemetryLoaderPlugin.d.ts
  69. 0 212
      Viewer/src/model/modelAnimation.d.ts
  70. 0 31
      Viewer/src/model/modelLoader.d.ts
  71. 0 222
      Viewer/src/model/viewerModel.d.ts
  72. 0 13
      Viewer/src/optimizer/custom/extended.d.ts
  73. 0 7
      Viewer/src/optimizer/custom/index.d.ts
  74. 0 57
      Viewer/src/telemetryManager.d.ts
  75. 0 252
      Viewer/src/templateManager.d.ts
  76. 0 104
      Viewer/src/viewer/defaultViewer.d.ts
  77. 0 206
      Viewer/src/viewer/sceneManager.d.ts
  78. 0 233
      Viewer/src/viewer/viewer.d.ts
  79. 0 55
      Viewer/src/viewer/viewerManager.d.ts
  80. 0 15
      Viewer/strip-indent
  81. 0 7
      Viewer/strip-indent.cmd
  82. 0 15
      Viewer/tsc
  83. 0 7
      Viewer/tsc.cmd
  84. 0 15
      Viewer/tsserver
  85. 0 7
      Viewer/tsserver.cmd
  86. 0 15
      Viewer/uglifyjs
  87. 0 7
      Viewer/uglifyjs.cmd
  88. 0 15
      Viewer/uuid
  89. 0 7
      Viewer/uuid.cmd
  90. 0 15
      Viewer/webpack
  91. 0 15
      Viewer/webpack-dev-server
  92. 0 7
      Viewer/webpack-dev-server.cmd
  93. 0 7
      Viewer/webpack.cmd
  94. 63 62
      Viewer/webpack.config.js
  95. 0 15
      Viewer/which
  96. 0 7
      Viewer/which.cmd

+ 0 - 15
Viewer/acorn

@@ -1,15 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
-    *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
-esac
-
-if [ -x "$basedir/node" ]; then
-  "$basedir/node"  "$basedir/node_modules/acorn/bin/acorn" "$@"
-  ret=$?
-else 
-  node  "$basedir/node_modules/acorn/bin/acorn" "$@"
-  ret=$?
-fi
-exit $ret

+ 0 - 7
Viewer/acorn.cmd

@@ -1,7 +0,0 @@
-@IF EXIST "%~dp0\node.exe" (
-  "%~dp0\node.exe"  "%~dp0\node_modules\acorn\bin\acorn" %*
-) ELSE (
-  @SETLOCAL
-  @SET PATHEXT=%PATHEXT:;.JS;=;%
-  node  "%~dp0\node_modules\acorn\bin\acorn" %*
-)

+ 0 - 15
Viewer/ansi-html

@@ -1,15 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
-    *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
-esac
-
-if [ -x "$basedir/node" ]; then
-  "$basedir/node"  "$basedir/node_modules/ansi-html/bin/ansi-html" "$@"
-  ret=$?
-else 
-  node  "$basedir/node_modules/ansi-html/bin/ansi-html" "$@"
-  ret=$?
-fi
-exit $ret

+ 0 - 7
Viewer/ansi-html.cmd

@@ -1,7 +0,0 @@
-@IF EXIST "%~dp0\node.exe" (
-  "%~dp0\node.exe"  "%~dp0\node_modules\ansi-html\bin\ansi-html" %*
-) ELSE (
-  @SETLOCAL
-  @SET PATHEXT=%PATHEXT:;.JS;=;%
-  node  "%~dp0\node_modules\ansi-html\bin\ansi-html" %*
-)

+ 0 - 15
Viewer/atob

@@ -1,15 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
-    *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
-esac
-
-if [ -x "$basedir/node" ]; then
-  "$basedir/node"  "$basedir/node_modules/atob/bin/atob.js" "$@"
-  ret=$?
-else 
-  node  "$basedir/node_modules/atob/bin/atob.js" "$@"
-  ret=$?
-fi
-exit $ret

+ 0 - 7
Viewer/atob.cmd

@@ -1,7 +0,0 @@
-@IF EXIST "%~dp0\node.exe" (
-  "%~dp0\node.exe"  "%~dp0\node_modules\atob\bin\atob.js" %*
-) ELSE (
-  @SETLOCAL
-  @SET PATHEXT=%PATHEXT:;.JS;=;%
-  node  "%~dp0\node_modules\atob\bin\atob.js" %*
-)

Файловите разлики са ограничени, защото са твърде много
+ 1 - 0
Viewer/dist/assets/ycone2.babylon


+ 126 - 11
Viewer/dist/basicExample.html

@@ -7,28 +7,143 @@
         <meta http-equiv="X-UA-Compatible" content="ie=edge">
         <title>BabylonJS Viewer - Basic usage</title>
         <style>
-            babylon {
-                max-width: 800px;
-                max-height: 500px;
-                width: 100%;
-                height: 600px;
-            }
         </style>
     </head>
 
     <body>
-        <babylon id="babylon-viewer" configuration="config.json" model.title="Damaged Helmet" model.subtitle="BabylonJS" model.thumbnail="https://www.babylonjs.com/img/favicon/apple-icon-144x144.png"
-            model.url="https://www.babylonjs.com/Assets/DamagedHelmet/glTF/DamagedHelmet.gltf" camera.behaviors.auto-rotate="0"
-            templates.nav-bar.params.disable-on-fullscreen="true"></babylon>
+        <!-- <babylon>
+            <model normalize.unit-size="true" title="Modèle 3D" subtitle="DS STEEL" thumbnail="http://strains.fr/wp-content/uploads/2018/01/icon_3D-DESIGN.png"
+                url="/assets/ycone2.babylon">
+            </model>
+            <camera behaviors.auto-rotate="0">
+            </camera>
+            <templates nav-bar="false" overlay="false" loading-screen="false"></templates>
+        </babylon> -->
+
+        <babylon id="viewer" templates.main.params.fill-screen="true" templates.loading-screen="false" extends="extended" model.loader=".gltf"></babylon>
+        <div id="viewport" touch-action="none"></div>
         <script src="viewer.js"></script>
         <script>
             // The following lines are redundant. 
             // They are only here to show how you could achive the tag initialization on your own.
 
             // a simple way of disabling auto init 
-            BabylonViewer.disableInit = true;
+            // BabylonViewer.viewerGlobals.disableInit = true;
             // Initializing the viewer on specific HTML tags.
-            BabylonViewer.InitTags('babylon');
+            //BabylonViewer.InitTags('babylon');
+
+            // this model - https://ugcorigin.s-microsoft.com/18/g009sv831rsm/953/003/004/08586805844133072215834575026/1521022566175.gltf
+            // has a problem with its materials / texures. should be rendered only after onComplete
+
+
+            // https://babylonjs.com/Assets/FlightHelmet/glTF/FlightHelmet_Materials.gltf
+            /*var config = {
+                extends: 'extended',
+                model: {
+                    url: "https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/Duck/glTF/Duck.gltf",
+                },
+                templates: {
+                    loadingScreen: false
+                },
+                camera: {
+                    behaviors: {
+                        autoRotate: false,
+                        framing: false,
+                        bouncing: false
+                    }
+                },
+                engine: {
+                    disableResize: true
+                }
+            }*/
+
+            var config = {
+                extends: 'extended',
+                // configuration: "./assets/environment/config.json",
+                model: {
+                    url: "https://babylonjs.com/Assets/FlightHelmet/glTF/FlightHelmet_Materials.gltf",
+                },
+                templates: {
+                    main: {
+                        params: {
+                            fillScreen: true
+                        }
+                    }
+                },
+                lab: {
+                    assetsRootURL: "./assets/environment/"
+                }
+            }
+            // create viewer
+            var viewerElement = document.getElementById("viewport");
+            // var viewer = new BabylonViewer.DefaultViewer(viewerElement, config);
+            /*viewer.onModelLoadedObservable.add(() => {
+                //viewer.engine.setHardwareScalingLevel(0.5);
+                var canvas = viewer.engine.getRenderingCanvas();
+                var filesInput = new BABYLON.FilesInput(viewer.engine, null, canvas, null);
+                filesInput._onReloadCallback = function (modelFile) {
+                    viewer.loadModel(modelFile, true);
+                };
+                filesInput.monitorElementForDragNDrop(canvas);
+            });*/
+
+            /*viewer.onInitDoneObservable.add(() => {
+
+            });*/
+
+            BabylonViewer.viewerManager.getViewerPromiseById("viewer").then((viewer) => {
+                viewer.onInitDoneObservable.add(() => {
+
+                })
+
+                document.addEventListener("keyup", (evt) => {
+                    if (evt.key === 'l')
+                        viewer.initModel("https://api.remix3d.com/v3/creations/0000000900000000801e172a00000000/gltf/streams/manifest?parameters=eyJmb3JtYXQiOiJHTFRGIiwiY2xpZW50Ijoid2ViIiwidXNhZ2UiOiJWaWV3In01");
+                    if (evt.key === 'a') {
+                        viewer.updateConfiguration({
+                            camera: {
+                                behaviors: {
+                                    autoRotate: false
+                                }
+                            }
+                        })
+                    }
+                    if (evt.key === 'p') {
+                        viewer.updateConfiguration({
+                            camera: {
+                                panningSensibility: 0
+                            }
+                        })
+                    }
+                    if (evt.key === 't') {
+                        viewer.updateConfiguration()
+                    }
+                    if (evt.key === 'r') {
+                        //viewer.sceneManager.scene.registerBeforeRender(() => {
+                        viewer.updateConfiguration({
+                            lab: {
+                                globalLightRotation: 0.01
+                            }
+                        })
+                        //});
+                    }
+                    if (evt.key === 'd') {
+                        viewer.sceneManager.scene.debugLayer.show();
+                    }
+                });
+            })
+
+            // create viewer
+            //var viewerElement = document.getElementById("viewport");
+
+            /*let config = {
+                // any other configuration you already have
+                model: {
+                    loader: '.gltf'
+                }
+            }
+            let viewer = new BabylonViewer.DefaultViewer(viewerElement, config);*/
+
         </script>
     </body>
 

+ 0 - 15
Viewer/errno

@@ -1,15 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
-    *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
-esac
-
-if [ -x "$basedir/node" ]; then
-  "$basedir/node"  "$basedir/node_modules/errno/cli.js" "$@"
-  ret=$?
-else 
-  node  "$basedir/node_modules/errno/cli.js" "$@"
-  ret=$?
-fi
-exit $ret

+ 0 - 7
Viewer/errno.cmd

@@ -1,7 +0,0 @@
-@IF EXIST "%~dp0\node.exe" (
-  "%~dp0\node.exe"  "%~dp0\node_modules\errno\cli.js" %*
-) ELSE (
-  @SETLOCAL
-  @SET PATHEXT=%PATHEXT:;.JS;=;%
-  node  "%~dp0\node_modules\errno\cli.js" %*
-)

+ 0 - 15
Viewer/esparse

@@ -1,15 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
-    *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
-esac
-
-if [ -x "$basedir/node" ]; then
-  "$basedir/node"  "$basedir/node_modules/esprima/bin/esparse.js" "$@"
-  ret=$?
-else 
-  node  "$basedir/node_modules/esprima/bin/esparse.js" "$@"
-  ret=$?
-fi
-exit $ret

+ 0 - 7
Viewer/esparse.cmd

@@ -1,7 +0,0 @@
-@IF EXIST "%~dp0\node.exe" (
-  "%~dp0\node.exe"  "%~dp0\node_modules\esprima\bin\esparse.js" %*
-) ELSE (
-  @SETLOCAL
-  @SET PATHEXT=%PATHEXT:;.JS;=;%
-  node  "%~dp0\node_modules\esprima\bin\esparse.js" %*
-)

+ 0 - 15
Viewer/esvalidate

@@ -1,15 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
-    *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
-esac
-
-if [ -x "$basedir/node" ]; then
-  "$basedir/node"  "$basedir/node_modules/esprima/bin/esvalidate.js" "$@"
-  ret=$?
-else 
-  node  "$basedir/node_modules/esprima/bin/esvalidate.js" "$@"
-  ret=$?
-fi
-exit $ret

+ 0 - 7
Viewer/esvalidate.cmd

@@ -1,7 +0,0 @@
-@IF EXIST "%~dp0\node.exe" (
-  "%~dp0\node.exe"  "%~dp0\node_modules\esprima\bin\esvalidate.js" %*
-) ELSE (
-  @SETLOCAL
-  @SET PATHEXT=%PATHEXT:;.JS;=;%
-  node  "%~dp0\node_modules\esprima\bin\esvalidate.js" %*
-)

+ 0 - 15
Viewer/handlebars

@@ -1,15 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
-    *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
-esac
-
-if [ -x "$basedir/node" ]; then
-  "$basedir/node"  "$basedir/node_modules/handlebars/bin/handlebars" "$@"
-  ret=$?
-else 
-  node  "$basedir/node_modules/handlebars/bin/handlebars" "$@"
-  ret=$?
-fi
-exit $ret

+ 0 - 7
Viewer/handlebars.cmd

@@ -1,7 +0,0 @@
-@IF EXIST "%~dp0\node.exe" (
-  "%~dp0\node.exe"  "%~dp0\node_modules\handlebars\bin\handlebars" %*
-) ELSE (
-  @SETLOCAL
-  @SET PATHEXT=%PATHEXT:;.JS;=;%
-  node  "%~dp0\node_modules\handlebars\bin\handlebars" %*
-)

+ 0 - 15
Viewer/he

@@ -1,15 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
-    *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
-esac
-
-if [ -x "$basedir/node" ]; then
-  "$basedir/node"  "$basedir/node_modules/he/bin/he" "$@"
-  ret=$?
-else 
-  node  "$basedir/node_modules/he/bin/he" "$@"
-  ret=$?
-fi
-exit $ret

+ 0 - 7
Viewer/he.cmd

@@ -1,7 +0,0 @@
-@IF EXIST "%~dp0\node.exe" (
-  "%~dp0\node.exe"  "%~dp0\node_modules\he\bin\he" %*
-) ELSE (
-  @SETLOCAL
-  @SET PATHEXT=%PATHEXT:;.JS;=;%
-  node  "%~dp0\node_modules\he\bin\he" %*
-)

+ 0 - 15
Viewer/html-minifier

@@ -1,15 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
-    *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
-esac
-
-if [ -x "$basedir/node" ]; then
-  "$basedir/node"  "$basedir/node_modules/html-minifier/cli.js" "$@"
-  ret=$?
-else 
-  node  "$basedir/node_modules/html-minifier/cli.js" "$@"
-  ret=$?
-fi
-exit $ret

+ 0 - 7
Viewer/html-minifier.cmd

@@ -1,7 +0,0 @@
-@IF EXIST "%~dp0\node.exe" (
-  "%~dp0\node.exe"  "%~dp0\node_modules\html-minifier\cli.js" %*
-) ELSE (
-  @SETLOCAL
-  @SET PATHEXT=%PATHEXT:;.JS;=;%
-  node  "%~dp0\node_modules\html-minifier\cli.js" %*
-)

+ 0 - 15
Viewer/import-local-fixture

@@ -1,15 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
-    *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
-esac
-
-if [ -x "$basedir/node" ]; then
-  "$basedir/node"  "$basedir/node_modules/import-local/fixtures/cli.js" "$@"
-  ret=$?
-else 
-  node  "$basedir/node_modules/import-local/fixtures/cli.js" "$@"
-  ret=$?
-fi
-exit $ret

+ 0 - 7
Viewer/import-local-fixture.cmd

@@ -1,7 +0,0 @@
-@IF EXIST "%~dp0\node.exe" (
-  "%~dp0\node.exe"  "%~dp0\node_modules\import-local\fixtures\cli.js" %*
-) ELSE (
-  @SETLOCAL
-  @SET PATHEXT=%PATHEXT:;.JS;=;%
-  node  "%~dp0\node_modules\import-local\fixtures\cli.js" %*
-)

+ 0 - 15
Viewer/internal-ip

@@ -1,15 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
-    *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
-esac
-
-if [ -x "$basedir/node" ]; then
-  "$basedir/node"  "$basedir/node_modules/internal-ip/cli.js" "$@"
-  ret=$?
-else 
-  node  "$basedir/node_modules/internal-ip/cli.js" "$@"
-  ret=$?
-fi
-exit $ret

+ 0 - 7
Viewer/internal-ip.cmd

@@ -1,7 +0,0 @@
-@IF EXIST "%~dp0\node.exe" (
-  "%~dp0\node.exe"  "%~dp0\node_modules\internal-ip\cli.js" %*
-) ELSE (
-  @SETLOCAL
-  @SET PATHEXT=%PATHEXT:;.JS;=;%
-  node  "%~dp0\node_modules\internal-ip\cli.js" %*
-)

+ 0 - 15
Viewer/json5

@@ -1,15 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
-    *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
-esac
-
-if [ -x "$basedir/node" ]; then
-  "$basedir/node"  "$basedir/node_modules/json5/lib/cli.js" "$@"
-  ret=$?
-else 
-  node  "$basedir/node_modules/json5/lib/cli.js" "$@"
-  ret=$?
-fi
-exit $ret

+ 0 - 7
Viewer/json5.cmd

@@ -1,7 +0,0 @@
-@IF EXIST "%~dp0\node.exe" (
-  "%~dp0\node.exe"  "%~dp0\node_modules\json5\lib\cli.js" %*
-) ELSE (
-  @SETLOCAL
-  @SET PATHEXT=%PATHEXT:;.JS;=;%
-  node  "%~dp0\node_modules\json5\lib\cli.js" %*
-)

+ 0 - 15
Viewer/miller-rabin

@@ -1,15 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
-    *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
-esac
-
-if [ -x "$basedir/node" ]; then
-  "$basedir/node"  "$basedir/node_modules/miller-rabin/bin/miller-rabin" "$@"
-  ret=$?
-else 
-  node  "$basedir/node_modules/miller-rabin/bin/miller-rabin" "$@"
-  ret=$?
-fi
-exit $ret

+ 0 - 7
Viewer/miller-rabin.cmd

@@ -1,7 +0,0 @@
-@IF EXIST "%~dp0\node.exe" (
-  "%~dp0\node.exe"  "%~dp0\node_modules\miller-rabin\bin\miller-rabin" %*
-) ELSE (
-  @SETLOCAL
-  @SET PATHEXT=%PATHEXT:;.JS;=;%
-  node  "%~dp0\node_modules\miller-rabin\bin\miller-rabin" %*
-)

+ 0 - 15
Viewer/mime

@@ -1,15 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
-    *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
-esac
-
-if [ -x "$basedir/node" ]; then
-  "$basedir/node"  "$basedir/node_modules/mime/cli.js" "$@"
-  ret=$?
-else 
-  node  "$basedir/node_modules/mime/cli.js" "$@"
-  ret=$?
-fi
-exit $ret

+ 0 - 7
Viewer/mime.cmd

@@ -1,7 +0,0 @@
-@IF EXIST "%~dp0\node.exe" (
-  "%~dp0\node.exe"  "%~dp0\node_modules\mime\cli.js" %*
-) ELSE (
-  @SETLOCAL
-  @SET PATHEXT=%PATHEXT:;.JS;=;%
-  node  "%~dp0\node_modules\mime\cli.js" %*
-)

+ 0 - 15
Viewer/mkdirp

@@ -1,15 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
-    *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
-esac
-
-if [ -x "$basedir/node" ]; then
-  "$basedir/node"  "$basedir/node_modules/mkdirp/bin/cmd.js" "$@"
-  ret=$?
-else 
-  node  "$basedir/node_modules/mkdirp/bin/cmd.js" "$@"
-  ret=$?
-fi
-exit $ret

+ 0 - 7
Viewer/mkdirp.cmd

@@ -1,7 +0,0 @@
-@IF EXIST "%~dp0\node.exe" (
-  "%~dp0\node.exe"  "%~dp0\node_modules\mkdirp\bin\cmd.js" %*
-) ELSE (
-  @SETLOCAL
-  @SET PATHEXT=%PATHEXT:;.JS;=;%
-  node  "%~dp0\node_modules\mkdirp\bin\cmd.js" %*
-)

+ 0 - 15
Viewer/multicast-dns

@@ -1,15 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
-    *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
-esac
-
-if [ -x "$basedir/node" ]; then
-  "$basedir/node"  "$basedir/node_modules/multicast-dns/cli.js" "$@"
-  ret=$?
-else 
-  node  "$basedir/node_modules/multicast-dns/cli.js" "$@"
-  ret=$?
-fi
-exit $ret

+ 0 - 7
Viewer/multicast-dns.cmd

@@ -1,7 +0,0 @@
-@IF EXIST "%~dp0\node.exe" (
-  "%~dp0\node.exe"  "%~dp0\node_modules\multicast-dns\cli.js" %*
-) ELSE (
-  @SETLOCAL
-  @SET PATHEXT=%PATHEXT:;.JS;=;%
-  node  "%~dp0\node_modules\multicast-dns\cli.js" %*
-)

+ 0 - 15
Viewer/rimraf

@@ -1,15 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
-    *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
-esac
-
-if [ -x "$basedir/node" ]; then
-  "$basedir/node"  "$basedir/node_modules/rimraf/bin.js" "$@"
-  ret=$?
-else 
-  node  "$basedir/node_modules/rimraf/bin.js" "$@"
-  ret=$?
-fi
-exit $ret

+ 0 - 7
Viewer/rimraf.cmd

@@ -1,7 +0,0 @@
-@IF EXIST "%~dp0\node.exe" (
-  "%~dp0\node.exe"  "%~dp0\node_modules\rimraf\bin.js" %*
-) ELSE (
-  @SETLOCAL
-  @SET PATHEXT=%PATHEXT:;.JS;=;%
-  node  "%~dp0\node_modules\rimraf\bin.js" %*
-)

+ 0 - 15
Viewer/semver

@@ -1,15 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
-    *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
-esac
-
-if [ -x "$basedir/node" ]; then
-  "$basedir/node"  "$basedir/node_modules/semver/bin/semver" "$@"
-  ret=$?
-else 
-  node  "$basedir/node_modules/semver/bin/semver" "$@"
-  ret=$?
-fi
-exit $ret

+ 0 - 7
Viewer/semver.cmd

@@ -1,7 +0,0 @@
-@IF EXIST "%~dp0\node.exe" (
-  "%~dp0\node.exe"  "%~dp0\node_modules\semver\bin\semver" %*
-) ELSE (
-  @SETLOCAL
-  @SET PATHEXT=%PATHEXT:;.JS;=;%
-  node  "%~dp0\node_modules\semver\bin\semver" %*
-)

+ 0 - 15
Viewer/sha.js

@@ -1,15 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
-    *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
-esac
-
-if [ -x "$basedir/node" ]; then
-  "$basedir/node"  "$basedir/node_modules/sha.js/bin.js" "$@"
-  ret=$?
-else 
-  node  "$basedir/node_modules/sha.js/bin.js" "$@"
-  ret=$?
-fi
-exit $ret

+ 0 - 7
Viewer/sha.js.cmd

@@ -1,7 +0,0 @@
-@IF EXIST "%~dp0\node.exe" (
-  "%~dp0\node.exe"  "%~dp0\node_modules\sha.js\bin.js" %*
-) ELSE (
-  @SETLOCAL
-  @SET PATHEXT=%PATHEXT:;.JS;=;%
-  node  "%~dp0\node_modules\sha.js\bin.js" %*
-)

+ 0 - 532
Viewer/src/configuration/configuration.d.ts

@@ -1,532 +0,0 @@
-import { ITemplateConfiguration } from './../templateManager';
-import { EngineOptions, IGlowLayerOptions, DepthOfFieldEffectBlurLevel } from 'babylonjs';
-export declare function getConfigurationKey(key: string, configObject: any): any;
-export interface ViewerConfiguration {
-    version?: string;
-    extends?: string;
-    pageUrl?: string;
-    configuration?: string | {
-        url?: string;
-        payload?: any;
-        mapper?: string;
-    };
-    observers?: IObserversConfiguration;
-    canvasElement?: string;
-    model?: IModelConfiguration | string;
-    scene?: ISceneConfiguration;
-    optimizer?: ISceneOptimizerConfiguration | boolean;
-    camera?: ICameraConfiguration;
-    skybox?: boolean | ISkyboxConfiguration;
-    ground?: boolean | IGroundConfiguration;
-    lights?: {
-        [name: string]: number | boolean | ILightConfiguration;
-    };
-    engine?: {
-        renderInBackground?: boolean;
-        antialiasing?: boolean;
-        disableResize?: boolean;
-        engineOptions?: EngineOptions;
-        adaptiveQuality?: boolean;
-    };
-    templates?: {
-        main: ITemplateConfiguration;
-        [key: string]: ITemplateConfiguration;
-    };
-    customShaders?: {
-        shaders?: {
-            [key: string]: string;
-        };
-        includes?: {
-            [key: string]: string;
-        };
-    };
-    loaderPlugins?: {
-        extendedMaterial?: boolean;
-        msftLod?: boolean;
-        telemetry?: boolean;
-        minecraft?: boolean;
-        [propName: string]: boolean | undefined;
-    };
-    lab?: {
-        flashlight?: boolean | {
-            exponent?: number;
-            angle?: number;
-            intensity?: number;
-            diffuse?: {
-                r: number;
-                g: number;
-                b: number;
-            };
-            specular?: {
-                r: number;
-                g: number;
-                b: number;
-            };
-        };
-        hideLoadingDelay?: number;
-        assetsRootURL?: string;
-        environmentMainColor?: {
-            r: number;
-            g: number;
-            b: number;
-        };
-        environmentMap?: {
-            /**
-             * Environment map texture path in relative to the asset folder.
-             */
-            texture: string;
-            /**
-             * Default rotation to apply to the environment map.
-             */
-            rotationY: number;
-            /**
-             * Tint level of the main color on the environment map.
-             */
-            tintLevel: number;
-        };
-        defaultRenderingPipelines?: boolean | IDefaultRenderingPipelineConfiguration;
-        globalLightRotation?: number;
-    };
-}
-/**
- * Defines an animation to be applied to a model (translation, scale or rotation).
- */
-export interface IModelAnimationConfiguration {
-    /**
-     * Time of animation, in seconds
-     */
-    time?: number;
-    /**
-     * Scale to apply
-     */
-    scaling?: {
-        x: number;
-        y: number;
-        z: number;
-    };
-    /**
-     * Easing function to apply
-     * See SPECTRE.EasingFunction
-     */
-    easingFunction?: number;
-    /**
-     * An Easing mode to apply to the easing function
-     * See BABYLON.EasingFunction
-     */
-    easingMode?: number;
-}
-export interface IDefaultRenderingPipelineConfiguration {
-    sharpenEnabled?: boolean;
-    bloomEnabled?: boolean;
-    bloomThreshold?: number;
-    depthOfFieldEnabled?: boolean;
-    depthOfFieldBlurLevel?: DepthOfFieldEffectBlurLevel;
-    fxaaEnabled?: boolean;
-    imageProcessingEnabled?: boolean;
-    defaultPipelineTextureType?: number;
-    bloomScale?: number;
-    chromaticAberrationEnabled?: boolean;
-    grainEnabled?: boolean;
-    bloomKernel?: number;
-    hardwareScaleLevel?: number;
-    bloomWeight?: number;
-    hdr?: boolean;
-    samples?: number;
-    glowLayerEnabled?: boolean;
-}
-export interface IModelConfiguration {
-    id?: string;
-    url?: string;
-    root?: string;
-    file?: string | File;
-    loader?: string;
-    position?: {
-        x: number;
-        y: number;
-        z: number;
-    };
-    rotation?: {
-        x: number;
-        y: number;
-        z: number;
-        w?: number;
-    };
-    scaling?: {
-        x: number;
-        y: number;
-        z: number;
-    };
-    parentObjectIndex?: number;
-    castShadow?: boolean;
-    receiveShadows?: boolean;
-    normalize?: boolean | {
-        center?: boolean;
-        unitSize?: boolean;
-        parentIndex?: number;
-    };
-    title?: string;
-    subtitle?: string;
-    thumbnail?: string;
-    animation?: {
-        autoStart?: boolean | string;
-        playOnce?: boolean;
-        autoStartIndex?: number;
-    };
-    entryAnimation?: IModelAnimationConfiguration;
-    exitAnimation?: IModelAnimationConfiguration;
-    material?: {
-        directEnabled?: boolean;
-        directIntensity?: number;
-        emissiveIntensity?: number;
-        environmentIntensity?: number;
-        [propName: string]: any;
-    };
-    /**
-     * Rotation offset axis definition
-     */
-    rotationOffsetAxis?: {
-        x: number;
-        y: number;
-        z: number;
-    };
-    /**
-     * the offset angle
-     */
-    rotationOffsetAngle?: number;
-    loaderConfiguration?: {
-        maxLODsToLoad?: number;
-        progressiveLoading?: boolean;
-    };
-}
-export interface ISkyboxConfiguration {
-    cubeTexture?: {
-        noMipMap?: boolean;
-        gammaSpace?: boolean;
-        url?: string | Array<string>;
-    };
-    color?: {
-        r: number;
-        g: number;
-        b: number;
-    };
-    pbr?: boolean;
-    scale?: number;
-    blur?: number;
-    material?: {
-        imageProcessingConfiguration?: IImageProcessingConfiguration;
-        [propName: string]: any;
-    };
-    infiniteDistance?: boolean;
-}
-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;
-    };
-}
-export interface ISceneConfiguration {
-    debug?: boolean;
-    clearColor?: {
-        r: number;
-        g: number;
-        b: number;
-        a: number;
-    };
-    mainColor?: {
-        r?: number;
-        g?: number;
-        b?: number;
-    };
-    imageProcessingConfiguration?: IImageProcessingConfiguration;
-    environmentTexture?: string;
-    colorGrading?: IColorGradingConfiguration;
-    environmentRotationY?: number;
-    /**
-     * Deprecated, please use default rendering pipeline
-     */
-    glow?: boolean | IGlowLayerOptions;
-    disableHdr?: boolean;
-    renderInBackground?: boolean;
-    disableCameraControl?: boolean;
-    animationPropertiesOverride?: {
-        [propName: string]: any;
-    };
-    defaultMaterial?: {
-        materialType: "standard" | "pbr";
-        [propName: string]: any;
-    };
-    flags?: {
-        shadowsEnabled?: boolean;
-        particlesEnabled?: boolean;
-        collisionsEnabled?: boolean;
-        lightsEnabled?: boolean;
-        texturesEnabled?: boolean;
-        lensFlaresEnabled?: boolean;
-        proceduralTexturesEnabled?: boolean;
-        renderTargetsEnabled?: boolean;
-        spritesEnabled?: boolean;
-        skeletonsEnabled?: boolean;
-        audioEnabled?: boolean;
-    };
-}
-/**
- * The Color Grading Configuration groups the different settings used to define the color grading used in the viewer.
- */
-export interface IColorGradingConfiguration {
-    /**
-     * Transform data string, encoded as determined by transformDataFormat.
-     */
-    transformData: string;
-    /**
-     * The encoding format of TransformData (currently only raw-base16 is supported).
-     */
-    transformDataFormat: string;
-    /**
-     * The weight of the transform
-     */
-    transformWeight: number;
-    /**
-     * Color curve colorFilterHueGlobal value
-     */
-    colorFilterHueGlobal: number;
-    /**
-     * Color curve colorFilterHueShadows value
-     */
-    colorFilterHueShadows: number;
-    /**
-     * Color curve colorFilterHueMidtones value
-     */
-    colorFilterHueMidtones: number;
-    /**
-     * Color curve colorFilterHueHighlights value
-     */
-    colorFilterHueHighlights: number;
-    /**
-     * Color curve colorFilterDensityGlobal value
-     */
-    colorFilterDensityGlobal: number;
-    /**
-     * Color curve colorFilterDensityShadows value
-     */
-    colorFilterDensityShadows: number;
-    /**
-     * Color curve colorFilterDensityMidtones value
-     */
-    colorFilterDensityMidtones: number;
-    /**
-     * Color curve colorFilterDensityHighlights value
-     */
-    colorFilterDensityHighlights: number;
-    /**
-     * Color curve saturationGlobal value
-     */
-    saturationGlobal: number;
-    /**
-     * Color curve saturationShadows value
-     */
-    saturationShadows: number;
-    /**
-     * Color curve saturationMidtones value
-     */
-    saturationMidtones: number;
-    /**
-     * Color curve saturationHighlights value
-     */
-    saturationHighlights: number;
-    /**
-     * Color curve exposureGlobal value
-     */
-    exposureGlobal: number;
-    /**
-     * Color curve exposureShadows value
-     */
-    exposureShadows: number;
-    /**
-     * Color curve exposureMidtones value
-     */
-    exposureMidtones: number;
-    /**
-     * Color curve exposureHighlights value
-     */
-    exposureHighlights: number;
-}
-export interface ISceneOptimizerConfiguration {
-    targetFrameRate?: number;
-    trackerDuration?: number;
-    autoGeneratePriorities?: boolean;
-    improvementMode?: boolean;
-    degradation?: string;
-    types?: {
-        texture?: ISceneOptimizerParameters;
-        hardwareScaling?: ISceneOptimizerParameters;
-        shadow?: ISceneOptimizerParameters;
-        postProcess?: ISceneOptimizerParameters;
-        lensFlare?: ISceneOptimizerParameters;
-        particles?: ISceneOptimizerParameters;
-        renderTarget?: ISceneOptimizerParameters;
-        mergeMeshes?: ISceneOptimizerParameters;
-    };
-    custom?: string;
-}
-export interface IObserversConfiguration {
-    onEngineInit?: string;
-    onSceneInit?: string;
-    onModelLoaded?: string;
-}
-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;
-}
-export interface ILightConfiguration {
-    type: number;
-    name?: string;
-    disabled?: boolean;
-    position?: {
-        x: number;
-        y: number;
-        z: number;
-    };
-    target?: {
-        x: number;
-        y: number;
-        z: number;
-    };
-    direction?: {
-        x: number;
-        y: number;
-        z: number;
-    };
-    diffuse?: {
-        r: number;
-        g: number;
-        b: number;
-    };
-    specular?: {
-        r: number;
-        g: number;
-        b: number;
-    };
-    intensity?: number;
-    intensityMode?: number;
-    radius?: number;
-    shadownEnabled?: boolean;
-    shadowConfig?: {
-        useBlurExponentialShadowMap?: boolean;
-        useBlurCloseExponentialShadowMap?: boolean;
-        useKernelBlur?: boolean;
-        blurKernel?: number;
-        blurScale?: number;
-        minZ?: number;
-        maxZ?: number;
-        frustumSize?: number;
-        angleScale?: number;
-        frustumEdgeFalloff?: number;
-        [propName: string]: any;
-    };
-    spotAngle?: number;
-    shadowFieldOfView?: number;
-    shadowBufferSize?: number;
-    shadowFrustumSize?: number;
-    shadowMinZ?: number;
-    shadowMaxZ?: number;
-    [propName: string]: any;
-    behaviors?: {
-        [name: string]: number | {
-            type: number;
-            [propName: string]: any;
-        };
-    };
-}
-export interface ISceneOptimizerParameters {
-    priority?: number;
-    maximumSize?: number;
-    step?: number;
-}
-export interface IImageProcessingConfiguration {
-    colorGradingEnabled?: boolean;
-    colorCurvesEnabled?: boolean;
-    colorCurves?: {
-        globalHue?: number;
-        globalDensity?: number;
-        globalSaturation?: number;
-        globalExposure?: number;
-        highlightsHue?: number;
-        highlightsDensity?: number;
-        highlightsSaturation?: number;
-        highlightsExposure?: number;
-        midtonesHue?: number;
-        midtonesDensity?: number;
-        midtonesSaturation?: number;
-        midtonesExposure?: number;
-        shadowsHue?: number;
-        shadowsDensity?: number;
-        shadowsSaturation?: number;
-        shadowsExposure?: number;
-    };
-    colorGradingWithGreenDepth?: boolean;
-    colorGradingBGR?: boolean;
-    exposure?: number;
-    toneMappingEnabled?: boolean;
-    contrast?: number;
-    vignetteEnabled?: boolean;
-    vignetteStretch?: number;
-    vignetteCentreX?: number;
-    vignetteCentreY?: number;
-    vignetteWeight?: number;
-    vignetteColor?: {
-        r: number;
-        g: number;
-        b: number;
-        a?: number;
-    };
-    vignetteCameraFov?: number;
-    vignetteBlendMode?: number;
-    vignetteM?: boolean;
-    applyByPostProcess?: boolean;
-    isEnabled?: boolean;
-}

+ 0 - 8
Viewer/src/configuration/configurationCompatibility.d.ts

@@ -1,8 +0,0 @@
-import { ViewerConfiguration } from './';
-/**
- * This function will make sure the configuration file is taking deprecated fields into account
- * and is setting them to the correct keys and values.
- *
- * @param configuration The configuration to process. Mutable!
- */
-export declare function processConfigurationCompatibility(configuration: ViewerConfiguration): void;

+ 0 - 5
Viewer/src/configuration/globals.d.ts

@@ -1,5 +0,0 @@
-export declare class ViewerGlobals {
-    disableInit: boolean;
-    disableWebGL2Support: boolean;
-}
-export declare let viewerGlobals: ViewerGlobals;

+ 0 - 1
Viewer/src/configuration/index.d.ts

@@ -1 +0,0 @@
-export * from './configuration';

+ 0 - 26
Viewer/src/configuration/loader.d.ts

@@ -1,26 +0,0 @@
-import { ViewerConfiguration } from './configuration';
-/**
- * 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.
- * It is a private member of the scene.
- */
-export declare class ConfigurationLoader {
-    private _enableCache;
-    private _configurationCache;
-    private _loadRequests;
-    constructor(_enableCache?: boolean);
-    /**
-     * load a configuration object that is defined in the initial configuration provided.
-     * The viewer configuration can extend different types of configuration objects and have an extra configuration defined.
-     *
-     * @param initConfig the initial configuration that has the definitions of further configuration to load.
-     * @param callback an optional callback that will be called sync, if noconfiguration needs to be loaded or configuration is payload-only
-     * @returns A promise that delivers the extended viewer configuration, when done.
-     */
-    loadConfiguration(initConfig?: ViewerConfiguration, callback?: (config: ViewerConfiguration) => void): Promise<ViewerConfiguration>;
-    /**
-     * Dispose the configuration loader. This will cancel file requests, if active.
-     */
-    dispose(): void;
-    private _loadFile(url);
-}

+ 0 - 42
Viewer/src/configuration/mappers.d.ts

@@ -1,42 +0,0 @@
-import { ViewerConfiguration } from './configuration';
-/**
- * This is the mapper's interface. Implement this function to create your own mapper and register it at the mapper manager
- */
-export interface IMapper {
-    map(rawSource: any): ViewerConfiguration;
-}
-/**
- * The MapperManager manages the different implemented mappers.
- * It allows the user to register new mappers as well and use them to parse their own configuration data
- */
-export declare class MapperManager {
-    private _mappers;
-    /**
-     * The default mapper is the JSON mapper.
-     */
-    static DefaultMapper: string;
-    constructor();
-    /**
-     * Get a specific configuration mapper.
-     *
-     * @param type the name of the mapper to load
-     */
-    getMapper(type: string): IMapper;
-    /**
-     * Use this functio to register your own configuration mapper.
-     * After a mapper is registered, it can be used to parse the specific type fo configuration to the standard ViewerConfiguration.
-     * @param type the name of the mapper. This will be used to define the configuration type and/or to get the mapper
-     * @param mapper The implemented mapper
-     */
-    registerMapper(type: string, mapper: IMapper): void;
-    /**
-     * Dispose the mapper manager and all of its mappers.
-     */
-    dispose(): void;
-}
-/**
- * mapperManager is a singleton of the type MapperManager.
- * The mapperManager can be disposed directly with calling mapperManager.dispose()
- * or indirectly with using BabylonViewer.disposeAll()
- */
-export declare let mapperManager: MapperManager;

+ 0 - 6
Viewer/src/configuration/types/default.d.ts

@@ -1,6 +0,0 @@
-import { ViewerConfiguration } from './../configuration';
-/**
- * The default configuration of the viewer, including templates (canvas, overly, loading screen)
- * This configuration doesn't hold specific parameters, and only defines objects that are needed for the viewer to fully work correctly.
- */
-export declare let defaultConfiguration: ViewerConfiguration;

+ 0 - 5
Viewer/src/configuration/types/environmentMap.d.ts

@@ -1,5 +0,0 @@
-import { ViewerConfiguration } from './../configuration';
-/**
- * Lab-oriented default .env support
- */
-export declare const environmentMapConfiguration: ViewerConfiguration;

+ 0 - 6
Viewer/src/configuration/types/extended.d.ts

@@ -1,6 +0,0 @@
-import { ViewerConfiguration } from './../configuration';
-/**
- * The viewer's "extended" configuration.
- * This configuration defines specific obejcts and parameters that we think make any model look good.
- */
-export declare let extendedConfiguration: ViewerConfiguration;

+ 0 - 13
Viewer/src/configuration/types/index.d.ts

@@ -1,13 +0,0 @@
-import { minimalConfiguration } from './minimal';
-import { defaultConfiguration } from './default';
-import { ViewerConfiguration } from '../configuration';
-/**
- * Get the configuration type you need to use as the base for your viewer.
- * The types can either be a single string, or comma separated types that will extend each other. for example:
- *
- * "default, environmentMap" will first load the default configuration and will extend it using the environmentMap configuration.
- *
- * @param types a comma-separated string of the type(s) or configuration to load.
- */
-declare let getConfigurationType: (types: string) => ViewerConfiguration;
-export { getConfigurationType, defaultConfiguration, minimalConfiguration };

+ 0 - 6
Viewer/src/configuration/types/minimal.d.ts

@@ -1,6 +0,0 @@
-import { ViewerConfiguration } from './../configuration';
-/**
- * The minimal configuration needed to make the viewer work.
- * Some functionalities might not work correctly (like fill-screen)
- */
-export declare let minimalConfiguration: ViewerConfiguration;

+ 0 - 9
Viewer/src/configuration/types/shadowLight.d.ts

@@ -1,9 +0,0 @@
-import { ViewerConfiguration } from './../configuration';
-/**
- * Defines a default directional shadow light for normalized objects (!)
- */
-export declare const shadowDirectionalLightConfiguration: ViewerConfiguration;
-/**
- * Defines a default shadow-enabled spot light for normalized objects.
- */
-export declare const shadowSpotlLightConfiguration: ViewerConfiguration;

+ 0 - 35
Viewer/src/eventManager.d.ts

@@ -1,35 +0,0 @@
-import { EventCallback, TemplateManager } from "./templateManager";
-/**
- * The EventManager is in charge of registering user interctions with the viewer.
- * It is used in the TemplateManager
- */
-export declare class EventManager {
-    private _templateManager;
-    private _callbacksContainer;
-    constructor(_templateManager: TemplateManager);
-    /**
-     * Register a new callback to a specific template.
-     * The best example for the usage can be found in the DefaultViewer
-     *
-     * @param templateName the templateName to register the event to
-     * @param callback The callback to be executed
-     * @param eventType the type of event to register
-     * @param selector an optional selector. if not defined the parent object in the template will be selected
-     */
-    registerCallback(templateName: string, callback: (eventData: EventCallback) => void, eventType?: string, selector?: string): void;
-    /**
-     * This will remove a registered event from the defined template.
-     * Each one of the variables apart from the template name are optional, but one must be provided.
-     *
-     * @param templateName the templateName
-     * @param callback the callback to remove (optional)
-     * @param eventType the event type to remove (optional)
-     * @param selector the selector from which to remove the event (optional)
-     */
-    unregisterCallback(templateName: string, callback: (eventData: EventCallback) => void, eventType?: string, selector?: string): void;
-    private _eventTriggered(data);
-    /**
-     * Dispose the event manager
-     */
-    dispose(): void;
-}

+ 0 - 24
Viewer/src/helper.d.ts

@@ -1,24 +0,0 @@
-/**
- * Is the provided string a URL?
- *
- * @param urlToCheck the url to inspect
- */
-export declare function isUrl(urlToCheck: string): boolean;
-/**
- * Convert a string from kebab-case to camelCase
- * @param s string to convert
- */
-export declare function kebabToCamel(s: any): any;
-/**
- * Convert a string from camelCase to kebab-case
- * @param str string to convert
- */
-export declare function camelToKebab(str: any): any;
-/**
- * This will extend an object with configuration values.
- * What it practically does it take the keys from the configuration and set them on the object.
- * I the configuration is a tree, it will traverse into the tree.
- * @param object the object to extend
- * @param config the configuration object that will extend the object
- */
-export declare function extendClassWithConfig(object: any, config: any): void;

+ 0 - 28
Viewer/src/index.d.ts

@@ -1,28 +0,0 @@
-/// <reference path="../../dist/babylon.glTF2Interface.d.ts" />
-import { mapperManager } from './configuration/mappers';
-import { viewerGlobals } from './configuration/globals';
-import { viewerManager } from './viewer/viewerManager';
-import { DefaultViewer } from './viewer/defaultViewer';
-import { AbstractViewer } from './viewer/viewer';
-import { telemetryManager } from './telemetryManager';
-import { ModelLoader } from './loader/modelLoader';
-import { ViewerModel, ModelState } from './model/viewerModel';
-import { AnimationPlayMode, AnimationState } from './model/modelAnimation';
-import { ILoaderPlugin } from './loader/plugins/loaderPlugin';
-/**
- * BabylonJS Viewer
- *
- * An HTML-Based viewer for 3D models, based on BabylonJS and its extensions.
- */
-import * as BABYLON from 'babylonjs';
-import 'babylonjs-loaders';
-import 'pep';
-import { InitTags } from './initializer';
-declare let disableInit: boolean;
-/**
- * Dispose all viewers currently registered
- */
-declare function disposeAll(): void;
-declare const Version: string;
-export { BABYLON, Version, InitTags, DefaultViewer, AbstractViewer, viewerGlobals, telemetryManager, disableInit, viewerManager, mapperManager, disposeAll, ModelLoader, ViewerModel, AnimationPlayMode, AnimationState, ModelState, ILoaderPlugin };
-export * from './configuration';

+ 0 - 11
Viewer/src/initializer.d.ts

@@ -1,11 +0,0 @@
-/**
- * Will attach an init function the the DOMContentLoaded event.
- * The init function will be removed automatically after the event was triggered.
- */
-export declare function initListeners(): void;
-/**
- * Select all HTML tags on the page that match the selector and initialize a viewer
- *
- * @param selector the selector to initialize the viewer on (default is 'babylon')
- */
-export declare function InitTags(selector?: string): void;

+ 0 - 5
Viewer/src/interfaces.d.ts

@@ -1,5 +0,0 @@
-export declare const enum CameraBehavior {
-    AUTOROTATION = 0,
-    BOUNCING = 1,
-    FRAMING = 2,
-}

+ 0 - 126
Viewer/src/labs/environmentSerializer.d.ts

@@ -1,126 +0,0 @@
-import { Vector3 } from "babylonjs";
-import { TextureCube } from './texture';
-/**
- * Spherical polynomial coefficients (counter part to spherical harmonic coefficients used in shader irradiance calculation)
- * @ignoreChildren
- */
-export interface SphericalPolynomalCoefficients {
-    x: Vector3;
-    y: Vector3;
-    z: Vector3;
-    xx: Vector3;
-    yy: Vector3;
-    zz: Vector3;
-    yz: Vector3;
-    zx: Vector3;
-    xy: Vector3;
-}
-/**
- * Wraps data and maps required for environments with physically based rendering
- */
-export interface PBREnvironment {
-    /**
-     * Spherical Polynomial Coefficients representing an irradiance map
-     */
-    irradiancePolynomialCoefficients: SphericalPolynomalCoefficients;
-    /**
-     * Specular cubemap
-     */
-    specularTexture?: TextureCube;
-    /**
-     * A scale factor applied to RGB values after reading from environment maps
-     */
-    textureIntensityScale: number;
-}
-/**
-         * Environment map representations: layouts, projections and approximations
-         */
-export declare type MapType = 'irradiance_sh_coefficients_9' | 'cubemap_faces';
-/**
- * Image type used for environment map
- */
-export declare type ImageType = 'png';
-/**
- * A generic field in JSON that report's its type
- */
-export interface TypedObject<T> {
-    type: T;
-}
-/**
- * Describes a range of bytes starting at byte pos (inclusive) and finishing at byte pos + length - 1
- */
-export interface ByteRange {
-    pos: number;
-    length: number;
-}
-/**
- * Complete Spectre Environment JSON Descriptor
- */
-export interface EnvJsonDescriptor {
-    radiance: TypedObject<MapType>;
-    irradiance: TypedObject<MapType>;
-    specular: TypedObject<MapType>;
-}
-/**
- * Spherical harmonic coefficients to provide an irradiance map
- */
-export interface IrradianceSHCoefficients9 extends TypedObject<MapType> {
-    l00: Array<number>;
-    l1_1: Array<number>;
-    l10: Array<number>;
-    l11: Array<number>;
-    l2_2: Array<number>;
-    l2_1: Array<number>;
-    l20: Array<number>;
-    l21: Array<number>;
-    l22: Array<number>;
-}
-/**
- * A generic set of images, where the image content is specified by byte ranges in the mipmaps field
- */
-export interface ImageSet<T> extends TypedObject<MapType> {
-    imageType: ImageType;
-    width: number;
-    height: number;
-    mipmaps: Array<T>;
-    multiplier: number;
-}
-/**
- * A set of cubemap faces
- */
-export declare type CubemapFaces = ImageSet<Array<ByteRange>>;
-/**
- * A single image containing an atlas of equirectangular-projection maps across all mip levels
- */
-export declare type EquirectangularMipmapAtlas = ImageSet<ByteRange>;
-/**
- * A static class proving methods to aid parsing Spectre environment files
- */
-export declare class EnvironmentDeserializer {
-    /**
-     * Parses an arraybuffer into a new PBREnvironment object
-     * @param arrayBuffer The arraybuffer of the Spectre environment file
-     * @return a PBREnvironment object
-     */
-    static Parse(arrayBuffer: ArrayBuffer): PBREnvironment;
-    /**
-     * Convert from irradiance to outgoing radiance for Lambertian BDRF, suitable for efficient shader evaluation.
-     *	  L = (1/pi) * E * rho
-     *
-     * This is done by an additional scale by 1/pi, so is a fairly trivial operation but important conceptually.
-     * @param harmonics Spherical harmonic coefficients (9)
-     */
-    private static _ConvertSHIrradianceToLambertianRadiance(harmonics);
-    /**
-     * Convert spherical harmonics to spherical polynomial coefficients
-     * @param harmonics Spherical harmonic coefficients (9)
-     * @param outPolynomialCoefficents Polynomial coefficients (9) object to store result
-     */
-    private static _ConvertSHToSP(harmonics, outPolynomialCoefficents);
-    /**
-     * Multiplies harmonic coefficients in place
-     * @param harmonics Spherical harmonic coefficients (9)
-     * @param scaleFactor Value to multiply by
-     */
-    private static _ScaleSH(harmonics, scaleFactor);
-}

+ 0 - 181
Viewer/src/labs/texture.d.ts

@@ -1,181 +0,0 @@
-/**
- * WebGL Pixel Formats
- */
-export declare const enum PixelFormat {
-    DEPTH_COMPONENT = 6402,
-    ALPHA = 6406,
-    RGB = 6407,
-    RGBA = 6408,
-    LUMINANCE = 6409,
-    LUMINANCE_ALPHA = 6410,
-}
-/**
- * WebGL Pixel Types
- */
-export declare const enum PixelType {
-    UNSIGNED_BYTE = 5121,
-    UNSIGNED_SHORT_4_4_4_4 = 32819,
-    UNSIGNED_SHORT_5_5_5_1 = 32820,
-    UNSIGNED_SHORT_5_6_5 = 33635,
-}
-/**
- * WebGL Texture Magnification Filter
- */
-export declare const enum TextureMagFilter {
-    NEAREST = 9728,
-    LINEAR = 9729,
-}
-/**
- * WebGL Texture Minification Filter
- */
-export declare const enum TextureMinFilter {
-    NEAREST = 9728,
-    LINEAR = 9729,
-    NEAREST_MIPMAP_NEAREST = 9984,
-    LINEAR_MIPMAP_NEAREST = 9985,
-    NEAREST_MIPMAP_LINEAR = 9986,
-    LINEAR_MIPMAP_LINEAR = 9987,
-}
-/**
- * WebGL Texture Wrap Modes
- */
-export declare const enum TextureWrapMode {
-    REPEAT = 10497,
-    CLAMP_TO_EDGE = 33071,
-    MIRRORED_REPEAT = 33648,
-}
-/**
- * Raw texture data and descriptor sufficient for WebGL texture upload
- */
-export interface TextureData {
-    /**
-     * Width of image
-     */
-    width: number;
-    /**
-     * Height of image
-     */
-    height: number;
-    /**
-     * Format of pixels in data
-     */
-    format: PixelFormat;
-    /**
-     * Row byte alignment of pixels in data
-     */
-    alignment: number;
-    /**
-     * Pixel data
-     */
-    data: ArrayBufferView;
-}
-/**
- * Wraps sampling parameters for a WebGL texture
- */
-export interface SamplingParameters {
-    /**
-     * Magnification mode when upsampling from a WebGL texture
-     */
-    magFilter?: TextureMagFilter;
-    /**
-     * Minification mode when upsampling from a WebGL texture
-     */
-    minFilter?: TextureMinFilter;
-    /**
-     * X axis wrapping mode when sampling out of a WebGL texture bounds
-     */
-    wrapS?: TextureWrapMode;
-    /**
-     * Y axis wrapping mode when sampling out of a WebGL texture bounds
-     */
-    wrapT?: TextureWrapMode;
-    /**
-    * Anisotropic filtering samples
-    */
-    maxAnisotropy?: number;
-}
-/**
- * Represents a valid WebGL texture source for use in texImage2D
- */
-export declare type TextureSource = TextureData | ImageData | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement;
-/**
- * A generic set of texture mipmaps (where index 0 has the largest dimension)
- */
-export declare type Mipmaps<T> = Array<T>;
-/**
- * A set of 6 cubemap arranged in the order [+x, -x, +y, -y, +z, -z]
- */
-export declare type Faces<T> = Array<T>;
-/**
- * A set of texture mipmaps specifically for 2D textures in WebGL (where index 0 has the largest dimension)
- */
-export declare type Mipmaps2D = Mipmaps<TextureSource>;
-/**
- * A set of texture mipmaps specifically for cubemap textures in WebGL (where index 0 has the largest dimension)
- */
-export declare type MipmapsCube = Mipmaps<Faces<TextureSource>>;
-/**
- * A minimal WebGL cubemap descriptor
- */
-export declare class TextureCube {
-    internalFormat: PixelFormat;
-    type: PixelType;
-    source: MipmapsCube;
-    /**
-     * Returns the width of a face of the texture or 0 if not available
-     */
-    readonly Width: number;
-    /**
-     * Returns the height of a face of the texture or 0 if not available
-     */
-    readonly Height: number;
-    /**
-     * constructor
-     * @param internalFormat WebGL pixel format for the texture on the GPU
-     * @param type WebGL pixel type of the supplied data and texture on the GPU
-     * @param source An array containing mipmap levels of faces, where each mipmap level is an array of faces and each face is a TextureSource object
-     */
-    constructor(internalFormat: PixelFormat, type: PixelType, source?: MipmapsCube);
-}
-/**
-     * A static class providing methods to aid working with Bablyon textures.
-     */
-export declare class TextureUtils {
-    /**
-     * A prefix used when storing a babylon texture object reference on a Spectre texture object
-     */
-    static BabylonTextureKeyPrefix: string;
-    /**
-     * Controls anisotropic filtering for deserialized textures.
-     */
-    static MaxAnisotropy: number;
-    /**
-     * Returns a BabylonCubeTexture instance from a Spectre texture cube, subject to sampling parameters.
-     * If such a texture has already been requested in the past, this texture will be returned, otherwise a new one will be created.
-     * The advantage of this is to enable working with texture objects without the need to initialize on the GPU until desired.
-     * @param scene A Babylon Scene instance
-     * @param textureCube A Spectre TextureCube object
-     * @param parameters WebGL texture sampling parameters
-     * @param automaticMipmaps Pass true to enable automatic mipmap generation where possible (requires power of images)
-     * @param environment Specifies that the texture will be used as an environment
-     * @param singleLod Specifies that the texture will be a singleLod (for environment)
-     * @return Babylon cube texture
-     */
-    static GetBabylonCubeTexture(scene: BABYLON.Scene, textureCube: TextureCube, automaticMipmaps: boolean, environment?: boolean, singleLod?: boolean): BABYLON.CubeTexture;
-    /**
-     * Applies Spectre SamplingParameters to a Babylon texture by directly setting texture parameters on the internal WebGLTexture as well as setting Babylon fields
-     * @param babylonTexture Babylon texture to apply texture to (requires the Babylon texture has an initialize _texture field)
-     * @param parameters Spectre SamplingParameters to apply
-     */
-    static ApplySamplingParameters(babylonTexture: BABYLON.BaseTexture, parameters: SamplingParameters): void;
-    private static _EnvironmentSampling;
-    private static _EnvironmentSingleMipSampling;
-    /**
-     * Environment preprocessing dedicated value (Internal Use or Advanced only).
-     */
-    static EnvironmentLODScale: number;
-    /**
-     * Environment preprocessing dedicated value (Internal Use or Advanced only)..
-     */
-    static EnvironmentLODOffset: number;
-}

+ 0 - 50
Viewer/src/labs/viewerLabs.d.ts

@@ -1,50 +0,0 @@
-import { PBREnvironment } from "./environmentSerializer";
-import { SceneManager } from '../viewer/sceneManager';
-import { ShadowLight, Vector3 } from 'babylonjs';
-/**
- * The ViewerLabs class will hold functions that are not (!) backwards compatible.
- * The APIs in all labs-related classes and configuration  might change.
- * Once stable, lab features will be moved to the publis API and configuration object.
- */
-export declare class ViewerLabs {
-    private _sceneManager;
-    constructor(_sceneManager: SceneManager);
-    assetsRootURL: string;
-    environment: PBREnvironment;
-    /**
-         * Loads an environment map from a given URL
-         * @param url URL of environment map
-         * @param onSuccess Callback fired after environment successfully applied to the scene
-         * @param onProgress Callback fired at progress events while loading the environment map
-         * @param onError Callback fired when the load fails
-         */
-    loadEnvironment(url: string, onSuccess?: (env: PBREnvironment) => void, onProgress?: (bytesLoaded: number, bytesTotal: number) => void, onError?: (e: any) => void): void;
-    /**
-     * Loads an environment map from a given URL
-     * @param buffer ArrayBuffer containing environment map
-     * @param onSuccess Callback fired after environment successfully applied to the scene
-     * @param onProgress Callback fired at progress events while loading the environment map
-     * @param onError Callback fired when the load fails
-     */
-    loadEnvironment(buffer: ArrayBuffer, onSuccess?: (env: PBREnvironment) => void, onProgress?: (bytesLoaded: number, bytesTotal: number) => void, onError?: (e: any) => void): void;
-    /**
-     * Sets the environment to an already loaded environment
-     * @param env PBREnvironment instance
-     * @param onSuccess Callback fired after environment successfully applied to the scene
-     * @param onProgress Callback fired at progress events while loading the environment map
-     * @param onError Callback fired when the load fails
-     */
-    loadEnvironment(env: PBREnvironment, onSuccess?: (env: PBREnvironment) => void, onProgress?: (bytesLoaded: number, bytesTotal: number) => void, onError?: (e: any) => void): void;
-    /**
-     * Applies an `EnvironmentMapConfiguration` to the scene
-     * @param environmentMapConfiguration Environment map configuration to apply
-     */
-    applyEnvironmentMapConfiguration(rotationY?: number): void;
-    /**
-     * Get an environment asset url by using the configuration if the path is not absolute.
-     * @param url Asset url
-     * @returns The Asset url using the `environmentAssetsRootURL` if the url is not an absolute path.
-     */
-    getAssetUrl(url: string): string;
-    rotateShadowLight(shadowLight: ShadowLight, amount: number, point?: Vector3, axis?: Vector3, target?: Vector3): void;
-}

+ 0 - 40
Viewer/src/loader/modelLoader.d.ts

@@ -1,40 +0,0 @@
-import { AbstractViewer } from "../viewer/viewer";
-import { IModelConfiguration } from "../configuration/configuration";
-import { ViewerModel } from "../model/viewerModel";
-import { ILoaderPlugin } from './plugins/loaderPlugin';
-/**
- * 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.
- *
- * A Model loader is unique per (Abstract)Viewer. It is being generated by the viewer
- */
-export declare class ModelLoader {
-    private _viewer;
-    private _loadId;
-    private _disposed;
-    private _loaders;
-    private _plugins;
-    /**
-     * Create a new Model loader
-     * @param _viewer the viewer using this model loader
-     */
-    constructor(_viewer: AbstractViewer);
-    /**
-     * Adds a new plugin to the loader process.
-     *
-     * @param plugin the plugin name or the plugin itself
-     */
-    addPlugin(plugin: ILoaderPlugin | string): void;
-    /**
-     * Load a model using predefined configuration
-     * @param modelConfiguration the modelConfiguration to use to load the model
-     */
-    load(modelConfiguration: IModelConfiguration): ViewerModel;
-    cancelLoad(model: ViewerModel): void;
-    /**
-     * dispose the model loader.
-     * If loaders are registered and are in the middle of loading, they will be disposed and the request(s) will be cancelled.
-     */
-    dispose(): void;
-    private _checkAndRun(functionName, ...payload);
-}

+ 0 - 11
Viewer/src/loader/plugins/applyMaterialConfig.d.ts

@@ -1,11 +0,0 @@
-import { ILoaderPlugin } from "./loaderPlugin";
-import { ViewerModel } from "../..";
-import { ISceneLoaderPlugin, ISceneLoaderPluginAsync, Material } from "babylonjs";
-/**
- * Force-apply material configuration right after a material was loaded.
- */
-export declare class ApplyMaterialConfigPlugin implements ILoaderPlugin {
-    private _model;
-    onInit(loader: ISceneLoaderPlugin | ISceneLoaderPluginAsync, model: ViewerModel): void;
-    onMaterialLoaded(material: Material): void;
-}

+ 0 - 9
Viewer/src/loader/plugins/extendedMaterialLoaderPlugin.d.ts

@@ -1,9 +0,0 @@
-import { ILoaderPlugin } from "./loaderPlugin";
-import { Material } from "babylonjs";
-/**
- * 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.
- */
-export declare class ExtendedMaterialLoaderPlugin implements ILoaderPlugin {
-    onMaterialLoaded(baseMaterial: Material): void;
-}

+ 0 - 8
Viewer/src/loader/plugins/index.d.ts

@@ -1,8 +0,0 @@
-import { ILoaderPlugin } from "./loaderPlugin";
-/**
- * Get a loader plugin according to its name.
- * The plugin will be cached and will be reused if called for again.
- *
- * @param name the name of the plugin
- */
-export declare function getLoaderPluginByName(name: string): ILoaderPlugin;

+ 0 - 20
Viewer/src/loader/plugins/loaderPlugin.d.ts

@@ -1,20 +0,0 @@
-import { ViewerModel } from "../../model/viewerModel";
-import { IGLTFLoaderExtension, IGLTFLoaderData } from "babylonjs-loaders";
-import { AbstractMesh, ISceneLoaderPlugin, ISceneLoaderPluginAsync, SceneLoaderProgressEvent, BaseTexture, Material } from "babylonjs";
-/**
- * This interface defines the structure of a loader plugin.
- * Any of those functions will be called if (!) the loader supports those callbacks.
- * Any loader supports onInit, onLoaded, onError and onProgress.
- */
-export interface ILoaderPlugin {
-    onInit?: (loader: ISceneLoaderPlugin | ISceneLoaderPluginAsync, model: ViewerModel) => void;
-    onLoaded?: (model: ViewerModel) => void;
-    onError?: (message: string, exception?: any) => void;
-    onProgress?: (progressEvent: SceneLoaderProgressEvent) => void;
-    onExtensionLoaded?: (extension: IGLTFLoaderExtension) => void;
-    onParsed?: (parsedData: IGLTFLoaderData) => void;
-    onMeshLoaded?: (mesh: AbstractMesh) => void;
-    onTextureLoaded?: (texture: BaseTexture) => void;
-    onMaterialLoaded?: (material: Material) => void;
-    onComplete?: () => void;
-}

+ 0 - 11
Viewer/src/loader/plugins/minecraftLoaderPlugin.d.ts

@@ -1,11 +0,0 @@
-import { ILoaderPlugin } from "./loaderPlugin";
-import { ViewerModel } from "../..";
-import { ISceneLoaderPlugin, ISceneLoaderPluginAsync, Material } from "babylonjs";
-import { IGLTFLoaderData } from "babylonjs-loaders";
-export declare class MinecraftLoaderPlugin implements ILoaderPlugin {
-    private _model;
-    private _minecraftEnabled;
-    onInit(loader: ISceneLoaderPlugin | ISceneLoaderPluginAsync, model: ViewerModel): void;
-    inParsed(data: IGLTFLoaderData): void;
-    onMaterialLoaded(material: Material): void;
-}

+ 0 - 12
Viewer/src/loader/plugins/msftLodLoaderPlugin.d.ts

@@ -1,12 +0,0 @@
-import { ILoaderPlugin } from "./loaderPlugin";
-import { ViewerModel } from "../..";
-import { ISceneLoaderPlugin, ISceneLoaderPluginAsync } from "babylonjs";
-import { IGLTFLoaderExtension } from "babylonjs-loaders";
-/**
- * A loder plugin to use MSFT_lod extension correctly (glTF)
- */
-export declare class MSFTLodLoaderPlugin implements ILoaderPlugin {
-    private _model;
-    onInit(loader: ISceneLoaderPlugin | ISceneLoaderPluginAsync, model: ViewerModel): void;
-    onExtensionLoaded(extension: IGLTFLoaderExtension): void;
-}

+ 0 - 12
Viewer/src/loader/plugins/telemetryLoaderPlugin.d.ts

@@ -1,12 +0,0 @@
-import { ILoaderPlugin } from "./loaderPlugin";
-import { ViewerModel } from "../..";
-import { ISceneLoaderPlugin, ISceneLoaderPluginAsync } from "babylonjs";
-export declare class TelemetryLoaderPlugin implements ILoaderPlugin {
-    private _model;
-    private _loadStart;
-    private _loadEnd;
-    onInit(loader: ISceneLoaderPlugin | ISceneLoaderPluginAsync, model: ViewerModel): void;
-    onLoaded(model: ViewerModel): void;
-    onError(message: string, exception: any): void;
-    onComplete(): void;
-}

+ 0 - 212
Viewer/src/model/modelAnimation.d.ts

@@ -1,212 +0,0 @@
-import { AnimationGroup, Vector3 } from "babylonjs";
-/**
- * Animation play mode enum - is the animation looping or playing once
- */
-export declare const enum AnimationPlayMode {
-    ONCE = 0,
-    LOOP = 1,
-}
-/**
- * An enum representing the current state of an animation object
- */
-export declare const enum AnimationState {
-    INIT = 0,
-    PLAYING = 1,
-    PAUSED = 2,
-    STOPPED = 3,
-    ENDED = 4,
-}
-/**
- * The different type of easing functions available
- */
-export declare const enum EasingFunction {
-    Linear = 0,
-    CircleEase = 1,
-    BackEase = 2,
-    BounceEase = 3,
-    CubicEase = 4,
-    ElasticEase = 5,
-    ExponentialEase = 6,
-    PowerEase = 7,
-    QuadraticEase = 8,
-    QuarticEase = 9,
-    QuinticEase = 10,
-    SineEase = 11,
-}
-/**
- * Defines a simple animation to be applied to a model (scale).
- */
-export interface ModelAnimationConfiguration {
-    /**
-     * Time of animation, in seconds
-     */
-    time: number;
-    /**
-     * Scale to apply
-     */
-    scaling?: Vector3;
-    /**
-     * Easing function to apply
-     * See SPECTRE.EasingFunction
-     */
-    easingFunction?: number;
-    /**
-     * An Easing mode to apply to the easing function
-     * See BABYLON.EasingFunction
-     */
-    easingMode?: number;
-}
-/**
- * This interface can be implemented to define new types of ModelAnimation objects.
- */
-export interface IModelAnimation {
-    /**
-     * Current animation state (playing, stopped etc')
-     */
-    readonly state: AnimationState;
-    /**
-     * the name of the animation
-     */
-    readonly name: string;
-    /**
-     * Get the max numbers of frame available in the animation group
-     *
-     * In correlation to an arry, this would be ".length"
-     */
-    readonly frames: number;
-    /**
-     * Get the current frame playing right now.
-     * This can be used to poll the frame currently playing (and, for exmaple, display a progress bar with the data)
-     *
-     * In correlation to an array, this would be the current index
-     */
-    readonly currentFrame: number;
-    /**
-     * Animation's FPS value
-     */
-    readonly fps: number;
-    /**
-     * Get or set the animation's speed ration (Frame-to-fps)
-     */
-    speedRatio: number;
-    /**
-     * Gets or sets the aimation's play mode.
-     */
-    playMode: AnimationPlayMode;
-    /**
-     * Start the animation
-     */
-    start(): any;
-    /**
-     * Stop the animation.
-     * This will fail silently if the animation group is already stopped.
-     */
-    stop(): any;
-    /**
-     * Pause the animation
-     * This will fail silently if the animation is not currently playing
-     */
-    pause(): any;
-    /**
-     * Reset this animation
-     */
-    reset(): any;
-    /**
-     * Restart the animation
-     */
-    restart(): any;
-    /**
-     * Go to a specific
-     * @param frameNumber the frame number to go to
-     */
-    goToFrame(frameNumber: number): any;
-    /**
-     * Dispose this animation
-     */
-    dispose(): any;
-}
-/**
- * The GroupModelAnimation is an implementation of the IModelAnimation interface using BABYLON's
- * native GroupAnimation class.
- */
-export declare class GroupModelAnimation implements IModelAnimation {
-    private _animationGroup;
-    private _playMode;
-    private _state;
-    /**
-     * Create a new GroupModelAnimation object using an AnimationGroup object
-     * @param _animationGroup The aniamtion group to base the class on
-     */
-    constructor(_animationGroup: AnimationGroup);
-    /**
-     * Get the animation's name
-     */
-    readonly name: string;
-    /**
-     * Get the current animation's state
-     */
-    readonly state: AnimationState;
-    /**
-     * Gets the speed ratio to use for all animations
-     */
-    /**
-     * Sets the speed ratio to use for all animations
-     */
-    speedRatio: number;
-    /**
-     * Get the max numbers of frame available in the animation group
-     *
-     * In correlation to an arry, this would be ".length"
-     */
-    readonly frames: number;
-    /**
-     * Get the current frame playing right now.
-     * This can be used to poll the frame currently playing (and, for exmaple, display a progress bar with the data)
-     *
-     * In correlation to an array, this would be the current index
-     */
-    readonly currentFrame: number;
-    /**
-     * Get the FPS value of this animation
-     */
-    readonly fps: number;
-    /**
-     * What is the animation'S play mode (looping or played once)
-     */
-    /**
-     * 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;
-    /**
-     * Reset the animation group
-     */
-    reset(): void;
-    /**
-     * Restart the animation group
-     */
-    restart(): void;
-    /**
-     *
-     * @param frameNumber Go to a specific frame in the animation
-     */
-    goToFrame(frameNumber: number): void;
-    /**
-     * Start playing the animation.
-     */
-    start(): void;
-    /**
-     * Pause the animation
-     */
-    pause(): void;
-    /**
-     * Stop the animation.
-     * This will fail silently if the animation group is already stopped.
-     */
-    stop(): void;
-    /**
-     * Dispose this animation object.
-     */
-    dispose(): void;
-}

+ 0 - 31
Viewer/src/model/modelLoader.d.ts

@@ -1,31 +0,0 @@
-import { AbstractViewer } from "..";
-import { IModelConfiguration } from "../configuration/configuration";
-import { ViewerModel } from "./viewerModel";
-/**
- * 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.
- *
- * A Model loader is unique per (Abstract)Viewer. It is being generated by the viewer
- */
-export declare class ModelLoader {
-    private _viewer;
-    private _loadId;
-    private _disposed;
-    private _loaders;
-    /**
-     * Create a new Model loader
-     * @param _viewer the viewer using this model loader
-     */
-    constructor(_viewer: AbstractViewer);
-    /**
-     * Load a model using predefined configuration
-     * @param modelConfiguration the modelConfiguration to use to load the model
-     */
-    load(modelConfiguration: IModelConfiguration): ViewerModel;
-    cancelLoad(model: ViewerModel): void;
-    /**
-     * dispose the model loader.
-     * If loaders are registered and are in the middle of loading, they will be disposed and the request(s) will be cancelled.
-     */
-    dispose(): void;
-}

+ 0 - 222
Viewer/src/model/viewerModel.d.ts

@@ -1,222 +0,0 @@
-import { ISceneLoaderPlugin, ISceneLoaderPluginAsync, AnimationGroup, AbstractMesh, Observable, SceneLoaderProgressEvent, ParticleSystem, Skeleton, IDisposable, Nullable, Animation, Material } from "babylonjs";
-import { GLTF2 } from "babylonjs-loaders";
-import { IModelConfiguration } from "../configuration/configuration";
-import { IModelAnimation } from "./modelAnimation";
-import { AbstractViewer } from "..";
-/**
- * The current state of the model
- */
-export declare enum ModelState {
-    INIT = 0,
-    LOADING = 1,
-    LOADED = 2,
-    ENTRY = 3,
-    ENTRYDONE = 4,
-    COMPLETE = 5,
-    CANCELED = 6,
-    ERROR = 7,
-}
-/**
- * The viewer model is a container for all assets representing a sngle loaded model.
- */
-export declare class ViewerModel implements IDisposable {
-    protected _viewer: AbstractViewer;
-    /**
-     * The loader used to load this model.
-     */
-    loader: ISceneLoaderPlugin | ISceneLoaderPluginAsync;
-    private _animations;
-    /**
-     * the list of meshes that are a part of this model
-     */
-    private _meshes;
-    /**
-     * This model's root mesh (the parent of all other meshes).
-     * This mesh does not(!) exist in the meshes array.
-     */
-    rootMesh: AbstractMesh;
-    private _pivotMesh;
-    /**
-     * ParticleSystems connected to this model
-     */
-    particleSystems: Array<ParticleSystem>;
-    /**
-     * Skeletons defined in this model
-     */
-    skeletons: Array<Skeleton>;
-    /**
-     * The current model animation.
-     * On init, this will be undefined.
-     */
-    currentAnimation: IModelAnimation;
-    /**
-     * Observers registered here will be executed when the model is done loading
-     */
-    onLoadedObservable: Observable<ViewerModel>;
-    /**
-     * Observers registered here will be executed when the loader notified of a progress event
-     */
-    onLoadProgressObservable: Observable<SceneLoaderProgressEvent>;
-    /**
-     * Observers registered here will be executed when the loader notified of an error.
-     */
-    onLoadErrorObservable: Observable<{
-        message: string;
-        exception: any;
-    }>;
-    /**
-     * Will be executed after the model finished loading and complete, including entry animation and lod
-     */
-    onCompleteObservable: Observable<ViewerModel>;
-    /**
-     * Observers registered here will be executed every time the model is being configured.
-     * This can be used to extend the model's configuration without extending the class itself
-     */
-    onAfterConfigure: Observable<ViewerModel>;
-    /**
-     * The current model state (loaded, error, etc)
-     */
-    state: ModelState;
-    /**
-     * A loadID provided by the modelLoader, unique to ths (Abstract)Viewer instance.
-     */
-    loadId: number;
-    loadInfo: GLTF2.IAsset;
-    private _loadedUrl;
-    private _modelConfiguration;
-    private _loaderDone;
-    private _entryAnimation;
-    private _exitAnimation;
-    private _scaleTransition;
-    private _animatables;
-    private _frameRate;
-    private _shadowsRenderedAfterLoad;
-    constructor(_viewer: AbstractViewer, modelConfiguration: IModelConfiguration);
-    shadowsRenderedAfterLoad: boolean;
-    /**
-     * Is this model enabled?
-     */
-    /**
-     * Set whether this model is enabled or not.
-     */
-    enabled: boolean;
-    loaderDone: boolean;
-    private _checkCompleteState();
-    /**
-     * Get the viewer showing this model
-     */
-    getViewer(): AbstractViewer;
-    /**
-     * Add a mesh to this model.
-     * Any mesh that has no parent will be provided with the root mesh as its new parent.
-     *
-     * @param mesh the new mesh to add
-     * @param triggerLoaded should this mesh trigger the onLoaded observable. Used when adding meshes manually.
-     */
-    addMesh(mesh: AbstractMesh, triggerLoaded?: boolean): Promise<ViewerModel> | undefined;
-    /**
-     * get the list of meshes (excluding the root mesh)
-     */
-    readonly meshes: AbstractMesh[];
-    /**
-     * Get the model's configuration
-     */
-    /**
-     * (Re-)set the model's entire configuration
-     * @param newConfiguration the new configuration to replace the new one
-     */
-    configuration: IModelConfiguration;
-    /**
-     * Update the current configuration with new values.
-     * Configuration will not be overwritten, but merged with the new configuration.
-     * Priority is to the new configuration
-     * @param newConfiguration the configuration to be merged into the current configuration;
-     */
-    updateConfiguration(newConfiguration: Partial<IModelConfiguration>): void;
-    private _initAnimations();
-    /**
-     * Animates the model from the current position to the default position
-     * @param completeCallback A function to call when the animation has completed
-     */
-    private _enterScene(completeCallback?);
-    /**
-     * Animates the model from the current position to the exit-screen position
-     * @param completeCallback A function to call when the animation has completed
-     */
-    private _exitScene(completeCallback);
-    private _modelComplete();
-    /**
-     * Add a new animation group to this model.
-     * @param animationGroup the new animation group to be added
-     */
-    addAnimationGroup(animationGroup: AnimationGroup): void;
-    /**
-     * Get the ModelAnimation array
-     */
-    getAnimations(): Array<IModelAnimation>;
-    /**
-     * Get the animations' names. Using the names you can play a specific animation.
-     */
-    getAnimationNames(): Array<string>;
-    /**
-     * Get an animation by the provided name. Used mainly when playing n animation.
-     * @param name the name of the animation to find
-     */
-    protected _getAnimationByName(name: string): Nullable<IModelAnimation>;
-    /**
-     * Choose an initialized animation using its name and start playing it
-     * @param name the name of the animation to play
-     * @returns The model aniamtion to be played.
-     */
-    playAnimation(name: string): IModelAnimation;
-    setCurrentAnimationByName(name: string): IModelAnimation;
-    private _configureModel();
-    private _modelAnimationConfigurationToObject(animConfig);
-    /**
-     * Apply a material configuration to a material
-     * @param material Material to apply configuration to
-     */
-    _applyModelMaterialConfiguration(material: Material): void;
-    /**
-     * Start entry/exit animation given an animation configuration
-     * @param animationConfiguration Entry/Exit animation configuration
-     * @param isEntry Pass true if the animation is an entry animation
-     * @param completeCallback Callback to execute when the animation completes
-     */
-    private _applyAnimation(animationConfiguration, isEntry, completeCallback?);
-    /**
-    * Begin @animations with the specified @easingFunction
-    * @param animations The BABYLON Animations to begin
-    * @param duration of transition, in seconds
-    * @param easingFunction An easing function to apply
-    * @param easingMode A easing mode to apply to the easingFunction
-    * @param onAnimationEnd Call back trigger at the end of the animation.
-    */
-    transitionTo(animations: Animation[], duration: number, easingFunction: any, easingMode: number | undefined, onAnimationEnd: () => void): void;
-    /**
-     * Sets key values on an Animation from first to last frame.
-     * @param animation The Babylon animation object to set keys on
-     * @param startValue The value of the first key
-     * @param endValue The value of the last key
-     * @param duration The duration of the animation, used to determine the end frame
-     */
-    private _setLinearKeys(animation, startValue, endValue, duration);
-    /**
-     * Creates and returns a Babylon easing funtion object based on a string representing the Easing function
-     * @param easingFunctionID The enum of the easing funtion to create
-     * @return The newly created Babylon easing function object
-     */
-    private _createEasingFunction(easingFunctionID?);
-    /**
-     * Stops and removes all animations that have been applied to the model
-     */
-    stopAllAnimations(): void;
-    /**
-     * Will remove this model from the viewer (but NOT dispose it).
-     */
-    remove(): void;
-    /**
-     * Dispose this model, including all of its associated assets.
-     */
-    dispose(): void;
-}

+ 0 - 13
Viewer/src/optimizer/custom/extended.d.ts

@@ -1,13 +0,0 @@
-import { AbstractViewer } from '../../viewer/viewer';
-/**
- * A custom upgrade-oriented function configuration for the scene optimizer.
- *
- * @param viewer the viewer to optimize
- */
-export declare function extendedUpgrade(viewer: AbstractViewer): boolean;
-/**
- * A custom degrade-oriented function configuration for the scene optimizer.
- *
- * @param viewer the viewer to optimize
- */
-export declare function extendedDegrade(viewer: AbstractViewer): boolean;

+ 0 - 7
Viewer/src/optimizer/custom/index.d.ts

@@ -1,7 +0,0 @@
-import { extendedUpgrade } from "./extended";
-/**
- *
- * @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 declare function getCustomOptimizerByName(name: string, upgrade?: boolean): typeof extendedUpgrade;

+ 0 - 57
Viewer/src/telemetryManager.d.ts

@@ -1,57 +0,0 @@
-import { Observable } from "babylonjs";
-import { AbstractViewer } from "./viewer/viewer";
-/**
- * The data structure of a telemetry event.
- */
-export interface TelemetryData {
-    event: string;
-    session: string;
-    date: Date;
-    now: number;
-    viewer?: AbstractViewer;
-    detail: any;
-}
-/**
- * Receives Telemetry events and raises events to the API
- */
-export declare class TelemetryManager {
-    onEventBroadcastedObservable: Observable<TelemetryData>;
-    private _currentSessionId;
-    private _event;
-    /**
-     * Receives a telemetry event
-     * @param event The name of the Telemetry event
-     * @param details An additional value, or an object containing a list of property/value pairs
-     */
-    readonly broadcast: (event: string, viewer: AbstractViewer, details?: any) => void;
-    /**
-     * Log a Telemetry event for errors raised on the WebGL context.
-     * @param engine The Babylon engine with the WebGL context.
-     */
-    flushWebGLErrors(viewer: AbstractViewer): void;
-    /**
-     * Enable or disable telemetry events
-     * @param enabled Boolan, true if events are enabled
-     */
-    enable: boolean;
-    /**
-     * Called on event when disabled, typically do nothing here
-     */
-    private _eventDisabled();
-    /**
-     * Called on event when enabled
-     * @param event - The name of the Telemetry event
-     * @param details An additional value, or an object containing a list of property/value pairs
-     */
-    private _eventEnabled(event, viewer?, details?);
-    /**
-     * Returns the current session ID or creates one if it doesn't exixt
-     * @return The current session ID
-     */
-    readonly session: string;
-    /**
-     * Disposes the telemetry manager
-     */
-    dispose(): void;
-}
-export declare const telemetryManager: TelemetryManager;

+ 0 - 252
Viewer/src/templateManager.d.ts

@@ -1,252 +0,0 @@
-import { Observable } from 'babylonjs';
-/**
- * A single template configuration object
- */
-export interface ITemplateConfiguration {
-    /**
-     * can be either the id of the template's html element or a URL.
-     * See - http://doc.babylonjs.com/extensions/the_templating_system#location-vs-html
-     */
-    location?: string;
-    /**
-     * If no location is provided you can provide here the raw html of this template.
-     * See http://doc.babylonjs.com/extensions/the_templating_system#location-vs-html
-     */
-    html?: string;
-    id?: string;
-    /**
-     * Parameters that will be delivered to the template and will render it accordingly.
-     */
-    params?: {
-        [key: string]: string | number | boolean | object;
-    };
-    /**
-     * Events to attach to this template.
-     * event name is the key. the value can either be a boolean (attach to the parent element)
-     * or a map of html id elements.
-     *
-     * See - http://doc.babylonjs.com/extensions/the_templating_system#event-binding
-     */
-    events?: {
-        pointerdown?: boolean | {
-            [id: string]: boolean;
-        };
-        pointerup?: boolean | {
-            [id: string]: boolean;
-        };
-        pointermove?: boolean | {
-            [id: string]: boolean;
-        };
-        pointerover?: boolean | {
-            [id: string]: boolean;
-        };
-        pointerout?: boolean | {
-            [id: string]: boolean;
-        };
-        pointerenter?: boolean | {
-            [id: string]: boolean;
-        };
-        pointerleave?: boolean | {
-            [id: string]: boolean;
-        };
-        pointercancel?: boolean | {
-            [id: string]: boolean;
-        };
-        click?: boolean | {
-            [id: string]: boolean;
-        };
-        dragstart?: boolean | {
-            [id: string]: boolean;
-        };
-        drop?: boolean | {
-            [id: string]: boolean;
-        };
-        [key: string]: boolean | {
-            [id: string]: boolean;
-        } | undefined;
-    };
-}
-/**
- * The object sent when an event is triggered
- */
-export interface EventCallback {
-    event: Event;
-    template: Template;
-    selector: string;
-    payload?: any;
-}
-/**
- * The template manager, a member of the viewer class, will manage the viewer's templates and generate the HTML.
- * The template manager managers a single viewer and can be seen as the collection of all sub-templates of the viewer.
- */
-export declare class TemplateManager {
-    containerElement: HTMLElement;
-    /**
-     * Will be triggered when any template is initialized
-     */
-    onTemplateInit: Observable<Template>;
-    /**
-     * Will be triggered when any template is fully loaded
-     */
-    onTemplateLoaded: Observable<Template>;
-    /**
-     * Will be triggered when a template state changes
-     */
-    onTemplateStateChange: Observable<Template>;
-    /**
-     * Will be triggered when all templates finished loading
-     */
-    onAllLoaded: Observable<TemplateManager>;
-    /**
-     * Will be triggered when any event on any template is triggered.
-     */
-    onEventTriggered: Observable<EventCallback>;
-    /**
-     * This template manager's event manager. In charge of callback registrations to native event types
-     */
-    eventManager: EventManager;
-    private templates;
-    constructor(containerElement: HTMLElement);
-    /**
-     * Initialize the template(s) for the viewer. Called bay the Viewer class
-     * @param templates the templates to be used to initialize the main template
-     */
-    initTemplate(templates: {
-        [key: string]: ITemplateConfiguration;
-    }): Promise<void>;
-    /**
-     *
-     * This function will create a simple map with child-dependencies of the template html tree.
-     * It will compile each template, check if its children exist in the configuration and will add them if they do.
-     * It is expected that the main template will be called main!
-     *
-     * @param templates
-     */
-    private _buildHTMLTree(templates);
-    /**
-     * Get the canvas in the template tree.
-     * There must be one and only one canvas inthe template.
-     */
-    getCanvas(): HTMLCanvasElement | null;
-    /**
-     * Get a specific template from the template tree
-     * @param name the name of the template to load
-     */
-    getTemplate(name: string): Template | undefined;
-    private _checkLoadedState();
-    /**
-     * Dispose the template manager
-     */
-    dispose(): void;
-}
-import { EventManager } from './eventManager';
-/**
- * This class represents a single template in the viewer's template tree.
- * An example for a template is a single canvas, an overlay (containing sub-templates) or the navigation bar.
- * A template is injected using the template manager in the correct position.
- * The template is rendered using Handlebars and can use Handlebars' features (such as parameter injection)
- *
- * For further information please refer to the documentation page, https://doc.babylonjs.com
- */
-export declare class Template {
-    name: string;
-    private _configuration;
-    /**
-     * Will be triggered when the template is loaded
-     */
-    onLoaded: Observable<Template>;
-    /**
-     * will be triggered when the template is appended to the tree
-     */
-    onAppended: Observable<Template>;
-    /**
-     * Will be triggered when the template's state changed (shown, hidden)
-     */
-    onStateChange: Observable<Template>;
-    /**
-     * Will be triggered when an event is triggered on ths template.
-     * The event is a native browser event (like mouse or pointer events)
-     */
-    onEventTriggered: Observable<EventCallback>;
-    /**
-     * is the template loaded?
-     */
-    isLoaded: boolean;
-    /**
-     * This is meant to be used to track the show and hide functions.
-     * This is NOT (!!) a flag to check if the element is actually visible to the user.
-     */
-    isShown: boolean;
-    /**
-     * Is this template a part of the HTML tree (the template manager injected it)
-     */
-    isInHtmlTree: boolean;
-    /**
-     * The HTML element containing this template
-     */
-    parent: HTMLElement;
-    /**
-     * A promise that is fulfilled when the template finished loading.
-     */
-    initPromise: Promise<Template>;
-    private _fragment;
-    private _addedFragment;
-    private _htmlTemplate;
-    private _rawHtml;
-    private loadRequests;
-    constructor(name: string, _configuration: ITemplateConfiguration);
-    /**
-     * Some templates have parameters (like background color for example).
-     * The parameters are provided to Handlebars which in turn generates the template.
-     * This function will update the template with the new parameters
-     *
-     * Note that when updating parameters the events will be registered again (after being cleared).
-     *
-     * @param params the new template parameters
-     */
-    updateParams(params: {
-        [key: string]: string | number | boolean | object;
-    }, append?: boolean): void;
-    /**
-     * Get the template'S configuration
-     */
-    readonly configuration: ITemplateConfiguration;
-    /**
-     * A template can be a parent element for other templates or HTML elements.
-     * This function will deliver all child HTML elements of this template.
-     */
-    getChildElements(): Array<string>;
-    /**
-     * Appending the template to a parent HTML element.
-     * If a parent is already set and you wish to replace the old HTML with new one, forceRemove should be true.
-     * @param parent the parent to which the template is added
-     * @param forceRemove if the parent already exists, shoud the template be removed from it?
-     */
-    appendTo(parent: HTMLElement, forceRemove?: boolean): void;
-    private _isShowing;
-    private _isHiding;
-    /**
-     * Show the template using the provided visibilityFunction, or natively using display: flex.
-     * The provided function returns a promise that should be fullfilled when the element is shown.
-     * Since it is a promise async operations are more than possible.
-     * See the default viewer for an opacity example.
-     * @param visibilityFunction The function to execute to show the template.
-     */
-    show(visibilityFunction?: (template: Template) => Promise<Template>): Promise<Template>;
-    /**
-     * Hide the template using the provided visibilityFunction, or natively using display: none.
-     * The provided function returns a promise that should be fullfilled when the element is hidden.
-     * Since it is a promise async operations are more than possible.
-     * See the default viewer for an opacity example.
-     * @param visibilityFunction The function to execute to show the template.
-     */
-    hide(visibilityFunction?: (template: Template) => Promise<Template>): Promise<Template>;
-    /**
-     * Dispose this template
-     */
-    dispose(): void;
-    private _getTemplateAsHtml(templateConfig);
-    private _registeredEvents;
-    private _registerEvents();
-    private _getTemplateLocation(templateConfig);
-}

+ 0 - 104
Viewer/src/viewer/defaultViewer.d.ts

@@ -1,104 +0,0 @@
-import { ViewerConfiguration, IModelConfiguration } from './../configuration/configuration';
-import { Template } from './../templateManager';
-import { AbstractViewer } from './viewer';
-import { ViewerModel } from '../model/viewerModel';
-/**
- * The Default viewer is the default implementation of the AbstractViewer.
- * It uses the templating system to render a new canvas and controls.
- */
-export declare class DefaultViewer extends AbstractViewer {
-    containerElement: HTMLElement;
-    /**
-     * Create a new default viewer
-     * @param containerElement the element in which the templates will be rendered
-     * @param initialConfiguration the initial configuration. Defaults to extending the default configuration
-     */
-    constructor(containerElement: HTMLElement, initialConfiguration?: ViewerConfiguration);
-    /**
-     * This will be executed when the templates initialize.
-     */
-    protected _onTemplatesLoaded(): Promise<AbstractViewer>;
-    private _dropped(evt);
-    private _initNavbar();
-    private _animationList;
-    private _currentAnimation;
-    private _isAnimationPaused;
-    private _resumePlay;
-    private _handlePointerDown;
-    /**
-     * Plays or Pauses animation
-     */
-    private _togglePlayPause;
-    private _oldIdleRotationValue;
-    /**
-     * Control progress bar position based on animation current frame
-     */
-    private _updateProgressBar;
-    /**
-     * Update Current Animation Speed
-     */
-    private _updateAnimationSpeed;
-    /**
-     * Update Current Animation Type
-     */
-    private _updateAnimationType;
-    /**
-     * Toggle fullscreen of the entire viewer
-     */
-    toggleFullscreen: () => void;
-    /**
-     * Preparing the container element to present the viewer
-     */
-    protected _prepareContainerElement(): void;
-    /**
-     * This function will configure the templates and update them after a model was loaded
-     * It is mainly responsible to changing the title and subtitle etc'.
-     * @param model the model to be used to configure the templates by
-     */
-    protected _configureTemplate(model: ViewerModel): void;
-    /**
-     * This will load a new model to the default viewer
-     * overriding the AbstractViewer's loadModel.
-     * The scene will automatically be cleared of the old models, if exist.
-     * @param model the configuration object (or URL) to load.
-     */
-    loadModel(model?: string | File | IModelConfiguration): Promise<ViewerModel>;
-    private _onModelLoaded;
-    /**
-     * Show the overlay and the defined sub-screen.
-     * 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<string> | Promise<Template>;
-    /**
-     * Hide the overlay screen.
-     */
-    hideOverlayScreen(): Promise<string> | Promise<Template>;
-    /**
-     * show the viewer (in case it was hidden)
-     *
-     * @param visibilityFunction an optional function to execute in order to show the container
-     */
-    show(visibilityFunction?: ((template: Template) => Promise<Template>)): Promise<Template>;
-    /**
-     * hide the viewer (in case it is visible)
-     *
-     * @param visibilityFunction an optional function to execute in order to hide the container
-     */
-    hide(visibilityFunction?: ((template: Template) => Promise<Template>)): Promise<Template>;
-    /**
-     * Show the loading screen.
-     * The loading screen can be configured using the configuration object
-     */
-    showLoadingScreen(): Promise<string> | Promise<Template>;
-    /**
-     * Hide the loading screen
-     */
-    hideLoadingScreen(): Promise<string> | Promise<Template>;
-    /**
-     * An extension of the light configuration of the abstract viewer.
-     * @param lightsConfiguration the light configuration to use
-     * @param model the model that will be used to configure the lights (if the lights are model-dependant)
-     */
-    private _configureLights(lightsConfiguration?, model?);
-}

+ 0 - 206
Viewer/src/viewer/sceneManager.d.ts

@@ -1,206 +0,0 @@
-import { Scene, ArcRotateCamera, Light, SceneOptimizer, EnvironmentHelper, Color3, Observable, DefaultRenderingPipeline, Nullable } from 'babylonjs';
-import { AbstractViewer } from './viewer';
-import { ILightConfiguration, ISceneConfiguration, ISceneOptimizerConfiguration, ICameraConfiguration, ISkyboxConfiguration, ViewerConfiguration, IGroundConfiguration, IModelConfiguration } from '../configuration/configuration';
-import { ViewerModel } from '../model/viewerModel';
-import { ViewerLabs } from '../labs/viewerLabs';
-/**
- * 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, ArcRotateCamera, Scene, etc')
- * T - the configuration type
- */
-export interface IPostConfigurationCallback<OBJ, CONF> {
-    newConfiguration: CONF;
-    sceneManager: SceneManager;
-    object: OBJ;
-    model?: ViewerModel;
-}
-export declare class SceneManager {
-    private _viewer;
-    /**
-     * Will notify when the scene was initialized
-     */
-    onSceneInitObservable: Observable<Scene>;
-    /**
-     * Will notify after the scene was configured. Can be used to further configure the scene
-     */
-    onSceneConfiguredObservable: Observable<IPostConfigurationCallback<Scene, ISceneConfiguration>>;
-    /**
-     * Will notify after the scene optimized was configured. Can be used to further configure the scene optimizer
-     */
-    onSceneOptimizerConfiguredObservable: Observable<IPostConfigurationCallback<SceneOptimizer, ISceneOptimizerConfiguration | boolean>>;
-    /**
-     * Will notify after the camera was configured. Can be used to further configure the camera
-     */
-    onCameraConfiguredObservable: Observable<IPostConfigurationCallback<ArcRotateCamera, ICameraConfiguration>>;
-    /**
-     * Will notify after the lights were configured. Can be used to further configure lights
-     */
-    onLightsConfiguredObservable: Observable<IPostConfigurationCallback<Array<Light>, {
-        [name: string]: ILightConfiguration | boolean | number;
-    }>>;
-    /**
-     * Will notify after the model(s) were configured. Can be used to further configure models
-     */
-    onModelsConfiguredObservable: Observable<IPostConfigurationCallback<Array<ViewerModel>, IModelConfiguration>>;
-    /**
-     * Will notify after the envirnoment was configured. Can be used to further configure the environment
-     */
-    onEnvironmentConfiguredObservable: Observable<IPostConfigurationCallback<EnvironmentHelper, {
-        skybox?: ISkyboxConfiguration | boolean;
-        ground?: IGroundConfiguration | boolean;
-    }>>;
-    /**
-     * The Babylon Scene of this viewer
-     */
-    scene: Scene;
-    /**
-     * The camera used in this viewer
-     */
-    camera: ArcRotateCamera;
-    /**
-     * Babylon's scene optimizer
-     */
-    sceneOptimizer: SceneOptimizer;
-    /**
-     * Models displayed in this viewer.
-     */
-    models: Array<ViewerModel>;
-    /**
-     * Babylon's environment helper of this viewer
-     */
-    environmentHelper: EnvironmentHelper;
-    private _animationBlendingEnabled;
-    protected _defaultHighpTextureType: number;
-    protected _shadowGeneratorBias: number;
-    protected _defaultPipelineTextureType: number;
-    /**
-     * The maximum number of shadows supported by the curent viewer
-     */
-    protected _maxShadows: number;
-    /**
-     * is HDR supported?
-     */
-    private _hdrSupport;
-    private _mainColor;
-    private _reflectionColor;
-    private readonly _white;
-    private _forceShadowUpdate;
-    /**
-     * The labs variable consists of objects that will have their API change.
-     * Please be careful when using labs in production.
-     */
-    labs: ViewerLabs;
-    private _defaultRenderingPipeline;
-    readonly defaultRenderingPipeline: Nullable<DefaultRenderingPipeline>;
-    constructor(_viewer: AbstractViewer);
-    /**
-     * Returns a boolean representing HDR support
-     */
-    readonly isHdrSupported: boolean;
-    /**
-     * Return the main color defined in the configuration.
-     */
-    readonly mainColor: Color3;
-    readonly reflectionColor: Color3;
-    animationBlendingEnabled: boolean;
-    private _processShadows;
-    /**
-     * The flag defining whether shadows are rendered constantly or once.
-     */
-    /**
-     * 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;
-    private _groundEnabled;
-    groundEnabled: boolean;
-    private _groundMirrorEnabled;
-    /**
-     * gets wether the reflection is disabled.
-     */
-    /**
-     * sets wether the reflection is disabled.
-     */
-    groundMirrorEnabled: boolean;
-    private _defaultRenderingPipelineEnabled;
-    defaultRenderingPipelineEnabled: boolean;
-    /**
-     * Sets the engine flags to unlock all babylon features.
-     * Can also be configured using the scene.flags configuration object
-     */
-    unlockBabylonFeatures(): void;
-    /**
-     * initialize the scene. Calling this function again will dispose the old scene, if exists.
-     */
-    initScene(sceneConfiguration?: ISceneConfiguration, optimizerConfiguration?: boolean | ISceneOptimizerConfiguration): Promise<Scene>;
-    clearScene(clearModels?: boolean, clearLights?: boolean): void;
-    /**
-     * This will update the scene's configuration, including camera, lights, environment.
-     * @param newConfiguration the delta that should be configured. This includes only the changes
-     * @param globalConfiguration The global configuration object, after the new configuration was merged into it
-     */
-    updateConfiguration(newConfiguration: Partial<ViewerConfiguration>, globalConfiguration: ViewerConfiguration): void;
-    private _defaultRenderingPipelineShouldBuild;
-    private _rebuildPostprocesses(configuration?);
-    private _bloomEnabled;
-    bloomEnabled: boolean;
-    private _fxaaEnabled;
-    fxaaEnabled: boolean;
-    /**
-     * internally configure the scene using the provided configuration.
-     * The scene will not be recreated, but just updated.
-     * @param sceneConfig the (new) scene configuration
-     */
-    protected _configureScene(sceneConfig: ISceneConfiguration): void;
-    /**
-     * Configure the scene optimizer.
-     * The existing scene optimizer will be disposed and a new one will be created.
-     * @param optimizerConfig the (new) optimizer configuration
-     */
-    protected _configureOptimizer(optimizerConfig: ISceneOptimizerConfiguration | boolean): void;
-    /**
-     * configure all models using the configuration.
-     * @param modelConfiguration the configuration to use to reconfigure the models
-     */
-    /**
-     * (Re) configure the camera. The camera will only be created once and from this point will only be reconfigured.
-     * @param cameraConfig the new camera configuration
-     * @param model optionally use the model to configure the camera.
-     */
-    protected _configureCamera(cameraConfig?: ICameraConfiguration): void;
-    private _focusOnModel;
-    protected _configureEnvironment(skyboxConifguration?: ISkyboxConfiguration | boolean, groundConfiguration?: IGroundConfiguration | boolean): void;
-    /**
-     * configure the lights.
-     *
-     * @param lightsConfiguration the (new) light(s) configuration
-     * @param model optionally use the model to configure the camera.
-     */
-    protected _configureLights(lightsConfiguration?: {
-        [name: string]: ILightConfiguration | boolean | number;
-    }): void;
-    private _shadowGroundPlane;
-    private _updateShadowRenderList(shadowGenerator, model?, resetList?);
-    private _updateGroundMirrorRenderList(model?, resetList?);
-    /**
-     * Gets the shadow map blur kernel according to the light configuration.
-     * @param light The light used to generate the shadows
-     * @param bufferSize The size of the shadow map
-     * @return the kernel blur size
-     */
-    getBlurKernel(light: BABYLON.IShadowLight, bufferSize: number): number;
-    /**
-     * Alters render settings to reduce features based on hardware feature limitations
-     * @param enableHDR Allows the viewer to run in HDR mode.
-     */
-    protected _handleHardwareLimitations(enableHDR?: boolean): void;
-    /**
-     * Dispoe the entire viewer including the scene and the engine
-     */
-    dispose(): void;
-    private _cameraBehaviorMapping;
-    private _setCameraBehavior(name, behaviorConfig, payload?);
-}

+ 0 - 233
Viewer/src/viewer/viewer.d.ts

@@ -1,233 +0,0 @@
-import { SceneManager } from './sceneManager';
-import { TemplateManager } from './../templateManager';
-import { ConfigurationLoader } from './../configuration/loader';
-import { Observable, Engine, Scene, SceneLoaderProgressEvent, ISceneLoaderPlugin, ISceneLoaderPluginAsync } from 'babylonjs';
-import { ViewerConfiguration, IObserversConfiguration, IModelConfiguration } from '../configuration/configuration';
-import { ViewerModel } from '../model/viewerModel';
-import { ModelLoader } from '../loader/modelLoader';
-/**
- * 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
- */
-export declare abstract class AbstractViewer {
-    containerElement: HTMLElement;
-    /**
-     * The corresponsing template manager of this viewer.
-     */
-    templateManager: TemplateManager;
-    /**
-     * Babylon Engine corresponding with this viewer
-     */
-    engine: Engine;
-    /**
-     * The ID of this viewer. it will be generated randomly or use the HTML Element's ID.
-     */
-    readonly baseId: string;
-    /**
-     * The last loader used to load a model.
-     * @deprecated
-     */
-    lastUsedLoader: ISceneLoaderPlugin | ISceneLoaderPluginAsync;
-    /**
-     * The ModelLoader instance connected with this viewer.
-     */
-    modelLoader: ModelLoader;
-    /**
-     * A flag that controls whether or not the render loop should be executed
-     */
-    runRenderLoop: boolean;
-    /**
-     * The scene manager connected with this viewer instance
-     */
-    sceneManager: SceneManager;
-    /**
-     * the viewer configuration object
-     */
-    protected _configuration: ViewerConfiguration;
-    /**
-     * Will notify when the scene was initialized
-     */
-    onSceneInitObservable: Observable<Scene>;
-    /**
-     * will notify when the engine was initialized
-     */
-    onEngineInitObservable: Observable<Engine>;
-    /**
-     * Will notify when a new model was added to the scene.
-     * Note that added does not neccessarily mean loaded!
-     */
-    onModelAddedObservable: Observable<ViewerModel>;
-    /**
-     * will notify after every model load
-     */
-    onModelLoadedObservable: Observable<ViewerModel>;
-    /**
-     * will notify when any model notify of progress
-     */
-    onModelLoadProgressObservable: Observable<SceneLoaderProgressEvent>;
-    /**
-     * will notify when any model load failed.
-     */
-    onModelLoadErrorObservable: Observable<{
-        message: string;
-        exception: any;
-    }>;
-    /**
-     * Will notify when a model was removed from the scene;
-     */
-    onModelRemovedObservable: Observable<ViewerModel>;
-    /**
-     * will notify when a new loader was initialized.
-     * Used mainly to know when a model starts loading.
-     */
-    onLoaderInitObservable: Observable<ISceneLoaderPlugin | ISceneLoaderPluginAsync>;
-    /**
-     * Observers registered here will be executed when the entire load process has finished.
-     */
-    onInitDoneObservable: Observable<AbstractViewer>;
-    /**
-     * Functions added to this observable will be executed on each frame rendered.
-     */
-    onFrameRenderedObservable: Observable<AbstractViewer>;
-    /**
-     * The canvas associated with this viewer
-     */
-    protected _canvas: HTMLCanvasElement;
-    /**
-     * The (single) canvas of this viewer
-     */
-    readonly canvas: HTMLCanvasElement;
-    /**
-     * is this viewer disposed?
-     */
-    protected _isDisposed: boolean;
-    /**
-     * registered onBeforeRender functions.
-     * This functions are also registered at the native scene. The reference can be used to unregister them.
-     */
-    protected _registeredOnBeforeRenderFunctions: Array<() => void>;
-    /**
-     * The configuration loader of this viewer
-     */
-    protected _configurationLoader: ConfigurationLoader;
-    /**
-     * Is the viewer already initialized. for internal use.
-     */
-    protected _isInit: boolean;
-    constructor(containerElement: HTMLElement, initialConfiguration?: ViewerConfiguration);
-    /**
-     * get the baseId of this viewer
-     */
-    getBaseId(): string;
-    /**
-     * Do we have a canvas to render on, and is it a part of the scene
-     */
-    isCanvasInDOM(): boolean;
-    /**
-     * Is the engine currently set to rende even when the page is in background
-     */
-    /**
-     * Set the viewer's background rendering flag.
-     */
-    renderInBackground: boolean;
-    /**
-     * Get the configuration object. This is a reference only.
-     * The configuration can ONLY be updated using the updateConfiguration function.
-     * changing this object will have no direct effect on the scene.
-     */
-    readonly configuration: ViewerConfiguration;
-    /**
-     * force resizing the engine.
-     */
-    forceResize(): void;
-    /**
-     * The resize function that will be registered with the window object
-     */
-    protected _resize: () => void;
-    /**
-     * Force a single render loop execution.
-     */
-    forceRender(): void;
-    /**
-     * render loop that will be executed by the engine
-     */
-    protected _render: (force?: boolean) => void;
-    /**
-     * Takes a screenshot of the scene and returns it as a base64 encoded png.
-     * @param callback optional callback that will be triggered when screenshot is done.
-     * @param width Optional screenshot width (default to 512).
-     * @param height Optional screenshot height (default to 512).
-     * @returns a promise with the screenshot data
-     */
-    takeScreenshot(callback?: (data: string) => void, width?: number, height?: number): Promise<string>;
-    /**
-     * Update the current viewer configuration with new values.
-     * Only provided information will be updated, old configuration values will be kept.
-     * If this.configuration was manually changed, you can trigger this function with no parameters,
-     * and the entire configuration will be updated.
-     * @param newConfiguration the partial configuration to update
-     *
-     */
-    updateConfiguration(newConfiguration?: Partial<ViewerConfiguration>): void;
-    /**
-     * this is used to register native functions using the configuration object.
-     * This will configure the observers.
-     * @param observersConfiguration observers configuration
-     */
-    protected _configureObservers(observersConfiguration: IObserversConfiguration): void;
-    /**
-     * Dispoe the entire viewer including the scene and the engine
-     */
-    dispose(): void;
-    /**
-     * This will prepare the container element for the viewer
-     */
-    protected abstract _prepareContainerElement(): any;
-    /**
-     * This function will execute when the HTML templates finished initializing.
-     * It should initialize the engine and continue execution.
-     *
-     * @returns {Promise<AbstractViewer>} The viewer object will be returned after the object was loaded.
-     */
-    protected _onTemplatesLoaded(): Promise<AbstractViewer>;
-    /**
-     * This will force the creation of an engine and a scene.
-     * It will also load a model if preconfigured.
-     * But first - it will load the extendible onTemplateLoaded()!
-     */
-    private _onTemplateLoaded();
-    /**
-     * Initialize the engine. Retruns a promise in case async calls are needed.
-     *
-     * @protected
-     * @returns {Promise<Engine>}
-     * @memberof Viewer
-     */
-    protected _initEngine(): Promise<Engine>;
-    private _isLoading;
-    /**
-     * Initialize a model loading. The returned object (a ViewerModel object) will be loaded in the background.
-     * The difference between this and loadModel is that loadModel will fulfill the promise when the model finished loading.
-     *
-     * @param modelConfig model configuration to use when loading the model.
-     * @param clearScene should the scene be cleared before loading this model
-     * @returns a ViewerModel object that is not yet fully loaded.
-     */
-    initModel(modelConfig: string | File | IModelConfiguration, clearScene?: boolean): ViewerModel;
-    /**
-     * load a model using the provided configuration.
-     * This function, as opposed to initModel, will return a promise that resolves when the model is loaded, and rejects with error.
-     * If you want to attach to the observables of the model, use initModle instead.
-     *
-     * @param modelConfig the model configuration or URL to load.
-     * @param clearScene Should the scene be cleared before loading the model
-     * @returns a Promise the fulfills when the model finished loading successfully.
-     */
-    loadModel(modelConfig: string | File | IModelConfiguration, clearScene?: boolean): Promise<ViewerModel>;
-    private _fpsTimeoutInterval;
-    protected _initTelemetryEvents(): void;
-    /**
-     * Injects all the spectre shader in the babylon shader store
-     */
-    protected _injectCustomShaders(): void;
-}

+ 0 - 55
Viewer/src/viewer/viewerManager.d.ts

@@ -1,55 +0,0 @@
-import { Observable } from 'babylonjs';
-import { AbstractViewer } from './viewer';
-/**
- * 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.
- */
-export declare class ViewerManager {
-    private _viewers;
-    /**
-     * A callback that will be triggered when a new viewer was added
-     */
-    onViewerAdded: (viewer: AbstractViewer) => void;
-    /**
-     * Will notify when a new viewer was added
-     */
-    onViewerAddedObservable: Observable<AbstractViewer>;
-    /**
-     * Will notify when a viewer was removed (disposed)
-     */
-    onViewerRemovedObservable: Observable<string>;
-    constructor();
-    /**
-     * Adding a new viewer to the viewer manager and start tracking it.
-     * @param viewer the viewer to add
-     */
-    addViewer(viewer: AbstractViewer): void;
-    /**
-     * remove a viewer from the viewer manager
-     * @param viewer the viewer to remove
-     */
-    removeViewer(viewer: AbstractViewer): void;
-    /**
-     * Get a viewer by its baseId (if the container element has an ID, it is the this is. if not, a random id was assigned)
-     * @param id the id of the HTMl element (or the viewer's, if none provided)
-     */
-    getViewerById(id: string): AbstractViewer;
-    /**
-     * Get a viewer using a container element
-     * @param element the HTML element to search viewers associated with
-     */
-    getViewerByHTMLElement(element: HTMLElement): AbstractViewer | undefined;
-    /**
-     * Get a promise that will fullfil when this viewer was initialized.
-     * Since viewer initialization and template injection is asynchronous, using the promise will guaranty that
-     * you will get the viewer after everything was already configured.
-     * @param id the viewer id to find
-     */
-    getViewerPromiseById(id: string): Promise<AbstractViewer>;
-    private _onViewerAdded(viewer);
-    /**
-     * dispose the manager and all of its associated viewers
-     */
-    dispose(): void;
-}
-export declare let viewerManager: ViewerManager;

+ 0 - 15
Viewer/strip-indent

@@ -1,15 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
-    *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
-esac
-
-if [ -x "$basedir/node" ]; then
-  "$basedir/node"  "$basedir/node_modules/strip-indent/cli.js" "$@"
-  ret=$?
-else 
-  node  "$basedir/node_modules/strip-indent/cli.js" "$@"
-  ret=$?
-fi
-exit $ret

+ 0 - 7
Viewer/strip-indent.cmd

@@ -1,7 +0,0 @@
-@IF EXIST "%~dp0\node.exe" (
-  "%~dp0\node.exe"  "%~dp0\node_modules\strip-indent\cli.js" %*
-) ELSE (
-  @SETLOCAL
-  @SET PATHEXT=%PATHEXT:;.JS;=;%
-  node  "%~dp0\node_modules\strip-indent\cli.js" %*
-)

+ 0 - 15
Viewer/tsc

@@ -1,15 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
-    *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
-esac
-
-if [ -x "$basedir/node" ]; then
-  "$basedir/node"  "$basedir/node_modules/typescript/bin/tsc" "$@"
-  ret=$?
-else 
-  node  "$basedir/node_modules/typescript/bin/tsc" "$@"
-  ret=$?
-fi
-exit $ret

+ 0 - 7
Viewer/tsc.cmd

@@ -1,7 +0,0 @@
-@IF EXIST "%~dp0\node.exe" (
-  "%~dp0\node.exe"  "%~dp0\node_modules\typescript\bin\tsc" %*
-) ELSE (
-  @SETLOCAL
-  @SET PATHEXT=%PATHEXT:;.JS;=;%
-  node  "%~dp0\node_modules\typescript\bin\tsc" %*
-)

+ 0 - 15
Viewer/tsserver

@@ -1,15 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
-    *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
-esac
-
-if [ -x "$basedir/node" ]; then
-  "$basedir/node"  "$basedir/node_modules/typescript/bin/tsserver" "$@"
-  ret=$?
-else 
-  node  "$basedir/node_modules/typescript/bin/tsserver" "$@"
-  ret=$?
-fi
-exit $ret

+ 0 - 7
Viewer/tsserver.cmd

@@ -1,7 +0,0 @@
-@IF EXIST "%~dp0\node.exe" (
-  "%~dp0\node.exe"  "%~dp0\node_modules\typescript\bin\tsserver" %*
-) ELSE (
-  @SETLOCAL
-  @SET PATHEXT=%PATHEXT:;.JS;=;%
-  node  "%~dp0\node_modules\typescript\bin\tsserver" %*
-)

+ 0 - 15
Viewer/uglifyjs

@@ -1,15 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
-    *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
-esac
-
-if [ -x "$basedir/node" ]; then
-  "$basedir/node"  "$basedir/node_modules/uglify-js/bin/uglifyjs" "$@"
-  ret=$?
-else 
-  node  "$basedir/node_modules/uglify-js/bin/uglifyjs" "$@"
-  ret=$?
-fi
-exit $ret

+ 0 - 7
Viewer/uglifyjs.cmd

@@ -1,7 +0,0 @@
-@IF EXIST "%~dp0\node.exe" (
-  "%~dp0\node.exe"  "%~dp0\node_modules\uglify-js\bin\uglifyjs" %*
-) ELSE (
-  @SETLOCAL
-  @SET PATHEXT=%PATHEXT:;.JS;=;%
-  node  "%~dp0\node_modules\uglify-js\bin\uglifyjs" %*
-)

+ 0 - 15
Viewer/uuid

@@ -1,15 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
-    *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
-esac
-
-if [ -x "$basedir/node" ]; then
-  "$basedir/node"  "$basedir/node_modules/uuid/bin/uuid" "$@"
-  ret=$?
-else 
-  node  "$basedir/node_modules/uuid/bin/uuid" "$@"
-  ret=$?
-fi
-exit $ret

+ 0 - 7
Viewer/uuid.cmd

@@ -1,7 +0,0 @@
-@IF EXIST "%~dp0\node.exe" (
-  "%~dp0\node.exe"  "%~dp0\node_modules\uuid\bin\uuid" %*
-) ELSE (
-  @SETLOCAL
-  @SET PATHEXT=%PATHEXT:;.JS;=;%
-  node  "%~dp0\node_modules\uuid\bin\uuid" %*
-)

+ 0 - 15
Viewer/webpack

@@ -1,15 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
-    *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
-esac
-
-if [ -x "$basedir/node" ]; then
-  "$basedir/node"  "$basedir/node_modules/webpack/bin/webpack.js" "$@"
-  ret=$?
-else 
-  node  "$basedir/node_modules/webpack/bin/webpack.js" "$@"
-  ret=$?
-fi
-exit $ret

+ 0 - 15
Viewer/webpack-dev-server

@@ -1,15 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
-    *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
-esac
-
-if [ -x "$basedir/node" ]; then
-  "$basedir/node"  "$basedir/node_modules/webpack-dev-server/bin/webpack-dev-server.js" "$@"
-  ret=$?
-else 
-  node  "$basedir/node_modules/webpack-dev-server/bin/webpack-dev-server.js" "$@"
-  ret=$?
-fi
-exit $ret

+ 0 - 7
Viewer/webpack-dev-server.cmd

@@ -1,7 +0,0 @@
-@IF EXIST "%~dp0\node.exe" (
-  "%~dp0\node.exe"  "%~dp0\node_modules\webpack-dev-server\bin\webpack-dev-server.js" %*
-) ELSE (
-  @SETLOCAL
-  @SET PATHEXT=%PATHEXT:;.JS;=;%
-  node  "%~dp0\node_modules\webpack-dev-server\bin\webpack-dev-server.js" %*
-)

+ 0 - 7
Viewer/webpack.cmd

@@ -1,7 +0,0 @@
-@IF EXIST "%~dp0\node.exe" (
-  "%~dp0\node.exe"  "%~dp0\node_modules\webpack\bin\webpack.js" %*
-) ELSE (
-  @SETLOCAL
-  @SET PATHEXT=%PATHEXT:;.JS;=;%
-  node  "%~dp0\node_modules\webpack\bin\webpack.js" %*
-)

+ 63 - 62
Viewer/webpack.config.js

@@ -1,7 +1,8 @@
 const path = require('path');
 const webpack = require('webpack');
 
-module.exports = [{
+module.exports = /*[
+    {
     entry: {
         'assets': './src/assets/index.ts'
     },
@@ -42,69 +43,69 @@ module.exports = [{
             loader: 'base64-font-loader'
         }]
     }
-},
-{
-    entry: {
-        'viewer': './src/index.ts',
-    },
-    output: {
-        path: path.resolve(__dirname, 'dist'),
-        filename: '[name].js',
-        libraryTarget: 'umd',
-        library: 'BabylonViewer',
-        umdNamedDefine: true,
-        devtoolModuleFilenameTemplate: '[relative-resource-path]'
-    },
-    resolve: {
-        extensions: ['.ts', '.js'],
-        alias: {
-            "babylonjs": __dirname + '/../dist/preview release/babylon.max.js',
-            "babylonjs-materials": __dirname + '/../dist/preview release/materialsLibrary/babylonjs.materials.js',
-            "babylonjs-loaders": __dirname + '/../dist/preview release/loaders/babylonjs.loaders.js',
-            "babylonjs-viewer-assets": __dirname + '/dist/assets.js'
-        }
-    },
-    externals: {
-        // until physics will be integrated in the viewer, ignore cannon
-        cannon: 'CANNON',
-        oimo: 'OIMO',
-        earcut: true
-    },
-    devtool: 'source-map',
-    plugins: [
-        new webpack.WatchIgnorePlugin([
-            /\.d\.ts$/
-        ])
-    ],
-    module: {
-        loaders: [{
-            test: /\.tsx?$/,
-            loader: 'ts-loader',
-            exclude: /node_modules/
+},*/
+    {
+        entry: {
+            'viewer': './src/index.ts',
         },
-        {
-            test: /\.(html)$/,
-            use: {
-                loader: 'html-loader',
-                options: {
-                    minimize: true
-                }
+        output: {
+            path: path.resolve(__dirname, 'dist'),
+            filename: '[name].js',
+            libraryTarget: 'umd',
+            library: 'BabylonViewer',
+            umdNamedDefine: true,
+            devtoolModuleFilenameTemplate: '[relative-resource-path]'
+        },
+        resolve: {
+            extensions: ['.ts', '.js'],
+            alias: {
+                "babylonjs": __dirname + '/../dist/preview release/babylon.max.js',
+                "babylonjs-materials": __dirname + '/../dist/preview release/materialsLibrary/babylonjs.materials.js',
+                "babylonjs-loaders": __dirname + '/../dist/preview release/loaders/babylonjs.loaders.js',
+                "babylonjs-viewer-assets": __dirname + '/src/assets/index.ts'
             }
         },
-        {
-            test: /\.(jpe?g|png|ttf|eot|svg?)(\?[a-z0-9=&.]+)?$/,
-            use: 'base64-image-loader?limit=1000&name=[name].[ext]'
+        externals: {
+            // until physics will be integrated in the viewer, ignore cannon
+            cannon: 'CANNON',
+            oimo: 'OIMO',
+            earcut: true
         },
-        {
-            test: /\.(woff|ttf|eot|svg)(\?v=[0-9]\.[0-9]\.[0-9])?$/,
-            loader: 'base64-font-loader'
-        }]
-    },
-    devServer: {
-        contentBase: path.join(__dirname, "dist"),
-        compress: false,
-        //open: true,
-        port: 9000
+        devtool: 'source-map',
+        plugins: [
+            new webpack.WatchIgnorePlugin([
+                /\.d\.ts$/
+            ])
+        ],
+        module: {
+            loaders: [{
+                test: /\.tsx?$/,
+                loader: 'ts-loader',
+                exclude: /node_modules/
+            },
+            {
+                test: /\.(html)$/,
+                use: {
+                    loader: 'html-loader',
+                    options: {
+                        minimize: true
+                    }
+                }
+            },
+            {
+                test: /\.(jpe?g|png|ttf|eot|svg?)(\?[a-z0-9=&.]+)?$/,
+                use: 'base64-image-loader?limit=1000&name=[name].[ext]'
+            },
+            {
+                test: /\.(woff|ttf|eot|svg)(\?v=[0-9]\.[0-9]\.[0-9])?$/,
+                loader: 'base64-font-loader'
+            }]
+        },
+        devServer: {
+            contentBase: path.join(__dirname, "dist"),
+            compress: false,
+            //open: true,
+            port: 9000
+        }
     }
-}
-]
+//]

+ 0 - 15
Viewer/which

@@ -1,15 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
-    *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
-esac
-
-if [ -x "$basedir/node" ]; then
-  "$basedir/node"  "$basedir/node_modules/which/bin/which" "$@"
-  ret=$?
-else 
-  node  "$basedir/node_modules/which/bin/which" "$@"
-  ret=$?
-fi
-exit $ret

+ 0 - 7
Viewer/which.cmd

@@ -1,7 +0,0 @@
-@IF EXIST "%~dp0\node.exe" (
-  "%~dp0\node.exe"  "%~dp0\node_modules\which\bin\which" %*
-) ELSE (
-  @SETLOCAL
-  @SET PATHEXT=%PATHEXT:;.JS;=;%
-  node  "%~dp0\node_modules\which\bin\which" %*
-)