浏览代码

Merge remote-tracking branch 'upstream/master' into subsurface-scattering

Benjamin Guignabert 5 年之前
父节点
当前提交
221428487f
共有 100 个文件被更改,包括 819 次插入280 次删除
  1. 1 1
      Tools/Config/config.json
  2. 0 0
      __assets__to_deleted/_headers
  3. 0 0
      __assets__to_deleted/environments/backgroundGround.png
  4. 0 0
      __assets__to_deleted/environments/backgroundSkybox.dds
  5. 0 0
      __assets__to_deleted/environments/correlatedBRDF.dds
  6. 0 0
      __assets__to_deleted/environments/correlatedBRDF_RGBD.png
  7. 0 0
      __assets__to_deleted/environments/correlatedMSBRDF.dds
  8. 0 0
      __assets__to_deleted/environments/correlatedMSBRDF_RGBD.png
  9. 0 0
      __assets__to_deleted/environments/environmentSpecular.dds
  10. 0 0
      __assets__to_deleted/environments/environmentSpecular.env
  11. 0 0
      __assets__to_deleted/environments/fullFloatEnvironmentBrdf.dds
  12. 0 0
      __assets__to_deleted/environments/studio.env
  13. 0 0
      __assets__to_deleted/environments/uncorrelatedBRDF.dds
  14. 0 0
      __assets__to_deleted/environments/uncorrelatedBRDF_RGBD.png
  15. 0 0
      __assets__to_deleted/meshes/controllers/_headers
  16. 0 0
      __assets__to_deleted/meshes/controllers/_redirects
  17. 0 0
      __assets__to_deleted/meshes/controllers/generic/generic.babylon
  18. 0 0
      __assets__to_deleted/meshes/controllers/generic/vr_controller_01_mrhat.png
  19. 0 0
      __assets__to_deleted/meshes/controllers/generic/vr_controller_01_mrhat_MetallicGlossMap.png
  20. 0 0
      __assets__to_deleted/meshes/controllers/microsoft/045E-065B/LICENSE
  21. 0 0
      __assets__to_deleted/meshes/controllers/microsoft/045E-065B/left.glb
  22. 0 0
      __assets__to_deleted/meshes/controllers/microsoft/045E-065B/right.glb
  23. 0 0
      __assets__to_deleted/meshes/controllers/microsoft/045E-065D/left.glb
  24. 0 0
      __assets__to_deleted/meshes/controllers/microsoft/045E-065D/right.glb
  25. 0 0
      __assets__to_deleted/meshes/controllers/microsoft/default/LICENSE
  26. 0 0
      __assets__to_deleted/meshes/controllers/microsoft/default/left.glb
  27. 0 0
      __assets__to_deleted/meshes/controllers/microsoft/default/right.glb
  28. 0 0
      __assets__to_deleted/meshes/controllers/oculus/external_controller01_col.png
  29. 0 0
      __assets__to_deleted/meshes/controllers/oculus/external_controller01_col_MetallicGlossMap.png
  30. 0 0
      __assets__to_deleted/meshes/controllers/oculus/left.babylon
  31. 0 0
      __assets__to_deleted/meshes/controllers/oculus/right.babylon
  32. 0 0
      __assets__to_deleted/meshes/controllers/oculusQuest/OculusQuestTouchControllerTexture.png
  33. 0 0
      __assets__to_deleted/meshes/controllers/oculusQuest/left.babylon
  34. 0 0
      __assets__to_deleted/meshes/controllers/oculusQuest/right.babylon
  35. 0 0
      __assets__to_deleted/meshes/controllers/vive/onepointfive_texture.png
  36. 0 0
      __assets__to_deleted/meshes/controllers/vive/onepointfive_texture_MetallicGlossMap.png
  37. 0 0
      __assets__to_deleted/meshes/controllers/vive/wand.babylon
  38. 0 0
      __assets__to_deleted/nme/currentScreenPostProcess.png
  39. 0 0
      __assets__to_deleted/particles/systems/explosion.json
  40. 0 0
      __assets__to_deleted/particles/systems/fire.json
  41. 0 0
      __assets__to_deleted/particles/systems/rain.json
  42. 0 0
      __assets__to_deleted/particles/systems/smoke.json
  43. 0 0
      __assets__to_deleted/particles/systems/sun.json
  44. 0 0
      __assets__to_deleted/particles/textures/explosion/FlameBlastSpriteSheet.png
  45. 0 0
      __assets__to_deleted/particles/textures/explosion/Flare.png
  46. 0 0
      __assets__to_deleted/particles/textures/explosion/FlashParticle.png
  47. 0 0
      __assets__to_deleted/particles/textures/explosion/Smoke_SpriteSheet_8x8.png
  48. 0 0
      __assets__to_deleted/particles/textures/fire/Fire_SpriteSheet1_8x8.png
  49. 0 0
      __assets__to_deleted/particles/textures/fire/Fire_SpriteSheet2_8x8.png
  50. 0 0
      __assets__to_deleted/particles/textures/fire/Fire_SpriteSheet3_8x8.png
  51. 0 0
      __assets__to_deleted/particles/textures/fire/sparks.png
  52. 0 0
      __assets__to_deleted/particles/textures/rain/Rain.png
  53. 0 0
      __assets__to_deleted/particles/textures/smoke/Smoke_SpriteSheet_8x8.png
  54. 0 0
      __assets__to_deleted/particles/textures/sun/T_Star.png
  55. 0 0
      __assets__to_deleted/particles/textures/sun/T_SunFlare.png
  56. 0 0
      __assets__to_deleted/particles/textures/sun/T_SunSurface.png
  57. 16 55
      azure-pipelines-cd.yml
  58. 1 1
      dist/preview release/babylon.js
  59. 3 0
      dist/preview release/babylon.max.js
  60. 1 1
      dist/preview release/babylon.max.js.map
  61. 2 2
      dist/preview release/inspector/babylon.inspector.bundle.js
  62. 10 5
      dist/preview release/inspector/babylon.inspector.bundle.max.js
  63. 1 1
      dist/preview release/inspector/babylon.inspector.bundle.max.js.map
  64. 1 0
      dist/preview release/inspector/babylon.inspector.d.ts
  65. 2 0
      dist/preview release/inspector/babylon.inspector.module.d.ts
  66. 24 1
      dist/preview release/sandbox/babylon.sandbox.d.ts
  67. 6 6
      dist/preview release/sandbox/babylon.sandbox.js
  68. 244 9
      dist/preview release/sandbox/babylon.sandbox.max.js
  69. 1 1
      dist/preview release/sandbox/babylon.sandbox.max.js.map
  70. 51 2
      dist/preview release/sandbox/babylon.sandbox.module.d.ts
  71. 1 1
      dist/preview release/viewer/babylon.viewer.js
  72. 1 1
      dist/preview release/viewer/babylon.viewer.max.js
  73. 1 0
      dist/preview release/what's new.md
  74. 8 2
      inspector/src/components/actionTabs/lineContainerComponent.tsx
  75. 3 3
      inspector/src/components/globalState.ts
  76. 0 0
      sandbox/__tobedeleted__/animation.js
  77. 0 0
      sandbox/__tobedeleted__/debug.html
  78. 0 0
      sandbox/__tobedeleted__/environment.js
  79. 0 0
      sandbox/__tobedeleted__/index-local.html
  80. 0 0
      sandbox/__tobedeleted__/index-media.css
  81. 2 0
      sandbox/index.css
  82. 0 0
      sandbox/__tobedeleted__/index.html
  83. 0 0
      sandbox/__tobedeleted__/index.js
  84. 1 1
      sandbox/public/index.html
  85. 162 0
      sandbox/src/components/animationBar.tsx
  86. 30 8
      sandbox/src/components/dropUpButton.tsx
  87. 4 2
      sandbox/src/components/footer.tsx
  88. 1 0
      sandbox/src/components/footerButton.tsx
  89. 1 0
      sandbox/src/img/icon-down.svg
  90. 1 0
      sandbox/src/img/icon-pause.svg
  91. 1 0
      sandbox/src/img/icon-play.svg
  92. 1 0
      sandbox/src/img/icon-up.svg
  93. 4 1
      sandbox/src/sandbox.tsx
  94. 135 0
      sandbox/src/scss/animationBar.scss
  95. 86 33
      sandbox/src/scss/footer.scss
  96. 7 0
      sandbox/src/scss/main.scss
  97. 1 1
      sandbox/src/tools/environmentTools.ts
  98. 4 0
      src/Debug/skeletonViewer.ts
  99. 0 142
      src/Engines/Native/nativeShaderProcessor.ts
  100. 0 0
      src/Engines/nativeEngine.ts

+ 1 - 1
Tools/Config/config.json

