@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.
Files changed (2) hide show
  1. package/dist/index.js +15 -28
  2. 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.459",
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 rotationRadians = ccwRotation * (Math.PI / 180);
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
- let rotation2 = hole.ccw_rotation || 0;
34183
- if (layer === "bottom") {
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
- let rotation2 = hole.ccw_rotation || 0;
34211
- if (layer === "bottom") {
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
- let rotation2 = hole.ccw_rotation || 0;
34238
- if (layer === "bottom") {
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
- let rotation2 = hole.ccw_rotation || 0;
34266
- if (rotation2) {
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
- let rotation2 = hole.ccw_rotation || 0;
34334
- if (layer === "bottom") {
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
- let rotation2 = (hole.ccw_rotation || 0) * (Math.PI / 180);
34381
- if (layer === "bottom") {
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 = layer === "bottom" ? -cutout.rotation * (Math.PI / 180) : cutout.rotation * (Math.PI / 180);
34434
+ const rotation2 = -cutout.rotation * (Math.PI / 180);
34448
34435
  ctx.rotate(rotation2);
34449
34436
  if (borderRadius > 0) {
34450
34437
  ctx.beginPath();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/3d-viewer",
3
- "version": "0.0.460",
3
+ "version": "0.0.461",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.js",
6
6
  "type": "module",