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

reference items that need examples #1954

Closed
20 of 40 tasks
lmccart opened this issue May 22, 2017 · 29 comments
Closed
20 of 40 tasks

reference items that need examples #1954

lmccart opened this issue May 22, 2017 · 29 comments

Comments

@lmccart
Copy link
Member

lmccart commented May 22, 2017

this wiki section contains info on how to add examples. anyone, please feel free to add to this list with reference entries that could use examples added.

@theekshanadis
Copy link

Hi,

I would like to contribute to p5js by adding examples listed in this issue. I have made an example for httpDo() method as my first contribution.
But I'm new to this Open Source project related documentation. Can you please give me some guidance.

Thank You.

@lmccart
Copy link
Member Author

lmccart commented Jul 19, 2017

@Thzn glad you want to contribute, thanks! In addition to the wiki section listed above, you may first want to check out this hello world github introduction and the other github guides and then watch the looking inside p5.js videos to get an overview of the file structure and tools of p5.js.

this section of the wiki explains how to add examples into the source code.

@theekshanadis
Copy link

@lmccart
Thank you for the instructions ...!. I will finish it soon...

@outofambit
Copy link
Contributor

hi! what is the proposed workflow for testing and adding examples? should i write them in a separate context and then copy paste into the inline comments?

i'm trying to build and view the documentation locally (by following https://github.com/processing/p5.js/wiki/Inline-documentation#adding-example-code) to verify that my example works, but am having no luck. (getting this:
local reference running
)

am i going about this wrong? thanks!

lmccart pushed a commit that referenced this issue Aug 20, 2017
@lmccart
Copy link
Member Author

lmccart commented Aug 20, 2017

@outofambit sorry that was out of date. running grunt yui should now generate docs that can be viewed at localhost/docs/reference, and are also ready to be copied to p5js.org. the fonts may not link correctly if viewing locally due to cross-origin permissions, but the examples should render.

@outofambit
Copy link
Contributor

outofambit commented Aug 20, 2017

@lmccart thanks i'll give that a try!

update: it works great!

@austince
Copy link
Contributor

@Thzn are you still working on the HTTP methods?

In the meantime, I'd like to contribute the Element/elt, Element/class, and Element/removeClass!

@theekshanadis
Copy link

@austince
No, I'm not working on them right now. I had a problem with the docker. So I posted about it on the page (toolness/p5.js-docker#13) . I think he is working on it. You can implement them as well.....

This was referenced Sep 12, 2017
@bomoko
Copy link
Contributor

bomoko commented Sep 30, 2017

Been meaning to return to this for a while.
I don't see anyone else working on the MediaElement examples - so I'd like to take them on.
Let's say, to begin, I'd like to do src, play, stop, pause, loop, and noLoop

lmccart pushed a commit that referenced this issue Jan 13, 2018
@eJohnstonePhd1991
Copy link
Contributor

This section https://p5js.org/reference/#/p5/createVideo also lacks an example, which may also relate to #1844

@constanceyu
Copy link
Contributor

Hi! I will be working on the p5.Table.js and p5.TableRow.js references. Please let me know if you already started working on any of them so we can work together!

@AdilRabbani
Copy link
Member

Hello, I would like to add examples to renderer methods (beginShape, vertex). But as they won't be appearing in the reference docs as suggested by @Spongman in #2793 , should I go for it?

@limzykenneth
Copy link
Member

@AdilRabbani those functions will be called when the sketch is in WebGL mode, so maybe you can create WebGL versions of those examples. Get concensus with @Spongman or @kjhollen first maybe as they may still be working on those functionalities.

@kjhollen
Copy link
Member

@AdilRabbani documentation for the renderer doesn't appear in the user facing documentation, so I don't think it's necessary to write examples there. However, the vertex method in general only has one example at the moment, and doesn't show any of the configurations for webGL. Maybe you can work on adding some there? in core/vertex.js.

@Spongman
Copy link
Contributor

Spongman commented Apr 20, 2018

just be aware that WebGL-mode support for some of the beginShape modes is a little spotty right now. hopefully this should improve a little with #2670.


the current list of methods missing examples is:

src\events\acceleration.js:350: method p5.setMoveThreshold missing example
src\events\acceleration.js:363: method p5.setShakeThreshold missing example
src\io\files.js:1329: method p5.save missing example
src\webgl\material.js:14: method p5.loadShader missing example
src\webgl\material.js:123: method p5.shader missing example
src\webgl\p5.Geometry.js:54: method p5.Geometry.computeFaces missing example
src\webgl\p5.Geometry.js:96: method p5.Geometry.computeNormals missing example
src\webgl\p5.Geometry.js:135: method p5.Geometry.averageNormals missing example
src\webgl\p5.Geometry.js:156: method p5.Geometry.averagePoleNormals missing example
src\webgl\p5.Geometry.js:249: method p5.Geometry.normalize missing example
src\webgl\p5.Shader.js:270: method p5.Shader.setUniform missing example

i think it would be nice, once all these are fixed, to turn this message into a build error to ensure that all future additions to the library include an example.

@AdilRabbani
Copy link
Member

AdilRabbani commented Apr 20, 2018

Added examples for vertex method. #2798

@aatishb
Copy link
Contributor

aatishb commented Apr 21, 2018

Hi, I'd like to add some simple visual interactive examples for the p5.Vector methods. Here's a list of examples I'm hoping to add.

@Spongman
Copy link
Contributor

@aatishb nice, could use a little toFixed() here & there.

@lmccart
Copy link
Member Author

lmccart commented Aug 13, 2018

thanks for the help everyone! closing this one as #2865 seems to cover this with clearer explanations

@jatin33
Copy link
Contributor

jatin33 commented Dec 24, 2019

Is this issue still opened? Is anyone else working on it?

@lmccart
Copy link
Member Author

lmccart commented Dec 27, 2019

Yes, here's a more up to date issue: #2865
You can get a partial list of missing examples by running grunt. Here's the current list:

src/dom/dom.js:2615: method p5.MediaElement.autoplay missing example
src/dom/dom.js:3032: method p5.MediaElement.connect missing example
src/dom/dom.js:3081: method p5.MediaElement.disconnect missing example
src/io/files.js:1395: method p5.save missing example
src/webgl/material.js:270: method p5.resetShader missing example
src/webgl/p5.Camera.js:298: method p5.createCamera missing example
src/webgl/p5.Camera.js:409: method p5.Camera.perspective missing example
src/webgl/p5.Camera.js:489: method p5.Camera.ortho missing example
src/webgl/p5.Camera.js:548: method p5.Camera.frustum missing example
src/webgl/p5.Camera.js:837: method p5.Camera.camera missing example
src/webgl/p5.Geometry.js:72: method p5.Geometry.computeFaces missing example
src/webgl/p5.Geometry.js:114: method p5.Geometry.computeNormals missing example
src/webgl/p5.Geometry.js:153: method p5.Geometry.averageNormals missing example
src/webgl/p5.Geometry.js:174: method p5.Geometry.averagePoleNormals missing example
src/webgl/p5.Geometry.js:267: method p5.Geometry.normalize missing example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests