@tscircuit/3d-viewer 0.0.453 → 0.0.454
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 +24 -10
- 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.453",
|
|
28513
28513
|
main: "./dist/index.js",
|
|
28514
28514
|
module: "./dist/index.js",
|
|
28515
28515
|
type: "module",
|
|
@@ -34016,15 +34016,29 @@ function createSoldermaskTextureForLayer({
|
|
|
34016
34016
|
const width10 = (hole.outer_width ?? hole.outer_diameter ?? hole.hole_width) * traceTextureResolution;
|
|
34017
34017
|
const height10 = (hole.outer_height ?? hole.outer_diameter ?? hole.hole_height) * traceTextureResolution;
|
|
34018
34018
|
const radius = Math.min(width10, height10) / 2;
|
|
34019
|
-
|
|
34020
|
-
|
|
34021
|
-
|
|
34022
|
-
|
|
34023
|
-
|
|
34024
|
-
|
|
34025
|
-
|
|
34026
|
-
|
|
34027
|
-
|
|
34019
|
+
let rotation2 = hole.ccw_rotation || 0;
|
|
34020
|
+
if (rotation2) {
|
|
34021
|
+
rotation2 = -rotation2;
|
|
34022
|
+
}
|
|
34023
|
+
if (rotation2) {
|
|
34024
|
+
ctx.save();
|
|
34025
|
+
ctx.translate(canvasX, canvasY);
|
|
34026
|
+
ctx.rotate(rotation2 * Math.PI / 180);
|
|
34027
|
+
ctx.beginPath();
|
|
34028
|
+
ctx.roundRect(-width10 / 2, -height10 / 2, width10, height10, radius);
|
|
34029
|
+
ctx.fill();
|
|
34030
|
+
ctx.restore();
|
|
34031
|
+
} else {
|
|
34032
|
+
ctx.beginPath();
|
|
34033
|
+
ctx.roundRect(
|
|
34034
|
+
canvasX - width10 / 2,
|
|
34035
|
+
canvasY - height10 / 2,
|
|
34036
|
+
width10,
|
|
34037
|
+
height10,
|
|
34038
|
+
radius
|
|
34039
|
+
);
|
|
34040
|
+
ctx.fill();
|
|
34041
|
+
}
|
|
34028
34042
|
}
|
|
34029
34043
|
});
|
|
34030
34044
|
const pcbHoles = su13(circuitJson).pcb_hole.list();
|