@tscircuit/3d-viewer 0.0.460 → 0.0.461
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 +15 -28
- 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.460",
|
|
28513
28513
|
main: "./dist/index.js",
|
|
28514
28514
|
module: "./dist/index.js",
|
|
28515
28515
|
type: "module",
|
|
@@ -34142,8 +34142,7 @@ function createSoldermaskTextureForLayer({
|
|
|
34142
34142
|
rawRadius
|
|
34143
34143
|
) * traceTextureResolution;
|
|
34144
34144
|
const ccwRotation = pad2.ccw_rotation || 0;
|
|
34145
|
-
const
|
|
34146
|
-
const rotation2 = layer === "bottom" ? -rotationRadians : rotationRadians;
|
|
34145
|
+
const rotation2 = -ccwRotation * (Math.PI / 180);
|
|
34147
34146
|
ctx.save();
|
|
34148
34147
|
ctx.translate(canvasX, canvasY);
|
|
34149
34148
|
ctx.rotate(rotation2);
|
|
@@ -34179,10 +34178,8 @@ function createSoldermaskTextureForLayer({
|
|
|
34179
34178
|
const width10 = (hole.outer_width ?? hole.outer_diameter ?? hole.hole_width) * traceTextureResolution;
|
|
34180
34179
|
const height10 = (hole.outer_height ?? hole.outer_diameter ?? hole.hole_height) * traceTextureResolution;
|
|
34181
34180
|
const radius = Math.min(width10, height10) / 2;
|
|
34182
|
-
|
|
34183
|
-
|
|
34184
|
-
rotation2 = -rotation2;
|
|
34185
|
-
}
|
|
34181
|
+
const ccwRotationDeg = hole.ccw_rotation || 0;
|
|
34182
|
+
const rotation2 = -ccwRotationDeg;
|
|
34186
34183
|
if (rotation2) {
|
|
34187
34184
|
ctx.save();
|
|
34188
34185
|
ctx.translate(canvasX, canvasY);
|
|
@@ -34207,10 +34204,8 @@ function createSoldermaskTextureForLayer({
|
|
|
34207
34204
|
const height10 = (hole.outer_height ?? hole.outer_diameter ?? hole.hole_height) * traceTextureResolution;
|
|
34208
34205
|
const radiusX = width10 / 2;
|
|
34209
34206
|
const radiusY = height10 / 2;
|
|
34210
|
-
|
|
34211
|
-
|
|
34212
|
-
rotation2 = -rotation2;
|
|
34213
|
-
}
|
|
34207
|
+
const ccwRotationDeg = hole.ccw_rotation || 0;
|
|
34208
|
+
const rotation2 = -ccwRotationDeg;
|
|
34214
34209
|
if (rotation2) {
|
|
34215
34210
|
ctx.save();
|
|
34216
34211
|
ctx.translate(canvasX, canvasY);
|
|
@@ -34234,10 +34229,8 @@ function createSoldermaskTextureForLayer({
|
|
|
34234
34229
|
const width10 = (hole.outer_width ?? hole.outer_diameter ?? hole.hole_width) * traceTextureResolution;
|
|
34235
34230
|
const height10 = (hole.outer_height ?? hole.outer_diameter ?? hole.hole_height) * traceTextureResolution;
|
|
34236
34231
|
const radius = Math.min(width10, height10) / 2;
|
|
34237
|
-
|
|
34238
|
-
|
|
34239
|
-
rotation2 = -rotation2;
|
|
34240
|
-
}
|
|
34232
|
+
const ccwRotationDeg = hole.ccw_rotation || 0;
|
|
34233
|
+
const rotation2 = -ccwRotationDeg;
|
|
34241
34234
|
if (rotation2) {
|
|
34242
34235
|
ctx.save();
|
|
34243
34236
|
ctx.translate(adjustedCanvasX, adjustedCanvasY);
|
|
@@ -34262,10 +34255,8 @@ function createSoldermaskTextureForLayer({
|
|
|
34262
34255
|
const height10 = (hole.outer_height ?? hole.outer_diameter ?? hole.hole_height) * traceTextureResolution;
|
|
34263
34256
|
const radiusX = width10 / 2;
|
|
34264
34257
|
const radiusY = height10 / 2;
|
|
34265
|
-
|
|
34266
|
-
|
|
34267
|
-
rotation2 = -rotation2;
|
|
34268
|
-
}
|
|
34258
|
+
const ccwRotationDeg = hole.ccw_rotation || 0;
|
|
34259
|
+
const rotation2 = -ccwRotationDeg;
|
|
34269
34260
|
if (rotation2) {
|
|
34270
34261
|
ctx.save();
|
|
34271
34262
|
ctx.translate(adjustedCanvasX, adjustedCanvasY);
|
|
@@ -34330,10 +34321,8 @@ function createSoldermaskTextureForLayer({
|
|
|
34330
34321
|
hole.rect_pad_height ?? hole.hole_height ?? 0,
|
|
34331
34322
|
rawRadius
|
|
34332
34323
|
) * traceTextureResolution;
|
|
34333
|
-
|
|
34334
|
-
|
|
34335
|
-
rotation2 = -rotation2;
|
|
34336
|
-
}
|
|
34324
|
+
const ccwRotationDeg = hole.ccw_rotation || 0;
|
|
34325
|
+
const rotation2 = -ccwRotationDeg;
|
|
34337
34326
|
if (rotation2) {
|
|
34338
34327
|
ctx.save();
|
|
34339
34328
|
ctx.translate(canvasX, canvasY);
|
|
@@ -34377,10 +34366,8 @@ function createSoldermaskTextureForLayer({
|
|
|
34377
34366
|
const width10 = hole.hole_width * traceTextureResolution;
|
|
34378
34367
|
const height10 = hole.hole_height * traceTextureResolution;
|
|
34379
34368
|
const radius = Math.min(width10, height10) / 2;
|
|
34380
|
-
|
|
34381
|
-
|
|
34382
|
-
rotation2 = -rotation2;
|
|
34383
|
-
}
|
|
34369
|
+
const ccwRotationDeg = hole.ccw_rotation || 0;
|
|
34370
|
+
const rotation2 = -ccwRotationDeg * (Math.PI / 180);
|
|
34384
34371
|
if (rotation2) {
|
|
34385
34372
|
ctx.save();
|
|
34386
34373
|
ctx.translate(canvasX, canvasY);
|
|
@@ -34444,7 +34431,7 @@ function createSoldermaskTextureForLayer({
|
|
|
34444
34431
|
if (cutout.rotation) {
|
|
34445
34432
|
ctx.save();
|
|
34446
34433
|
ctx.translate(canvasX, canvasY);
|
|
34447
|
-
const rotation2 =
|
|
34434
|
+
const rotation2 = -cutout.rotation * (Math.PI / 180);
|
|
34448
34435
|
ctx.rotate(rotation2);
|
|
34449
34436
|
if (borderRadius > 0) {
|
|
34450
34437
|
ctx.beginPath();
|