-
Notifications
You must be signed in to change notification settings - Fork 351
Add "query playground" #406
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
Add "query playground" #406
Conversation
- Adjust the rotation center of the cursor so that its single pixel is gets rendered onto a single stage pixel instead of being split across 2-4 stage pixels. - Add canvas CSS to make most browsers scale the canvases without interpolation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some thoughts.
RenderWebGL.sampleColor3b(point, candidates, color); | ||
if (debugCanvasContext) { | ||
debugCanvasContext.fillStyle = `rgb(${color[0]},${color[1]},${color[2]})`; | ||
debugCanvasContext.fillRect(x - bounds.left, bounds.bottom - y, 1, 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this is a weird idea. What if this wasn't drawing but was calling delegate methods. Methods on debugCanvasContext. Then the different playground pages could change what they use about this data if that would be useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea of delegates. That could also solve another problem I've been having, where using "the" debug canvas is basically impossible in some projects since you only get a brief glimpse of the thing you're interested in before the canvas gets overwritten by the next thing. This could be solved by including some basic context info when calling the delegate method so the delegate could decide which data to handle, and how.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I explored this idea a bit and it started getting super complicated, mainly due to the differences between the CPU and GPU paths. It might be better (or at least easier) to have canvas-fetching delegates or something like that... I dunno. Anyway, I still like the idea but I think I'm filing it under "future work"...
aeab3a8
to
c390124
Compare
Resolves
Progress toward diagnosing #390 and other "touching color" issues
Proposed Changes
touching color?
.queryPlayground.html
, to interactively test renderer queries liketouching color?
.Current state:

Reason for Changes
This should help figure out what's going wrong with
touching color?
, as well as making it easier to add more playgrounds in the future if necessary.