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

webgl模式下, 保存的png文件为空 #1

Open
nobodxbodon opened this issue Sep 10, 2017 · 1 comment
Open

webgl模式下, 保存的png文件为空 #1

nobodxbodon opened this issue Sep 10, 2017 · 1 comment

Comments

@nobodxbodon
Copy link
Member

https://github.com/program-in-chinese/p5js_in_chinese/blob/master/3D/%E5%9F%BA%E6%9C%AC/%E6%BC%94%E7%A4%BA.js

在官方论坛提问, 还未有结果:
saveFrames for canvas with WEBGL renderer

另外看到一处开发者评论, 似乎不支持:
http://qiita.com/hp0me/items/1570694d9f61368f3ae6#comment-28790f29e14af374d5ae

その後jsgifなどのライブラリを使って直接CanvasからGIFに落とせないか検討してみたのですが、WEBGLでcreateCanvas()した場合、p5.js側で{preserveDrawingBuffer: false}が指定されており、p5.jsに手を入れない限りはcanvasのイメージ取得ができないようでした。saveFrames()などの関数もWEBGLモードでは動いていないようですね。

@nobodxbodon
Copy link
Member Author

刚试了好像和上面的preserveDrawingBuffer: false有关. 改成true之后保存出的文件不是空了, 但显示有问题:
3d_0 10

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

1 participant