Skip to content

Conversation

@samaneh-kazemi
Copy link
Collaborator

@samaneh-kazemi samaneh-kazemi commented Jul 29, 2025

Summary

Replaced the text-based "1:1" and "@" icons in the XR menu panel with proper SVG icons for better visual consistency and user experience. The close button now uses a dedicated close icon, and the toggle button switches between view real size and replay icons.

Changes Made

  • Icon System Overhaul
    Replaced text labels with proper SVG icons:
    Close button: Dedicated close icon (X symbol)
    Toggle button: Switches between view real size (1:1) and replay (reset) icons
    Added SVG constants for better performance and maintainability
    Implemented texture caching to prevent white squares on first load

  • Performance Improvements
    Pre-rendered icon textures to avoid async loading issues
    Static texture cache shared across all XR menu panel instances
    Race condition fix with polling mechanism for async texture creation
    Eliminated repeated texture creation on each icon toggle

  • Code Quality Enhancements
    Configuration-driven design with centralized constants
    Separation of concerns with dedicated methods for panel/button creation
    Improved readability with clear method names and responsibilities
    Type safety with proper TypeScript configurations

icon-change.mp4

@samaneh-kazemi samaneh-kazemi merged commit 6384d7b into master Jul 29, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant