-
Notifications
You must be signed in to change notification settings - Fork 165
Open
Labels
EnhancementNew feature or requestNew feature or request
Description
The syntax section of the reference could be clearer in a few places.
Methods
The reference pages for methods such as p5.Vector.add() display the following syntax:
add(x, [y], [z])
add(value)
add(v1, v2, [target])
It'd be helpful to demonstrate the dot operator, and to distinguish between instance and static methods. I suggest standardizing on p5.X.method()
and myX.method()
, as in:
myVector.add(x, [y], [z]);
myVector.add(value);
p5.Vector.add(v1, v2, [target]);
Side note: I'm not sure whether we should encourage copy/pasting syntax snippets.
Events and Structure
The reference pages for event functions such as doubleClicked() display the following syntax:
doubleClicked([event])
It'd be helpful to demonstrate that these functions are declared, not called, as in:
function doubleClicked([event]) {
// Code to run.
}
🤦🏽♂️ I just noticed that the code snippets for these are broken and will make a pull request soon!
Metadata
Metadata
Assignees
Labels
EnhancementNew feature or requestNew feature or request