@tscircuit/3d-viewer 0.0.494 → 0.0.495

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 +18 -2
  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.493",
30828
+ version: "0.0.494",
30829
30829
  main: "./dist/index.js",
30830
30830
  module: "./dist/index.js",
30831
30831
  type: "module",
@@ -33869,8 +33869,8 @@ import * as THREE24 from "three";
33869
33869
  import { su as su9 } from "@tscircuit/circuit-json-util";
33870
33870
 
33871
33871
  // src/utils/soldermask-texture.ts
33872
- import * as THREE19 from "three";
33873
33872
  import { su as su5 } from "@tscircuit/circuit-json-util";
33873
+ import * as THREE19 from "three";
33874
33874
 
33875
33875
  // node_modules/@tscircuit/math-utils/dist/chunk-5N7UJNVK.js
33876
33876
  var getBoundsFromPoints = (points) => {
@@ -34191,6 +34191,22 @@ function createSoldermaskTextureForLayer({
34191
34191
  ctx.arc(adjustedCanvasX, adjustedCanvasY, canvasRadius, 0, 2 * Math.PI);
34192
34192
  ctx.fill();
34193
34193
  }
34194
+ if (hole.pad_outline && hole.pad_outline.length >= 3) {
34195
+ ctx.beginPath();
34196
+ hole.pad_outline.forEach(
34197
+ (point2, index2) => {
34198
+ const px = canvasXFromPcb(hole.x + point2.x);
34199
+ const py = canvasYFromPcb(hole.y + point2.y);
34200
+ if (index2 === 0) {
34201
+ ctx.moveTo(px, py);
34202
+ } else {
34203
+ ctx.lineTo(px, py);
34204
+ }
34205
+ }
34206
+ );
34207
+ ctx.closePath();
34208
+ ctx.fill();
34209
+ }
34194
34210
  } else if (hole.shape === "circular_hole_with_rect_pad") {
34195
34211
  const padWidth = (hole.rect_pad_width ?? hole.hole_diameter ?? 0) * traceTextureResolution;
34196
34212
  const padHeight = (hole.rect_pad_height ?? hole.hole_diameter ?? 0) * traceTextureResolution;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/3d-viewer",
3
- "version": "0.0.494",
3
+ "version": "0.0.495",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.js",
6
6
  "type": "module",