evancz / elm-playground

Create pictures, animations, and games with Elm!
https://package.elm-lang.org/packages/evancz/elm-playground/latest/
BSD 3-Clause "New" or "Revised" License
107 stars 17 forks source link

`flip` transformation #6

Open miniBill opened 4 years ago

miniBill commented 4 years ago

I think the package could use a flipHorizontally/flipVertically pair of functions.

My use case is flipping an image (otherwise I'd need two versions of the same image, one normal and one flipped).

miniBill commented 4 years ago

I hereby release the contents of the commit https://github.com/miniBill/elm-playground/commit/aa894224d69bd12c0335dd7cdfa619ff1e908b68 under the license CC0, or at your choice, MIT

justgook commented 4 years ago

i would suggest instead of flip - add scaleX and scaleY - that can solve that problem, and add more functionality, and flipHorizontally - would be just alias to scaleX -1