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

Implement and Use GlobalColorFilter #105

Open
np-eazy opened this issue May 18, 2023 · 0 comments
Open

Implement and Use GlobalColorFilter #105

np-eazy opened this issue May 18, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@np-eazy
Copy link
Owner

np-eazy commented May 18, 2023

  • getHex() can take in a filter function which takes in three RGB values and outputs three filtered RGB values. Ideally this would be used by defining a handler called globalColorFilter in the gameState or coreState and passing it down into all occurrences.

  • idleUpdate and AudioEvent callbacks can be configured to change the gameState attributes that will be used to dynamically define the globalColorFilter

  • globalColorFilter: (red, green, blue) => hue transformation, invert strength, multiply by dimmer, then add linear dodge/burn

  • Invert either happens or it doesn't, the strength tells the chance that the color is inverted and is sampled once in gameState each frame so that everything is either inverted or not at the same time. Same with hue transformation

  • Dimmer decays to 0 and is set to an initial value by callbacks

  • Same with linear dodge/burn

@np-eazy np-eazy added the enhancement New feature or request label May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant