feat(web): trace token shape and texture the whole mesh

TokenViewer now traces the image's alpha channel via /trace and extrudes the silhouette with @tts/mesh, aligning the texture using the full image as the UV framing. The texture is applied to the whole mesh (top, back, and walls) instead of separate solid-white walls.
This commit is contained in:
2026-08-08 15:12:11 +08:00
parent 21fc1b29c1
commit a4759be5ac
5 changed files with 166 additions and 6 deletions
+9
View File
@@ -84,6 +84,9 @@ importers:
'@tts/shared':
specifier: workspace:*
version: link:../../packages/shared
bson:
specifier: ^7.3.1
version: 7.3.1
react:
specifier: ^19.2.8
version: 19.2.8
@@ -907,6 +910,10 @@ packages:
resolution: {integrity: sha512-WIsKqkSC0ABoBJuT1LEX+2HEvNmNKKgnTAyd0fL8qzK4SH2i9NXg+t08YtdZp/V9IZ33cxe3iV4yM0qg8lMQng==}
engines: {node: '>=16.20.1'}
bson@7.3.1:
resolution: {integrity: sha512-h/C0qe6857pQhcSJHLfsR1uYGj98Ge3wKAD3Ed9KqH3wcVh+BM4Jq4xISD7vs9OPuT07n+q3QQVjslJ286j6ag==}
engines: {node: '>=20.19.0'}
buffer@6.0.3:
resolution: {integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==}
@@ -2101,6 +2108,8 @@ snapshots:
bson@6.10.4: {}
bson@7.3.1: {}
buffer@6.0.3:
dependencies:
base64-js: 1.5.1