@playcanvas/supersplat-viewer 1.35.1 → 1.35.2

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/dist/viewer.css CHANGED
@@ -838,6 +838,7 @@
838
838
  position: absolute;
839
839
  left: 0;
840
840
  top: 0;
841
+ will-change: transform;
841
842
  display: none;
842
843
  align-items: center;
843
844
  justify-content: center;
@@ -872,6 +873,9 @@
872
873
  .sse-viewer .sse-annotations > .sse-annotation {
873
874
  --sse-annotation-bkg: rgba(0, 0, 0, 0.9);
874
875
  position: absolute;
876
+ left: 0;
877
+ top: 0;
878
+ will-change: transform;
875
879
  width: -moz-max-content;
876
880
  width: max-content;
877
881
  max-width: min(280px, 100% - 16px);
@@ -912,6 +916,9 @@
912
916
  .sse-viewer .sse-annotations > .sse-annotation:has(> .sse-annotation-text:empty) > .sse-annotation-text {
913
917
  display: none;
914
918
  }
919
+ .sse-viewer .sse-annotations > .sse-annotation:has(> .sse-annotation-title:empty):has(> .sse-annotation-text:empty) {
920
+ display: none;
921
+ }
915
922
  .sse-viewer .sse-annotations > .sse-annotation.sse-arrow-right::before, .sse-viewer .sse-annotations > .sse-annotation.sse-arrow-left::before {
916
923
  content: "";
917
924
  position: absolute;
package/dist/viewer.js CHANGED
@@ -2558,7 +2558,7 @@ const importSettings = (settings) => {
2558
2558
  return result;
2559
2559
  };
2560
2560
 
2561
- var version = "1.35.1";
2561
+ var version = "1.35.2";
2562
2562
 
2563
2563
  class Tooltip {
2564
2564
  register;
@@ -2773,7 +2773,9 @@ class Annotation extends Script {
2773
2773
  initialize() {
2774
2774
  const ctx = this.context;
2775
2775
  this.hotspotDom = document.createElement('div');
2776
- this.hotspotDom.className = 'sse-annotation-hotspot';
2776
+ // dimmed until the occlusion test first shows it in view, rather than every hotspot
2777
+ // showing at full strength on the reveal and the hidden ones fading afterwards
2778
+ this.hotspotDom.className = 'sse-annotation-hotspot sse-occluded';
2777
2779
  this.hotspotDom.textContent = this.label;
2778
2780
  const onClick = (e) => {
2779
2781
  e.stopPropagation();
@@ -2902,8 +2904,7 @@ class Annotation extends Script {
2902
2904
  tooltip.style.setProperty('--arrow-top', `${arrowY}px`);
2903
2905
  tooltip.classList.toggle('sse-arrow-right', !flipped);
2904
2906
  tooltip.classList.toggle('sse-arrow-left', flipped);
2905
- tooltip.style.left = `${left}px`;
2906
- tooltip.style.top = `${top}px`;
2907
+ tooltip.style.transform = `translate(${left}px, ${top}px)`;
2907
2908
  }
2908
2909
  }
2909
2910
  /**