@tscircuit/3d-viewer 0.0.237 → 0.0.239
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 +16 -9
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -16985,7 +16985,7 @@ import { Canvas, useFrame as useFrame2 } from "@react-three/fiber";
|
|
|
16985
16985
|
// package.json
|
|
16986
16986
|
var package_default = {
|
|
16987
16987
|
name: "@tscircuit/3d-viewer",
|
|
16988
|
-
version: "0.0.
|
|
16988
|
+
version: "0.0.238",
|
|
16989
16989
|
main: "./dist/index.js",
|
|
16990
16990
|
module: "./dist/index.js",
|
|
16991
16991
|
type: "module",
|
|
@@ -17019,7 +17019,7 @@ var package_default = {
|
|
|
17019
17019
|
"@tscircuit/core": "^0.0.424",
|
|
17020
17020
|
"@tscircuit/props": "^0.0.193",
|
|
17021
17021
|
"@tscircuit/soup-util": "^0.0.41",
|
|
17022
|
-
"jscad-electronics": "^0.0.
|
|
17022
|
+
"jscad-electronics": "^0.0.29",
|
|
17023
17023
|
"jscad-fiber": "^0.0.79",
|
|
17024
17024
|
"jscad-planner": "^0.0.13",
|
|
17025
17025
|
"manifold-3d": "^3.1.0",
|
|
@@ -17050,7 +17050,7 @@ var package_default = {
|
|
|
17050
17050
|
"@vitejs/plugin-react": "^4.3.4",
|
|
17051
17051
|
"bun-match-svg": "^0.0.9",
|
|
17052
17052
|
"bun-types": "^1.2.1",
|
|
17053
|
-
"circuit-json": "^0.0.
|
|
17053
|
+
"circuit-json": "^0.0.190",
|
|
17054
17054
|
"circuit-to-svg": "^0.0.130",
|
|
17055
17055
|
debug: "^4.4.0",
|
|
17056
17056
|
jsdom: "^26.0.0",
|
|
@@ -17825,7 +17825,7 @@ peg$SyntaxError.buildMessage = function(expected, found) {
|
|
|
17825
17825
|
// src/geoms/create-geoms-for-silkscreen-text.ts
|
|
17826
17826
|
function createSilkscreenTextGeoms(silkscreenText) {
|
|
17827
17827
|
const textOutlines = (0, import_text.vectorText)({
|
|
17828
|
-
height: silkscreenText.font_size * 0.
|
|
17828
|
+
height: silkscreenText.font_size * 0.45,
|
|
17829
17829
|
input: silkscreenText.text
|
|
17830
17830
|
});
|
|
17831
17831
|
let rotationDegrees = silkscreenText.ccw_rotation ?? 0;
|
|
@@ -19152,7 +19152,7 @@ function createSilkscreenTextureForLayer({
|
|
|
19152
19152
|
ctx.lineCap = "butt";
|
|
19153
19153
|
ctx.lineJoin = "miter";
|
|
19154
19154
|
const rawTextOutlines = (0, import_text2.vectorText)({
|
|
19155
|
-
height: fontSize * 0.
|
|
19155
|
+
height: fontSize * 0.45,
|
|
19156
19156
|
input: textS.text
|
|
19157
19157
|
});
|
|
19158
19158
|
const processedTextOutlines = [];
|
|
@@ -19186,10 +19186,17 @@ function createSilkscreenTextureForLayer({
|
|
|
19186
19186
|
const textCenterY = (textBounds.minY + textBounds.maxY) / 2;
|
|
19187
19187
|
let xOff = -textCenterX;
|
|
19188
19188
|
let yOff = -textCenterY;
|
|
19189
|
-
|
|
19190
|
-
|
|
19191
|
-
|
|
19192
|
-
else if (
|
|
19189
|
+
const alignment = textS.anchor_alignment || "center";
|
|
19190
|
+
if (alignment.includes("left")) {
|
|
19191
|
+
xOff = -textBounds.minX;
|
|
19192
|
+
} else if (alignment.includes("right")) {
|
|
19193
|
+
xOff = -textBounds.maxX;
|
|
19194
|
+
}
|
|
19195
|
+
if (alignment.includes("top")) {
|
|
19196
|
+
yOff = -textBounds.maxY;
|
|
19197
|
+
} else if (alignment.includes("bottom")) {
|
|
19198
|
+
yOff = -textBounds.minY;
|
|
19199
|
+
}
|
|
19193
19200
|
const transformMatrices = [];
|
|
19194
19201
|
let rotationDeg = textS.ccw_rotation ?? 0;
|
|
19195
19202
|
if (textS.layer === "bottom") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tscircuit/3d-viewer",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.239",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@tscircuit/core": "^0.0.424",
|
|
35
35
|
"@tscircuit/props": "^0.0.193",
|
|
36
36
|
"@tscircuit/soup-util": "^0.0.41",
|
|
37
|
-
"jscad-electronics": "^0.0.
|
|
37
|
+
"jscad-electronics": "^0.0.29",
|
|
38
38
|
"jscad-fiber": "^0.0.79",
|
|
39
39
|
"jscad-planner": "^0.0.13",
|
|
40
40
|
"manifold-3d": "^3.1.0",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"@vitejs/plugin-react": "^4.3.4",
|
|
66
66
|
"bun-match-svg": "^0.0.9",
|
|
67
67
|
"bun-types": "^1.2.1",
|
|
68
|
-
"circuit-json": "^0.0.
|
|
68
|
+
"circuit-json": "^0.0.190",
|
|
69
69
|
"circuit-to-svg": "^0.0.130",
|
|
70
70
|
"debug": "^4.4.0",
|
|
71
71
|
"jsdom": "^26.0.0",
|