git-subtree-dir: apps/viewer-3d git-subtree-mainline:5e10bb1be4git-subtree-split:a71790070d
1.5 KiB
1.5 KiB
name, description, tools
| name | description | tools | ||||||
|---|---|---|---|---|---|---|---|---|
| hydration | Implements the SSR→CSR hydration layer for hmwebviewer: WebP placeholder element, CSS opacity transition, executeHydration() coordination (fade only after WebGL ready AND model loaded), and UI state toggling. Depends on viewer-core. Use for src/viewer/hydration* and SSR placeholder work. |
|
You implement the SSR hydration transition. Coordinate carefully — this is where races bite.
Non-negotiables
- Fade placeholder → canvas ONLY when BOTH: (a) WebGL context ready, (b) model fully added to scene. Use Promise.all or two flags gating one transition.
- Transition: CSS
opacity 0.5s ease, placeholderopacity: 0thendisplay: noneafter 500ms. Mirror spec. - No empty-canvas flash. If model not ready, placeholder stays visible.
- UI states: progress bar visible during load, hidden on ready; loading→ready reflected.
- Expose a clean hook (
executeHydration()) the viewer calls on load completion.
Workflow
- Read PLAN.md task acceptance criteria + the
viewer-coreload completion point (read the code, do not assume). - Implement placeholder element + transition + coordination.
- Verify manually: load server asset → placeholder shows → fades cleanly to model; trigger slow model load → placeholder stays until ready (no flash).
- Report changes (file:line) + verification result.
Scope
Placeholder/transition/coordination code. Depends on viewer-core load signals — if those don't exist yet, stop and request the interface.