circuit-json-to-gltf 0.0.19 → 0.0.21

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/README.md CHANGED
@@ -4,7 +4,7 @@ Converts circuit JSON to 3D GLTF files. Used for exporting circuits as 3D models
4
4
 
5
5
  [Online Playground](https://circuit-json-to-gltf.vercel.app/renderer.html?fixtureId=%7B%22path%22%3A%22CircuitToGltfDemo.fixture.tsx%22%7D&locked=true)
6
6
 
7
- <img width="2424" height="1854" alt="image" src="https://github.com/user-attachments/assets/4ad8b607-e496-449c-88a3-8875b16c0a53" />
7
+ <img width="2424" height="1854" alt="image" src="https://github.com/user-attachments/assets/cb0862aa-2034-4d06-abcc-9a4d1e5a6041" />
8
8
 
9
9
  ## Features
10
10
 
package/dist/index.js CHANGED
@@ -1345,7 +1345,7 @@ async function convertCircuitJsonTo3D(circuitJson, options = {}) {
1345
1345
  z: cad.position.y
1346
1346
  } : {
1347
1347
  x: pcbComponent?.center.x ?? 0,
1348
- y: isBottomLayer ? -(effectiveBoardThickness / 2 + size.y / 2) : effectiveBoardThickness / 2 + size.y / 2,
1348
+ y: isBottomLayer ? -(effectiveBoardThickness + size.y / 2) : effectiveBoardThickness / 2 + size.y / 2,
1349
1349
  z: pcbComponent?.center.y ?? 0
1350
1350
  };
1351
1351
  const meshType = model_stl_url ? "stl" : model_obj_url ? "obj" : model_gltf_url ? "gltf" : "glb";
@@ -1414,7 +1414,7 @@ async function convertCircuitJsonTo3D(circuitJson, options = {}) {
1414
1414
  boxes.push({
1415
1415
  center: {
1416
1416
  x: component.center.x,
1417
- y: isBottomLayer ? -(effectiveBoardThickness / 2 + compHeight / 2) : effectiveBoardThickness / 2 + compHeight / 2,
1417
+ y: isBottomLayer ? -(effectiveBoardThickness + compHeight / 2) : effectiveBoardThickness / 2 + compHeight / 2,
1418
1418
  z: component.center.y
1419
1419
  },
1420
1420
  size: {
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.19",
5
+ "version": "0.0.21",
6
6
  "scripts": {
7
7
  "test": "bun test tests/",
8
8
  "format": "biome format --write .",