feat: initialize sunrise with 100-player shared rooms

This commit is contained in:
2026-10-30 16:36:35 +09:00
commit 31d6eac4c2
257 changed files with 66063 additions and 0 deletions
@@ -0,0 +1,32 @@
# Mobile Rendering Implementation Plan
> Execute inline with superpowers:executing-plans; use measured evidence before enabling optimizations.
**Goal:** Improve mobile movement and rotation smoothness while preserving astronomy, movement, terrain and materials.
**Architecture:** Add development-only profiling around the existing loop, then measure resolution and postprocessing separately. Keep production adaptive resolution independent of simulation updates.
**Tech Stack:** Existing TypeScript, Three.js, Vite, Node tests. No new dependencies.
**Spec:** User's 2026-10-30 mobile rendering work order and approved measurement-first approach in this chat.
## Constraints and review focus
- Preserve solar calculations, movement speed, camera direction and spatial geometry.
- No unmeasured LOD, mesh batching, texture compression or shadow system changes.
- Distinguish rendered frames from idle animation callbacks; aggregate all composer passes.
- Exclude hidden/loading/resize transitions from quality decisions without filtering ordinary slow frames.
- Test hysteresis, idle gaps and resolution bounds; do not label desktop viewport tests as device validation.
- No Git repository exists here: preserve original touched source in `.tmp/mobile-performance/`; no worktree or commit possible.
## Tasks
- [ ] 1. Add development profiling and fixed-condition replay. Save baseline FPS/mean/p95/slow frames, whole-frame draw calls, triangles, textures, geometries, viewport, lights and passes. Scenarios: static, rotation, movement, dense view, 300-second endurance. Tests verify percentile aggregation.
- [ ] 2. Measure DPR 2, 1.5, 1.25 and postprocessing separately with identical scene/time/weather/path. Retain only justified changes, preserving near PBR and silhouette. Save screenshots and raw JSON.
- [ ] 3. Add adaptive resolution with 5-second slow windows, 20-second fast observation, 10-second settling and asymmetric thresholds. Default touch/mobile starting cap 1.5, desktop cap 2; actual frame evidence drives changes. Test thresholds, idle/hidden reset, and bounds.
- [ ] 4. Run existing tests/build/solar checks and browser interactions; obtain independent code review. Record real device availability, five-minute results and unmet targets honestly.
## Ledger
- Initial inspection: DPR 2; RenderPass + optional night bloom + OutputPass; no enabled shadows; building geometry already merged. Movement triggers solar/UI refresh and minimap redraw. These are candidates, not proven bottlenecks.
- Real Android device discovery failed because ADB daemon could not start; device availability not confirmed. Safari not available through current browser inventory.
- Task 1: development instrumentation complete; four provisional raw runs saved. Concurrent terrain edits invalidate cross-run source equivalence; these are observations, not a final baseline.
- Ruling: user requested stopping the five-minute workload while other work runs. Stop all continuous render benchmarking; no passed endurance result or screenshot comparison is claimed.
- Ruling: because matched resolution experiments cannot yet be completed and shared scene sources are changing, keep automatic resolution DEV-only behind `?profile&quality=adaptive`. Production defaults stay unchanged. Task 2 and production activation in Task 3 are deferred pending matched evidence, not marked complete.
- Task 3 prototype: statistics and adaptive controller tests pass. Slow/healthy hysteresis, idle and visibility/texture/resize resets are wired only through developer diagnostics.
- Validation: full suite 68 pass, production build passes (size warning), solar numerical comparison passes. Initial localhost test EACCES resolved by rerunning with local networking permitted.
- Final review fixes: reset adaptive quality at benchmark start, collect inventory before samples, abort external resize. Restart regression test failed before implementation and passes afterward. Final suite 69/69; build passes. No additional GPU workload; browser viewport override reset.