Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jsDoc updates/fixes #598

Merged
merged 3 commits into from
Aug 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 40 additions & 40 deletions interface/src/ui/overlays/Overlays.h

Large diffs are not rendered by default.

88 changes: 44 additions & 44 deletions libraries/audio/src/AudioScriptingInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class AudioScriptingInterface : public QObject, public Dependency {
}

/*@jsdoc
* Adds avatars to the audio solo list. If the audio solo list is not empty, only audio from the avatars in the list is
* Adds avatars to the audio solo list. If the audio solo list is not empty, only audio from the avatars in the list is
* played.
* @function Audio.addToSoloList
* @param {Uuid[]} ids - Avatar IDs to add to the solo list.
Expand All @@ -57,25 +57,25 @@ class AudioScriptingInterface : public QObject, public Dependency {
* // Find nearby avatars.
* var RANGE = 100; // m
* var nearbyAvatars = AvatarList.getAvatarsInRange(MyAvatar.position, RANGE);
*
*
* // Remove own avatar from list.
* var myAvatarIndex = nearbyAvatars.indexOf(MyAvatar.sessionUUID);
* if (myAvatarIndex !== -1) {
* nearbyAvatars.splice(myAvatarIndex, 1);
* }
*
*
* if (nearbyAvatars.length > 0) {
* // Listen to only one of the nearby avatars.
* var avatarName = AvatarList.getAvatar(nearbyAvatars[0]).displayName;
* print("Listening only to " + avatarName);
* Audio.addToSoloList([nearbyAvatars[0]]);
*
*
* // Stop listening to only the one avatar after a short while.
* Script.setTimeout(function () {
* print("Finished listening only to " + avatarName);
* Audio.resetSoloList();
* }, 10000); // 10s
*
*
* } else {
* print("No nearby avatars");
* }
Expand All @@ -85,7 +85,7 @@ class AudioScriptingInterface : public QObject, public Dependency {
}

/*@jsdoc
* Removes avatars from the audio solo list. If the audio solo list is not empty, only audio from the avatars in the list
* Removes avatars from the audio solo list. If the audio solo list is not empty, only audio from the avatars in the list
* is played.
* @function Audio.removeFromSoloList
* @param {Uuid[]} ids - Avatar IDs to remove from the solo list.
Expand All @@ -103,44 +103,44 @@ class AudioScriptingInterface : public QObject, public Dependency {
}

/*@jsdoc
* Gets whether your microphone audio is echoed back to you from the server. When enabled, microphone audio is echoed only
* Gets whether your microphone audio is echoed back to you from the server. When enabled, microphone audio is echoed only
* if you're unmuted or are using push-to-talk.
* @function Audio.getServerEcho
* @returns {boolean} <code>true</code> if echoing microphone audio back to you from the server is enabled,
* @returns {boolean} <code>true</code> if echoing microphone audio back to you from the server is enabled,
* <code>false</code> if it isn't.
*/
Q_INVOKABLE bool getServerEcho();

/*@jsdoc
* Sets whether your microphone audio is echoed back to you from the server. When enabled, microphone audio is echoed
* Sets whether your microphone audio is echoed back to you from the server. When enabled, microphone audio is echoed
* only if you're unmuted or are using push-to-talk.
* @function Audio.setServerEcho
* @param {boolean} serverEcho - <code>true</code> to enable echoing microphone back to you from the server,
* @param {boolean} serverEcho - <code>true</code> to enable echoing microphone back to you from the server,
* <code>false</code> to disable.
*/
Q_INVOKABLE void setServerEcho(bool serverEcho);

/*@jsdoc
* Toggles the echoing of microphone audio back to you from the server. When enabled, microphone audio is echoed only if
* Toggles the echoing of microphone audio back to you from the server. When enabled, microphone audio is echoed only if
* you're unmuted or are using push-to-talk.
* @function Audio.toggleServerEcho
*/
Q_INVOKABLE void toggleServerEcho();

/*@jsdoc
* Gets whether your microphone audio is echoed back to you by the client. When enabled, microphone audio is echoed
* Gets whether your microphone audio is echoed back to you by the client. When enabled, microphone audio is echoed
* even if you're muted or not using push-to-talk.
* @function Audio.getLocalEcho
* @returns {boolean} <code>true</code> if echoing microphone audio back to you from the client is enabled,
* @returns {boolean} <code>true</code> if echoing microphone audio back to you from the client is enabled,
* <code>false</code> if it isn't.
*/
Q_INVOKABLE bool getLocalEcho();

