-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
textOutput() describes position incorrectly #6612
Comments
@calebfoss, @cosmicbhejafry, @apoorva-a98, @tedkmburu, @Zarkv, @SkylerW99, @itsjoopark, @hannahvy, @nhasalajoshi what do y'all think? |
@nickmcintyre can you assign this issue to me, I would love to work on this issue |
Thanks @nickmcintyre. I think @lm-n might have some thoughts on this too! |
I think modying the |
function _shapeDetails(idT, ingredients) {
let shapeDetails = '';
let shapeNumber = 0;
// goes through every shape type in ingredients
for (let x in ingredients) {
// and for every shape
for (let y in ingredients[x]) {
// it creates a table row
let row = `<tr id="${idT}shape${shapeNumber}"><th>${
ingredients[x][y].color
} ${x}</th>`;
if (x === 'line') {
row =
row +
`<td>location = ${ingredients[x][y].pos.x}, ${ingredients[x][y].pos.y}</td><td>length = ${
ingredients[x][y].length
} pixels</td></tr>`;
} else {
row = row + <td>location = ${ingredients[x][y].pos.x}, ${ingredients[x][y].pos.y}</td>;
if (x !== 'point') {
row = row + <td> area = ${ingredients[x][y].area}%</td>;
}
row = row + '</tr>';
}
shapeDetails = shapeDetails + row;
shapeNumber++;
}
}
return shapeDetails;
} |
@umangutkarsh Have you figured out a way of testing your code, Can you tell me please? been struggling for a while |
@ujjwaleee26 even I'm not able to figure out, since the url in the readme is redirecting to 404 page. And after doing |
I asked on forum , but these commands dont work |
This means we don't have to run the local server. right? Can you share the link of this answer here? |
Yes but he says refer the bundle to testing webpage, how to do that |
@nickmcintyre The position used in these functions are calculated through applying the current transformation matrix of the canvas, for 2D it is For 3D it seems a bit more complicated but I'm still testing a few things out so see how it works. @umangutkarsh @ujjwaleee26 The contributor docs 404 is due to your ISP DNS blocking Github's resource URL, changing your DNS setting to use a third party DNS provider will solve it, otherwise you can read the contributor docs directly on Github here: https://github.com/processing/p5.js/tree/main/contributor_docs |
From my test, WebGL probably never worked with Web Accessibility before and although some lines of code seems to try to account for it, it probably isn't fully tested. The main thing in terms of positioning is that it still assumes (0, 0) is at the top left corner instead of being in the middle of the canvas. It is possible to account for it but we may need to review the overall WebGL support of p5.js Web Accessibility first. |
Oops! I introduced this bug. I opened #6649 to fix it. @limzykenneth yeah I brought up the issues with WEBGL in #6126. I had planned to add in an error when trying to set up outputs in WEBGL mode, but I got stuck on trying to do that with the friendly error system. |
Most appropriate sub-area of p5.js?
p5.js version
1.9.0
Web browser and version
Chrome 118, Firefox 120, Safari 17
Operating System
macOS
Steps to reproduce this
Steps:
textOutput(LABEL)
and view the results.pixelDensity(1)
to test the idea a little more.Original
The sketch above produces the following description:
Move the circle to the top-left
The sketch above produces the following description:
Change the pixel density
The sketch above produces the following description:
The text was updated successfully, but these errors were encountered: