@tscircuit/3d-viewer 0.0.642 → 0.0.644

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.
Files changed (2) hide show
  1. package/dist/index.js +7 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -19115,7 +19115,8 @@ function getGlbComponentMetadata(object) {
19115
19115
  "cad_component_id",
19116
19116
  "source_component_id",
19117
19117
  "pcb_component_id",
19118
- "componentName"
19118
+ "componentName",
19119
+ "pcb_board_id"
19119
19120
  ]) {
19120
19121
  if (typeof metadata[key] === "string") result[key] = metadata[key];
19121
19122
  }
@@ -22344,7 +22345,7 @@ import * as THREE31 from "three";
22344
22345
  // package.json
22345
22346
  var package_default = {
22346
22347
  name: "@tscircuit/3d-viewer",
22347
- version: "0.0.641",
22348
+ version: "0.0.643",
22348
22349
  repository: {
22349
22350
  type: "git",
22350
22351
  url: "https://github.com/tscircuit/3d-viewer"
@@ -32107,14 +32108,14 @@ function GlbScene({
32107
32108
  }, [rootObject, model]);
32108
32109
  useEffect37(() => {
32109
32110
  setHover(void 0);
32110
- const applyVisibility = (object, inComponent) => {
32111
- const id = object.userData.cad_component_id;
32111
+ const applyVisibility = (object, inObject) => {
32112
+ const id = object.userData.cad_component_id ?? object.userData.pcb_board_id;
32112
32113
  if (typeof id === "string")
32113
32114
  object.visible = !isObjectHidden(objectVisibility, id);
32114
- else if (!inComponent && object instanceof THREE62.Mesh)
32115
+ else if (!inObject && object instanceof THREE62.Mesh)
32115
32116
  object.visible = !isObjectHidden(objectVisibility, void 0);
32116
32117
  for (const child of object.children)
32117
- applyVisibility(child, inComponent || typeof id === "string");
32118
+ applyVisibility(child, inObject || typeof id === "string");
32118
32119
  };
32119
32120
  applyVisibility(model, false);
32120
32121
  }, [model, objectVisibility]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/3d-viewer",
3
- "version": "0.0.642",
3
+ "version": "0.0.644",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/tscircuit/3d-viewer"