Skip to content

Add comprehensive component showcase page for hybrid casual games#7

Merged
canerdogan merged 7 commits intomainfrom
claude/component-showcase-page-HiyHS
Jan 16, 2026
Merged

Add comprehensive component showcase page for hybrid casual games#7
canerdogan merged 7 commits intomainfrom
claude/component-showcase-page-HiyHS

Conversation

@canerdogan
Copy link
Contributor

Summary

  • Add showcase.html with 20+ production-ready UI components for hybrid casual games
  • Components include: Buttons, Progress Bars, Currency Display, Cards, TopBar/HUD, Avatar, Star Rating, Timer, Leaderboard, Daily Rewards, Toast, Modal, Badge, Toggle, Slider
  • Each component has visual preview and code examples
  • Modern dark theme with sidebar navigation (21st.dev style)
  • Mobile-first, extensible design
  • Update index.html with link to showcase

Test plan

  • Open showcase.html in browser
  • Verify all component previews render correctly
  • Test sidebar navigation scrolls to sections
  • Test copy-to-clipboard functionality for code examples
  • Verify responsive layout on mobile viewport

🤖 Generated with Claude Code

canerdogan and others added 7 commits January 10, 2026 19:18
…detection

- Fix type safety issues by replacing (this as any) with private backing fields
  and public getters in 12 physics-related files
- Fix memory leak in InputManager by storing bound event handlers as class properties
  for proper cleanup during removeEventListeners()
- Remove duplicate GraphicsEngine initialization in RenderingServiceProvider
  (race condition fix - initialization now only in GameByte.initialize())
- Complete AudioBus source connection with connectToNode/reconnectToMaster methods
- Add static utility methods to DeviceDetector for synchronous usage across framework
- Centralize device detection in PhysicsManager, InputManager, AudioManager,
  AssetManager, and both MobileOptimizers to use DeviceDetector

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add GameByte.quick2D(), quick3D(), and quick(config) static methods
- Add game.stage getter for direct stage/scene access
- Add game.onUpdate() and game.onRender() hook callbacks
- Add drawToTexture() helper to GraphicsEngine
- Add getStage() and getNativeRenderer() to Renderer interface
- Enable 3D exports (ThreeRenderer, HybridRenderer, ThreeGraphicsFactory) in UMD bundle
- Update demo-archero-simple to use new Quick API
- Add example-quick-start.html as minimal usage example

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix memory leak: Store ResizeObserver reference and disconnect in destroy()
- Improve type safety: Replace any with generics in getStage<T>() and getNativeRenderer<T>()
- Add error handling to drawToTexture(): Validate inputs and throw descriptive errors
- Clear callback arrays (updateCallbacks, renderCallbacks) in destroy()
- Add DrawToTextureOptions interface with proper documentation
- Add 12 new unit tests for Quick API (callbacks, stage/renderer access, cleanup)

All 44 GameByte tests now pass.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The setInterval in startQueueProcessor() was never cleared, causing a resource leak even after destroy() is called. This fix adds proper cleanup by storing the interval ID and clearing it in the destroy() method.

Changes:
- Added queueProcessorInterval property to track the timer
- Store interval ID when creating it in startQueueProcessor()
- Clear interval in destroy() before other cleanup operations

Impact: Prevents CPU waste and allows proper garbage collection of destroyed asset managers.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…ialization guard

- Add test to verify queue processor interval is cleared on destroy
- Add guard against double initialization in startQueueProcessor()
- Prevents potential memory leak if startQueueProcessor() is called multiple times

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Create showcase.html with 20+ production-ready UI components
- Include Buttons, Progress Bars, Currency Display, Cards
- Add Game UI: TopBar, Avatar, Star Rating, Timer, Leaderboard, Daily Rewards
- Add Feedback: Toast, Modal, Badge notifications
- Add Inputs: Toggle Switch, Slider
- Each component has visual preview and code examples
- Modern dark theme with sidebar navigation
- Mobile-first, extensible design
- Update index.html with link to showcase
Resolve conflicts:
- Use main's disabled exports for missing files (LayoutAdapter, UIAdapter, etc.)
- Use ui/menus path for ArcheroMenu (main's structure)
- Keep LoadingScreen and ScreenLayoutManager disabled until files exist
@claude
Copy link

claude bot commented Jan 16, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@canerdogan canerdogan merged commit d54b9c6 into main Jan 16, 2026
4 checks passed
@canerdogan canerdogan deleted the claude/component-showcase-page-HiyHS branch January 16, 2026 09:14
canerdogan added a commit that referenced this pull request Feb 11, 2026
- UIAnimationSystem: Guard setNestedProperty against prototype pollution
  (__proto__, constructor, prototype keys rejected)
- GameSplash: Sanitize cfg.logoUrl in HTML template, fix incomplete
  style-tag stripping with iterative replacement loop
- PixiVersionDetection: Add input length guard to prevent regex backtracking
- archero-menu-demo: Add SRI integrity hash for GSAP CDN script
- Rebuild UMD bundle with all source fixes applied

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

2 participants