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

CanvasData type #64

Open
Chadtech opened this issue Sep 30, 2017 · 1 comment
Open

CanvasData type #64

Chadtech opened this issue Sep 30, 2017 · 1 comment

Comments

@Chadtech
Copy link
Collaborator

Its really performant to turn canvas data into a 2D JavaScript array of rows and columns of pixels. Its unfortunately less performant to turn a 2D JavaScript array into an Elm list or a JavaScript list.

Perhaps there could be type CanvasData. and functions like `transform : Position -> (Color -> Color)

transformPixel : Position -> (Color -> Color) -> CanvasData

fromData : CanvasData -> Size -> Canvas

type alias Color = (Int, Int, Int, Int)
@Chadtech Chadtech changed the title To List (List (Int, Int, Int, Int) ) CanvasData type Sep 30, 2017
@bcb
Copy link

bcb commented Oct 7, 2020

I would also like this

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

No branches or pull requests

2 participants