@@ -823,4 +823,4 @@
             "legacyPackageOutputDirectory": "../../../Viewer/build/assets/"
             "legacyPackageOutputDirectory": "../../../Viewer/build/assets/"
         }
         }
     }
     }
-}
+}

assets/meshes/controllers/_headers → __assets__to_deleted/_headers


assets/environments/backgroundGround.png → __assets__to_deleted/environments/backgroundGround.png


assets/environments/backgroundSkybox.dds → __assets__to_deleted/environments/backgroundSkybox.dds


assets/environments/correlatedBRDF.dds → __assets__to_deleted/environments/correlatedBRDF.dds


assets/environments/correlatedBRDF_RGBD.png → __assets__to_deleted/environments/correlatedBRDF_RGBD.png


assets/environments/correlatedMSBRDF.dds → __assets__to_deleted/environments/correlatedMSBRDF.dds


assets/environments/correlatedMSBRDF_RGBD.png → __assets__to_deleted/environments/correlatedMSBRDF_RGBD.png


assets/environments/environmentSpecular.dds → __assets__to_deleted/environments/environmentSpecular.dds


assets/environments/environmentSpecular.env → __assets__to_deleted/environments/environmentSpecular.env


assets/environments/fullFloatEnvironmentBrdf.dds → __assets__to_deleted/environments/fullFloatEnvironmentBrdf.dds


assets/environments/studio.env → __assets__to_deleted/environments/studio.env


assets/environments/uncorrelatedBRDF.dds → __assets__to_deleted/environments/uncorrelatedBRDF.dds


assets/environments/uncorrelatedBRDF_RGBD.png → __assets__to_deleted/environments/uncorrelatedBRDF_RGBD.png


assets/_headers → __assets__to_deleted/meshes/controllers/_headers


assets/meshes/controllers/_redirects → __assets__to_deleted/meshes/controllers/_redirects


assets/meshes/controllers/generic/generic.babylon → __assets__to_deleted/meshes/controllers/generic/generic.babylon


assets/meshes/controllers/generic/vr_controller_01_mrhat.png → __assets__to_deleted/meshes/controllers/generic/vr_controller_01_mrhat.png


assets/meshes/controllers/generic/vr_controller_01_mrhat_MetallicGlossMap.png → __assets__to_deleted/meshes/controllers/generic/vr_controller_01_mrhat_MetallicGlossMap.png


assets/meshes/controllers/microsoft/default/LICENSE → __assets__to_deleted/meshes/controllers/microsoft/045E-065B/LICENSE


assets/meshes/controllers/microsoft/default/left.glb → __assets__to_deleted/meshes/controllers/microsoft/045E-065B/left.glb


assets/meshes/controllers/microsoft/default/right.glb → __assets__to_deleted/meshes/controllers/microsoft/045E-065B/right.glb


assets/meshes/controllers/microsoft/045E-065D/left.glb → __assets__to_deleted/meshes/controllers/microsoft/045E-065D/left.glb


assets/meshes/controllers/microsoft/045E-065D/right.glb → __assets__to_deleted/meshes/controllers/microsoft/045E-065D/right.glb


assets/meshes/controllers/microsoft/045E-065B/LICENSE → __assets__to_deleted/meshes/controllers/microsoft/default/LICENSE


assets/meshes/controllers/microsoft/045E-065B/left.glb → __assets__to_deleted/meshes/controllers/microsoft/default/left.glb


assets/meshes/controllers/microsoft/045E-065B/right.glb → __assets__to_deleted/meshes/controllers/microsoft/default/right.glb


assets/meshes/controllers/oculus/external_controller01_col.png → __assets__to_deleted/meshes/controllers/oculus/external_controller01_col.png


assets/meshes/controllers/oculus/external_controller01_col_MetallicGlossMap.png → __assets__to_deleted/meshes/controllers/oculus/external_controller01_col_MetallicGlossMap.png


assets/meshes/controllers/oculus/left.babylon → __assets__to_deleted/meshes/controllers/oculus/left.babylon


assets/meshes/controllers/oculus/right.babylon → __assets__to_deleted/meshes/controllers/oculus/right.babylon


assets/meshes/controllers/oculusQuest/OculusQuestTouchControllerTexture.png → __assets__to_deleted/meshes/controllers/oculusQuest/OculusQuestTouchControllerTexture.png


assets/meshes/controllers/oculusQuest/left.babylon → __assets__to_deleted/meshes/controllers/oculusQuest/left.babylon


assets/meshes/controllers/oculusQuest/right.babylon → __assets__to_deleted/meshes/controllers/oculusQuest/right.babylon


assets/meshes/controllers/vive/onepointfive_texture.png → __assets__to_deleted/meshes/controllers/vive/onepointfive_texture.png


assets/meshes/controllers/vive/onepointfive_texture_MetallicGlossMap.png → __assets__to_deleted/meshes/controllers/vive/onepointfive_texture_MetallicGlossMap.png


assets/meshes/controllers/vive/wand.babylon → __assets__to_deleted/meshes/controllers/vive/wand.babylon


assets/nme/currentScreenPostProcess.png → __assets__to_deleted/nme/currentScreenPostProcess.png


assets/particles/systems/explosion.json → __assets__to_deleted/particles/systems/explosion.json


assets/particles/systems/fire.json → __assets__to_deleted/particles/systems/fire.json


assets/particles/systems/rain.json → __assets__to_deleted/particles/systems/rain.json


assets/particles/systems/smoke.json → __assets__to_deleted/particles/systems/smoke.json


assets/particles/systems/sun.json → __assets__to_deleted/particles/systems/sun.json


assets/particles/textures/explosion/FlameBlastSpriteSheet.png → __assets__to_deleted/particles/textures/explosion/FlameBlastSpriteSheet.png


assets/particles/textures/explosion/Flare.png → __assets__to_deleted/particles/textures/explosion/Flare.png


assets/particles/textures/explosion/FlashParticle.png → __assets__to_deleted/particles/textures/explosion/FlashParticle.png


assets/particles/textures/explosion/Smoke_SpriteSheet_8x8.png → __assets__to_deleted/particles/textures/explosion/Smoke_SpriteSheet_8x8.png


assets/particles/textures/fire/Fire_SpriteSheet1_8x8.png → __assets__to_deleted/particles/textures/fire/Fire_SpriteSheet1_8x8.png


assets/particles/textures/fire/Fire_SpriteSheet2_8x8.png → __assets__to_deleted/particles/textures/fire/Fire_SpriteSheet2_8x8.png


assets/particles/textures/fire/Fire_SpriteSheet3_8x8.png → __assets__to_deleted/particles/textures/fire/Fire_SpriteSheet3_8x8.png


assets/particles/textures/fire/sparks.png → __assets__to_deleted/particles/textures/fire/sparks.png


assets/particles/textures/rain/Rain.png → __assets__to_deleted/particles/textures/rain/Rain.png


assets/particles/textures/smoke/Smoke_SpriteSheet_8x8.png → __assets__to_deleted/particles/textures/smoke/Smoke_SpriteSheet_8x8.png


assets/particles/textures/sun/T_Star.png → __assets__to_deleted/particles/textures/sun/T_Star.png


assets/particles/textures/sun/T_SunFlare.png → __assets__to_deleted/particles/textures/sun/T_SunFlare.png


assets/particles/textures/sun/T_SunSurface.png → __assets__to_deleted/particles/textures/sun/T_SunSurface.png


+ 16 - 55
azure-pipelines-cd.yml

@@ -33,50 +33,11 @@ jobs:
     env:
     env:
       AZURE_PULLREQUESTID: $(System.PullRequest.PullRequestId)
       AZURE_PULLREQUESTID: $(System.PullRequest.PullRequestId)
       NETLIFY_AUTH_TOKEN: $(babylon.netlify.authToken)
       NETLIFY_AUTH_TOKEN: $(babylon.netlify.authToken)
-  - script: 'npx netlify deploy --prod --dir=sandbox/'
+  - script: 'npx netlify deploy --prod --dir=sandbox/public/'
     displayName: 'netlify deploy babylonjs-sandbox'
     displayName: 'netlify deploy babylonjs-sandbox'
     env:
     env:
       AZURE_PULLREQUESTID: $(System.PullRequest.PullRequestId)
       AZURE_PULLREQUESTID: $(System.PullRequest.PullRequestId)
       NETLIFY_AUTH_TOKEN: $(babylon.netlify.authToken)
       NETLIFY_AUTH_TOKEN: $(babylon.netlify.authToken)