/*@jsdoc
* Sets whether your microphone audio is echoed back to you by the client. When enabled, microphone audio is echoed
* Sets whether your microphone audio is echoed back to you by the client. When enabled, microphone audio is echoed
* even if you're muted or not using push-to-talk.
* @function Audio.setLocalEcho
* @parm {boolean} localEcho - <code>true</code> to enable echoing microphone audio back to you from the client,
* @parm {boolean} localEcho - <code>true</code> to enable echoing microphone audio back to you from the client,
* <code>false</code> to disable.
* @example <caption>Echo local audio for a few seconds.</caption>
* Audio.setLocalEcho(true);
Expand All @@ -151,7 +151,7 @@ class AudioScriptingInterface : public QObject, public Dependency {
Q_INVOKABLE void setLocalEcho(bool localEcho);

/*@jsdoc
* Toggles the echoing of microphone audio back to you by the client. When enabled, microphone audio is echoed even if
* Toggles the echoing of microphone audio back to you by the client. When enabled, microphone audio is echoed even if
* you're muted or not using push-to-talk.
* @function Audio.toggleLocalEcho
*/
Expand All @@ -164,32 +164,32 @@ class AudioScriptingInterface : public QObject, public Dependency {
// these methods are protected to stop C++ callers from calling, but invokable from script

/*@jsdoc
* Starts playing or "injecting" the content of an audio file. The sound is played globally (sent to the audio
* mixer) so that everyone hears it, unless the <code>injectorOptions</code> has <code>localOnly</code> set to
* <code>true</code> in which case only the client hears the sound played. No sound is played if sent to the audio mixer
* but the client is not connected to an audio mixer. The {@link AudioInjector} object returned by the function can be used
* Starts playing or "injecting" the content of an audio file. The sound is played globally (sent to the audio
* mixer) so that everyone hears it, unless the <code>injectorOptions</code> has <code>localOnly</code> set to
* <code>true</code> in which case only the client hears the sound played. No sound is played if sent to the audio mixer
* but the client is not connected to an audio mixer. The {@link AudioInjector} object returned by the function can be used
* to control the playback and get information about its current state.
* @function Audio.playSound
* @param {SoundObject} sound - The content of an audio file, loaded using {@link SoundCache.getSound}. See
* @param {SoundObject} sound - The content of an audio file, loaded using {@link SoundCache.getSound}. See
* {@link SoundObject} for supported formats.
* @param {AudioInjector.AudioInjectorOptions} [injectorOptions={}] - Configures where and how the audio injector plays the
* @param {AudioInjector.AudioInjectorOptions} [injectorOptions={}] - Configures where and how the audio injector plays the
* audio file.
* @returns {AudioInjector} The audio injector that plays the audio file.
* @example <caption>Play a sound.</caption>
* var sound = SoundCache.getSound("https://cdn-1.vircadia.com/us-c-1/ken/samples/forest_ambiX.wav");
*
* var sound = SoundCache.getSound("https://apidocs.overte.org/examples/beach-tide-amplified.wav");
*
* function playSound() {
* var injectorOptions = {
* position: MyAvatar.position
* };
* var injector = Audio.playSound(sound, injectorOptions);
* }
*
*
* function onSoundReady() {
* sound.ready.disconnect(onSoundReady);
* playSound();
* }
*
*
* if (sound.downloaded) {
* playSound();
* } else {
Expand All @@ -199,18 +199,18 @@ class AudioScriptingInterface : public QObject, public Dependency {
Q_INVOKABLE ScriptAudioInjector* playSound(SharedSoundPointer sound, const AudioInjectorOptions& injectorOptions = AudioInjectorOptions());

/*@jsdoc
* Starts playing the content of an audio file locally (isn't sent to the audio mixer). This is the same as calling
* {@link Audio.playSound} with {@link AudioInjector.AudioInjectorOptions} <code>localOnly</code> set <code>true</code> and
* Starts playing the content of an audio file locally (isn't sent to the audio mixer). This is the same as calling
* {@link Audio.playSound} with {@link AudioInjector.AudioInjectorOptions} <code>localOnly</code> set <code>true</code> and
* the specified <code>position</code>.
* @function Audio.playSystemSound
* @param {SoundObject} sound - The content of an audio file, which is loaded using {@link SoundCache.getSound}. See
* @param {SoundObject} sound - The content of an audio file, which is loaded using {@link SoundCache.getSound}. See
* {@link SoundObject} for supported formats.
* @returns {AudioInjector} The audio injector that plays the audio file.
*/
Q_INVOKABLE ScriptAudioInjector* playSystemSound(SharedSoundPointer sound);

/*@jsdoc
* Sets whether the audio input should be used in stereo. If the audio input doesn't support stereo then setting a value
* Sets whether the audio input should be used in stereo. If the audio input doesn't support stereo then setting a value
* of <code>true</code> has no effect.
* @function Audio.setStereoInput
* @param {boolean} stereo - <code>true</code> if the audio input should be used in stereo, otherwise <code>false</code>.
Expand All @@ -220,65 +220,65 @@ class AudioScriptingInterface : public QObject, public Dependency {
/*@jsdoc
* Gets whether the audio input is used in stereo.
* @function Audio.isStereoInput
* @returns {boolean} <code>true</code> if the audio input is used in stereo, otherwise <code>false</code>.
* @returns {boolean} <code>true</code> if the audio input is used in stereo, otherwise <code>false</code>.
*/
Q_INVOKABLE bool isStereoInput();

signals:

/*@jsdoc
* Triggered when the client is muted by the mixer because their loudness value for the noise background has reached the
* Triggered when the client is muted by the mixer because their loudness value for the noise background has reached the
* threshold set for the domain (in the server settings).
* @function Audio.mutedByMixer
* @returns {Signal}
* @returns {Signal}
*/
void mutedByMixer();

/*@jsdoc
* Triggered when the client is muted by the mixer because they're within a certain radius (50m) of someone who requested
* Triggered when the client is muted by the mixer because they're within a certain radius (50m) of someone who requested
* the mute through Developer &gt; Audio &gt; Mute Environment.
* @function Audio.environmentMuted
* @returns {Signal}
* @returns {Signal}
*/
void environmentMuted();

/*@jsdoc
* Triggered when the client receives its first packet from the audio mixer.
* @function Audio.receivedFirstPacket
* @returns {Signal}
* @returns {Signal}
*/
void receivedFirstPacket();

/*@jsdoc
* Triggered when the client is disconnected from the audio mixer.
* @function Audio.disconnected
* @returns {Signal}
* @returns {Signal}
*/
void disconnected();

/*@jsdoc
* Triggered when the noise gate is opened. The input audio signal is no longer blocked (fully attenuated) because it has
* risen above an adaptive threshold set just above the noise floor. Only occurs if <code>Audio.noiseReduction</code> is
* Triggered when the noise gate is opened. The input audio signal is no longer blocked (fully attenuated) because it has
* risen above an adaptive threshold set just above the noise floor. Only occurs if <code>Audio.noiseReduction</code> is
* <code>true</code>.
* @function Audio.noiseGateOpened
* @returns {Signal}
* @returns {Signal}
*/
void noiseGateOpened();

/*@jsdoc
* Triggered when the noise gate is closed. The input audio signal is blocked (fully attenuated) because it has fallen
* below an adaptive threshold set just above the noise floor. Only occurs if <code>Audio.noiseReduction</code> is
* Triggered when the noise gate is closed. The input audio signal is blocked (fully attenuated) because it has fallen
* below an adaptive threshold set just above the noise floor. Only occurs if <code>Audio.noiseReduction</code> is
* <code>true</code>.
* @function Audio.noiseGateClosed
* @returns {Signal}
* @returns {Signal}
*/
void noiseGateClosed();

/*@jsdoc
* Triggered when a frame of audio input is processed.
* @function Audio.inputReceived
* @param {Int16Array} inputSamples - The audio input processed.
* @returns {Signal}
* @returns {Signal}
*/
void inputReceived(const QByteArray& inputSamples);

Expand Down
4 changes: 2 additions & 2 deletions libraries/avatars-renderer/src/avatars-renderer/Avatar.h
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ class Avatar : public AvatarData, public scriptable::ModelProvider, public MetaM
* @param {Vec3} offset - The skeleton offset to set.
* @example <caption>Raise your avatar off the ground a little.</caption>
* // Raise your avatar off the ground a little.
* MyAvatar.setSkeletonOffset({ x: 0, y: 0.1: z: 0 });
* MyAvatar.setSkeletonOffset({ x: 0, y: 0.1, z: 0 });
*
* // Restore its offset after 5s.
* Script.setTimeout(function () {
Expand All @@ -373,7 +373,7 @@ class Avatar : public AvatarData, public scriptable::ModelProvider, public MetaM
* @function MyAvatar.getSkeletonOffset
* @returns {Vec3} The current skeleton offset.
* @example <caption>Report your avatar's current skeleton offset.</caption>
* print(JSON.stringify(MyAvatar.getSkeletonOffset());
* print(JSON.stringify(MyAvatar.getSkeletonOffset()));
*/
Q_INVOKABLE glm::vec3 getSkeletonOffset() { return _skeletonOffset; }

Expand Down
4 changes: 2 additions & 2 deletions libraries/entities/src/EntityItemProperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,7 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
* type: "Model",
* position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0.75, z: -2 })),
* rotation: MyAvatar.orientation,
* modelURL: "https://apidocs.vircadia.dev/models/cowboy-hat.fbx",
* modelURL: "https://apidocs.overte.org/examples/cowboy-hat.fbx",
* dimensions: { x: 0.8569, y: 0.3960, z: 1.0744 },
* lifetime: 300 // Delete after 5 minutes.
* });
Expand Down Expand Up @@ -1160,7 +1160,7 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
* speedSpread: 0.01,
* emitAcceleration: { x: 0, y: 0.02, z: 0 },
* polarFinish: Math.PI,
* textures: "https://content.vircadia.com/eu-c-1/vircadia-assets/interface/default/default_particle.png",
* textures: "https://content.overte.org/Bazaar/Assets/Textures/Defaults/Interface/default_particle.png",
* particleRadius: 0.1,
* color: { red: 0, green: 255, blue: 0 },
* alphaFinish: 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
class ScriptEngine;

