Skip to content

Feat: Viewport orientation gizmo with XYZ/ABCD toggle#1

Merged
arossti merged 1 commit intomainfrom
public-gizmo
Mar 1, 2026
Merged

Feat: Viewport orientation gizmo with XYZ/ABCD toggle#1
arossti merged 1 commit intomainfrom
public-gizmo

Conversation

@arossti
Copy link
Owner

@arossti arossti commented Mar 1, 2026

Summary

  • New viewport orientation gizmo — 2D canvas overlay in top-right corner showing camera orientation
  • Two modes: XYZ (Cartesian 3 axes) and ABCD (Quadray tetrahedral 4 axes), toggled by clicking the mode label
  • Click any axis bubble to snap the camera to that view
  • Louis Trümpler (ifc5cad) attribution added for ViewGizmo inspiration

Changes

  • modules/rt-gizmo.js — New self-contained gizmo module (canvas overlay, axis projection, interaction)
  • modules/rt-rendering.js — Wire gizmo into scene init and animation loop; expose mode API
  • modules/rt-delta.js — Add "gizmo-mode" to view delta system for save/load
  • LICENSE / README.md — Third-party attribution for Louis Trümpler / ifc5cad

Test plan

  • Gizmo appears top-right, axes rotate in sync with camera orbit
  • XYZ mode: 3 primary + 3 secondary bubbles with correct colors
  • ABCD mode: 4 primary + 4 secondary bubbles with tetrahedral directions
  • Click-to-snap: X → side view, Z → top view, A/B/C/D → tet vertex views
  • Mode toggle persists across view save/load
  • No interference with orbit/pan/zoom on main canvas

🤖 Generated with Claude Code

Co-Authored-By: Andy🤦‍♂️ & Claude🤖 andy@openbuilding.ca

2D canvas overlay showing camera orientation with colored axis bubbles.
Click an axis to snap the camera to that view. Click the mode label
to toggle between XYZ (Cartesian) and ABCD (Quadray tetrahedral).

- New module: modules/rt-gizmo.js
- Wired into rendering loop and view delta system
- Louis Trümpler (ifc5cad) attribution added to LICENSE and README

🤖 Co-Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Andy🤦‍♂️ & Claude🤖 <andy@openbuilding.ca>
@github-actions
Copy link

github-actions bot commented Mar 1, 2026

🤖 Claude Code Review

API Error: x-api-key header is required


ℹ️ About this review

This automated review checks for:

  • Debug statements (console.log)
  • Commented-out code
  • Code duplication
  • Unused variables

Human review required - these are suggestions only.
Diff size: 20451 bytes

@arossti arossti self-assigned this Mar 1, 2026
@arossti arossti merged commit 3501ffd into main Mar 1, 2026
3 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