Skip to content

Commit 8b91218

Browse files
Philippe Vaillancourtwilleastcott
authored andcommitted
Various small documentation fixes (playcanvas#1067)
* Fix small typo * Add @returns documentation for pc.Controller#isPressed * Remove duplicate [options.cache] param description from pc.Http methods * Add @returns documentation for pc.SoundInstance#stop * Make 'request' a property defined as a function once again
1 parent cb1bcd5 commit 8b91218

File tree

4 files changed

+4
-7
lines changed

4 files changed

+4
-7
lines changed

src/framework/components/rigid-body/system.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pc.extend(pc, function () {
1919
/**
2020
* @name pc.RaycastResult
2121
* @class Object holding the result of a successful raycast hit
22-
* @description Create a new RaycastResul
22+
* @description Create a new RaycastResult
2323
* @param {pc.Entity} entity The entity that was hit
2424
* @param {pc.Vec3} point The point at which the ray hit the entity in world space
2525
* @param {pc.Vec3} normal The normal vector of the surface where the ray hit in world space.

src/input/controller.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,9 @@ pc.extend(pc, function () {
281281
/**
282282
* @function
283283
* @name pc.Controller#isPressed
284-
* @description Return true if the current action is enabled
284+
* @description Returns true if the current action is enabled
285285
* @param {String} action The name of the action
286+
* @returns {Boolean} True if the action is enabled
286287
*/
287288
Controller.prototype.isPressed = function (actionName) {
288289
if(!this._actions[actionName]) {

src/net/http.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ pc.extend(pc, function () {
6262
* @param {Document | Object} [options.postdata] Data to send in the body of the request.
6363
* Some content types are handled automatically, If postdata is an XML Document it is handled, if the Content-Type header is set to 'application/json' then
6464
* the postdata is JSON stringified, otherwise by default the data is sent as form-urlencoded
65-
* @param {Object} [options.cache] If false, then add a timestamp to the request to prevent caching
6665
* @param {Function} callback The callback used when the response has returned. Passed (err, data) where data is the response (format depends on response type, text, Object, ArrayBuffer, XML) and err is the error code.
6766
* @example
6867
* pc.http.get("http://example.com/", function (err, response) {
@@ -88,7 +87,6 @@ pc.extend(pc, function () {
8887
* @param {Object} [options.cache] If false, then add a timestamp to the request to prevent caching
8988
* @param {Boolean} [options.withCredentials] Send cookies with this request (default: true)
9089
* @param {String} [options.responseType] Override the response type
91-
* @param {Object} [options.cache] If false, then add a timestamp to the request to prevent caching
9290
* @param {Object} data Data to send in the body of the request.
9391
* Some content types are handled automatically, If postdata is an XML Document it is handled, if the Content-Type header is set to 'application/json' then
9492
* the postdata is JSON stringified, otherwise by default the data is sent as form-urlencoded
@@ -114,7 +112,6 @@ pc.extend(pc, function () {
114112
* @param {Object} [options.cache] If false, then add a timestamp to the request to prevent caching
115113
* @param {Boolean} [options.withCredentials] Send cookies with this request (default: true)
116114
* @param {String} [options.responseType] Override the response type
117-
* @param {Object} [options.cache] If false, then add a timestamp to the request to prevent caching
118115
* @param {Document | Object} data Data to send in the body of the request.
119116
* Some content types are handled automatically, If postdata is an XML Document it is handled, if the Content-Type header is set to 'application/json' then
120117
* the postdata is JSON stringified, otherwise by default the data is sent as form-urlencoded
@@ -143,7 +140,6 @@ pc.extend(pc, function () {
143140
* @param {Document | Object} [options.postdata] Data to send in the body of the request.
144141
* Some content types are handled automatically, If postdata is an XML Document it is handled, if the Content-Type header is set to 'application/json' then
145142
* the postdata is JSON stringified, otherwise by default the data is sent as form-urlencoded
146-
* @param {Object} [options.cache] If false, then add a timestamp to the request to prevent caching
147143
* @param {Function} callback The callback used when the response has returned. Passed (err, data) where data is the response (format depends on response type, text, Object, ArrayBuffer, XML) and err is the error code.
148144
*/
149145
del: function (url, options, callback) {
@@ -169,7 +165,6 @@ pc.extend(pc, function () {
169165
* @param {Document|Object} [options.postdata] Data to send in the body of the request.
170166
* Some content types are handled automatically, If postdata is an XML Document it is handled, if the Content-Type header is set to 'application/json' then
171167
* the postdata is JSON stringified, otherwise by default the data is sent as form-urlencoded
172-
* @param {Object} [options.cache] If false, then add a timestamp to the request to prevent caching
173168
* @param {Function} callback The callback used when the response has retured. Passed (err, data) where data is the response (format depends on response type, text, Object, ArrayBuffer, XML) and err is the error code.
174169
*/
175170
request: function (method, url, options, callback) {

src/sound/instance.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@ pc.extend(pc, function () {
278278
* @function
279279
* @name pc.SoundInstance#stop
280280
* @description Stops playback of sound. Calling play() again will restart playback from the beginning of the sound.
281+
* @returns {Boolean} Returns true if the sound was stopped.
281282
*/
282283
stop: function () {
283284
if (this._state === STATE_STOPPED || !this.source)

0 commit comments

Comments
 (0)