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

Adding missing examples to the documentation. #6751

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

deveshidwivedi
Copy link
Contributor

@deveshidwivedi deveshidwivedi commented Jan 19, 2024

Resolves #6750

Changes: Added some of the missing examples.

Before:

Screenshot 2024-01-17 201617

After:

Screenshot 2024-01-20 000144

PR Checklist

@davepagurek
Copy link
Contributor

It looks like currently tests are failing from a linting error:

Running "eslint:source" (eslint) task
/home/runner/work/p5.js/p5.js/src/dom/dom.js:4664:72: Trailing spaces not allowed. [Error/no-trailing-spaces]
/home/runner/work/p5.js/p5.js/src/webgl/p5.Geometry.js:310:16: Trailing spaces not allowed. [Error/no-trailing-spaces]
/home/runner/work/p5.js/p5.js/src/webgl/p5.Geometry.js:311:16: Trailing spaces not allowed. [Error/no-trailing-spaces]
/home/runner/work/p5.js/p5.js/src/webgl/p5.Geometry.js:329:53: Trailing spaces not allowed. [Error/no-trailing-spaces]
/home/runner/work/p5.js/p5.js/src/webgl/p5.Geometry.js:944:59: Trailing spaces not allowed. [Error/no-trailing-spaces]
/home/runner/work/p5.js/p5.js/src/webgl/p5.Geometry.js:947:3: Trailing spaces not allowed. [Error/no-trailing-spaces]

(I haven't taken a closer look just yet at the changes, I'll do that soon. Thanks for taking on this task and adding so many examples!)

@deveshidwivedi
Copy link
Contributor Author

I'll fix these..

@perminder-17
Copy link
Contributor

Thank you @deveshidwivedi for raising this point. It's essential for new learners who may struggle with understanding concepts without clear examples. Your examples are excellent. I'd like to add a few cleanup for this one. :)

@deveshidwivedi
Copy link
Contributor Author

Thank you!@perminder-17
Please share any suggestions for refinement you may have.

@perminder-17
Copy link
Contributor

perminder-17 commented Jan 19, 2024

Oops Idk why my review is not showing up, maybe due to the access. Sharing the screenshots though :')

review

review2

@limzykenneth
Copy link
Member

@perminder-17 You seem to have started the review but not submitted it, on the top right of the code review page you need to press "Review changes" > "Submit review" for it to show up.

src/webgl/3d_primitives.js Show resolved Hide resolved
* function setup() {
* createCanvas(150, 150);
* pixelDensity(4);
* pg = createGraphics(75, 75);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm uncertain about whether we should include examples in all files containing the same method, such as pixelDensity, which is present in three files. If it's advisable, we could consider adding relevant examples in each corresponding file. What are your thoughts on this matter? for the example (pixelDensity), I believe we're referring to the method created on p5.framebuffer. Could we include an example related to using framebuffer instead of createGraphics? This might provide more relevant examples. What you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, for p5.Framebuffer.pixelDensity it would indeed be more relevant to add an example using framebuffer instead of createGraphics.

@perminder-17
Copy link
Contributor

@perminder-17 You seem to have started the review but not submitted it, on the top right of the code review page you need to press "Review changes" > "Submit review" for it to show up.

Thanks... My bad😂

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 this pull request may close these issues.

Add missing examples.
4 participants