From 6750d022287d83a1ff43f5fa9da4251232540800 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Tue, 10 Dec 2019 13:33:40 +1300 Subject: [PATCH] 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