circuit-json-to-gltf 0.0.18 → 0.0.19

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 +3 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1323,14 +1323,14 @@ async function convertCircuitJsonTo3D(circuitJson, options = {}) {
1323
1323
  const pcbComponentIdsWith3D = /* @__PURE__ */ new Set();
1324
1324
  for (const cad of cadComponents) {
1325
1325
  let { model_stl_url, model_obj_url, model_glb_url, model_gltf_url } = cad;
1326
- const hasModelUrl = Boolean(
1326
+ let hasModelUrl = Boolean(
1327
1327
  model_stl_url || model_obj_url || model_glb_url || model_gltf_url
1328
1328
  );
1329
1329
  if (!hasModelUrl && cad.footprinter_string) {
1330
1330
  model_glb_url = `https://modelcdn.tscircuit.com/jscad_models/${cad.footprinter_string}.glb`;
1331
+ hasModelUrl = true;
1331
1332
  }
1332
- if (!model_stl_url && !model_obj_url && !model_glb_url && !model_gltf_url)
1333
- continue;
1333
+ if (!hasModelUrl) continue;
1334
1334
  pcbComponentIdsWith3D.add(cad.pcb_component_id);
1335
1335
  const pcbComponent = db.pcb_component.get(cad.pcb_component_id);
1336
1336
  const isBottomLayer = pcbComponent?.layer === "bottom";
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.18",
5
+ "version": "0.0.19",
6
6
  "scripts": {
7
7
  "test": "bun test tests/",
8
8
  "format": "biome format --write .",