@tscircuit/3d-viewer 0.0.488 → 0.0.489

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 +16 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -30825,7 +30825,7 @@ import * as THREE16 from "three";
30825
30825
  // package.json
30826
30826
  var package_default = {
30827
30827
  name: "@tscircuit/3d-viewer",
30828
- version: "0.0.487",
30828
+ version: "0.0.488",
30829
30829
  main: "./dist/index.js",
30830
30830
  module: "./dist/index.js",
30831
30831
  type: "module",
@@ -34244,13 +34244,26 @@ function createSoldermaskTextureForLayer({
34244
34244
  const y = hole.y;
34245
34245
  const canvasX = canvasXFromPcb(x);
34246
34246
  const canvasY = canvasYFromPcb(y);
34247
- const holeShape = hole.hole_shape || hole.shape;
34247
+ const holeShape = hole.hole_shape;
34248
34248
  if (holeShape === "circle" && typeof hole.hole_diameter === "number") {
34249
34249
  const canvasRadius = hole.hole_diameter / 2 * traceTextureResolution;
34250
34250
  ctx.beginPath();
34251
34251
  ctx.arc(canvasX, canvasY, canvasRadius, 0, 2 * Math.PI);
34252
34252
  ctx.fill();
34253
- } else if ((holeShape === "pill" || holeShape === "rotated_pill") && typeof hole.hole_width === "number" && typeof hole.hole_height === "number") {
34253
+ } else if (holeShape === "pill" && typeof hole.hole_width === "number" && typeof hole.hole_height === "number") {
34254
+ const width10 = hole.hole_width * traceTextureResolution;
34255
+ const height10 = hole.hole_height * traceTextureResolution;
34256
+ const radius = Math.min(width10, height10) / 2;
34257
+ ctx.beginPath();
34258
+ ctx.roundRect(
34259
+ canvasX - width10 / 2,
34260
+ canvasY - height10 / 2,
34261
+ width10,
34262
+ height10,
34263
+ radius
34264
+ );
34265
+ ctx.fill();
34266
+ } else if (holeShape === "rotated_pill" && typeof hole.hole_width === "number" && typeof hole.hole_height === "number") {
34254
34267
  const width10 = hole.hole_width * traceTextureResolution;
34255
34268
  const height10 = hole.hole_height * traceTextureResolution;
34256
34269
  const radius = Math.min(width10, height10) / 2;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/3d-viewer",
3
- "version": "0.0.488",
3
+ "version": "0.0.489",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.js",
6
6
  "type": "module",