gopxl / pixel

A hand-crafted 2D game library in Go.
MIT License
225 stars 9 forks source link

Color refactor #93

Closed dusk125 closed 3 weeks ago

dusk125 commented 1 month ago

Refactor the pixel.RGBA to be an alias of color.RGBA so that it's less data to move around and better integrated with the standard library.

Also, adds an implicit contract with the caller.

Addresses: #71

hajimehoshi commented 1 month ago

Just out of curiosity, are you adding breaking changes without changing the major version from 2?

dusk125 commented 1 month ago

Just out of curiosity, are you adding breaking changes without changing the major version from 2?

No, I marked this as breaking so we would know that we would need to increase the major version, and to see if this change is something we actually want to consider.

I have some other refactoring I want to consider as well, so for the non-draft version of this PR, I'll probably create a v3 branch to accumulate these breaking changes before moving the project to v3.

duysqubix commented 4 weeks ago

Just out of curiosity, are you adding breaking changes without changing the major version from 2?

We did go from v1 to v2 and have the original v1 snapshot as a release.

dusk125 commented 4 weeks ago

And just a note, this PR is now targeting a v3 feature branch instead of main.