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

On the reference page, p5.Image methods are duplicated #344

Closed
davepagurek opened this issue May 8, 2024 · 7 comments · Fixed by #349
Closed

On the reference page, p5.Image methods are duplicated #344

davepagurek opened this issue May 8, 2024 · 7 comments · Fixed by #349
Assignees

Comments

@davepagurek
Copy link
Collaborator

On https://beta.p5js.org/reference/#Image, the first subsection (just labelled "Image") seems to have the same content as the last subsection (labelled "p5.Image".) This doesn't happen for every subsection from a class (e.g. p5.Geometry doesn't have this problem.)

I need to look into whether or not this is something we can fix in the UI or whether it requires a data change. Leaving this issue here so I don't forget about it.

@davepagurek davepagurek self-assigned this May 8, 2024
@limzykenneth
Copy link
Member

This is mainly because the one directly under Image is the functions that is called as is and act on the main canvas, whereas for those under p5.Image acts against p5.Image object instance (ie. img.filter()). I'm not sure a data change will make sense here and probably a UI change for object instance methods to make it clear what they are will work better.

@davepagurek
Copy link
Collaborator Author

Ah ok so the methods are all valid? They still link to the same URLs that include p5.Image, that's probably in need of fixing at least

@limzykenneth
Copy link
Member

Yup, they are essentially this page and this page respectively. The contents are very similar as well.

@davepagurek
Copy link
Collaborator Author

Wait, actually those do still exist but in the pixels category a little below. It looks like that first section really is just a duplicate?

@limzykenneth
Copy link
Member

There's something not quite right going on here. blend() under pixels actually links to the constant BLEND.

@davepagurek
Copy link
Collaborator Author

There was some discussion before about the naming collision between constants and methods, what was the result of that? I wonder if that incorrect link could be related

@davepagurek
Copy link
Collaborator Author

I think I've got a fix, I'll put up a PR soon. Also just noticing that when a method has multiple overloads with shared parameter names, it duplicates the shared names but without a description:

image

vs on the current site:

image

I'll address that too.

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

Successfully merging a pull request may close this issue.

2 participants