/*@jsdoc
* The <code>Graphics</code> API enables you to access and manipulate avatar, entity, and overlay models in the rendered scene.
* This includes getting mesh and material information for applying {@link Entities.EntityProperties-Material|Material}
* The <code>Graphics</code> API enables you to access and manipulate avatar, entity, and overlay models in the rendered scene.
* This includes getting mesh and material information for applying {@link Entities.EntityProperties-Material|Material}
* entities.
*
* @namespace Graphics
Expand All @@ -49,7 +49,7 @@ public slots:
* <p>Note: The model data may be used for more than one instance of the item displayed in the scene.</p>
* @function Graphics.getModel
* @param {UUID} id - The ID of the avatar, 3D entity, or 3D overlay.
* @returns {GraphicsModel} The model data for the avatar, entity, or overlay, as displayed. This includes the results of
* @returns {GraphicsModel} The model data for the avatar, entity, or overlay, as displayed. This includes the results of
* applying any {@link Entities.EntityProperties-Material|Material} entities to the item.
* @example <caption>Report some details of your avatar's model.</caption>
* var model = Graphics.getModel(MyAvatar.sessionUUID);
Expand All @@ -58,7 +58,7 @@ public slots:
* for (var i = 0; i < meshes.length; i++) {
* numMeshparts += meshes[i].numParts;
* }
*
*
* print("Avatar:", MyAvatar.skeletonModelURL);
* print("Number of meshes:", model.numMeshes);
* print("Number of mesh parts:", numMeshparts);
Expand All @@ -77,7 +77,7 @@ public slots:
bool updateModel(const QUuid& uuid, const scriptable::ScriptableModelPointer& model);

/*@jsdoc
* Checks whether the model for an avatar, entity, or overlay can be updated in the rendered scene. Only avatars,
* Checks whether the model for an avatar, entity, or overlay can be updated in the rendered scene. Only avatars,
* <code>"Model"</code> entities and <code>"model"</code> overlays can have their meshes updated.
* @function Graphics.canUpdateModel
* @param {Uuid} id - The ID of the avatar, entity, or overlay.
Expand All @@ -89,7 +89,7 @@ public slots:
* type: "Model",
* position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(Camera.orientation, { x: -0.5, y: 0, z: -3 })),
* rotation: MyAvatar.orientation,
* modelURL: "https://apidocs.vircadia.dev/models/cowboy-hat.fbx",
* modelURL: "https://apidocs.overte.org/examples/cowboy-hat.fbx",
* dimensions: { x: 0.8569, y: 0.3960, z: 1.0744 },
* lifetime: 300 // Delete after 5 minutes.
* });
Expand All @@ -100,7 +100,7 @@ public slots:
* dimensions: { x: 0.4, y: 0.6, z: 0.4 },
* lifetime: 300 // Delete after 5 minutes.
* });
*
*
* Script.setTimeout(function () {
* print("Can update avatar:", Graphics.canUpdateModel(MyAvatar.sessionUUID)); // true
* print("Can update model entity:", Graphics.canUpdateModel(modelEntityID)); // true
Expand Down
2 changes: 1 addition & 1 deletion libraries/networking/src/ResourceCache.h
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ class ScriptableResourceCache : public QObject {
* // Replace AnimationCache with MaterialCache, ModelCache, SoundCache, or TextureCache as appropriate.
* // TextureCache has its own version of this function.
*
* var resourceURL = "https://cdn-1.vircadia.com/eu-c-1/vircadia-public/clement/production/animations/sitting_idle.fbx";
* var resourceURL = "https://apidocs.overte.org/examples/Silly%20Dancing.fbx";
* var resourceObject = AnimationCache.prefetch(resourceURL);
*
* function checkIfResourceLoaded(state) {
Expand Down
2 changes: 1 addition & 1 deletion libraries/script-engine/src/PointerEvent.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

class ScriptEngine;

/// Represents a 2D or 3D pointer to the scripting engine. Exposed as <code><a href="https://apidocs.vircadia.dev/global.html#PointerEvent">PointerEvent</a></code>
/// Represents a 2D or 3D pointer to the scripting engine. Exposed as <code><a href="https://apidocs.overte.org/global.html#PointerEvent">PointerEvent</a></code>
class PointerEvent {
public:
enum Button {
Expand Down
Loading
Loading