Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/picolove/cindy
True Colors for LÖVE 11 (reconstructed fork)
https://github.com/picolove/cindy
colors love love2d love2d-framework lua
Last synced: 4 days ago
JSON representation
True Colors for LÖVE 11 (reconstructed fork)
- Host: GitHub
- URL: https://github.com/picolove/cindy
- Owner: picolove
- License: wtfpl
- Created: 2024-02-18T17:04:27.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2024-02-18T17:29:42.000Z (10 months ago)
- Last Synced: 2024-10-31T04:24:17.332Z (about 2 months ago)
- Topics: colors, love, love2d, love2d-framework, lua
- Language: Lua
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cindy
True Colors for LÖVE 11cindy adds functions to LÖVE 11.x that accept/return colors in the [0-255] range instead of the newly introduced
[0.0-1.0] range.In love.graphics:
- `clearBytes`
- `getColorBytes`, `setColorBytes`
- `getBackgroundColorBytes`, `setBackgroundColorBytes`
- `getColorMaskBytes`, `setColorMaskBytes`In ImageData:
- `getPixelBytes`, `setPixelBytes`
- `mapPixelBytes`In ParticleSystem:
- `setColorsBytes`, `getColorsBytes`In SpriteBatch:
- `getColorBytes`, `setColorBytes`In Shader:
- `sendColorBytes`These functions behave the same as their built-in counterparts, except for the different value range. Note that calling them has additional runtime costs in comparison to the original functions.
To replace all original functions, call `cindy.applyPatch()` at the start of the program: `require('cindy').applyPatch()`. This effectively restores the pre-11.0 behavior.