Skip to content

Add a separate 2D / 3D View switch - #282

Merged
nekomario28 merged 12 commits into
mainfrom
feat/view-dimension-toggle
Aug 26, 2026
Merged

Add a separate 2D / 3D View switch#282
nekomario28 merged 12 commits into
mainfrom
feat/view-dimension-toggle

Conversation

@nekomario28

Copy link
Copy Markdown
Owner

Summary

Implements the renderer hierarchy decided after #281: Three.js is not a thirteenth 2D Style. Instead, the viewer exposes a separate top-level View: 2D / 3D control, while each renderer keeps its own Style space.

Behavior

  • 2D viewer keeps the existing twelve Style options unchanged.
  • Adds a View control with 2D active and 3D Lab as the experimental switch.
  • Three.js exposes the same View control with 3D Lab active and 2D as the return path.
  • Three.js exposes its current renderer-local Style as Cosmic; this is intentionally separate from the twelve 2D styles and leaves room for future 3D styles.
  • Routes remain /u/ and /three/; no premature route unification.
  • Existing renderer-neutral state transfer remains authoritative for username/search/status/motion/activity/focus/depth/quality.
  • Renderer navigation additionally carries style2d, so switching Galaxy Hybrid 2D → Cosmic 3D → 2D restores Galaxy Hybrid rather than resetting the 2D style.
  • style2d is removed again when returning to 2D; Three.js render= is never carried into 2D.
  • Dedicated 2D routes such as /radial/ receive the same View axis.
  • Three.js remains visibly marked Lab/experimental.

Architecture

This deliberately models:

View
├─ 2D
│  └─ Style: existing 12 presets
└─ 3D (Lab)
   └─ Style: Cosmic (currently one option)

rather than mixing threejs into the existing Style enum.

Gates

  • build-time injection is idempotent;
  • generated JS is syntax checked and linted;
  • 2D test asserts exactly twelve Style options and no Three.js/Cosmic entry;
  • browser E2E verifies transferable state plus style2d restoration across 2D → 3D → 2D;
  • dedicated /radial/ route verifies the same architecture;
  • existing full Verify, 12-preset comparison, Chromium/WebKit and Three.js performance regressions remain enabled.

Refs #276.

@nekomario28 nekomario28 reopened this Aug 26, 2026
@nekomario28
nekomario28 marked this pull request as ready for review August 26, 2026 12:20
@nekomario28
nekomario28 merged commit 36fc285 into main Aug 26, 2026
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant