Way of saving canvas to image in deck.gl
See original GitHub issueHi, I want to save the webgl canvas to image by using toDataURL
or gl.readPixels
and have some questions:
- In order to read from canvas, seems I need to use
deck.redraw()
to trigger the render and read from framebuffer.Since I am usingUse<DeckGL>
in React and, according to the code thethis.deck
is not exposed from<DeckGL>
, how could I achieve this without passing customized deck instance?ref.current.deck.redraw(true)
- What is your recommendation of the way saving canvas to image, in deck.gl? Thanks!
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (2 by maintainers)
Top Results From Across the Web
Way of saving canvas to image in deck.gl · Issue #4436 - GitHub
Hi, I want to save the webgl canvas to image by using toDataURL or gl.readPixels and have some questions: In order to read...
Read more >deck.gl Capture Canvas as Image - CodePen
deck.gl Capture Canvas as Image · Miss X Follow. Love Run. Pen Editor Menu. Settings. Change View. Use Left Layout Use Top Layout...
Read more >Views and Projections - deck.gl
The position and extent of the view on the canvas: x , y , width , and height ... 10); // Save the...
Read more >mapbox gl js - Export png from deckl map - Stack Overflow
1 Answer 1 · Aadd id to Deckgl Component and ref return ( <DeckGL id="deck-gl-canvas" ref={this.deckRef} layers={layers} onHover={this. · add ref ...
Read more >Animated Map Visualizations with Deck.gl - YouTube
https://twitter.com/pbesh, @cortico, MIT @medialab.Visualize and animate data with interactive maps powered by http:// deck. gl - Uber's ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The general idea:
Great! It doesn’t look like you need that
html2canvas
tool though. Deck.gl maintains a reference to its canvas. I believe the rest of your code will work the same way, i.e.