@mml-io/3d-web-client-core 0.0.0-experimental-0d0c89d-20240206 → 0.0.0-experimental-a3e15a8-20240207

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.js CHANGED
@@ -2360,18 +2360,15 @@ var RendererStatsFolder = class {
2360
2360
  FPS: "0"
2361
2361
  };
2362
2362
  this.folder = parentFolder.addFolder({ title: "renderStats", expanded });
2363
- this.performance = this.folder.addFolder({ title: "performance", expanded: true });
2364
- this.defails = this.folder.addFolder({ title: "pipeline details", expanded: false });
2365
- this.folder.addBlade({ view: "separator" });
2366
- this.performance.addBinding(this.statsData, "FPS", { readonly: true });
2367
- this.performance.addBinding(this.statsData, "deltaTime", { readonly: true });
2368
- this.performance.addBinding(this.statsData, "rawDeltaTime", { readonly: true });
2369
- this.defails.addBinding(this.statsData, "triangles", { readonly: true });
2370
- this.defails.addBinding(this.statsData, "geometries", { readonly: true });
2371
- this.defails.addBinding(this.statsData, "textures", { readonly: true });
2372
- this.defails.addBinding(this.statsData, "shaders", { readonly: true });
2373
- this.defails.addBinding(this.statsData, "postPasses", { readonly: true });
2374
- this.defails.addBinding(this.statsData, "drawCalls", { readonly: true });
2363
+ this.folder.addBinding(this.statsData, "FPS", { readonly: true });
2364
+ this.folder.addBinding(this.statsData, "deltaTime", { readonly: true });
2365
+ this.folder.addBinding(this.statsData, "rawDeltaTime", { readonly: true });
2366
+ this.folder.addBinding(this.statsData, "triangles", { readonly: true });
2367
+ this.folder.addBinding(this.statsData, "geometries", { readonly: true });
2368
+ this.folder.addBinding(this.statsData, "textures", { readonly: true });
2369
+ this.folder.addBinding(this.statsData, "shaders", { readonly: true });
2370
+ this.folder.addBinding(this.statsData, "postPasses", { readonly: true });
2371
+ this.folder.addBinding(this.statsData, "drawCalls", { readonly: true });
2375
2372
  }
