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

Make screenshot of the scene #13

Open
hellhorse123 opened this issue May 10, 2023 · 4 comments
Open

Make screenshot of the scene #13

hellhorse123 opened this issue May 10, 2023 · 4 comments

Comments

@hellhorse123
Copy link

No description provided.

@hellhorse123
Copy link
Author

I'm trying to take a screenshot from BabylonJSViewer using the screenshot.dart library and on the iPhone simulator it takes a photo of only a white screen (on Android everything is fine):

 Screenshot(
                    controller: _screenshotController,
                    child: BabylonJSViewer(src: mannequinLink)),

.
I also get errors:

 [VERBOSE-2:platform_view_layer.cc(19)] Trying to embed a platform view but the PrerollContext does not support embedding
[VERBOSE-2:platform_view_layer.cc(38)] Trying to embed a platform view but the PaintContext does not support embedding

although adding the necessary line to info.plst :

<key>io.flutter.embedded_views_preview</key>
	<true/>

@MarlonJD
Copy link
Owner

Can you get the model without the capturing screenshot?

@hellhorse123
Copy link
Author

hellhorse123 commented May 10, 2023

yes, and I can also take a screenshot of other widgets besides the scene. But I can’t take a screenshot of the scene, so I’m trying to figure out which library is the problem. Due to the fact that I only get errors

 [VERBOSE-2:platform_view_layer.cc(19)] Trying to embed a platform view but the PrerollContext does not support embedding
[VERBOSE-2:platform_view_layer.cc(38)] Trying to embed a platform view but the PaintContext does not support embedding

when I try to take a screenshot of the scene - I thought that maybe the problem is in the library BabylonJSViewer

@MarlonJD
Copy link
Owner

Actually, there is a screenshot method in Babylon's viewer itself. I'll try in there to getting screenshot, but it can be hard to get this to the device

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

2 participants