three-cad-viewer 5.0.5 → 5.0.6

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.
@@ -97356,7 +97356,7 @@ float metalnessFactor = metalness;
97356
97356
  }
97357
97357
  }
97358
97358
 
97359
- const version = "5.0.5";
97359
+ const version = "5.0.6";
97360
97360
 
97361
97361
  /**
97362
97362
  * `PickedComponent` over a GPU id-pick result. Drives the shader
@@ -112532,12 +112532,21 @@ void mainImage(const in vec4 inputColor, const in vec2 uv, const in float depth,
112532
112532
  this.renderer.setSize(cadWidth, height);
112533
112533
  // Resize the id pick target to match the canvas
112534
112534
  this.idPicker?.setSize(cadWidth, height);
112535
- // Adapt display dimensions
112535
+ // Adapt display dimensions. `glass` and `tools` are part of the sizes:
112536
+ // setSizes widens the toolbar and the body by the tree only when the tree
112537
+ // sits beside the canvas (`tools && !glass`), and updates the tree and
112538
+ // info heights only outside glass mode. Leaving them out meant neither
112539
+ // branch could ever be taken from a resize, so a non-glass viewer got a
112540
+ // toolbar and a body of `cadWidth + 2` with a `treeWidth + cadWidth` row
112541
+ // inside them - measured as a 550px toolbar over 802px of content - and a
112542
+ // tree that kept its old height. `glassMode` passes both and was right.
112536
112543
  this.display.setSizes({
112537
112544
  treeWidth: treeWidth,
112538
112545
  treeHeight: this.state.get("treeHeight"),
112539
112546
  cadWidth: cadWidth,
112540
112547
  height: height,
112548
+ glass: glass,
112549
+ tools: this.state.get("tools"),
112541
112550
  });
112542
112551
  // Set glass state - subscription will update UI
112543
112552
  this.state.set("glass", glass);