elm-community / webgl

Moved to elm-explorations/webgl
https://package.elm-lang.org/packages/elm-explorations/webgl/latest
BSD 3-Clause "New" or "Revised" License
131 stars 18 forks source link

Add preserveDrawingBuffer option #53

Closed w0rm closed 5 years ago

w0rm commented 6 years ago

There is a need to read image from the canvas in JavaScript. Due to WebGL nature, you have to enable the preserveDrawingBuffer option in order to be able to do this reliably.

A sample use case might be recording a gif from the WebGL rendering. Originally requested for http://elmation.com in this reddit post but it is possible to do it without exposing gl context.

gif

shockham commented 6 years ago

This would be really useful for a project I am working on, is there any time-frame on this being merged/published? Thanks.

w0rm commented 6 years ago

@shockham I can’t promise anything because all changes to Native should be discussed with Evan. So we should wait until we gather multiple things together.

shockham commented 6 years ago

@w0rm No worries, have vendored the branch into the project for the time being.

w0rm commented 5 years ago

Reopened in https://github.com/elm-explorations/webgl/pull/10