@tscircuit/3d-viewer 0.0.267 → 0.0.269
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 -6
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -17282,7 +17282,7 @@ import {
|
|
|
17282
17282
|
// package.json
|
|
17283
17283
|
var package_default = {
|
|
17284
17284
|
name: "@tscircuit/3d-viewer",
|
|
17285
|
-
version: "0.0.
|
|
17285
|
+
version: "0.0.268",
|
|
17286
17286
|
main: "./dist/index.js",
|
|
17287
17287
|
module: "./dist/index.js",
|
|
17288
17288
|
type: "module",
|
|
@@ -17314,7 +17314,7 @@ var package_default = {
|
|
|
17314
17314
|
"@react-three/drei": "^9.121.4",
|
|
17315
17315
|
"@react-three/fiber": "^8.17.14",
|
|
17316
17316
|
"@tscircuit/core": "^0.0.454",
|
|
17317
|
-
"@tscircuit/props": "^0.0.
|
|
17317
|
+
"@tscircuit/props": "^0.0.221",
|
|
17318
17318
|
"@tscircuit/soup-util": "^0.0.41",
|
|
17319
17319
|
"jscad-electronics": "^0.0.29",
|
|
17320
17320
|
"jscad-fiber": "^0.0.79",
|
|
@@ -17705,14 +17705,14 @@ var arePointsClockwise = (points) => {
|
|
|
17705
17705
|
return signedArea <= 0;
|
|
17706
17706
|
};
|
|
17707
17707
|
var createBoardGeomWithOutline = (board, depth = 1.2) => {
|
|
17708
|
-
const {
|
|
17708
|
+
const { outline } = board;
|
|
17709
17709
|
let outlineVec2 = outline.map((point) => [point.x, point.y]);
|
|
17710
17710
|
if (arePointsClockwise(outlineVec2)) {
|
|
17711
17711
|
outlineVec2 = outlineVec2.reverse();
|
|
17712
17712
|
}
|
|
17713
17713
|
const shape = (0, import_primitives.polygon)({ points: outlineVec2 });
|
|
17714
17714
|
let boardGeom = (0, import_extrusions.extrudeLinear)({ height: depth }, shape);
|
|
17715
|
-
boardGeom = (0, import_transforms.translate)([
|
|
17715
|
+
boardGeom = (0, import_transforms.translate)([0, 0, -depth / 2], boardGeom);
|
|
17716
17716
|
return boardGeom;
|
|
17717
17717
|
};
|
|
17718
17718
|
|
|
@@ -17728,7 +17728,6 @@ var createSimplifiedBoardGeom = (circuitJson) => {
|
|
|
17728
17728
|
if (board.outline && board.outline.length > 0) {
|
|
17729
17729
|
boardGeom = createBoardGeomWithOutline(
|
|
17730
17730
|
{
|
|
17731
|
-
center: board.center,
|
|
17732
17731
|
outline: board.outline
|
|
17733
17732
|
},
|
|
17734
17733
|
pcbThickness
|
|
@@ -18377,7 +18376,6 @@ var BoardGeomBuilder = class {
|
|
|
18377
18376
|
if (this.board.outline && this.board.outline.length > 0) {
|
|
18378
18377
|
this.boardGeom = createBoardGeomWithOutline(
|
|
18379
18378
|
{
|
|
18380
|
-
center: this.board.center,
|
|
18381
18379
|
outline: this.board.outline
|
|
18382
18380
|
},
|
|
18383
18381
|
this.ctx.pcbThickness
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tscircuit/3d-viewer",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.269",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@react-three/drei": "^9.121.4",
|
|
33
33
|
"@react-three/fiber": "^8.17.14",
|
|
34
34
|
"@tscircuit/core": "^0.0.454",
|
|
35
|
-
"@tscircuit/props": "^0.0.
|
|
35
|
+
"@tscircuit/props": "^0.0.221",
|
|
36
36
|
"@tscircuit/soup-util": "^0.0.41",
|
|
37
37
|
"jscad-electronics": "^0.0.29",
|
|
38
38
|
"jscad-fiber": "^0.0.79",
|