mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 19:52:26 +02:00
Fix up MyAvatar reaction methods' JSDoc
This commit is contained in:
parent
28f5046ab2
commit
13a8ede1ac
1 changed files with 36 additions and 26 deletions
|
@ -1839,12 +1839,13 @@ public:
|
||||||
Q_INVOKABLE void releaseEyesLookAtControl();
|
Q_INVOKABLE void releaseEyesLookAtControl();
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* Aims the pointing directional blending towards the provided target point. The "point" reaction should be triggered
|
* Sets the point-at target for the <code>"point"</code> reaction that may be started with {@link MyAvatar.beginReaction}.
|
||||||
* before using this method with the code <code>MyAvatar.beginReaction("point")</code>.
|
* The point-at target is set only if it is in front of the avatar.
|
||||||
* @function MyAvatar.setPointAt
|
* <p>Note: The <code>"point"</code> reaction should be started before calling this method.</p>
|
||||||
* @param {Vec3} pointAtTarget - The target point in world coordinates.
|
* @function MyAvatar.setPointAt
|
||||||
* @returns {boolean} <code>true</code> if the target point lays in front of the avatar, <code>false</code> if it doesn't.
|
* @param {Vec3} pointAtTarget - The target to point at, in world coordinates.
|
||||||
*/
|
* @returns {boolean} <code>true</code> if the target point was set, <code>false</code> if it wasn't.
|
||||||
|
*/
|
||||||
Q_INVOKABLE bool setPointAt(const glm::vec3& pointAtTarget);
|
Q_INVOKABLE bool setPointAt(const glm::vec3& pointAtTarget);
|
||||||
|
|
||||||
glm::quat getLookAtRotation() { return _lookAtYaw * _lookAtPitch; }
|
glm::quat getLookAtRotation() { return _lookAtYaw * _lookAtPitch; }
|
||||||
|
@ -2348,43 +2349,52 @@ public slots:
|
||||||
virtual void setModelScale(float scale) override;
|
virtual void setModelScale(float scale) override;
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* MyAvatar.getTriggerReactions
|
* Gets the list of reactions names that can be triggered using {@link MyAvatar.triggerReaction}.
|
||||||
* Returns a list of reactions names that can be triggered using MyAvatar.triggerReaction().
|
* <p>See also: {@link MyAvatar.getBeginEndReactions}.
|
||||||
* @returns {string[]} Array of reaction names.
|
* @function MyAvatar.getTriggerReactions
|
||||||
|
* @returns {string[]} List of reaction names that can be triggered using {@link MyAvatar.triggerReaction}.
|
||||||
|
* @example <caption>List the available trigger reactions.</caption>
|
||||||
|
* print("Trigger reactions:", JSON.stringify(MyAvatar.getTriggerReactions()));
|
||||||
*/
|
*/
|
||||||
QStringList getTriggerReactions() const;
|
QStringList getTriggerReactions() const;
|
||||||
|
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* MyAvatar.getBeginReactions
|
* Gets the list of reactions names that can be enabled using {@link MyAvatar.beginReaction} and
|
||||||
* Returns a list of reactions names that can be enabled using MyAvatar.beginReaction() and MyAvatar.endReaction().
|
* {@link MyAvatar.endReaction}.
|
||||||
* @returns {string[]} Array of reaction names.
|
* <p>See also: {@link MyAvatar.getTriggerReactions}.
|
||||||
|
* @function MyAvatar.getBeginEndReactions
|
||||||
|
* @returns {string[]} List of reaction names that can be enabled using {@link MyAvatar.beginReaction} and
|
||||||
|
* {@link MyAvatar.endReaction}.
|
||||||
|
* @example <caption>List the available begin-end reactions.</caption>
|
||||||
|
* print("Begin-end reactions:", JSON.stringify(MyAvatar.getBeginEndReactions()));
|
||||||
*/
|
*/
|
||||||
QStringList getBeginEndReactions() const;
|
QStringList getBeginEndReactions() const;
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* MyAvatar.triggerReaction
|
* Plays a reaction on the avatar. Once the reaction is complete it will stop playing.
|
||||||
* Plays the given reaction on the avatar, once the reaction is complete it will automatically complete. Only reaction names returned from MyAvatar.getTriggerReactions() are available.
|
* <p>Only reaction names returned by {@link MyAvatar.getTriggerReactions} are available.</p>
|
||||||
* @param {string} reactionName - reaction name
|
* @function MyAvatar.triggerReaction
|
||||||
* @returns {bool} false if the given reaction is not supported.
|
* @param {string} reactionName - The reaction to trigger.
|
||||||
|
* @returns {boolean} <code>true</code> if the reaction was played, <code>false</code> if the reaction is not supported.
|
||||||
*/
|
*/
|
||||||
bool triggerReaction(QString reactionName);
|
bool triggerReaction(QString reactionName);
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* MyAvatar.beginReaction
|
* Starts playing a reaction on the avatar. The reaction will continue to play until stopped using
|
||||||
* Plays the given reaction on the avatar. The avatar will continue to play the reaction until stopped via the MyAvatar.endReaction() call or superseeded by another reaction.
|
* {@link MyAvatar.endReaction} or superseded by another reaction.
|
||||||
* Only reaction names returned from MyAvatar.getBeginEndReactions() are available.
|
* <p>Only reactions returned by {@link MyAvatar.getBeginEndReactions} are available.</p>
|
||||||
* NOTE: the caller is responsible for calling the corresponding MyAvatar.endReaction(), otherwise the avatar might become stuck in the reaction forever.
|
* @function MyAvatar.beginReaction
|
||||||
* @param {string} reactionName - reaction name
|
* @param {string} reactionName - The reaction to start playing.
|
||||||
* @returns {bool} false if the given reaction is not supported.
|
* @returns {boolean} <code>true</code> if the reaction was started, <code>false</code> if the reaction is not supported.
|
||||||
*/
|
*/
|
||||||
bool beginReaction(QString reactionName);
|
bool beginReaction(QString reactionName);
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* MyAvatar.endReaction
|
* Stops playing a reaction that was started using {@link MyAvatar.beginReaction}.
|
||||||
* Used to stop a given reaction that was started via MyAvatar.beginReaction().
|
* @function MyAvatar.endReaction
|
||||||
* @param {string} reactionName - reaction name
|
* @param {string} reactionName - The reaction to stop playing.
|
||||||
* @returns {bool} false if the given reaction is not supported.
|
* @returns {boolean} <code>true</code> if the reaction was stopped, <code>false</code> if the reaction is not supported.
|
||||||
*/
|
*/
|
||||||
bool endReaction(QString reactionName);
|
bool endReaction(QString reactionName);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue