From 1a4266a64a93db554fea764aba38bb4596177b40 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Mon, 20 Jan 2020 14:33:06 +1300 Subject: [PATCH] Review JSDoc updates from recent commits --- .../src/avatars/ScriptableAvatar.h | 10 +++++----- interface/src/avatar/MyAvatar.h | 18 +++++++++--------- interface/src/ui/InteractiveWindow.cpp | 2 +- .../src/avatars-renderer/Avatar.cpp | 2 +- .../src/avatars-renderer/Avatar.h | 4 ++-- .../src/avatars-renderer/ScriptAvatar.h | 4 ++-- libraries/avatars/src/AvatarData.h | 10 +++++----- libraries/avatars/src/ScriptAvatarData.h | 2 +- .../GraphicsScriptingInterface.cpp | 2 +- .../src/graphics-scripting/ScriptableMesh.h | 4 ++-- .../graphics-scripting/ScriptableMeshPart.h | 2 +- .../src/graphics-scripting/ScriptableModel.h | 4 ++-- .../src/graphics/BufferViewHelpers.cpp | 2 +- libraries/shared/src/JointData.h | 2 +- libraries/shared/src/RegisteredMetaTypes.cpp | 2 +- 15 files changed, 35 insertions(+), 35 deletions(-) diff --git a/assignment-client/src/avatars/ScriptableAvatar.h b/assignment-client/src/avatars/ScriptableAvatar.h index 500c3f44fb..1e6046ba7e 100644 --- a/assignment-client/src/avatars/ScriptableAvatar.h +++ b/assignment-client/src/avatars/ScriptableAvatar.h @@ -82,15 +82,15 @@ *

Note: This property will automatically be set to true if the Controller system has valid facial * blend shape actions.

