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

move documentation to the wiki feature or seperate page? #35

Open
bmoren opened this issue Jun 30, 2020 · 1 comment
Open

move documentation to the wiki feature or seperate page? #35

bmoren opened this issue Jun 30, 2020 · 1 comment

Comments

@bmoren
Copy link
Owner

bmoren commented Jun 30, 2020

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.

@wisehackermonkey
Copy link
Contributor

wisehackermonkey commented Jun 30, 2020

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;
};

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

2 participants