Go to file
Michael Mainguy 7849bf4eb2 Extract toolbox buttons into standalone reusable classes
Refactor Toolbox button code into separate, focused classes following Single Responsibility Principle.

New Button Classes:
- ExitXRButton (src/objects/buttons/ExitXRButton.ts)
  * Encapsulates exit XR functionality
  * Takes XR experience, scene, parent, and optional position
  * Handles click events to exit XR session
  * Provides dispose() and transform getter

- ConfigButton (src/objects/buttons/ConfigButton.ts)
  * Encapsulates config panel toggle functionality
  * Uses dependency injection for toggle callback
  * Configurable position relative to parent
  * Provides dispose() and transform getter

- RenderModeButton (src/objects/buttons/RenderModeButton.ts)
  * Encapsulates render mode cycling functionality
  * Internally manages render mode state
  * Automatically recreates button with new label on mode change
  * Cycles through all available rendering modes
  * Provides dispose() and transform getter

Toolbox Changes:
- Removed createRenderModeButton() and updateRenderModeButton() methods
- Simplified setupXRButton() to instantiate button classes
- Reduced button-related code by ~120 lines
- Added button instance properties for cleanup
- Clean, declarative button creation with clear positioning

Benefits:
- Single Responsibility Principle - each button class has one purpose
- Reusability - buttons can be used anywhere in the app
- Testability - each button can be tested independently
- Cleaner code - Toolbox class focuses on core tool management
- Better dependencies - clear interfaces and dependency injection
- Easier maintenance - button logic isolated and self-contained

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 16:14:01 -06:00
.github/workflows Update node.js.yml 2024-08-30 12:18:10 -05:00
api Initial Menu System Commit. 2023-06-29 21:03:00 -05:00
docs Add WebXR rendering mode toggle with 4 modes 2025-11-13 10:36:03 -06:00
functions Added Initial Voice Command Handler, fixed connection issues. 2023-08-14 13:27:20 -05:00
netlify/functions added request headers to CORD response. 2023-12-12 06:53:14 -06:00
pages Initial Menu System Commit. 2023-06-27 16:58:19 -05:00
public Fix label positioning, add billboard mode, fix XR entry shift, and fix config system 2025-11-18 08:52:04 -06:00
server Add WebXR rendering mode toggle with 4 modes 2025-11-13 10:36:03 -06:00
src Extract toolbox buttons into standalone reusable classes 2025-11-19 16:14:01 -06:00
.gitignore Refactored api path. 2023-08-11 07:51:46 -05:00
CLAUDE.md Add configurable feature management system with JSON-based feature flags 2025-11-18 06:52:39 -06:00
index.html Added webxr exit button 2025-02-14 11:01:27 -06:00
LICENSE.txt Disabled service worker, enhanced management console. 2024-08-30 12:43:19 -05:00
package-lock.json Refactor config naming and upgrade dependencies 2025-11-12 21:36:56 -06:00
package.json version bump 2025-11-19 13:35:40 -06:00
server.js Re added quest link. 2024-04-02 14:19:27 -05:00
tsconfig.json Added 3d closet demo, cleaned up menus. 2024-02-05 10:46:23 -06:00
versionBump.js Added smart versioning 2024-06-11 16:58:35 -05:00
vite.config.ts Add configurable feature management system with JSON-based feature flags 2025-11-18 06:52:39 -06:00
VRCONFIGPLAN.md Add VR configuration panel implementation plan and Phase 1 foundation 2025-11-18 11:53:47 -06:00