* @property {boolean} hasProceduralBlinkFaceMovement=true - true if avatars blink automatically by animating - * facial blend shapes, false if automatic blinking is disabled. Set this property to false if - * you wish to fully control the blink facial blend shapes via the {@link MyAvatar.setBlendshape} method. + * facial blend shapes, false if automatic blinking is disabled. Set to false to fully control + * the blink facial blend shapes via the {@link MyAvatar.setBlendshape} method. * @property {boolean} hasProceduralEyeFaceMovement=true - true if the facial blend shapes for an avatar's eyes * adjust automatically as the eyes move, false if this automatic movement is disabled. Set this property - * to true to prevent the iris from being obscured by the upper or lower lids. Set this property to - * false if you wish to fully control the eye blend shapes via the {@link MyAvatar.setBlendshape} method. + * to true to prevent the iris from being obscured by the upper or lower lids. Set to false to + * fully control the eye blend shapes via the {@link MyAvatar.setBlendshape} method. * @property {boolean} hasAudioEnabledFaceMovement=true - true if the avatar's mouth blend shapes animate * automatically based on detected microphone input, false if this automatic movement is disabled. Set - * this property to false if you wish to fully control the mouth facial blend shapes via the + * this property to false to fully control the mouth facial blend shapes via the * {@link MyAvatar.setBlendshape} method. * * @example Create a scriptable avatar. diff --git a/interface/src/avatar/MyAvatar.h b/interface/src/avatar/MyAvatar.h index 9b9bc2d9df..0f46af458e 100644 --- a/interface/src/avatar/MyAvatar.h +++ b/interface/src/avatar/MyAvatar.h @@ -154,12 +154,12 @@ class MyAvatar : public Avatar { *

Note: This property will automatically be set to true if the controller system has * valid facial blend shape actions.

* @property {boolean} hasProceduralBlinkFaceMovement=true - true if avatars blink automatically by animating - * facial blend shapes, false if automatic blinking is disabled. Set this property to false - * to fully control the blink facial blend shapes via the {@link MyAvatar.setBlendshape} method. + * facial blend shapes, false if automatic blinking is disabled. Set to false to fully control + * the blink facial blend shapes via the {@link MyAvatar.setBlendshape} method. * @property {boolean} hasProceduralEyeFaceMovement=true - true if the facial blend shapes for an avatar's eyes * adjust automatically as the eyes move, false if this automatic movement is disabled. Set this property - * to true to prevent the iris from being obscured by the upper or lower lids. Set this property to - * false to fully control the eye blend shapes via the {@link MyAvatar.setBlendshape} method. + * to true to prevent the iris from being obscured by the upper or lower lids. Set to false to + * fully control the eye blend shapes via the {@link MyAvatar.setBlendshape} method. * @property {boolean} hasAudioEnabledFaceMovement=true - true if the avatar's mouth blend shapes animate * automatically based on detected microphone input, false if this automatic movement is disabled. Set * this property to false to fully control the mouth facial blend shapes via the @@ -1793,15 +1793,15 @@ public: /**jsdoc * Turns the avatar's head until it faces the target point within a +90/-90 degree range. - * Once this method is called, API calls will have full control of the head for a limited time. - * If this method is not called for 2 seconds, the engine will regain control of the head. + * Once this method is called, API calls have full control of the head for a limited time. + * If this method is not called for 2 seconds, the engine regains control of the head. * @function MyAvatar.setHeadLookAt * @param {Vec3} lookAtTarget - The target point in world coordinates. */ Q_INVOKABLE void setHeadLookAt(const glm::vec3& lookAtTarget); /**jsdoc - * Returns the current target point of the head's look direction in world coordinates. + * Gets the current target point of the head's look direction in world coordinates. * @function MyAvatar.getHeadLookAt * @returns {Vec3} The head's look-at target in world coordinates. */ @@ -1815,7 +1815,7 @@ public: /**jsdoc * Forces the avatar's eyes to look at a specified location. Once this method is called, API calls - * have full control of the eyes for a limited time. If this method is not called for two seconds, + * full control of the eyes for a limited time. If this method is not called for 2 seconds, * the engine regains control of the eyes. * @function MyAvatar.setEyesLookAt * @param {Vec3} lookAtTarget - The target point in world coordinates. @@ -1823,7 +1823,7 @@ public: Q_INVOKABLE void setEyesLookAt(const glm::vec3& lookAtTarget); /**jsdoc - * Returns the current target point of the eyes look direction in world coordinates. + * Gets the current target point of the eyes look direction in world coordinates. * @function MyAvatar.getEyesLookAt * @returns {Vec3} The eyes' look-at target in world coordinates. */ diff --git a/interface/src/ui/InteractiveWindow.cpp b/interface/src/ui/InteractiveWindow.cpp index 2acac2c529..0ac1f05737 100644 --- a/interface/src/ui/InteractiveWindow.cpp +++ b/interface/src/ui/InteractiveWindow.cpp @@ -145,7 +145,7 @@ void InteractiveWindow::emitMainWindowResizeEvent() { * @property {InteractiveWindow.Flags} [additionalFlags=0] - Customizes window behavior. * @property {InteractiveWindow.OverrideFlags} [overrideFlags=0] - Customizes window controls. - * @property {InteractiveWindow.RelativePositionAnchor} [relativePositionAnchor] - he anchor for the + * @property {InteractiveWindow.RelativePositionAnchor} [relativePositionAnchor] - The anchor for the * relativePosition, if used. * @property {Vec2} [relativePosition] - The position of the window, relative to the relativePositionAnchor, in * pixels. Excludes the window frame. diff --git a/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp b/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp index a9e16e9ff1..3792057052 100644 --- a/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp +++ b/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp @@ -1925,7 +1925,7 @@ void Avatar::setParentJointIndex(quint16 parentJointIndex) { * @typedef {object} SkeletonJoint * @property {string} name - Joint name. * @property {number} index - Joint index. - * @property {number} parentIndex - Index of this joint's parent (-1 if no parent). + * @property {number} parentIndex - Index of this joint's parent (-1 if no parent). */ QList Avatar::getSkeleton() { SkeletonModelPointer skeletonModel = _skeletonModel; diff --git a/libraries/avatars-renderer/src/avatars-renderer/Avatar.h b/libraries/avatars-renderer/src/avatars-renderer/Avatar.h index dcd4d00db0..2c36a92b0f 100644 --- a/libraries/avatars-renderer/src/avatars-renderer/Avatar.h +++ b/libraries/avatars-renderer/src/avatars-renderer/Avatar.h @@ -442,7 +442,7 @@ public: void setOrientationViaScript(const glm::quat& orientation) override; /**jsdoc - * Gets the ID of the entity of avatar that the avatar is parented to. + * Gets the ID of the entity or avatar that the avatar is parented to. * @function MyAvatar.getParentID * @returns {Uuid} The ID of the entity or avatar that the avatar is parented to. {@link Uuid(0)|Uuid.NULL} if not parented. */ @@ -450,7 +450,7 @@ public: Q_INVOKABLE virtual const QUuid getParentID() const override { return SpatiallyNestable::getParentID(); } /**jsdoc - * Sets the ID of the entity of avatar that the avatar is parented to. + * Sets the ID of the entity or avatar that the avatar is parented to. * @function MyAvatar.setParentID * @param {Uuid} parentID - The ID of the entity or avatar that the avatar should be parented to. Set to * {@link Uuid(0)|Uuid.NULL} to unparent. diff --git a/libraries/avatars-renderer/src/avatars-renderer/ScriptAvatar.h b/libraries/avatars-renderer/src/avatars-renderer/ScriptAvatar.h index 3f8fc4f88b..abc15ae11b 100644 --- a/libraries/avatars-renderer/src/avatars-renderer/ScriptAvatar.h +++ b/libraries/avatars-renderer/src/avatars-renderer/ScriptAvatar.h @@ -19,7 +19,7 @@ /**jsdoc * Information about an avatar. * - *

Created using {@link MyAvatar.getTargetAvatar} or {@link AvatarList.getAvatar}.

+ *

Create using {@link MyAvatar.getTargetAvatar} or {@link AvatarList.getAvatar}.

* * @class ScriptAvatar * @hideconstructor @@ -152,7 +152,7 @@ public slots: /**jsdoc - * Gets the ID of the entity of avatar that the avatar is parented to. + * Gets the ID of the entity or avatar that the avatar is parented to. * @function ScriptAvatar.getParentID * @returns {Uuid} The ID of the entity or avatar that the avatar is parented to. {@link Uuid(0)|Uuid.NULL} if not parented * or avatar data aren't available. diff --git a/libraries/avatars/src/AvatarData.h b/libraries/avatars/src/AvatarData.h index 24808b98bf..40e3a056da 100755 --- a/libraries/avatars/src/AvatarData.h +++ b/libraries/avatars/src/AvatarData.h @@ -538,12 +538,12 @@ class AvatarData : public QObject, public SpatiallyNestable { *

Note: This property will automatically be set to true if the controller system has * valid facial blend shape actions.

* @property {boolean} hasProceduralBlinkFaceMovement=true - true if avatars blink automatically by animating - * facial blend shapes, false if automatic blinking is disabled. Set this property to false - * to fully control the blink facial blend shapes via the {@link Avatar.setBlendshape} method. + * facial blend shapes, false if automatic blinking is disabled. Set to false to fully control + * the blink facial blend shapes via the {@link Avatar.setBlendshape} method. * @property {boolean} hasProceduralEyeFaceMovement=true - true if the facial blend shapes for an avatar's eyes * adjust automatically as the eyes move, false if this automatic movement is disabled. Set this property - * to true to prevent the iris from being obscured by the upper or lower lids. Set this property to - * false to fully control the eye blend shapes via the {@link Avatar.setBlendshape} method. + * to true to prevent the iris from being obscured by the upper or lower lids. Set to false to + * fully control the eye blend shapes via the {@link Avatar.setBlendshape} method. * @property {boolean} hasAudioEnabledFaceMovement=true - true if the avatar's mouth blend shapes animate * automatically based on detected microphone input, false if this automatic movement is disabled. Set * this property to false to fully control the mouth facial blend shapes via the @@ -1542,7 +1542,7 @@ signals: void sessionDisplayNameChanged(); /**jsdoc - * Triggered when the avatar's model (i.e., skeletonModelURL property value) is changed. + * Triggered when the avatar's model (i.e., skeletonModelURL property value) changes. * @function Avatar.skeletonModelURLChanged * @returns {Signal} * @example Report when your avatar's skeleton model changes. diff --git a/libraries/avatars/src/ScriptAvatarData.h b/libraries/avatars/src/ScriptAvatarData.h index 7dcd7cc7e1..128bf9aef7 100644 --- a/libraries/avatars/src/ScriptAvatarData.h +++ b/libraries/avatars/src/ScriptAvatarData.h @@ -248,7 +248,7 @@ signals: void sessionDisplayNameChanged(); /**jsdoc - * Triggered when the avatar's model (i.e., skeletonModelURL property value) is changed. + * Triggered when the avatar's model (i.e., skeletonModelURL property value) changes. * @function ScriptAvatar.skeletonModelURLChanged * @returns {Signal} */ diff --git a/libraries/graphics-scripting/src/graphics-scripting/GraphicsScriptingInterface.cpp b/libraries/graphics-scripting/src/graphics-scripting/GraphicsScriptingInterface.cpp index 9d36cfd91a..a27eff9cbe 100644 --- a/libraries/graphics-scripting/src/graphics-scripting/GraphicsScriptingInterface.cpp +++ b/libraries/graphics-scripting/src/graphics-scripting/GraphicsScriptingInterface.cpp @@ -434,7 +434,7 @@ namespace scriptable { * @property {string} [glossMap] - The URL of the gloss texture image. * Only use one of roughnessMap and glossMap. * "hifi_pbr" model only. - * @property {string} [normalMa]p - The URL of the normal texture image. + * @property {string} [normalMap] - The URL of the normal texture image. * If "fallthrough" then it and bumpMap fall through to the material below. * Only use one of normalMap and bumpMap. * "hifi_pbr" model only. diff --git a/libraries/graphics-scripting/src/graphics-scripting/ScriptableMesh.h b/libraries/graphics-scripting/src/graphics-scripting/ScriptableMesh.h index 8d70eda9e4..0e7eecc03b 100644 --- a/libraries/graphics-scripting/src/graphics-scripting/ScriptableMesh.h +++ b/libraries/graphics-scripting/src/graphics-scripting/ScriptableMesh.h @@ -31,7 +31,7 @@ namespace scriptable { /**jsdoc * A handle to in-memory mesh data in a {@link GraphicsModel}. * - *

Created using the {@link Graphics} API, {@link GraphicsModel.cloneModel}, or {@link GraphicsMesh.cloneMesh}.

+ *

Create using the {@link Graphics} API, {@link GraphicsModel.cloneModel}, or {@link GraphicsMesh.cloneMesh}.

* * @class GraphicsMesh * @hideconstructor @@ -133,7 +133,7 @@ namespace scriptable { QVector findNearbyVertexIndices(const glm::vec3& origin, float epsilon = 1e-6) const; /**jsdoc - * Adds an attribute to the (whole) mesh's vertices. + * Adds an attribute for all vertices. * @function GraphicsMesh.addAttribute * @param {Graphics.BufferTypeName} name - The name of the attribute. * @param {Graphics.BufferType} [defaultValue] - The value to give the attributes added to the vertices. diff --git a/libraries/graphics-scripting/src/graphics-scripting/ScriptableMeshPart.h b/libraries/graphics-scripting/src/graphics-scripting/ScriptableMeshPart.h index 78ddb4f2b0..878b239f3d 100644 --- a/libraries/graphics-scripting/src/graphics-scripting/ScriptableMeshPart.h +++ b/libraries/graphics-scripting/src/graphics-scripting/ScriptableMeshPart.h @@ -13,7 +13,7 @@ namespace scriptable { /**jsdoc * A handle to in-memory mesh part data in a {@link GraphicsModel}. * - *

Created using the {@link Graphics} API, {@link GraphicsModel.cloneModel}, {@link GraphicsMesh.cloneMesh}, or + *

Create using the {@link Graphics} API, {@link GraphicsModel.cloneModel}, {@link GraphicsMesh.cloneMesh}, or * {@link GraphicsMeshPart.cloneMeshPart}.

* * @class GraphicsMeshPart diff --git a/libraries/graphics-scripting/src/graphics-scripting/ScriptableModel.h b/libraries/graphics-scripting/src/graphics-scripting/ScriptableModel.h index 6dc2a06747..a6f135c321 100644 --- a/libraries/graphics-scripting/src/graphics-scripting/ScriptableModel.h +++ b/libraries/graphics-scripting/src/graphics-scripting/ScriptableModel.h @@ -22,7 +22,7 @@ namespace scriptable { *

Note: The model may be used for more than one instance of an item displayed in the scene. Modifying the model updates * all instances displayed.

* - *

Created using the {@link Graphics} API or {@link GraphicsModel.cloneModel}.

+ *

Create using the {@link Graphics} API or {@link GraphicsModel.cloneModel}.

* * @class GraphicsModel * @hideconstructor @@ -34,7 +34,7 @@ namespace scriptable { * @property {Uuid} objectID - The ID of the entity or avatar that the model is associated with, if any; null * if the model is not associated with an entity or avatar. * Read-only. - * @property {number} numMeshes - The number of meshes contained in the model. + * @property {number} numMeshes - The number of meshes in the model. * Read-only. * @property {GraphicsMesh[]} meshes - The meshes in the model. Each mesh may have more than one mesh part. * Read-only. diff --git a/libraries/graphics/src/graphics/BufferViewHelpers.cpp b/libraries/graphics/src/graphics/BufferViewHelpers.cpp index 076cb92dcf..87d19ec6a2 100644 --- a/libraries/graphics/src/graphics/BufferViewHelpers.cpp +++ b/libraries/graphics/src/graphics/BufferViewHelpers.cpp @@ -76,7 +76,7 @@ const std::array ZERO123 = { { "0", "1", "2", "3" } }; * {@link Vec2}"texcoord4"Fifth UV coordinates buffer. * * - * @typedef {Vec3|vec2} Graphics.BufferType + * @typedef {Vec4|Vec3|Vec2} Graphics.BufferType */ QMap ATTRIBUTES{ {"position", gpu::Stream::POSITION }, diff --git a/libraries/shared/src/JointData.h b/libraries/shared/src/JointData.h index 3f957fa046..329c2dd151 100644 --- a/libraries/shared/src/JointData.h +++ b/libraries/shared/src/JointData.h @@ -16,7 +16,7 @@ public: // Used by the avatar mixer to describe a single joint // Translations relative to their parent joint // Rotations are absolute (i.e. not relative to parent) and are in rig space. -// No JSDoc because its not provided as a type to the script engine. +// No JSDoc because it's not provided as a type to the script engine. class JointData { public: glm::quat rotation; diff --git a/libraries/shared/src/RegisteredMetaTypes.cpp b/libraries/shared/src/RegisteredMetaTypes.cpp index 7c30d4f205..7faaebbae9 100644 --- a/libraries/shared/src/RegisteredMetaTypes.cpp +++ b/libraries/shared/src/RegisteredMetaTypes.cpp @@ -1309,7 +1309,7 @@ void meshesFromScriptValue(const QScriptValue& value, MeshProxyList &out) { /**jsdoc * A triangle in a mesh. * @typedef {object} MeshFace - * @property {number[]} vertices - The indexes of the three vertices that make up the fase. + * @property {number[]} vertices - The indexes of the three vertices that make up the face. */ QScriptValue meshFaceToScriptValue(QScriptEngine* engine, const MeshFace &meshFace) { QScriptValue obj = engine->newObject();