From 6b5da80d13491565df2103d9f093ed00c54dba10 Mon Sep 17 00:00:00 2001 From: Atul Varma Date: Tue, 29 Mar 2016 17:40:24 -0400 Subject: [PATCH 1/2] Don't publicly document Sprite constructor. Fixes #63. --- lib/p5.play.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/p5.play.js b/lib/p5.play.js index 153e008b..afa0b786 100644 --- a/lib/p5.play.js +++ b/lib/p5.play.js @@ -716,14 +716,10 @@ 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 */ function Sprite(pInst, _x, _y, _w, _h) { From 0bd39c3a36da1f5d59eaf7e68bc69b0fecd2489f Mon Sep 17 00:00:00 2001 From: Atul Varma Date: Wed, 30 Mar 2016 06:50:49 -0400 Subject: [PATCH 2/2] Re-add sprite constructor docs as non-YUIDoc comment block. --- lib/p5.play.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/p5.play.js b/lib/p5.play.js index afa0b786..15171ff8 100644 --- a/lib/p5.play.js +++ b/lib/p5.play.js @@ -722,6 +722,16 @@ deltaTime = ((now - then) / 1000)/INTERVAL_60; // seconds since last frame * @class Sprite */ +// 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 function Sprite(pInst, _x, _y, _w, _h) { var pInstBind = createPInstBinder(pInst);