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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't publicly document Sprite constructor #67

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions lib/p5.play.js
Original file line number Diff line number Diff line change
Expand Up @@ -716,16 +716,22 @@ deltaTime = ((now - then) / 1000)/INTERVAL_60; // seconds since last frame
* A Sprite can have a collider that defines the active area to detect
* collisions or overlappings with other sprites and mouse interactions.
*
* To create a Sprite, use
* {{#crossLink "p5.play/createSprite:method"}}{{/crossLink}}.
*
* @class Sprite
* @constructor
* @param {Number} x Initial x coordinate
* @param {Number} y Initial y coordinate
* @param {Number} width Width of the placeholder rectangle and of the
* collider until an image or new collider are set
* @param {Number} height Height of the placeholder rectangle and of the
* collider until an image or new collider are set
*/

// For details on why these docs aren't in a YUIDoc comment block, see:
//
Copy link
Contributor

Choose a reason for hiding this comment

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

Could move this documentation of parameter types into a plain-old-JS-comment just inside the function, to preserve the documentation for devs without mucking up the generated documentation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a good idea... something like this maybe?

// For details on why these docs aren't in a YUIDoc comment block, see:
// 
// https://github.com/molleindustria/p5.play/pull/67
//
// @param {Number} x Initial x coordinate
// @param {Number} y Initial y coordinate
// @param {Number} width Width of the placeholder rectangle and of the
//                       collider until an image or new collider are set
// @param {Number} height Height of the placeholder rectangle and of the
//                        collider until an image or new collider are set

// https://github.com/molleindustria/p5.play/pull/67
//
// @param {Number} x Initial x coordinate
// @param {Number} y Initial y coordinate
// @param {Number} width Width of the placeholder rectangle and of the
// collider until an image or new collider are set
// @param {Number} height Height of the placeholder rectangle and of the
// collider until an image or new collider are set
function Sprite(pInst, _x, _y, _w, _h) {
var pInstBind = createPInstBinder(pInst);

Expand Down