Hi! I've used SpectorJS often in interactive contexts where there's a running frameloop, and I click things in the UI to start a capture and reload the page. It's enormously useful!
Today I'm trying to debug failures in a testing scaffold with many WebGL contexts, and having trouble getting SpectorJS to capture events for the correct canvas during the test period. For various reasons I think I need to do this entirely programmatically — no clicking in the UI — and while I've been trying to follow the basic usage I'm having trouble getting results.
My code looks like this:
const spector = new SPECTOR.Spector();
const canvas = document.createElement('canvas');
canvas.id = 'my-canvas';
canvas.width = canvas.height = 1;
document.body.appendChild(canvas);
// <create webgl context>
spector.displayUI();
spector.startCapture(canvas);
// <call gl.drawArrays>
spector.stopCapture();
Immediately I see this:

And a few seconds later it updates to:

The canvas I originally captured is listed in the dropdown, but doesn't appear to be selected, and no results are coming up. Am I doing this incorrectly, or is this something where a minimal reproducible example would be helpful?
Thanks!
Hi! I've used SpectorJS often in interactive contexts where there's a running frameloop, and I click things in the UI to start a capture and reload the page. It's enormously useful!
Today I'm trying to debug failures in a testing scaffold with many WebGL contexts, and having trouble getting SpectorJS to capture events for the correct canvas during the test period. For various reasons I think I need to do this entirely programmatically — no clicking in the UI — and while I've been trying to follow the basic usage I'm having trouble getting results.
My code looks like this:
Immediately I see this:
And a few seconds later it updates to:
The canvas I originally captured is listed in the dropdown, but doesn't appear to be selected, and no results are coming up. Am I doing this incorrectly, or is this something where a minimal reproducible example would be helpful?
Thanks!