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

spector.js no longer able to capture a frame with maplibre-gl-js #4534

Open
xabbu42 opened this issue Aug 10, 2024 · 2 comments
Open

spector.js no longer able to capture a frame with maplibre-gl-js #4534

xabbu42 opened this issue Aug 10, 2024 · 2 comments
Labels
need more info Further information is requested

Comments

@xabbu42
Copy link
Contributor

xabbu42 commented Aug 10, 2024

Since commit 859b1a7 capturing a single frame with spector.js no longer works. I assume it is the same problem as BabylonJS/Spector.js#115. This issue is about different ways to handle that as spector.js is quite useful.

Can we go back to doing the rendering directly in the requestAnimationFrame callback or are there technical issues against that approach? I'll add a pull request with my experiments in this direction.

If not, can we find a way to still capture a single frame with spector.js and document that?

@HarelM
Copy link
Collaborator

HarelM commented Aug 11, 2024

The main purpose of the linked commit was to remove callback hell from the code.
It might have been an overkill to do that for requestAnimationFrame as it is not used widely, but generally speaking, I would like to keep it as is in terms of APIs.
I would like to receive a better definition of the problem as the linked issue is not specific enough to maplibre, and I would like to get a better reproduction of the issue in terms relevant to this repo and library if possible, i.e. link to jsbin and better description of the issue.

@HarelM HarelM added the need more info Further information is requested label Aug 11, 2024
@xabbu42
Copy link
Contributor Author

xabbu42 commented Aug 13, 2024

This is a basic map using v4.5.2 and enabling the spector ui: https://output.jsbin.com/tikepev/1
if you click on the red circle to start a frame capture the map remains responsive and after a while you get the error "No frames with gl commands detected. Try moving the camera.".

The same example with v3.6.2: https://output.jsbin.com/tikepev/2
here a click on the red circle blocks the map and after a while you get the capture of a single frame.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need more info Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants