mirror of
https://github.com/overte-org/overte.git
synced 2025-07-23 02:58:09 +02:00
Miscellaneous JSDoc fixes
This commit is contained in:
parent
73f5841c9f
commit
92493f14d7
3 changed files with 10 additions and 4 deletions
|
@ -280,9 +280,9 @@ public slots:
|
|||
* @function Overlays.textSize
|
||||
* @param {Uuid} overlayID - The ID of the overlay to use for calculation.
|
||||
* @param {string} text - The string to calculate the size of.
|
||||
* @returns {Vec2} The size of the <code>text</code> if the overlay is a text overlay, otherwise
|
||||
* <code>{ x: 0, y: 0 }</code>. If the overlay is a 2D overlay the size is in pixels; if the overlay if a 3D overlay the
|
||||
* size is in meters.
|
||||
* @returns {Size} The size of the <code>text</code> if the overlay is a text overlay, otherwise
|
||||
* <code>{ height: 0, width : 0 }</code>. If the overlay is a 2D overlay the size is in pixels; if the overlay if a 3D
|
||||
* overlay the size is in meters.
|
||||
*/
|
||||
QSizeF textSize(OverlayID id, const QString& text);
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ PointerEvent::PointerEvent(EventType type, uint32_t id,
|
|||
* @property {number} id - Integer number used to identify the pointer: <code>0</code> = hardware mouse, <code>1</code> = left
|
||||
* controller, <code>2</code> = right controller.
|
||||
* @property {Vec2} pos2D - The 2D position of the event on the intersected overlay or entity XY plane.
|
||||
* @property {Vec3) pos3D - The 3D position of the event on the intersected overlay or entity.
|
||||
* @property {Vec3} pos3D - The 3D position of the event on the intersected overlay or entity.
|
||||
* @property {Vec3} normal - The surface normal at the intersection point.
|
||||
* @property {Vec3} direction - The direction of the intersection ray.
|
||||
* @property {string} button - The name of the button pressed: <code>None</code>, <code>Primary</code>, <code>Secondary</code>,
|
||||
|
|
|
@ -826,6 +826,12 @@ void quuidFromScriptValue(const QScriptValue& object, QUuid& uuid) {
|
|||
uuid = fromString;
|
||||
}
|
||||
|
||||
/**jsdoc
|
||||
* A 2D size value.
|
||||
* @typedef {object} Size
|
||||
* @property {number} height - The height value.
|
||||
* @property {number} width - The width value.
|
||||
*/
|
||||
QScriptValue qSizeFToScriptValue(QScriptEngine* engine, const QSizeF& qSizeF) {
|
||||
QScriptValue obj = engine->newObject();
|
||||
obj.setProperty("width", qSizeF.width());
|
||||
|
|
Loading…
Reference in a new issue