p5.collide2D icon indicating copy to clipboard operation
p5.collide2D copied to clipboard

move documentation to the wiki feature or seperate page?

Open bmoren opened this issue 4 years ago • 1 comments

is this a good idea? maybe a series of md files, or a gh-pages documentation instead?

I think this would clear up the read-me a bit and allow for some more in-depth examples.

bmoren avatar Jun 30 '20 00:06 bmoren

Thought

Modify the main readme for getting started, with a simple example

and have a list of functions signatures to choose from

where the user clicks on each to see more in-depth examples.

Docs options that would be cool, in addition to github page

Moving forward

If we move the examples to md files i think it might be worth it to start using doc generation
like add all the examples in a comment above the function definition

Benifits

1) keep the docs close to the function within the code and makes for easy search and replace
2) doc generators automatically generate lists of functions with links to examples out of the box

Example

Examples of great documentation from other github projects for inspiration

//###########collidePointCircle###########
// #### collidePointCircle()
// ###### collidePointCircle(pointX, pointY, circleX, circleY, diameter)
// point to circle collision in 2D. Assumes ellipseMode(CENTER);

// var hit = false;
// function setup() {
// 	......
// }
// function draw() {
// 	......
// 	hit = collidePointCircle(mouseX,mouseY,200,200,100)
// ......
// }
//--------------------
p5.prototype.collidePointCircle = function (x, y, cx, cy, d) {
//2d
if( this.dist(x,y,cx,cy) <= d/2 ){
  return true;
}
return false;
};

wisehackermonkey avatar Jun 30 '20 02:06 wisehackermonkey