From 6750d022287d83a1ff43f5fa9da4251232540800 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Tue, 10 Dec 2019 13:33:40 +1300 Subject: [PATCH 1/3] Rates JSDoc --- .../src/scripting/RatesScriptingInterface.h | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/interface/src/scripting/RatesScriptingInterface.h b/interface/src/scripting/RatesScriptingInterface.h index 5658ed99a0..9806a6517e 100644 --- a/interface/src/scripting/RatesScriptingInterface.h +++ b/interface/src/scripting/RatesScriptingInterface.h @@ -14,6 +14,41 @@ #include +/**jsdoc + * The Rates API provides some information on current rendering performance. + * + * @namespace Rates + * + * @hifi-interface + * @hifi-client-entity + * @hifi-avatar + * + * @property {number} render - The rate at which new GPU frames are being created, in Hz. + * Read-only. + * @property {number} present - The rate at which the display plugin is presenting to the display device, in Hz + * Read-only. + * @property {number} newFrame - The rate at which the display plugin is presenting new GPU frames, in Hz. + * Read-only. + * @property {number} dropped - The rate at which the display plugin is dropping GPU frames, in Hz. + * Read-only. + * @property {number} simulation - The rate at which the game loop is running, in Hz. + * Read-only. + * + * @example Report current rendering rates. + * // The rates to report. + * var rates = [ + * "render", + * "present", + * "newFrame", + * "dropped", + * "simulation" + * ]; + * + * // Report the rates. + * for (var i = 0; i < rates.length; i++) { + * print("Rates." + rates[i], "=", Rates[rates[i]]); + * } + */ class RatesScriptingInterface : public QObject { Q_OBJECT From 73ad5d1d3171f3013cd62052f50704dd19a1687f Mon Sep 17 00:00:00 2001 From: David Rowe Date: Tue, 10 Dec 2019 13:34:32 +1300 Subject: [PATCH 2/3] Fix some JSDoc typos noticed in passing --- interface/src/scripting/DesktopScriptingInterface.h | 2 +- tools/jsdoc/plugins/hifi.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/src/scripting/DesktopScriptingInterface.h b/interface/src/scripting/DesktopScriptingInterface.h index c25f382891..e75bd571e8 100644 --- a/interface/src/scripting/DesktopScriptingInterface.h +++ b/interface/src/scripting/DesktopScriptingInterface.h @@ -22,7 +22,7 @@ /**jsdoc * The Desktop API provides the dimensions of the computer screen, sets the opacity of the HUD surface, and * enables QML and HTML windows to be shown inside or outside of Interface. - * + * * @namespace Desktop * * @hifi-interface diff --git a/tools/jsdoc/plugins/hifi.js b/tools/jsdoc/plugins/hifi.js index 0da2a34c48..496b144218 100644 --- a/tools/jsdoc/plugins/hifi.js +++ b/tools/jsdoc/plugins/hifi.js @@ -26,7 +26,7 @@ exports.handlers = { '../../assignment-client/src/octree', '../../interface/src', '../../interface/src/assets', - //'../../interface/src/audio', Exlude AudioScope API from output. + //'../../interface/src/audio', Exclude AudioScope API from output. '../../interface/src/avatar', '../../interface/src/commerce', '../../interface/src/java', From 4c1f7466d453562f0fa2fbef0e76320d9f575b08 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Wed, 11 Dec 2019 09:31:29 +1300 Subject: [PATCH 3/3] Typo --- interface/src/scripting/RatesScriptingInterface.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/src/scripting/RatesScriptingInterface.h b/interface/src/scripting/RatesScriptingInterface.h index 9806a6517e..6feef94d17 100644 --- a/interface/src/scripting/RatesScriptingInterface.h +++ b/interface/src/scripting/RatesScriptingInterface.h @@ -25,7 +25,7 @@ * * @property {number} render - The rate at which new GPU frames are being created, in Hz. * Read-only. - * @property {number} present - The rate at which the display plugin is presenting to the display device, in Hz + * @property {number} present - The rate at which the display plugin is presenting to the display device, in Hz. * Read-only. * @property {number} newFrame - The rate at which the display plugin is presenting new GPU frames, in Hz. * Read-only.