circuit-json-to-gltf 0.0.130 → 0.0.131
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/index.js +4 -4
- package/package.json +10 -4
package/dist/index.js
CHANGED
|
@@ -16998,16 +16998,16 @@ async function convertCircuitJsonTo3D(circuitJson, options = {}) {
|
|
|
16998
16998
|
const hasFootprinterModel = Boolean(
|
|
16999
16999
|
cad.footprinter_string && !model_stl_url && !model_obj_url && !model_glb_url && !model_gltf_url && !model_jscad && !model_step_url
|
|
17000
17000
|
);
|
|
17001
|
-
if (cad.show_as_bounding_box) {
|
|
17001
|
+
if (cad.show_as_bounding_box && cad.pcb_component_id) {
|
|
17002
17002
|
pcbComponentIdsWithBoundingBox.add(cad.pcb_component_id);
|
|
17003
17003
|
}
|
|
17004
17004
|
const hasModelSource = Boolean(
|
|
17005
17005
|
model_stl_url || model_obj_url || model_glb_url || model_gltf_url || model_jscad || model_step_url || hasFootprinterModel
|
|
17006
17006
|
);
|
|
17007
17007
|
if (!hasModelSource) continue;
|
|
17008
|
-
pcbComponentIdsWith3D.add(cad.pcb_component_id);
|
|
17009
|
-
const pcbComponent = db.pcb_component.get(cad.pcb_component_id);
|
|
17010
|
-
const isBottomLayer = pcbComponent?.layer === "bottom";
|
|
17008
|
+
if (cad.pcb_component_id) pcbComponentIdsWith3D.add(cad.pcb_component_id);
|
|
17009
|
+
const pcbComponent = cad.pcb_component_id ? db.pcb_component.get(cad.pcb_component_id) : void 0;
|
|
17010
|
+
const isBottomLayer = (cad.layer ?? pcbComponent?.layer) === "bottom";
|
|
17011
17011
|
const modelScaleFactor = cad.model_unit_to_mm_scale_factor ?? 1;
|
|
17012
17012
|
const size = cad.size ? convertCadSizeToSceneSize({
|
|
17013
17013
|
x: cad.size.x * modelScaleFactor,
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "circuit-json-to-gltf",
|
|
3
3
|
"main": "dist/index.js",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "0.0.
|
|
5
|
+
"version": "0.0.131",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "https://github.com/tscircuit/circuit-json-to-gltf.git"
|
|
@@ -35,14 +35,16 @@
|
|
|
35
35
|
"@playwright/test": "^1.58.2",
|
|
36
36
|
"@resvg/resvg-js": "^2.6.2",
|
|
37
37
|
"@resvg/resvg-wasm": "^2.6.2",
|
|
38
|
-
"@tscircuit/circuit-json-util": "^0.0.
|
|
38
|
+
"@tscircuit/circuit-json-util": "^0.0.114",
|
|
39
|
+
"@tscircuit/core": "^0.0.1955",
|
|
40
|
+
"@tscircuit/props": "^0.0.664",
|
|
39
41
|
"@types/bun": "latest",
|
|
40
42
|
"@types/earcut": "^3.0.0",
|
|
41
43
|
"@types/react": "^19.1.9",
|
|
42
44
|
"@types/react-dom": "^19.1.7",
|
|
43
45
|
"@vitejs/plugin-react": "^5.0.0",
|
|
44
46
|
"bun-match-svg": "^0.0.12",
|
|
45
|
-
"circuit-json": "^0.0.
|
|
47
|
+
"circuit-json": "^0.0.497",
|
|
46
48
|
"circuit-to-svg": "^0.0.422",
|
|
47
49
|
"graphics-debug": "^0.0.96",
|
|
48
50
|
"looks-same": "^9.0.1",
|
|
@@ -51,7 +53,7 @@
|
|
|
51
53
|
"react-cosmos": "^7.0.0",
|
|
52
54
|
"react-cosmos-plugin-vite": "^7.0.0",
|
|
53
55
|
"react-dom": "^19.1.1",
|
|
54
|
-
"tscircuit": "^0.0.
|
|
56
|
+
"tscircuit": "^0.0.2611",
|
|
55
57
|
"tsup": "^8.5.0",
|
|
56
58
|
"vite": "^7.1.1"
|
|
57
59
|
},
|
|
@@ -70,5 +72,9 @@
|
|
|
70
72
|
"@resvg/resvg-js": {
|
|
71
73
|
"optional": true
|
|
72
74
|
}
|
|
75
|
+
},
|
|
76
|
+
"overrides": {
|
|
77
|
+
"@tscircuit/core": "^0.0.1955",
|
|
78
|
+
"circuit-json": "^0.0.497"
|
|
73
79
|
}
|
|
74
80
|
}
|