2376
2373
  update(renderer, composer, timeManager) {
2377
2374
  const { geometries, textures } = renderer.info.memory;
@@ -2718,7 +2715,7 @@ var ToneMappingFolder = class {
2718
2715
  // src/tweakpane/tweakPaneStyle.ts
2719
2716
  var tweakPaneStyle = `
2720
2717
  :root {
2721
- --tp-base-background-color: rgba(0, 0, 0, 0.6);
2718
+ --tp-base-background-color: rgba(12, 12, 12, 0.6);
2722
2719
  --tp-base-shadow-color: hsla(0, 0%, 0%, 0.2);
2723
2720
  --tp-button-background-color: hsla(0, 0%, 80%, 1);
2724
2721
  --tp-button-background-color-active: hsla(0, 0%, 100%, 1);
@@ -2739,6 +2736,9 @@ var tweakPaneStyle = `
2739
2736
  --tp-label-foreground-color: hsla(0, 0%, 100%, 0.6);
2740
2737
  --tp-monitor-background-color: hsla(0, 0%, 0%, 0.3);
2741
2738
  --tp-monitor-foreground-color: hsla(0, 0%, 100%, 0.3);
2739
+ -webkit-user-select: none;
2740
+ -ms-user-select: none;
2741
+ user-select: none;
2742
2742
  }
2743
2743
 
2744
2744
  .tp-brkv {
@@ -2748,28 +2748,40 @@ var tweakPaneStyle = `
2748
2748
  }
2749
2749
 
2750
2750
  .tp-dfwv {
2751
+ z-index: 100;
2751
2752
  color: white;
2752
- backdrop-filter: blur(12px);
2753
- width: 360px !important;
2753
+ width: 600px !important;
2754
2754
  display: none;
2755
2755
  -webkit-user-select: none;
2756
2756
  -ms-user-select: none;
2757
2757
  user-select: none;
2758
2758
  }
2759
2759
 
2760
+ .tp-fldv {
2761
+ margin: 1px 0px 0px 0px !important;
2762
+ }
2763
+
2764
+ .tp-fldv_b {
2765
+ overflow: visible !important;
2766
+ }
2767
+
2760
2768
  .tp-fldv_t {
2761
- font-size: 11px;
2762
- background-color: rgba(0, 0, 0, 0.1);
2769
+ font-size: 13px;
2770
+ font-weight: 900;
2771
+ color: #ffffff;
2772
+ background-color: rgba(70, 70, 70, 0.3);
2773
+ border-top: 1px solid rgba(210, 210, 210, 0.1);
2774
+ border-radius: 3px;
2763
2775
  }
2764
2776
 
2765
2777
  .tp-lblv_l {
2766
- font-size: 11px;
2778
+ font-size: 12px;
2767
2779
  padding-left: 0px !important;
2768
2780
  padding-right: 0px !important;
2769
2781
  }
2770
2782
 
2771
2783
  .tp-lblv_v {
2772
- width: 180px;
2784
+ width: 150px;
2773
2785
  }
2774
2786
 
2775
2787
  .tp-sldtxtv_t {
@@ -2777,9 +2789,13 @@ var tweakPaneStyle = `
2777
2789
  }
2778
2790
 
2779
2791
  .tp-sglv_i {
2780
- font-size: 11px;
2792
+ font-size: 12px;
2781
2793
  color: rgba(255, 255, 255, 0.7);
2782
2794
  }
2795
+
2796
+ .tp-ckbv_w {
2797
+ border: 1px solid rgba(200, 200, 250, 0.2);
2798
+ }
2783
2799
  `;
2784
2800
 
2785
2801
  // src/tweakpane/TweakPane.ts
@@ -2788,9 +2804,13 @@ var TweakPane = class {
2788
2804
  this.renderer = renderer;
2789
2805
  this.scene = scene;
2790
2806
  this.composer = composer;
2791
- this.gui = new Pane();
2792
2807
  this.saveVisibilityInLocalStorage = true;
2793
2808
  this.guiVisible = false;
2809
+ const appWrapper = document.getElementById("app");
2810
+ const tweakPaneWrapper = document.createElement("div");
2811
+ tweakPaneWrapper.id = "tweakpane-panel";
2812
+ appWrapper.appendChild(tweakPaneWrapper);
2813
+ this.gui = new Pane({ container: tweakPaneWrapper });
2794
2814
  this.gui.registerPlugin(EssentialsPlugin);
2795
2815
  if (this.saveVisibilityInLocalStorage) {
2796
2816
  const localStorageGuiVisible = localStorage.getItem("guiVisible");
@@ -2817,21 +2837,22 @@ var TweakPane = class {
2817
2837
  this.toneMappingFolder.folder.hidden = rendererValues.toneMapping === 5 ? false : true;
2818
2838
  this.export = this.gui.addFolder({ title: "import / export", expanded: false });
2819
2839
  window.addEventListener("keydown", this.processKey.bind(this));
2820
- this.setupGUIListeners.bind(this)();
2821
2840
  this.setupRenderPane = this.setupRenderPane.bind(this);
2822
- }
2823
- processKey(e) {
2824
- if (e.key === "p")
2825
- this.toggleGUI();
2841
+ this.setupGUIListeners.bind(this)();
2826
2842
  }
2827
2843
  setupGUIListeners() {
2828
2844
  const gui = this.gui;
2829
2845
  const paneElement = gui.containerElem_;
2830
- paneElement.style.display = this.guiVisible ? "unset" : "none";
2846
+ paneElement.style.right = this.guiVisible ? "0px" : "-450px";
2847
+ this.gui.element.addEventListener("mouseenter", () => setTweakpaneActive(true));
2831
2848
  this.gui.element.addEventListener("mousedown", () => setTweakpaneActive(true));
2832
2849
  this.gui.element.addEventListener("mouseup", () => setTweakpaneActive(false));
2833
2850
  this.gui.element.addEventListener("mouseleave", () => setTweakpaneActive(false));
2834
2851
  }
2852
+ processKey(e) {
2853
+ if (e.key === "p")
2854
+ this.toggleGUI();
2855
+ }
2835
2856
  setupRenderPane(composer, normalPass, ppssaoEffect, ppssaoPass, n8aopass, toneMappingEffect, toneMappingPass, brightnessContrastSaturation, bloomEffect, gaussGrainEffect, hasLighting, sun, setHDR, setAmbientLight, setFog) {
2836
2857
  this.rendererFolder.setupChangeEvent(
2837
2858
  this.scene,
@@ -2903,10 +2924,10 @@ var TweakPane = class {
2903
2924
  input.click();
2904
2925
  }
2905
2926
  toggleGUI() {
2927
+ this.guiVisible = !this.guiVisible;
2906
2928
  const gui = this.gui;
2907
2929
  const paneElement = gui.containerElem_;
2908
- paneElement.style.display = this.guiVisible ? "none" : "unset";
2909
- this.guiVisible = !this.guiVisible;
2930
+ paneElement.style.right = this.guiVisible ? "0px" : "-450px";
2910
2931
  if (this.saveVisibilityInLocalStorage) {
2911
2932
  localStorage.setItem("guiVisible", this.guiVisible === true ? "true" : "false");
2912
2933
  }