Skip to content

Conversation

cd33
Copy link

@cd33 cd33 commented Mar 7, 2025

This PR introduces a new Pixel Statistics feature that provides detailed insights about the current frame and layer in the sprite editor. The new statistics panel includes:

Key Features:

  • Real-time pixel statistics tracking
  • Display of total pixels in the current frame
  • Count and percentage of used (non-transparent) pixels
  • Transparency percentage calculation
  • Color usage breakdown with:
    • Total number of unique colors
    • Individual color statistics with usage percentages
    • Visual color swatches for each used color
    • Improved ergonomics by allowing users to adjust the size of the panels to suit their needs

Technical Implementation:

  • Added new PixelStatsController and PixelStatsService for managing statistics
  • Implemented efficient caching mechanism for performance optimization
  • Responsive updates on various editor events (frame changes, layer modifications, selections, etc.)
  • Clean UI integration with existing toolbox layout

This feature helps artists better understand their sprite composition and color usage patterns, making it easier to optimize sprites and maintain consistent color schemes.

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