Svelte Commerce
A standalone open-source storefront built with SvelteKit, headless across 26 commerce backends. MIT licensed.
翻译准备中
尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证AR menu proof of concept: scan a QR code, see a chocolate cake on your table at real size (model-viewer, GLB + USDZ)
翻译准备中
取自仓库 README
正在加载完整 README。
查看完整 README ↗Scan the QR code with a phone, pick a dish and tap View on your table. The dish appears on your table at its real size. Walk around it and lean in.
| Dish | Real size |
|---|---|
| Chocolate ring cake | 26 cm across, 11 cm tall, on a 32 cm plate |
| Tiramisu | a layered slice in a 16 cm tray, 7 cm tall (AI-generated model) |
| Pumpkin gnocchi | 23 cm bowl, 7 cm tall to the top of the food (AI-generated from photos of the real dish) |
Each dish has its own link: …/ar-menu-poc/#cake, …/ar-menu-poc/#tiramisu, …/ar-menu-poc/#gnocchi.
Live: https://pmtchakanyuka-star.github.io/ar-menu-poc/
| Piece | What it is |
|---|---|
index.html | The menu page. One tab per dish (the DISHES list in the script). It uses Google's <model-viewer> for the 3D preview and the AR hand-off. ar-scale="fixed" locks each dish to its real size. |
models/*.glb | glTF 2.0 models for the web preview and Android: WebXR in Chrome, with Scene Viewer as the fallback. |
models/*.usdz | USDZ models for iPhone and iPad (AR Quick Look). |
models/*-thumb.webp | Menu tab pictures: renders of the models. |
tools/calib/detect_edges.py | Finds the plate rim, the edge of the glaze pool and the cake's top outline in the reference photo. |
tools/calib/fit_camera.py | Fits a camera and the cake's profile to those edges, plus a few hand-measured points on the hole and base, then scales the result so the base is 26 cm. |
tools/build_cake.py | Builds the shape and projects the photo onto it as texture. Writes both model files. |
tools/build_ai_model.py | Turns an AI-generated 3D model (Higgsfield → Tripo H3.1, downloaded into the git-ignored tools/ai/) into a menu model: real size, welded and decimated to 130k triangles, a fresh UV atlas with the full-detail texture baked onto it, matte food. Writes both model files. Used for the gnocchi and the tiramisu. |
media/hero.* | The looping hero clip (Higgsfield Seedance from a photo of the gnocchi at the café, WebM + MP4, ~0.2 MB) and its poster. It starts only after the first dish has loaded, never with reduced motion or data saver, and has a pause button. |
tools/build_tiramisu.py | The earlier, photo-built tiramisu (no longer used on the menu). |
tools/build_gnocchi.py | The earlier gnocchi: fits a camera to the overhead photo and textures a height field with it (no longer used on the menu). |
tools/model_io.py | The glTF and USDZ writers both builders share. |
tools/preview.html | Dev-only full-window render of one model (?src=tiramisu). |
tools/make_qr.py | Writes qr.png / qr.svg. |
| Cake | 26 cm across the base, 11 cm tall (31.6 cm plate) |
| Triangles | ~101k |
| Textures | colour 2048×1024, bump 2048×1024, roughness 1024×512 (JPEG) |
| Files | cake.glb 4.4 MB · cake.usdz 3.3 MB |
Both files are validated. The Khronos glTF Validator reports 0 errors and 0 warnings, and all 28 OpenUSD validators pass for the USDZ, including the usdz packaging rules.
tools/build_tiramisu.py.| Slice | 11 × 9 cm, 4 cm tall (16 cm tray) |
| Triangles | ~113k |
| Files | tiramisu.glb 4.2 MB · tiramisu.usdz 3.1 MB |
Both files pass the same checks as the cake's: 0 glTF Validator errors or warnings, and all 28 OpenUSD validators.
tools/gnocchi/camera.json.One photo can't see everything: the sides of gnocchi facing away from the overhead camera are stretched a little. Projecting the side photos onto those faces is the next step.
| Bowl | 23 cm across, 5.3 cm tall |
| Triangles | ~127k |
| Textures | colour 4096×4096, bump 2048×2048, roughness 1024×1024 (JPEG) |
| Files | gnocchi.glb 5.6 MB · gnocchi.usdz 4.1 MB |
The reference photo isn't in the repo, because it shows more than the cake. Put it at
tools/calib/reference.jpg, then:
python -m venv .venv
.venv/Scripts/python -m pip install -r requirements.txt # macOS/Linux: .venv/bin/python
.venv/Scripts/python tools/calib/detect_edges.py
.venv/Scripts/python tools/calib/fit_camera.py # writes fit_overlay.png - check the fit by eye
.venv/Scripts/python tools/build_cake.py
.venv/Scripts/python tools/make_qr.py
To use a different real size, change CAKE_BASE_DIAMETER in tools/calib/fit_camera.py.
The tiramisu photos aren't in the repo either (people in the background). Put them in
tools/tiramisu/ref/ as front.jpg (from the front, a little above), corner.jpg
(from the front left corner), top.jpg (straight down) and, for reference only,
low.jpg and corner2.jpg. Then:
.venv/Scripts/python tools/build_tiramisu.py
The photo crops it uses (the corners of each face, the top's crop) are listed at the top of the script.
For the gnocchi, put the overhead photo at tools/gnocchi/ref/overhead.jpg (side.jpg was used
only to measure the bowl's profile). Then:
.venv/Scripts/python tools/build_gnocchi.py
Delete tools/gnocchi/camera.json to refit the camera, for example with a new photo.
Rebuild them with:
.venv/Scripts/python tools/build_ai_model.py tools/ai/gnocchi.glb gnocchi --width 0.23 --glaze
.venv/Scripts/python tools/build_ai_model.py tools/ai/tiramisu.glb tiramisu --width 0.16
The extra Python packages are trimesh, fast-simplification, xatlas and embreex.