-# playground
-#  - script: 'npx netlify unlink'
-#    displayName: 'netlify unlink'
-#  - script: 'npx netlify link --id=9161d5f0-b208-4b86-a281-9300386f6c94'
-#    displayName: 'netlify link babylonjs-playground'
-#    env:
-#      AZURE_PULLREQUESTID: $(System.PullRequest.PullRequestId)
-#      NETLIFY_AUTH_TOKEN: $(babylon.netlify.authToken)
-#  - script: 'npx netlify deploy --prod --dir=Playground/'
-#    displayName: 'netlify deploy babylonjs-playground'
-#    env:
-#      AZURE_PULLREQUESTID: $(System.PullRequest.PullRequestId)
-#      NETLIFY_AUTH_TOKEN: $(babylon.netlify.authToken)
-# babylonjs-preview
-#  - script: 'npx netlify unlink'
-#    displayName: 'netlify unlink'
-#  - script: 'npx netlify link --id=e1c1c520-e3a4-4d5b-91e6-254f1bea1b6b'
-#    displayName: 'netlify link babylonjs-preview'
-#    env:
-#      AZURE_PULLREQUESTID: $(System.PullRequest.PullRequestId)
-#      NETLIFY_AUTH_TOKEN: $(babylon.netlify.authToken)
-#  - script: 'npx netlify deploy --prod --dir="dist/preview release"'
-#    displayName: 'netlify deploy babylonjs-preview'
-#    env:
-#      AZURE_PULLREQUESTID: $(System.PullRequest.PullRequestId)
-#      NETLIFY_AUTH_TOKEN: $(babylon.netlify.authToken)
-# assets-babylonjs
-  - script: 'npx netlify unlink'
-    displayName: 'netlify unlink'
-  - script: 'npx netlify link --id=bd58224a-5f56-42de-afd2-ffa72b85fd71'
-    displayName: 'netlify link assets-babylonjs'
-    env:
-      AZURE_PULLREQUESTID: $(System.PullRequest.PullRequestId)
-      NETLIFY_AUTH_TOKEN: $(babylon.netlify.authToken)
-  - script: 'npx netlify deploy --prod --dir=assets/'
-    displayName: 'netlify deploy assets-babylonjs'
-    env:
-      AZURE_PULLREQUESTID: $(System.PullRequest.PullRequestId)
-      NETLIFY_AUTH_TOKEN: $(babylon.netlify.authToken)
 # nodeeditor
 # nodeeditor
   - script: 'npm install --prefix Tools/Gulp && npx gulp nodeEditor --gulpfile ./Tools/Gulp/gulpfile.js'
   - script: 'npm install --prefix Tools/Gulp && npx gulp nodeEditor --gulpfile ./Tools/Gulp/gulpfile.js'
     displayName: 'gulp build nodeeditor'
     displayName: 'gulp build nodeeditor'
@@ -107,19 +68,19 @@ jobs:
     env:
     env:
       AZURE_PULLREQUESTID: $(System.PullRequest.PullRequestId)
       AZURE_PULLREQUESTID: $(System.PullRequest.PullRequestId)
       NETLIFY_AUTH_TOKEN: $(babylon.netlify.authToken)
       NETLIFY_AUTH_TOKEN: $(babylon.netlify.authToken)
-  - task: AzureFileCopy@2
-    displayName: 'Update Preview Storage'
-    inputs:
-      SourcePath: 'dist/preview release'
-      azureSubscription: 'Visual Studio Enterprise (2bb1afe6-4492-4d3d-9cf8-e658f447d211)'
-      Destination: AzureBlob
-      storage: previewcdn
-      ContainerName: '$web'
+#  - task: AzureFileCopy@2
+#    displayName: 'Update Preview Storage'
+#    inputs:
+#      SourcePath: 'dist/preview release'
+#      azureSubscription: 'Visual Studio Enterprise (2bb1afe6-4492-4d3d-9cf8-e658f447d211)'
+#      Destination: AzureBlob
+#      storage: previewcdn
+#      ContainerName: '$web'
 
 
-  - task: AzureCLI@2
-    displayName: 'Purge preview CDN'
-    inputs:
-      azureSubscription: 'Visual Studio Enterprise(2bb1afe6-4492-4d3d-9cf8-e658f447d211)'
-      scriptType: 'ps'
-      scriptLocation: 'inlineScript'
-      inlineScript: 'az cdn endpoint purge --resource-group Playground-Resources --profile-name Preview-CDN --name babylonjspreview --content-paths /*'
+#  - task: AzureCLI@2
+#    displayName: 'Purge preview CDN'
+#    inputs:
+#      azureSubscription: 'Visual Studio Enterprise(2bb1afe6-4492-4d3d-9cf8-e658f447d211)'
+#      scriptType: 'ps'
+#      scriptLocation: 'inlineScript'
+#      inlineScript: 'az cdn endpoint purge --resource-group Playground-Resources --profile-name Preview-CDN --name babylonjspreview --content-paths /*'

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


+ 3 - 0
dist/preview release/babylon.max.js

@@ -29414,6 +29414,9 @@ var SkeletonViewer = /** @class */ (function () {
                 return;
                 return;
             }
             }
             this._isEnabled = value;
             this._isEnabled = value;
+            if (this._debugMesh) {
+                this._debugMesh.setEnabled(value);
+            }
             if (value) {
             if (value) {
                 this._scene.registerBeforeRender(this._renderFunction);
                 this._scene.registerBeforeRender(this._renderFunction);
             }
             }

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


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


+ 10 - 5
dist/preview release/inspector/babylon.inspector.bundle.max.js

@@ -55818,10 +55818,13 @@ var LineContainerComponent = /** @class */ (function (_super) {
     };
     };
     LineContainerComponent.prototype.componentDidMount = function () {
     LineContainerComponent.prototype.componentDidMount = function () {
         var _this = this;
         var _this = this;
-        if (this.props.globalState && this.props.globalState.selectedLineContainerTitles.length === 0) {
+        if (!this.props.globalState) {
             return;
             return;
         }
         }
-        if (this.props.globalState && this.props.globalState.selectedLineContainerTitles.indexOf(this.props.title) > -1) {
+        if (this.props.globalState.selectedLineContainerTitles.length === 0 && this.props.globalState.selectedLineContainerTitlesNoFocus.length === 0) {
+            return;
+        }
+        if (this.props.globalState.selectedLineContainerTitles.indexOf(this.props.title) > -1) {
             setTimeout(function () {
             setTimeout(function () {
                 _this.props.globalState.selectedLineContainerTitles = [];
                 _this.props.globalState.selectedLineContainerTitles = [];
             });
             });
@@ -55830,6 +55833,9 @@ var LineContainerComponent = /** @class */ (function (_super) {
                 _this.setState({ isHighlighted: false });
                 _this.setState({ isHighlighted: false });
             }, 5000);
             }, 5000);
         }
         }
+        else if (this.props.globalState.selectedLineContainerTitlesNoFocus.indexOf(this.props.title) > -1) {
+            this.setState({ isExpanded: true, isHighlighted: false });
+        }
         else {
         else {
             this.setState({ isExpanded: false });
             this.setState({ isExpanded: false });
         }
         }
@@ -68863,8 +68869,6 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Misc/observable */ "babylonjs/Misc/observable");
 /* harmony import */ var babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Misc/observable */ "babylonjs/Misc/observable");
 /* harmony import */ var babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_0__);
 /* harmony import */ var babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_0__);
 /* harmony import */ var _replayRecorder__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./replayRecorder */ "./components/replayRecorder.ts");
 /* harmony import */ var _replayRecorder__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./replayRecorder */ "./components/replayRecorder.ts");
-/* harmony import */ var _inspector__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../inspector */ "./inspector.ts");
-
 
 
 
 
 
 
@@ -68883,6 +68887,7 @@ var GlobalState = /** @class */ (function () {
         this.glTFLoaderDefaults = { "validate": true };
         this.glTFLoaderDefaults = { "validate": true };
         this.blockMutationUpdates = false;
         this.blockMutationUpdates = false;
         this.selectedLineContainerTitles = [];
         this.selectedLineContainerTitles = [];
+        this.selectedLineContainerTitlesNoFocus = [];
         this.recorder = new _replayRecorder__WEBPACK_IMPORTED_MODULE_1__["ReplayRecorder"]();
         this.recorder = new _replayRecorder__WEBPACK_IMPORTED_MODULE_1__["ReplayRecorder"]();
         this._onlyUseEulers = null;
         this._onlyUseEulers = null;
         this._ignoreBackfacesForPicking = null;
         this._ignoreBackfacesForPicking = null;
@@ -68954,7 +68959,7 @@ var GlobalState = /** @class */ (function () {
             _this.validationResults = results;
             _this.validationResults = results;
             _this.onValidationResultsUpdatedObservable.notifyObservers(results);
             _this.onValidationResultsUpdatedObservable.notifyObservers(results);
             if (results.issues.numErrors || results.issues.numWarnings) {
             if (results.issues.numErrors || results.issues.numWarnings) {
-                _inspector__WEBPACK_IMPORTED_MODULE_2__["Inspector"].MarkLineContainerTitleForHighlighting("GLTF VALIDATION");
+                _this.selectedLineContainerTitlesNoFocus.push("GLTF VALIDATION");
                 _this.onTabChangedObservable.notifyObservers(3);
                 _this.onTabChangedObservable.notifyObservers(3);
             }
             }
         });
         });

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


