Skip to content

Web Screenshots#195

Merged
tzanio merged 8 commits intomasterfrom
web-screenshot
Aug 27, 2021
Merged

Web Screenshots#195
tzanio merged 8 commits intomasterfrom
web-screenshot

Conversation

@tomstitt
Copy link
Copy Markdown
Member

I tried to share some of aux_vis:Screenshot but if it's more confusing that way I can revert and copy what's needed from it

@tzanio tzanio added this to the glvis-4.1 milestone Aug 26, 2021
@tzanio tzanio mentioned this pull request Aug 26, 2021
15 tasks
Copy link
Copy Markdown
Member

@tzanio tzanio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested the associated JS lib and it worked great, thanks @tomstitt !

@tzanio
Copy link
Copy Markdown
Member

tzanio commented Aug 26, 2021

We should probably mention this in CHANGELOG

@tomstitt
Copy link
Copy Markdown
Member Author

I changed this a bit based on the slack discussion (@tzanio found that hidpi images weren't working) so instead of using a canvas to generate the png we'll use libpng to write a png with the correct dpi to the emscripten "filesystem" (all in-memory), load it to a byte array, pass that to JavaScript, and encode it as a base64 string from there

--no-heap-copy -s ENVIRONMENT=web -s MODULARIZE=1 -s EXPORT_NAME=glvis \
-s GL_ASSERTIONS=1 -s GL_DEBUG=1 -s USE_FREETYPE=1 -s MAX_WEBGL_VERSION=2 \
-s DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=0
-s DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=0 --minify 0
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm just going to add this so we don't have to patch each time for the web build

Copy link
Copy Markdown
Contributor

@publixsubfan publixsubfan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🎉

@tzanio tzanio merged commit 9169908 into master Aug 27, 2021
@tzanio tzanio deleted the web-screenshot branch August 27, 2021 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants