feat(proxy): add image tracing endpoint

Add GET /trace which fetches an image, traces it into a vector shape, and returns the result BSON-encoded. Tracing is configurable via mode (alpha, bw, color) and format (shape, svg). The shape format parses the vtracer SVG into an outline/holes polygon matching @tts/mesh's Shape interface.
This commit is contained in:
2026-08-08 14:51:36 +08:00
parent d554d6bde1
commit 445dbc1781
10 changed files with 922 additions and 0 deletions
+4
View File
@@ -16,7 +16,11 @@
"@hono/node-server": "^1.13.7",
"@tts/shared": "workspace:*",
"@tts/tts": "workspace:*",
"@visioncortex/vtracer": "1.0.0-alpha.3",
"bson": "^6.10.4",
"hono": "^4.6.14",
"sharp": "^0.35.3",
"svgpath": "^2.6.0",
"zod": "^3.24.1"
},
"devDependencies": {