+ 1 - 0
dist/preview release/inspector/babylon.inspector.d.ts

@@ -52,6 +52,7 @@ declare module INSPECTOR {
         };
         };
         blockMutationUpdates: boolean;
         blockMutationUpdates: boolean;
         selectedLineContainerTitles: Array<string>;
         selectedLineContainerTitles: Array<string>;
+        selectedLineContainerTitlesNoFocus: Array<string>;
         recorder: ReplayRecorder;
         recorder: ReplayRecorder;
         private _onlyUseEulers;
         private _onlyUseEulers;
         get onlyUseEulers(): boolean;
         get onlyUseEulers(): boolean;

+ 2 - 0
dist/preview release/inspector/babylon.inspector.module.d.ts

@@ -65,6 +65,7 @@ declare module "babylonjs-inspector/components/globalState" {
         };
         };
         blockMutationUpdates: boolean;
         blockMutationUpdates: boolean;
         selectedLineContainerTitles: Array<string>;
         selectedLineContainerTitles: Array<string>;
+        selectedLineContainerTitlesNoFocus: Array<string>;
         recorder: ReplayRecorder;
         recorder: ReplayRecorder;
         private _onlyUseEulers;
         private _onlyUseEulers;
         get onlyUseEulers(): boolean;
         get onlyUseEulers(): boolean;
@@ -3595,6 +3596,7 @@ declare module INSPECTOR {
         };
         };
         blockMutationUpdates: boolean;
         blockMutationUpdates: boolean;
         selectedLineContainerTitles: Array<string>;
         selectedLineContainerTitles: Array<string>;
+        selectedLineContainerTitlesNoFocus: Array<string>;
         recorder: ReplayRecorder;
         recorder: ReplayRecorder;
         private _onlyUseEulers;
         private _onlyUseEulers;
         get onlyUseEulers(): boolean;
         get onlyUseEulers(): boolean;

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

