Files
workinf_Blender_Wasm/tools/web/complete/README.md
mes123456 4eb08faf31 chore(web): checkpoint export fixes, operator routing and three-domain evidence
- Web engine CMake: apply WITH_WEB_USD_PYTHON to blender_web_engine_core,
  embed /usd resources, link pxr Python bindings after the core archive and
  whole-archive the monolithic OpenUSD archive. Fixes the wm.usd_export abort
  and restores Alembic/USD embedded export.
- ?ui=web menus: fix inverted localOnly gating and route queueLocalDesktopOperator
  and nativeAdd through the desktop operator channel with a VIEW_3D context;
  non-mesh edit-mode selection uses the native VIEW3D_SELECT bridge.
- Refresh WebEngine wasm/js artifacts, manual/course pages and the complete
  course video asset.
- Record focused Chromium probes for Add/F3/parameters/modifier/UV/curve/deform,
  scene operations, OPFS save/reopen and worker restart. Evidence is NOT_CLAIMED.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-11-14 06:12:44 +08:00

85 lines
3.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Web Blender 完整初学者课程 / 全功能走查 / 视频
任务:`COMPLETE-TUTORIAL-001`。资产:
- `/home/mes123456/workinf_Blender_Wasm/re/5000PBR精简版/5000+ PBR catalog.blend`(sha256 `54942f05…c125`)
- `/home/mes123456/workinf_Blender_Wasm/re/猴头.glb`(sha256 `60267d…e003`)
- 派生库:`/home/mes123456/workinf_Blender_Wasm/web/app/public/assets/re-pbr/`(`library:re-pbr-v1`)
- 高清库:`/home/mes123456/workinf_Blender_Wasm/web/app/public/assets/re-pbr-hq/`(`library:re-pbr-hq-v1`)
## 1. 启动本地 lane(WASM)
```bash
cd /home/mes123456/workinf_Blender_Wasm/web
npm run dev -- --host 127.0.0.1 --port 5184 --strictPort
```
入口:`http://127.0.0.1:5184/?ui=web`
## 2. 启动后端 lane(server/native)
```bash
cd /home/mes123456/workinf_Blender_Wasm/web
npm run build
cd /home/mes123456/workinf_Blender_Wasm
BLENDER_BIN=/home/mes123456/workinf_Blender_Wasm/build_blender_native/bin/blender \
BLENDER_WEB_HTTP_PORT=5176 \
node /home/mes123456/workinf_Blender_Wasm/tools/web/deployment-http-server.mjs dist
```
部署服务器代理 `/api/server-operator-job`、`/api/blender-workflow`、`/api/blender-session`、`/api/blender-resources`。
需要 `/usr/bin/bwrap`、`/usr/bin/prlimit`、`/usr/bin/xvfb-run` 与本机 Blender 二进制。
## 3. 全功能走查(31 项能力)
```bash
cd /home/mes123456/workinf_Blender_Wasm
DISPLAY=:1 CHROME_PATH=/usr/bin/google-chrome GPU_MODE=hardware \
node /home/mes123456/workinf_Blender_Wasm/tools/web/complete/capture-complete-course.mjs \
--port 5184 --gpu hardware
```
单模块:`--module M11`;报告:
`/home/mes123456/workinf_Blender_Wasm/tests/golden/COMPLETE-TUTORIAL-001/capture-report.json`
截图:
`/home/mes123456/workinf_Blender_Wasm/tests/golden/COMPLETE-TUTORIAL-001/walkthrough/Mxx/*.jpg`
课程图:
`/home/mes123456/workinf_Blender_Wasm/web/app/public/tutorial/complete/steps/`
## 4. 生成 HTML 教案
```bash
cd /home/mes123456/workinf_Blender_Wasm
node /home/mes123456/workinf_Blender_Wasm/tools/web/course/generate-complete-course.mjs
node /home/mes123456/workinf_Blender_Wasm/tools/web/course/check-complete-course.mjs
```
输出:`/home/mes123456/workinf_Blender_Wasm/web/app/public/tutorial/complete/index.html`
## 5. 完整带配音视频
```bash
cd /home/mes123456/workinf_Blender_Wasm
python3 -I /home/mes123456/workinf_Blender_Wasm/tools/web/generate-re-pbr-narration.py --mode prepare \
--chapters /home/mes123456/workinf_Blender_Wasm/tools/web/course/complete-video-chapters.json \
--out /home/mes123456/workinf_Blender_Wasm/tests/golden/COMPLETE-TUTORIAL-001/video
DISPLAY=:1 CHROME_PATH=/usr/bin/google-chrome GPU_MODE=hardware \
node /home/mes123456/workinf_Blender_Wasm/tools/web/course/record-complete-video.mjs \
--port 5184 --gpu hardware
python3 -I /home/mes123456/workinf_Blender_Wasm/tools/web/generate-re-pbr-narration.py --mode mix \
--out /home/mes123456/workinf_Blender_Wasm/tests/golden/COMPLETE-TUTORIAL-001/video \
--video /home/mes123456/workinf_Blender_Wasm/web/app/public/tutorial/complete/video/complete-course-720p.mp4
```
`mix` 会把 VTT 写到 `video/re-pbr-lesson.zh-Hans.vtt`,需要重命名为
`/home/mes123456/workinf_Blender_Wasm/web/app/public/tutorial/complete/video/complete-course.zh-Hans.vtt`。
## 6. 注意
- 所有保存/重开/恢复使用 OPFS;本地 `.blend` 只由用户手动“下载 .blend”生成。
- Chromium only;`crossOriginIsolated` 必须为 true。
- 首次加载可能 30–193 秒;每步用 `engine-status`/`scene-stats` 等待,不用固定 sleep。
- 后端并发上限 2、源码 512 MiB、渲染 240 帧;缺失依赖返回 503。