Why does my canvas go blank after converting to image?

前端 未结 3 687
温柔的废话
温柔的废话 2020-12-01 09:48

I am trying to convert the canvas element on this page to a png using the following snippet (e.g. enter in JavaScript console):

(function conver         


        
3条回答
  •  离开以前
    2020-12-01 10:25

    toDataURL() read data from Buffer.

    we don't need to use preserveDrawingBuffer: true

    before read data, we also need to use render()

    finally:

    renderer.domElement.toDataURL();
    

提交回复
热议问题