Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a way to see index of color (plus bugfixes) #1143

Merged
merged 10 commits into from
Nov 29, 2024

Conversation

Variable-ind
Copy link
Contributor

@Variable-ind Variable-ind commented Nov 26, 2024

Added:

An index preview (same as what was used in voxelorama) that displays after the same zoom as pixel grid
NOTE: i attempted to make them visible at all zoom levels but it caused a visual artifact at smaller zoom levels (see video below) so i thought it was best to restrict it up to a given zoom level.

test-.5.mp4

Fixes:

  • [Index mode] If the color we are drawing is already selected in the palette, then it's index now takes priority (this solves any issues with palettes having multiple instances of the same color)
  • [Palettes] Fixed more than one swatch selected in grid if the same color available in an earlier swatch.
  • [Index mode] Fixed wrong index drawn when moved to an empty swatch (when we drag and drop to an empty swatch, after updating palette, we were getting two entries of that color because the last position was not erased)
  • [Index mode] When populating the palettes array, the color added was slightly wrong (i think the reason is same as Fixed a colorpicker bug (fixed inconsistent raw values) #1108). due to this the palette.has(color) check in set_pixelv_custom was almost always false even if the color was there in the palette

@Variable-ind Variable-ind changed the title Added a way to see index of color Added a way to see index of color (plus bugfixes) Nov 26, 2024
@Variable-ind Variable-ind marked this pull request as draft November 26, 2024 11:35
@Variable-ind Variable-ind marked this pull request as ready for review November 26, 2024 12:14
@OverloadedOrama
Copy link
Member

OverloadedOrama commented Nov 29, 2024

Looks pretty good! I think it may be better to not show the indices at all when they are 0. It would make the canvas less noisy, and the pixels with non-zero indices would be easier to read.

Copy link
Member

@OverloadedOrama OverloadedOrama left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you!

@OverloadedOrama OverloadedOrama merged commit 31981a1 into Orama-Interactive:master Nov 29, 2024
4 checks passed
@Variable-ind Variable-ind deleted the indicex-display branch November 30, 2024 00:57
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