feat: server-side STL/OBJ thumbnail generation via geometry projection + Sharp
Tim Falken authored 6 months ago
- Add MODEL_EXTS, isModelPath, geometry parsers (ASCII/binary STL, OBJ),
projectModelVector, createModelSvgBuffer and generateModelThumb to
thumbnail-cache.js; thumbnails are now generated as WebP on disk
- syncThumbnailCacheOnce picks up model files alongside images and videos
- Client getThumbnailKind now returns 'image' for MODEL_EXTS so the
existing /api/files/thumbnail endpoint is used (blob URL, cached on disk)
- Remove all client-side geometry parsing functions (createModelSvgFromPolygons,
projectModelVector, resolveObjIndex, parseObjPolygons,
parseAsciiStlPolygons, parseBinaryStlPolygons,
parseModelPolygonsFromBlob, modelThumbnailDataUrl) from app.js
- Update STL tile test to expect a blob URL from the thumbnail endpoint
- Add thumbnail-cache test for STL server-side generation (WebP output)