Commit Graph
127 Commits
Author SHA1 Message Date
hypercross a4759be5ac 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.
2026-08-08 15:12:11 +08:00
hypercross 21fc1b29c1 feat(mesh): support uvBounds and planar back-face UVs
Add an optional uvBounds to extrudeShape/extrudeShapeParts so UVs can be derived from a framing rectangle instead of the shape's bounding box, letting a traced silhouette align with its full image. The bottom face now uses the same planar xy UVs as the top face (no horizontal mirror), so the texture is consistent across front, back, and walls.
2026-08-08 15:12:07 +08:00
hypercross dc8127dba1 docs: document image tracing endpoint 2026-08-08 14:51:40 +08:00
hypercross 445dbc1781 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.
2026-08-08 14:51:36 +08:00
hypercross d554d6bde1 feat(tile): render tiles with the mesh generator
Replace the per-shape tile geometries with @tts/mesh extrusion, honoring
the tile type and stretch aspect ratio. Add extrudeShapeParts so the
caps carry the texture while the walls are solid white, matching TTS
tinting. Fix bottom-face UVs to mirror horizontally and make wall UVs
inherit the front mapping independent of z.
2026-08-08 14:21:53 +08:00
hypercross 14f83f476c feat(mesh): add tile mesh generation package
Add @tts/mesh, a package for generating extruded tile meshes from 2D
shapes. It provides shape generators (rect, hex, circle, rounded rect,
frame), earcut-based tessellation of top/bottom faces with UVs, and
outward-normal wall generation, combined into raw BufferGeometry-ready
typed arrays.
2026-08-08 13:42:32 +08:00
hypercross 3b86a641aa Fix custom model loading and hook order
Detect the model format from file contents instead of the URL extension,
since TTS model URLs are often extension-less. Move the diffuse texture
hook into a child component so the hook count stays consistent across
renders.
2026-08-08 13:06:01 +08:00
hypercross 179efae99f Fix R3F hooks used outside the Canvas
Move useTexture calls in the tile, token, and card viewers into child
components rendered inside the Canvas. R3F hooks must run within the
Canvas store, so calling them at the viewer's top level threw a runtime
error.
2026-08-08 12:59:32 +08:00
hypercross 7d1f05902d Add error boundary around object viewers
Wrap the resolved viewer in an error boundary so a render failure (e.g.
WebGL context loss or a model/texture load error) is contained to the
inspector pane instead of crashing the page. The fallback shows the
error message and stack trace.
2026-08-08 12:58:28 +08:00
hypercross 001d5eeb54 Add 3D object viewers with r3f stack
Add per-class 3D viewers for tiles, tokens, cards, and custom models
using React Three Fiber, drei, and postprocessing. Viewers are
lazy-loaded and registered through the existing viewer registry, with a
shared scene wrapper for lighting, orbit controls, and subtle effects.

Add a CORS-safe /asset proxy route so three.js loaders can fetch
Workshop-hosted textures and models, and extend TTSObject with the
CustomMesh and CustomTile/CustomToken fields the viewers read.
2026-08-08 12:56:46 +08:00
hypercross f390f170da docs: clarify multi-set and CDN-loaded object icons 2026-08-08 12:47:05 +08:00
hypercross 9619cc3863 feat(web): expand object class icon mapping
Map more TTS classes to icons, including multi-set icons for models and
bags, and add a wrap-break-word class fix in the default viewer.
2026-08-08 12:45:40 +08:00
hypercross fad784c03f docs: document iconify icons and object icon files 2026-08-08 12:32:13 +08:00
hypercross 4f37dabbe7 feat(web): add iconify tag icons for object classes
Replace the text class tag in the tree and inspector with one or more
MDI icons (hover shows the class name). Bundle only the used icons via
a generator script instead of the full set.
2026-08-08 12:32:11 +08:00
hypercross 3b66e82b67 feat(web): make object tree collapsible and collapsed by default 2026-08-08 12:27:23 +08:00
hypercross f126bf7993 fix(web): dedupe tree keys and guard against circular JSON
Key tree nodes by their index path instead of GUID, since TTS saves can
contain duplicate GUIDs. Skip the Parent back-reference in the default
viewer and stringify with a circular-reference guard.
2026-08-08 12:23:48 +08:00
hypercross 08c767f399 docs: update architecture and plan for tree inspector UI
Record the viewer-registry decision and refresh the extract/web
descriptions and repo layout.
2026-08-08 12:19:47 +08:00
hypercross a8e84c8b9d feat(web): replace flat lists with tree sidebar and object inspector
Add a containment-tree sidebar with class tags and display labels, plus
an inspector pane backed by a viewer registry with a default viewer.
Custom per-class viewers can be registered later.
2026-08-08 12:19:43 +08:00
hypercross d8a698986a feat(extract): build containment tree and traverse all containers
Add buildTree to mirror how TTS nests objects, with a display label
(Nickname or class Name). Generalize traverseMod to descend into any
object with ContainedObjects, not just bags, and add Nickname to
TTSObject.
2026-08-08 12:19:39 +08:00
hypercross e2d87df1a4 chore: add script to dump TTS saves as JSON
Resolves the authoritative file_url via the Steam Web API, validates
the download is a BSON document, and writes the deserialized save to
scripts/dumps/<id>.json. Dumps are gitignored.
2026-08-08 11:59:43 +08:00
hypercross f7a6eb6ee1 feat: allow loading mods without a Steam API key
Add fetchModFromUrl/fetchModFileFromUrl and accept a fileUrl query param on /items routes so the frontend can download saves directly from a search result's file_url, with no key required.
2026-08-08 11:32:57 +08:00
hypercross 4ffe858c36 fix: make STEAM_API_KEY optional so the proxy starts without it
The proxy now boots without a key; /items routes still return 500 when a key is required but missing.
2026-08-08 11:28:58 +08:00
hypercross 7c812a109c feat: add React frontend with search and mod pages
Add apps/web (Vite + React Router + Tailwind v4 + Zustand) with a search page and a mod page that analyzes saves via @tts/extract. Document the frontend in the README and docs.
2026-08-08 11:22:09 +08:00
hypercross b32cb53c67 test: add proxy route and env tests
Cover health, search, and items routes via Hono's app.request, plus env validation.
2026-08-08 11:15:42 +08:00
hypercross 92f11db415 test: add vitest unit tests across packages
Cover shared zod schemas, extract traversal/refs/downloads, and tts filename/error handling. Document the test setup in the README and docs.
2026-08-08 11:13:14 +08:00
hypercross 1de559c321 feat: scaffold workspace with search, fetch, and extract packages 2026-08-08 10:43:00 +08:00
hypercross 405602a943 docs: add architecture and decisions documentation 2026-08-08 10:26:37 +08:00