@tscircuit/3d-viewer 0.0.455 → 0.0.456
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 +25 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -28509,7 +28509,7 @@ import * as THREE15 from "three";
|
|
|
28509
28509
|
// package.json
|
|
28510
28510
|
var package_default = {
|
|
28511
28511
|
name: "@tscircuit/3d-viewer",
|
|
28512
|
-
version: "0.0.
|
|
28512
|
+
version: "0.0.455",
|
|
28513
28513
|
main: "./dist/index.js",
|
|
28514
28514
|
module: "./dist/index.js",
|
|
28515
28515
|
type: "module",
|
|
@@ -34115,12 +34115,12 @@ function createSoldermaskTextureForLayer({
|
|
|
34115
34115
|
ctx.beginPath();
|
|
34116
34116
|
ctx.arc(canvasX, canvasY, canvasRadius, 0, 2 * Math.PI);
|
|
34117
34117
|
ctx.fill();
|
|
34118
|
-
} else if (hole.shape === "pill"
|
|
34118
|
+
} else if (hole.shape === "pill") {
|
|
34119
34119
|
const width10 = (hole.outer_width ?? hole.outer_diameter ?? hole.hole_width) * traceTextureResolution;
|
|
34120
34120
|
const height10 = (hole.outer_height ?? hole.outer_diameter ?? hole.hole_height) * traceTextureResolution;
|
|
34121
34121
|
const radius = Math.min(width10, height10) / 2;
|
|
34122
34122
|
let rotation2 = hole.ccw_rotation || 0;
|
|
34123
|
-
if (
|
|
34123
|
+
if (layer === "bottom") {
|
|
34124
34124
|
rotation2 = -rotation2;
|
|
34125
34125
|
}
|
|
34126
34126
|
if (rotation2) {
|
|
@@ -34142,6 +34142,28 @@ function createSoldermaskTextureForLayer({
|
|
|
34142
34142
|
);
|
|
34143
34143
|
ctx.fill();
|
|
34144
34144
|
}
|
|
34145
|
+
} else if (hole.shape === "oval") {
|
|
34146
|
+
const width10 = (hole.outer_width ?? hole.outer_diameter ?? hole.hole_width) * traceTextureResolution;
|
|
34147
|
+
const height10 = (hole.outer_height ?? hole.outer_diameter ?? hole.hole_height) * traceTextureResolution;
|
|
34148
|
+
const radiusX = width10 / 2;
|
|
34149
|
+
const radiusY = height10 / 2;
|
|
34150
|
+
let rotation2 = hole.ccw_rotation || 0;
|
|
34151
|
+
if (layer === "bottom") {
|
|
34152
|
+
rotation2 = -rotation2;
|
|
34153
|
+
}
|
|
34154
|
+
if (rotation2) {
|
|
34155
|
+
ctx.save();
|
|
34156
|
+
ctx.translate(canvasX, canvasY);
|
|
34157
|
+
ctx.rotate(rotation2 * Math.PI / 180);
|
|
34158
|
+
ctx.beginPath();
|
|
34159
|
+
ctx.ellipse(0, 0, radiusX, radiusY, 0, 0, 2 * Math.PI);
|
|
34160
|
+
ctx.fill();
|
|
34161
|
+
ctx.restore();
|
|
34162
|
+
} else {
|
|
34163
|
+
ctx.beginPath();
|
|
34164
|
+
ctx.ellipse(canvasX, canvasY, radiusX, radiusY, 0, 0, 2 * Math.PI);
|
|
34165
|
+
ctx.fill();
|
|
34166
|
+
}
|
|
34145
34167
|
}
|
|
34146
34168
|
});
|
|
34147
34169
|
const pcbHoles = su13(circuitJson).pcb_hole.list();
|