@@ -74,9 +74,10 @@ declare module SANDBOX {
     interface IDropUpButtonProps {
     interface IDropUpButtonProps {
         globalState: GlobalState;
         globalState: GlobalState;
         enabled: boolean;
         enabled: boolean;
-        icon: any;
+        icon?: any;
         label: string;
         label: string;
         options: string[];
         options: string[];
+        selectedOption?: string;
         onOptionPicked: (option: string) => void;
         onOptionPicked: (option: string) => void;
     }
     }
     export class DropUpButton extends React.Component<IDropUpButtonProps, {
     export class DropUpButton extends React.Component<IDropUpButtonProps, {
@@ -104,6 +105,28 @@ declare module SANDBOX {
     }
     }
 }
 }
 declare module SANDBOX {
 declare module SANDBOX {
+    interface IAnimationBarProps {
+        globalState: GlobalState;
+        enabled: boolean;
+    }
+    export class AnimationBar extends React.Component<IAnimationBarProps, {
+        groupIndex: number;
+    }> {
+        private _currentScene;
+        private _sliderSyncObserver;
+        private _currentGroup;
+        private _sliderRef;
+        private _currentPlayingState;
+        constructor(props: IAnimationBarProps);
+        getCurrentPosition(): string;
+        registerBeforeRender(newScene: BABYLON.Scene): void;
+        pause(): void;
+        play(): void;
+        sliderInput(evt: React.FormEvent<HTMLInputElement>): void;
+        render(): JSX.Element | null;
+    }
+}
+declare module SANDBOX {
     interface IFooterProps {
     interface IFooterProps {
         globalState: GlobalState;
         globalState: GlobalState;
     }
     }

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


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


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


+ 51 - 2
dist/preview release/sandbox/babylon.sandbox.module.d.ts

@@ -88,9 +88,10 @@ declare module "babylonjs-sandbox/components/dropUpButton" {
     interface IDropUpButtonProps {
     interface IDropUpButtonProps {
         globalState: GlobalState;
         globalState: GlobalState;
         enabled: boolean;
         enabled: boolean;
-        icon: any;
+        icon?: any;
         label: string;
         label: string;
         options: string[];
         options: string[];
+        selectedOption?: string;
         onOptionPicked: (option: string) => void;
         onOptionPicked: (option: string) => void;
     }
     }
     export class DropUpButton extends React.Component<IDropUpButtonProps, {
     export class DropUpButton extends React.Component<IDropUpButtonProps, {
@@ -119,6 +120,31 @@ declare module "babylonjs-sandbox/components/footerFileButton" {
         render(): JSX.Element | null;
         render(): JSX.Element | null;
     }
     }
 }
 }
+declare module "babylonjs-sandbox/components/animationBar" {
+    import * as React from "react";
+    import { GlobalState } from "babylonjs-sandbox/globalState";
+    import { Scene } from 'babylonjs/scene';
+    interface IAnimationBarProps {
+        globalState: GlobalState;
+        enabled: boolean;
+    }
+    export class AnimationBar extends React.Component<IAnimationBarProps, {
+        groupIndex: number;
+    }> {
+        private _currentScene;
+        private _sliderSyncObserver;
+        private _currentGroup;
+        private _sliderRef;
+        private _currentPlayingState;
+        constructor(props: IAnimationBarProps);
+        getCurrentPosition(): string;
+        registerBeforeRender(newScene: Scene): void;
+        pause(): void;
+        play(): void;
+        sliderInput(evt: React.FormEvent<HTMLInputElement>): void;
+        render(): JSX.Element | null;
+    }
+}
 declare module "babylonjs-sandbox/components/footer" {
 declare module "babylonjs-sandbox/components/footer" {
     import * as React from "react";
     import * as React from "react";
     import { GlobalState } from "babylonjs-sandbox/globalState";
     import { GlobalState } from "babylonjs-sandbox/globalState";
@@ -237,9 +263,10 @@ declare module SANDBOX {
     interface IDropUpButtonProps {
     interface IDropUpButtonProps {
         globalState: GlobalState;
         globalState: GlobalState;
         enabled: boolean;
         enabled: boolean;
-        icon: any;
+        icon?: any;
         label: string;
         label: string;
         options: string[];
         options: string[];
+        selectedOption?: string;
         onOptionPicked: (option: string) => void;
         onOptionPicked: (option: string) => void;
     }
     }
     export class DropUpButton extends React.Component<IDropUpButtonProps, {
     export class DropUpButton extends React.Component<IDropUpButtonProps, {
@@ -267,6 +294,28 @@ declare module SANDBOX {
     }
     }
 }
 }
 declare module SANDBOX {
 declare module SANDBOX {
+    interface IAnimationBarProps {
+        globalState: GlobalState;
+        enabled: boolean;
+    }
+    export class AnimationBar extends React.Component<IAnimationBarProps, {
+        groupIndex: number;
+    }> {
+        private _currentScene;
+        private _sliderSyncObserver;
+        private _currentGroup;
+        private _sliderRef;
+        private _currentPlayingState;
+        constructor(props: IAnimationBarProps);
+        getCurrentPosition(): string;
+        registerBeforeRender(newScene: BABYLON.Scene): void;
+        pause(): void;
+        play(): void;
+        sliderInput(evt: React.FormEvent<HTMLInputElement>): void;
+        render(): JSX.Element | null;
+    }
+}
+declare module SANDBOX {
     interface IFooterProps {
     interface IFooterProps {
         globalState: GlobalState;
         globalState: GlobalState;
     }
     }

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


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


+ 1 - 0
dist/preview release/what's new.md

@@ -235,6 +235,7 @@
 - Fixed MSAA fail on MultiRenderTarget textures ([CraigFeldpsar](https://github.com/craigfeldspar)
 - Fixed MSAA fail on MultiRenderTarget textures ([CraigFeldpsar](https://github.com/craigfeldspar)
 - Fixed wrong display when setting `DefaultRenderingPipeline.imageProcessingEnabled` to `false` ([Popov72](https://github.com/Popov72))
 - Fixed wrong display when setting `DefaultRenderingPipeline.imageProcessingEnabled` to `false` ([Popov72](https://github.com/Popov72))
 - Fix crash when loading a .obj file with vertex colors ([Popov72](https://github.com/Popov72))
 - Fix crash when loading a .obj file with vertex colors ([Popov72](https://github.com/Popov72))
+- Fix skeleton viewer still visible when `isEnabled = false` ([Popov72](https://github.com/Popov72))
 
 
 ## Breaking changes
 ## Breaking changes
 
 

+ 8 - 2
inspector/src/components/actionTabs/lineContainerComponent.tsx

@@ -26,11 +26,15 @@ export class LineContainerComponent extends React.Component<ILineContainerCompon
     }
     }
 
 
     componentDidMount() {
     componentDidMount() {
-        if (this.props.globalState && this.props.globalState.selectedLineContainerTitles.length === 0) {
+        if (!this.props.globalState) {
             return;
             return;
         }
         }
 
 
-        if (this.props.globalState && this.props.globalState.selectedLineContainerTitles.indexOf(this.props.title) > -1) {
+        if (this.props.globalState.selectedLineContainerTitles.length === 0 && this.props.globalState.selectedLineContainerTitlesNoFocus.length === 0) {
+            return;
+        }
+
+        if (this.props.globalState.selectedLineContainerTitles.indexOf(this.props.title) > -1) {
             setTimeout(() => {
             setTimeout(() => {
                 this.props.globalState!.selectedLineContainerTitles = [];
                 this.props.globalState!.selectedLineContainerTitles = [];
             });
             });
@@ -40,6 +44,8 @@ export class LineContainerComponent extends React.Component<ILineContainerCompon
             window.setTimeout(() => {
             window.setTimeout(() => {
                 this.setState({ isHighlighted: false });
                 this.setState({ isHighlighted: false });
             }, 5000);
             }, 5000);
+        } else if (this.props.globalState.selectedLineContainerTitlesNoFocus.indexOf(this.props.title) > -1) {
+            this.setState({ isExpanded: true, isHighlighted: false });
         } else {
         } else {
             this.setState({isExpanded: false});
             this.setState({isExpanded: false});
         }
         }

+ 3 - 3
inspector/src/components/globalState.ts

@@ -11,7 +11,6 @@ import { PropertyChangedEvent } from "./propertyChangedEvent";
 import { ReplayRecorder } from './replayRecorder';
 import { ReplayRecorder } from './replayRecorder';
 import { DataStorage } from 'babylonjs/Misc/dataStorage';
 import { DataStorage } from 'babylonjs/Misc/dataStorage';
 import { CodeChangedEvent } from './codeChangedEvent';
 import { CodeChangedEvent } from './codeChangedEvent';
-import { Inspector } from '../inspector';
 
 
 export class GlobalState {
 export class GlobalState {
     public onSelectionChangedObservable: Observable<any>;
     public onSelectionChangedObservable: Observable<any>;
@@ -32,7 +31,8 @@ export class GlobalState {
     public glTFLoaderDefaults: { [key: string]: any } = { "validate": true };
     public glTFLoaderDefaults: { [key: string]: any } = { "validate": true };
 
 
     public blockMutationUpdates = false;
     public blockMutationUpdates = false;
-    public selectedLineContainerTitles:Array<string> = [];
+    public selectedLineContainerTitles:Array<string> = [];    
+    public selectedLineContainerTitlesNoFocus:Array<string> = [];
 
 
     public recorder = new ReplayRecorder();
     public recorder = new ReplayRecorder();
 
 
@@ -111,7 +111,7 @@ export class GlobalState {
             this.onValidationResultsUpdatedObservable.notifyObservers(results);
             this.onValidationResultsUpdatedObservable.notifyObservers(results);
 
 
             if (results.issues.numErrors || results.issues.numWarnings) {
             if (results.issues.numErrors || results.issues.numWarnings) {
-                Inspector.MarkLineContainerTitleForHighlighting("GLTF VALIDATION");
+                this.selectedLineContainerTitlesNoFocus.push("GLTF VALIDATION");
                 this.onTabChangedObservable.notifyObservers(3);
                 this.onTabChangedObservable.notifyObservers(3);
             }
             }
         });
         });

sandbox/animation.js → sandbox/__tobedeleted__/animation.js


sandbox/debug.html → sandbox/__tobedeleted__/debug.html


sandbox/environment.js → sandbox/__tobedeleted__/environment.js


sandbox/index-local.html → sandbox/__tobedeleted__/index-local.html


sandbox/index-media.css → sandbox/__tobedeleted__/index-media.css


+ 2 - 0
sandbox/index.css

@@ -212,6 +212,8 @@ a:visited {
     background-color: var(--footer-background);    
     background-color: var(--footer-background);    
     grid-column: 2;
     grid-column: 2;
     grid-row: 1;
     grid-row: 1;
+    padding: 0px;
+    margin: 0px;
 }
 }
 
 
 .row {
 .row {

sandbox/index.html → sandbox/__tobedeleted__/index.html


sandbox/index.js → sandbox/__tobedeleted__/index.js


+ 1 - 1
sandbox/public/index.html

@@ -16,13 +16,13 @@
     <script src="https://preview.babylonjs.com/Oimo.js"></script>
     <script src="https://preview.babylonjs.com/Oimo.js"></script>
     <script src="https://preview.babylonjs.com/libktx.js"></script>
     <script src="https://preview.babylonjs.com/libktx.js"></script>
     <script src="https://preview.babylonjs.com/babylon.js"></script>
     <script src="https://preview.babylonjs.com/babylon.js"></script>
-    <script src="https://preview.babylonjs.com/inspector/babylon.inspector.bundle.js"></script>
 
 
     <script src="https://preview.babylonjs.com/loaders/babylonjs.loaders.min.js"></script>
     <script src="https://preview.babylonjs.com/loaders/babylonjs.loaders.min.js"></script>
     <script src="https://preview.babylonjs.com/serializers/babylonjs.serializers.min.js"></script>
     <script src="https://preview.babylonjs.com/serializers/babylonjs.serializers.min.js"></script>
     <script src="https://preview.babylonjs.com/materialsLibrary/babylonjs.materials.min.js"></script>
     <script src="https://preview.babylonjs.com/materialsLibrary/babylonjs.materials.min.js"></script>
 
 
     
     
+    <script src="https://preview.babylonjs.com/inspector/babylon.inspector.bundle.js"></script>
     <script src="https://preview.babylonjs.com/sandbox/babylon.sandbox.js"></script>
     <script src="https://preview.babylonjs.com/sandbox/babylon.sandbox.js"></script>
     
     
     <style>
     <style>

+ 162 - 0
sandbox/src/components/animationBar.tsx

@@ -0,0 +1,162 @@
+import * as React from "react";
+import { GlobalState } from '../globalState';
+import { DropUpButton } from './dropUpButton';
+import { Scene } from 'babylonjs/scene';
+import { Observer } from 'babylonjs/Misc/observable';
+import { Nullable } from 'babylonjs/types';
+import { AnimationGroup } from 'babylonjs/Animations/animationGroup';
+
+var iconPlay = require("../img/icon-play.svg");
+var iconPause = require("../img/icon-pause.svg");
+
+require("../scss/animationBar.scss");
+
+interface IAnimationBarProps {
+    globalState: GlobalState;
+    enabled: boolean;
+}
+
+export class AnimationBar extends React.Component<IAnimationBarProps, {groupIndex: number}> {
+    private _currentScene: Scene;
+    private _sliderSyncObserver: Nullable<Observer<Scene>>;
+    private _currentGroup: Nullable<AnimationGroup>;
+    private _sliderRef: React.RefObject<HTMLInputElement>;
+    private _currentPlayingState: boolean;
+
+    public constructor(props: IAnimationBarProps) {    
+        super(props);
+
+        this._sliderRef = React.createRef();
+
+        this.state = {groupIndex: 0};
+
+        props.globalState.onSceneLoaded.add(info => {
+            this.registerBeforeRender(info.scene);
+        });
+
+        if (this.props.globalState.currentScene) {
+            this.registerBeforeRender(this.props.globalState.currentScene); 
+        }
+    }
+
+    getCurrentPosition() {
+        if (!this._currentGroup) {
+            return "0";
+
+        }
+        let targetedAnimations = this._currentGroup.targetedAnimations;
+        if (targetedAnimations.length > 0) {
+            let runtimeAnimations = this._currentGroup.targetedAnimations[0].animation.runtimeAnimations;
+            if (runtimeAnimations.length > 0) {
+                return runtimeAnimations[0].currentFrame.toString();
+            }
+        }
+
+        return "0";
+    }
+
+    registerBeforeRender(newScene: Scene) {
+        if (this._currentScene) {
+            this._currentScene.onBeforeRenderObservable.remove(this._sliderSyncObserver);
+        }
+
+        this._currentScene = newScene;
+        this._sliderSyncObserver = this._currentScene.onBeforeRenderObservable.add(() => {
+            if (this._currentGroup && this._sliderRef.current) {
+                this._sliderRef.current.value = this.getCurrentPosition();
+
+                if (this._currentPlayingState !== this._currentGroup.isPlaying) {
+                    this.forceUpdate();
+                }
+            }
+        });
+    }
+
+    pause() {
+        if (!this._currentGroup) {
+            return;
+        }
+
+        this._currentGroup.pause();
+        this.forceUpdate();
+    }
+
+    play() {
+        if (!this._currentGroup) {
+            return;
+        }
+
+        this._currentGroup.play();
+        this.forceUpdate();
+    }
+
+    sliderInput(evt: React.FormEvent<HTMLInputElement>) {
+        if (!this._currentGroup) {
+            return;
+        }
+
+        let value = parseFloat((evt.target as HTMLInputElement).value);
+
+        if (!this._currentGroup.isPlaying) {
+            this._currentGroup.play(true);
+            this._currentGroup.goToFrame(value);
+            this._currentGroup.pause();
+        } else {
+            this._currentGroup.goToFrame(value);
+        }
+    }
+
+    public render() {
+        if (!this.props.enabled) {
+            this._currentGroup = null;
+            return null;
+        }
+        let scene = this.props.globalState.currentScene;
+        
+        if (scene.animationGroups.length === 0) {
+            this._currentGroup = null;
+            return null;
+        }
+        
+        let groupNames = scene.animationGroups.map(g => g.name);
+
+        this._currentGroup = scene.animationGroups[this.state.groupIndex];
+        this._currentPlayingState = this._currentGroup.isPlaying;
+
+        return (
+            <div className="animationBar">
+                <div className="row">
+                    <button id="playBtn">
+                        {
+                            this._currentGroup.isPlaying &&
+                            <img id="pauseImg" src={iconPause} onClick={() => this.pause()}/>
+                        }
+                        {
+                            !this._currentGroup.isPlaying &&
+                            <img id="playImg" src={iconPlay} onClick={() => this.play()}/>
+                        }
+                    </button>
+                    <input ref={this._sliderRef} className="slider" type="range" 
+                        onInput={evt => this.sliderInput(evt)}
+                        min={this._currentGroup.from} 
+                        max={this._currentGroup.to} 
+                        onChange={() => {}}
+                        value={this.getCurrentPosition()} step="any"></input>
+                </div>
+                <DropUpButton globalState={this.props.globalState} 
+                                    label="Active animation group"
+                                    options={groupNames}
+                                    selectedOption={this._currentGroup.name}
+                                    onOptionPicked={option => {
+                                        this._currentGroup!.stop();
+
+                                        let newIndex = groupNames.indexOf(option);
+                                        this.setState({groupIndex: newIndex});
+
+                                        scene.animationGroups[newIndex].play(true);
+                                    }}
+                                    enabled={true}/>
+            </div>            
+        )
+    }
+}

+ 30 - 8
sandbox/src/components/dropUpButton.tsx

@@ -3,13 +3,16 @@ import { GlobalState } from '../globalState';
 import { Nullable } from 'babylonjs/types';
 import { Nullable } from 'babylonjs/types';
 import { Observer } from 'babylonjs/Misc/observable';
 import { Observer } from 'babylonjs/Misc/observable';
 
 
+var iconUp = require("../img/icon-up.svg");
+var iconDown = require("../img/icon-down.svg");
 
 
 interface IDropUpButtonProps {
 interface IDropUpButtonProps {
     globalState: GlobalState;
     globalState: GlobalState;
     enabled: boolean;
     enabled: boolean;
-    icon: any;
+    icon?: any;
     label: string;
     label: string;
     options: string[];
     options: string[];
+    selectedOption?: string;
     onOptionPicked: (option: string) => void;
     onOptionPicked: (option: string) => void;
 }
 }
 
 
@@ -22,7 +25,7 @@ export class DropUpButton extends React.Component<IDropUpButtonProps, {isOpen: b
         this.state = {isOpen: false};
         this.state = {isOpen: false};
 
 
         this._onClickInterceptorClickedObserver = props.globalState.onClickInterceptorClicked.add(() => {
         this._onClickInterceptorClickedObserver = props.globalState.onClickInterceptorClicked.add(() => {
-            this.switchDropUp();
+            this.setState({isOpen: false});
         });
         });
     }
     }
 
 
@@ -46,13 +49,32 @@ export class DropUpButton extends React.Component<IDropUpButtonProps, {isOpen: b
         }
         }
 
 
         return (
         return (
-            <>
-                <div className="button" onClick={() => this.switchDropUp()}>
-                    <img src={this.props.icon} alt={this.props.label} title={this.props.label}  />
-                </div>
+            <div className="dropup">
+                {
+                    this.props.icon &&
+                    <div className={"button" + (this.state.isOpen ? " active" : "")} onClick={() => this.switchDropUp()}>
+                        <img src={this.props.icon} alt={this.props.label} title={this.props.label}  />
+                    </div>
+                }
+                {
+                    this.props.selectedOption &&
+                    <div className={"button long" + (this.state.isOpen ? " active" : "")} onClick={() => this.switchDropUp()}> 
+                        {
+                            this.state.isOpen &&
+                            <img className="button-icon" src={iconDown} alt="Close the list" title="Close the list"  />
+                        }            
+                        {
+                            !this.state.isOpen &&
+                            <img className="button-icon" src={iconUp} alt="Open the list" title="Open the list"  />
+                        }           
+                        <div className="button-text" title={this.props.selectedOption}>
+                            {this.props.selectedOption}
+                        </div>                           
+                    </div>
+                }
                 {
                 {
                     this.state.isOpen &&
                     this.state.isOpen &&
-                    <div className="dropup-content">
+                    <div className={"dropup-content" + (this.props.selectedOption ? " long-mode" : "")}>
                     {
                     {
                         this.props.options.map(o => {
                         this.props.options.map(o => {
                             return(
                             return(
@@ -64,7 +86,7 @@ export class DropUpButton extends React.Component<IDropUpButtonProps, {isOpen: b
                     }
                     }
                     </div>
                     </div>
                 }
                 }
-            </>
+            </div>
         )
         )
     }
     }
 }
 }

+ 4 - 2
sandbox/src/components/footer.tsx

@@ -4,6 +4,7 @@ import { FooterButton } from './footerButton';
 import { DropUpButton } from './dropUpButton';
 import { DropUpButton } from './dropUpButton';
 import { EnvironmentTools } from '../tools/environmentTools';
 import { EnvironmentTools } from '../tools/environmentTools';
 import { FooterFileButton } from './footerFileButton';
 import { FooterFileButton } from './footerFileButton';
+import { AnimationBar } from './animationBar';
 
 
 require("../scss/footer.scss");
 require("../scss/footer.scss");
 var babylonIdentity = require("../img/babylon-identity.svg");
 var babylonIdentity = require("../img/babylon-identity.svg");
@@ -16,8 +17,7 @@ interface IFooterProps {
 }
 }
 
 
 export class Footer extends React.Component<IFooterProps> {
 export class Footer extends React.Component<IFooterProps> {
-    
-        
+            
     public constructor(props: IFooterProps) {    
     public constructor(props: IFooterProps) {    
         super(props);
         super(props);
         props.globalState.onSceneLoaded.add(info => {
         props.globalState.onSceneLoaded.add(info => {
@@ -42,6 +42,8 @@ export class Footer extends React.Component<IFooterProps> {
                 <div className="footerLeft">
                 <div className="footerLeft">
                     <img id="logoImg" src={babylonIdentity}/>
                     <img id="logoImg" src={babylonIdentity}/>
                 </div>
                 </div>
+                <AnimationBar globalState={this.props.globalState} 
+                                enabled={!!this.props.globalState.currentScene}/>
                 <div className="footerRight">
                 <div className="footerRight">
                     <FooterFileButton globalState={this.props.globalState} 
                     <FooterFileButton globalState={this.props.globalState} 
                                 enabled={true}
                                 enabled={true}

+ 1 - 0
sandbox/src/components/footerButton.tsx

@@ -15,6 +15,7 @@ export class FooterButton extends React.Component<IFooterButtonProps> {
         if (!this.props.enabled) {
         if (!this.props.enabled) {
             return null;
             return null;
         }
         }
+        
 
 
         return (
         return (
             <div className="button" onClick={() => this.props.onClick()}>
             <div className="button" onClick={() => this.props.onClick()}>

+ 1 - 0
sandbox/src/img/icon-down.svg

@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 70 70"><defs><style>.cls-1{fill:#fff;}.cls-2{fill:none;}</style></defs><title>DownArrowIcon</title><g id="Layer_2" data-name="Layer 2"><g id="Redlines"><path class="cls-1" d="M23.14,30.07l1.42-1.42L34.85,38.94,45.14,28.65l1.41,1.42L34.85,41.78Z"/><rect class="cls-2" width="70" height="70"/></g></g></svg>

+ 1 - 0
sandbox/src/img/icon-pause.svg

@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 70 70"><defs><style>.cls-1{fill:none;}.cls-2{fill:#fff;}</style></defs><title>PauseIcon</title><g id="Layer_2" data-name="Layer 2"><g id="Redlines"><rect class="cls-1" width="70" height="70"/><path class="cls-2" d="M28.83,44.37v-20h2v20Zm10-20h2v20h-2Z"/></g></g></svg>

+ 1 - 0
sandbox/src/img/icon-play.svg

@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 70 70"><defs><style>.cls-1{fill:none;}.cls-2{fill:#fff;}</style></defs><title>PlayIcon</title><g id="Layer_2" data-name="Layer 2"><g id="Redlines"><rect class="cls-1" width="70" height="70"/><path class="cls-2" d="M28.83,25.13l16,10-16,10Zm2,3.61V41.52l10.22-6.39Z"/></g></g></svg>

+ 1 - 0
sandbox/src/img/icon-up.svg

@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 70 70"><defs><style>.cls-1{fill:#fff;}.cls-2{fill:none;}</style></defs><title>UpArrowIcon</title><g id="Layer_2" data-name="Layer 2"><g id="Redlines"><path class="cls-1" d="M34.85,29.78,24.56,40.06l-1.42-1.41L34.85,26.94l11.7,11.71-1.42,1.41Z"/><rect class="cls-2" width="70" height="70"/></g></g></svg>

+ 4 - 1
sandbox/src/sandbox.tsx

@@ -118,7 +118,10 @@ export class Sandbox extends React.Component<ISandboxProps, {isFooterVisible: bo
                     cameraPosition={this._cameraPosition} 
                     cameraPosition={this._cameraPosition} 
                     expanded={!this.state.isFooterVisible}/>                
                     expanded={!this.state.isFooterVisible}/>                
                 <div ref={this._clickInterceptorRef} 
                 <div ref={this._clickInterceptorRef} 
-                    onClick={() => this._globalState.onClickInterceptorClicked.notifyObservers()}
+                    onClick={() => {
+                        this._globalState.onClickInterceptorClicked.notifyObservers();
+                        this._clickInterceptorRef.current!.classList.add("hidden");
+                    }}
                     className="clickInterceptor hidden"></div>
                     className="clickInterceptor hidden"></div>
                 {
                 {
                     this.state.isFooterVisible &&
                     this.state.isFooterVisible &&

+ 135 - 0
sandbox/src/scss/animationBar.scss

@@ -0,0 +1,135 @@
+.animationBar {
+    align-items: center;
+    color: white;
+    min-height: 30px;
+    height: var(--footer-height);
+    background-color: var(--footer-background);    
+    grid-column: 2;
+    grid-row: 1;
+    margin-left: 10px;
+    display: flex;
+
+    * {        
+        padding: 0px;
+        margin: 0px;
+    }
+
+    .row {
+        display: flex;
+        flex-direction: row;
+        justify-content: center;
+        flex-grow: 10;
+        align-items: center
+    }
+
+    #playBtn {    
+        display: flex;
+        align-items: center;
+        height: var(--footer-height);
+        width: var(--footer-height);
+        border: none;
+        background-color: inherit;
+        cursor: pointer;
+
+        img {
+            width: var(--footer-height);
+            height: var(--footer-height);
+        }
+
+        &:hover {
+            background-color: var(--button-hover-color);   
+        }
+    
+        &:active {
+            background-color: var(--button-hover-background);
+        }
+    
+        &:focus {
+            outline: none !important;
+            border: none;
+        }    
+    }
+
+    .slider {
+        -webkit-appearance: none;
+        cursor: pointer;
+        width: 100%;
+        max-width: 820px;
+        height: var(--footer-height);
+        outline: none;
+        margin-left: 20px;
+        margin-right: 10px;
+        background-color: transparent;
+    }
+
+    /*Chrome -webkit */
+    .slider::-webkit-slider-thumb {
+        -webkit-appearance: none;
+        width: 20px;
+        height: 20px;
+        border: 2px solid white;
+        border-radius: 50%;
+        background: var(--footer-background);
+        margin-top: -10px;
+    }
+    .slider::-webkit-slider-runnable-track {
+        height: 2px;
+        -webkit-appearance: none;
+        background-color: white;
+    }
+
+
+    /** FireFox -moz */
+    .slider::-moz-range-progress {
+    background-color: white;
+    height: 2px; 
+    }
+    .slider::-moz-range-thumb{
+        width: 20px;
+        height: 20px;
+        border: 2px solid white;
+        border-radius: 50%;
+        background: var(--footer-background);
+    }
+    .slider::-moz-range-track {
+        background: white;
+        height: 2px;
+    }
+
+    /** IE -ms */
+    .slider::-ms-track {
+        height: 2px;
+        
+        /*remove bg colour from the track, we'll use ms-fill-lower and ms-fill-upper instead */
+        background: transparent;
+        
+        /*leave room for the larger thumb to overflow with a transparent border */
+        border-color: transparent;
+        border-width: 10px 0;
+
+        /*remove default tick marks*/
+        color: transparent;
+    }
+    .slider::-ms-fill-lower {
+        background: white;
+        border-radius: 5px;
+    }
+    .slider::-ms-fill-upper {
+        background: white;
+        border-radius: 5px;
+    }
+    .slider::-ms-thumb {
+        width: 16px;
+        height: 16px;
+        border: 2px solid white;
+        border-radius: 50%;
+        background: var(--footer-background);
+        margin-top: 0px;
+    }
+}
+
+@media (max-width: 768px) {
+    .animationBar {       
+        margin-left: 0;
+    }
+}

+ 86 - 33
sandbox/src/scss/footer.scss

@@ -24,43 +24,70 @@
         }
         }
     }
     }
 
 
-    .footerRight {
-        display: flex;
-        flex-direction: row-reverse;
-        grid-column: 3;
-        grid-row: 1;
+    .button {
+        float: left; /* Float links side by side */
+        width: var(--footer-height);
+        height: var(--footer-height);
+        margin: 0px;
+        padding: 0;
+        transition: all 0.3s ease; /* Add transition for hover effects */
+        display: grid;
+        align-content: center;
+        justify-content: center;
+        cursor: pointer;
 
 
-        .button {
-            float: left; /* Float links side by side */
-            width: var(--footer-height);
-            height: var(--footer-height);
-            margin: 0px;
-            padding: 0;
-            transition: all 0.3s ease; /* Add transition for hover effects */
-            display: grid;
-            align-content: center;
-            justify-content: center;
-            cursor: pointer;
+        &.long {
+            width: 200px;
+            grid-template-columns: var(--footer-height) calc(200px - var(--footer-height));
 
 
-            img {
-                width: var(--footer-height);
-                height: var(--footer-height);
-            }
-            
-            &:hover {
-                background-color: var(--button-hover-color);
+            .button-icon {
+                grid-row: 1;
+                grid-column: 1;
             }
             }
-            
-            &:active {
-                background-color: var(--button-hover-background);
+
+            .button-text {
+                grid-row: 1;
+                grid-column: 2;
+                align-self: center;
+                justify-self: left;
+                overflow: hidden;
+                text-overflow: ellipsis;
+                white-space: nowrap;
+                font-size: var(--font-size)
             }
             }
-        }         
+        }
+
+        &.active {
+            background-color: var(--button-hover-color);
+        }
+
+        img {
+            width: var(--footer-height);
+            height: var(--footer-height);
+        }
+        
+        &:hover {
+            background-color: var(--button-hover-color);
+        }
         
         
+        &:active {
+            background-color: var(--button-hover-background);
+        }
+    }   
+
+    .dropup {
+        position: relative;        
+
         .dropup-content {
         .dropup-content {
             position: absolute;
             position: absolute;
             bottom: var(--footer-height);
             bottom: var(--footer-height);
-            right: 0px;     
-            z-index: 100;
+            left: 0px;     
+            z-index: 100;            
+            width: calc(2 * var(--footer-height));
+
+            &.long-mode {
+                width: 200px;
+            }
 
 
             div  {
             div  {
                 background-color: var(--button-hover-color);
                 background-color: var(--button-hover-color);
@@ -68,7 +95,7 @@
                 text-overflow: ellipsis;
                 text-overflow: ellipsis;
                 white-space: nowrap;
                 white-space: nowrap;
                 font-size: var(--font-size);
                 font-size: var(--font-size);
-                width: calc(2 * var(--footer-height));
+                width: 100%;
                 color: white;
                 color: white;
                 cursor: pointer;
                 cursor: pointer;
                 height: 40px;
                 height: 40px;
@@ -88,8 +115,15 @@
                     transition: all 0.3s ease;
                     transition: all 0.3s ease;
                 }
                 }
             }
             }
-        }    
-        
+        }     
+    }
+
+    .footerRight {
+        display: flex;
+        flex-direction: row-reverse;
+        grid-column: 3;
+        grid-row: 1;
+                     
         .custom-upload {
         .custom-upload {
             position: relative;
             position: relative;
             background-position: center right;
             background-position: center right;
@@ -130,4 +164,23 @@
             }
             }
         }
         }
     }
     }
-}
+}
+
+@media (max-width: 768px) {
+    .footer {       
+        grid-template-columns: 0px 1fr 150px;
+
+        .dropup {
+            .dropup-content {    
+                width: 100px;
+            }
+        }
+
+        .button {    
+            &.long {
+                width: 100px;                
+                grid-template-columns: var(--footer-height) calc(100px - var(--footer-height));
+            }
+        }
+    }
+}

+ 7 - 0
sandbox/src/scss/main.scss

@@ -96,3 +96,10 @@ html, body, #root {
             }
             }
         }
         }
 }
 }
+
+@media (max-width: 768px) {
+    html {
+        --footer-height: 50px;
+        --font-size: 16px;
+    }
+}

+ 1 - 1
sandbox/src/tools/environmentTools.ts

@@ -21,7 +21,7 @@ export class EnvironmentTools {
     ];    
     ];    
 
 
     public static LoadSkyboxPathTexture(scene: Scene) {                
     public static LoadSkyboxPathTexture(scene: Scene) {                
-        var defaultSkyboxIndex = LocalStorageHelper.ReadLocalStorageValue("defaultSkyboxId", 0);
+        var defaultSkyboxIndex = Math.max(0, LocalStorageHelper.ReadLocalStorageValue("defaultSkyboxId", 0));
         let path = this.SkyboxPath || this.Skyboxes[defaultSkyboxIndex];
         let path = this.SkyboxPath || this.Skyboxes[defaultSkyboxIndex];
         if (path.indexOf(".hdr") === (path.length - 4)) {
         if (path.indexOf(".hdr") === (path.length - 4)) {
             return new HDRCubeTexture(path, scene, 256, false, true, false, true);
             return new HDRCubeTexture(path, scene, 256, false, true, false, true);

+ 4 - 0
src/Debug/skeletonViewer.ts

@@ -70,6 +70,10 @@ export class SkeletonViewer {
 
 
         this._isEnabled = value;
         this._isEnabled = value;
 
 
+        if (this._debugMesh) {
+            this._debugMesh.setEnabled(value);
+        }
+
         if (value) {
         if (value) {
             this._scene.registerBeforeRender(this._renderFunction);
             this._scene.registerBeforeRender(this._renderFunction);
         } else {
         } else {

+ 0 - 142
src/Engines/Native/nativeShaderProcessor.ts

@@ -1,142 +0,0 @@
-import { WebGL2ShaderProcessor } from "../WebGL/webGL2ShaderProcessors";
-import { VertexBuffer } from "../../Meshes/buffer";
-
-// These numbers must match the values for bgfx::Attrib::Enum
-const attributeLocations: { [kind: string]: number } = {
-    [VertexBuffer.PositionKind]: 0,
-    [VertexBuffer.NormalKind]: 1,
-    [VertexBuffer.TangentKind]: 2,
-    [VertexBuffer.UVKind]: 10,
-    [VertexBuffer.UV2Kind]: 11,
-    [VertexBuffer.UV3Kind]: 12,
-    [VertexBuffer.UV4Kind]: 13,
-    [VertexBuffer.ColorKind]: 4,
-    [VertexBuffer.MatricesIndicesKind]: 8,
-    [VertexBuffer.MatricesWeightsKind]: 9,
-};
-// Remap BJS names to bgfx names
-const attributeBGFXName: { [kind: string]: string } = {
-    [VertexBuffer.PositionKind]: "a_position",
-    [VertexBuffer.NormalKind]: "a_normal",
-    [VertexBuffer.TangentKind]: "a_tangent",
-    [VertexBuffer.UVKind]: "a_texcoord0",
-    [VertexBuffer.UV2Kind]: "a_texcoord1",
-    [VertexBuffer.UV3Kind]: "a_texcoord2",
-    [VertexBuffer.UV4Kind]: "a_texcoord3",
-    [VertexBuffer.ColorKind]: "a_color0",
-    [VertexBuffer.MatricesIndicesKind]: "a_indices",
-    [VertexBuffer.MatricesWeightsKind]: "a_weight",
-};
-
-// Must match bgfx::Attrib::TexCoord0
-const firstGenericAttributeLocation = 10;
-
-// Must match bgfx::Attrib::TexCoord7
-const lastGenericAttributeLocation = 17;
-
-/** @hidden */
-export class NativeShaderProcessor extends WebGL2ShaderProcessor {
-    private _genericAttributeLocation: number;
-    private _varyingLocationCount: number;
-    private _varyingLocationMap: { [name: string]: number };
-    private _replacements: Array<{ searchValue: RegExp, replaceValue: string }>;
-    private _textureCount: number;
-    private _uniforms: Array<string>;
-
-    public lineProcessor(line: string): string {
-        for (const replacement of this._replacements) {
-            line = line.replace(replacement.searchValue, replacement.replaceValue);
-        }
-
-        return line;
-    }
-
-    public attributeProcessor(attribute: string): string {
-        const match = attribute.match(/attribute\s+[^\s]+\s+([^\s]+)\s*(?:\[.+\])?\s*;/)!;
-        const name = match[1];
-
-        let location = attributeLocations[name];
-        if (location === undefined) {
-            location = this._genericAttributeLocation++;
-            if (location > lastGenericAttributeLocation) {
-                throw new Error("Exceeded maximum custom attributes");
-            }
-        }
-        let newName = attributeBGFXName[name];
-        if (newName === undefined) {
-            throw new Error("Can't find bgfx name mapping");
-        }
-        attribute = attribute.replace(name, newName);
-        this._replacements.push({ searchValue: new RegExp(`\\b${name}\\b`, 'g'), replaceValue: `${newName}` });
-        return `layout(location=${location}) ${super.attributeProcessor(attribute)}`;
-    }
-
-    public varyingProcessor(varying: string, isFragment: boolean): string {
-        let location: number;
-
-        if (isFragment) {
-            location = this._varyingLocationMap[varying];
-        }
-        else {
-            location = this._varyingLocationCount++;
-            this._varyingLocationMap[varying] = location;
-        }
-
-        return `layout(location=${location}) ${super.varyingProcessor(varying, isFragment)}`;
-    }
-
-    public uniformProcessor(uniform: string): string {
-        const match = uniform.match(/uniform\s+([^\s]+)\s+([^\s]+)\s*(?:\[.+\])?\s*;/)!;
-        const type = match[1];
-        const name = match[2];
-
-        switch (type) {
-            case "sampler2D":
-            case "samplerCube": {
-                const suffix = type.substr(7);
-                const binding = this._textureCount++;
-                this._replacements.push({ searchValue: new RegExp(`\\b${name}\\b`), replaceValue: `sampler${suffix}(${name}Texture, ${name})` });
-                return `layout(binding=${binding}) uniform texture${suffix} ${name}Texture;\nlayout(binding=${binding}) uniform sampler ${name};`;
-            }
-            case "float": {
-                this._replacements.push({ searchValue: new RegExp(`\\b${name}\\b`), replaceValue: `${name}.x` });
-                uniform = `uniform vec4 ${name};`;
-                break;
-            }
-            case "vec2": {
-                this._replacements.push({ searchValue: new RegExp(`\\b${name}\\b`), replaceValue: `${name}.xy` });
-                uniform = `uniform vec4 ${name};`;
-                break;
-            }
-            case "vec3": {
-                this._replacements.push({ searchValue: new RegExp(`\\b${name}\\b`), replaceValue: `${name}.xyz` });
-                uniform = `uniform vec4 ${name};`;
-                break;
-            }
-        }
-
-        this._uniforms.push(uniform);
-        return this._uniforms.length === 1 ? "<UNIFORM>" : "";
-    }
-
-    public preProcessor(code: string, defines: string[], isFragment: boolean): string {
-        this._genericAttributeLocation = firstGenericAttributeLocation;
-
-        if (!isFragment) {
-            this._varyingLocationCount = 0;
-            this._varyingLocationMap = {};
-        }
-
-        this._replacements = [];
-        this._textureCount = 0;
-        this._uniforms = [];
-        return code;
-    }
-
-    public postProcessor(code: string, defines: string[], isFragment: boolean): string {
-        code = super.postProcessor(code, defines, isFragment);
-        code = code.replace("<UNIFORM>", `layout(binding=0) uniform Frame {\n${this._uniforms.join("\n")}\n};`);
-        code = code.replace("out vec4 glFragColor", "layout(location=0) out vec4 glFragColor");
-        return code;
-    }
-}

+ 0 - 0
src/Engines/nativeEngine.ts


部分文件因为文件数量过多而无法显示