diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 6a102f418b..1a009954b5 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -717,7 +717,7 @@ private: *
NavigationFocused
hmdRollControlEnabled
is enabled.
- * @property hmdRollControlRate {number} If hmdRollControlEnabled is true, this value determines the maximum turn rate of
+ * @property {number} hmdRollControlRate If hmdRollControlEnabled is true, this value determines the maximum turn rate of
* your avatar when rolling your HMD in degrees per second.
* @property {number} userHeight=1.75 - The height of the user in sensor space.
* @property {number} userEyeHeight=1.65 - The estimated height of the user's eyes in sensor space. Read-only.
diff --git a/interface/src/raypick/PickScriptingInterface.h b/interface/src/raypick/PickScriptingInterface.h
index a39aa3a4a1..5ef5d27d74 100644
--- a/interface/src/raypick/PickScriptingInterface.h
+++ b/interface/src/raypick/PickScriptingInterface.h
@@ -22,21 +22,22 @@
* @hifi-interface
* @hifi-client-entity
*
- * @property PICK_NOTHING {number} A filter flag. Don't intersect with anything. Read-only.
- * @property PICK_ENTITIES {number} A filter flag. Include entities when intersecting. Read-only.
- * @property PICK_OVERLAYS {number} A filter flag. Include overlays when intersecting. Read-only.
- * @property PICK_AVATARS {number} A filter flag. Include avatars when intersecting. Read-only.
- * @property PICK_HUD {number} A filter flag. Include the HUD sphere when intersecting in HMD mode. Read-only.
- * @property PICK_COARSE {number} A filter flag. Pick against coarse meshes, instead of exact meshes. Read-only.
- * @property PICK_INCLUDE_INVISIBLE {number} A filter flag. Include invisible objects when intersecting. Read-only.
- * @property PICK_INCLUDE_NONCOLLIDABLE {number} A filter flag. Include non-collidable objects when intersecting.
+ * @property {number} PICK_NOTHING A filter flag. Don't intersect with anything. Read-only.
+ * @property {number} PICK_ENTITIES A filter flag. Include entities when intersecting. Read-only.
+ * @property {number} PICK_OVERLAYS A filter flag. Include overlays when intersecting. Read-only.
+ * @property {number} PICK_AVATARS A filter flag. Include avatars when intersecting. Read-only.
+ * @property {number} PICK_HUD A filter flag. Include the HUD sphere when intersecting in HMD mode. Read-only.
+ * @property {number} PICK_COARSE A filter flag. Pick against coarse meshes, instead of exact meshes. Read-only.
+ * @property {number} PICK_INCLUDE_INVISIBLE A filter flag. Include invisible objects when intersecting. Read-only.
+ * @property {number} PICK_INCLUDE_NONCOLLIDABLE A filter flag. Include non-collidable objects when intersecting.
* Read-only.
- * @property PICK_ALL_INTERSECTIONS {number} Read-only.
- * @property INTERSECTED_NONE {number} An intersection type. Intersected nothing with the given filter flags. Read-only.
- * @property INTERSECTED_ENTITY {number} An intersection type. Intersected an entity. Read-only.
- * @property INTERSECTED_OVERLAY {number} An intersection type. Intersected an overlay. Read-only.
- * @property INTERSECTED_AVATAR {number} An intersection type. Intersected an avatar. Read-only.
- * @property INTERSECTED_HUD {number} An intersection type. Intersected the HUD sphere. Read-only.
+ * @property {number} PICK_ALL_INTERSECTIONS Read-only.
+ * @property {number} INTERSECTED_NONE An intersection type. Intersected nothing with the given filter flags.
+ * Read-only.
+ * @property {number} INTERSECTED_ENTITY An intersection type. Intersected an entity. Read-only.
+ * @property {number} INTERSECTED_OVERLAY An intersection type. Intersected an overlay. Read-only.
+ * @property {number} INTERSECTED_AVATAR An intersection type. Intersected an avatar. Read-only.
+ * @property {number} INTERSECTED_HUD An intersection type. Intersected the HUD sphere. Read-only.
* @property {number} perFrameTimeBudget - The max number of usec to spend per frame updating Pick results. Read-only.
*/
@@ -99,7 +100,7 @@ public:
/**jsdoc
* An intersection result for a Ray Pick.
*
- * @typedef {Object} RayPickResult
+ * @typedef {object} RayPickResult
* @property {number} type The intersection type.
* @property {boolean} intersects If there was a valid intersection (type != INTERSECTED_NONE)
* @property {Uuid} objectID The ID of the intersected object. Uuid.NULL for the HUD or invalid intersections.
@@ -113,7 +114,7 @@ public:
/**jsdoc
* An intersection result for a Stylus Pick.
*
- * @typedef {Object} StylusPickResult
+ * @typedef {object} StylusPickResult
* @property {number} type The intersection type.
* @property {boolean} intersects If there was a valid intersection (type != INTERSECTED_NONE)
* @property {Uuid} objectID The ID of the intersected object. Uuid.NULL for the HUD or invalid intersections.
diff --git a/interface/src/raypick/PointerScriptingInterface.cpp b/interface/src/raypick/PointerScriptingInterface.cpp
index b7ac899c8d..4e953a5cb8 100644
--- a/interface/src/raypick/PointerScriptingInterface.cpp
+++ b/interface/src/raypick/PointerScriptingInterface.cpp
@@ -68,14 +68,14 @@ unsigned int PointerScriptingInterface::createStylus(const QVariant& properties)
* A set of properties used to define the visual aspect of a Ray Pointer in the case that the Pointer is not intersecting something. Same as a {@link Pointers.RayPointerRenderState},
* but with an additional distance field.
*
- * @typedef {Object} Pointers.DefaultRayPointerRenderState
+ * @typedef {object} Pointers.DefaultRayPointerRenderState
* @augments Pointers.RayPointerRenderState
* @property {number} distance The distance at which to render the end of this Ray Pointer, if one is defined.
*/
/**jsdoc
* A set of properties used to define the visual aspect of a Ray Pointer in the case that the Pointer is intersecting something.
*
- * @typedef {Object} Pointers.RayPointerRenderState
+ * @typedef {object} Pointers.RayPointerRenderState
* @property {string} name The name of this render state, used by {@link Pointers.setRenderState} and {@link Pointers.editRenderState}
* @property {Overlays.OverlayProperties} [start] All of the properties you would normally pass to {@link Overlays.addOverlay}, plus the type (as a type
field).
* An overlay to represent the beginning of the Ray Pointer, if desired.
@@ -87,7 +87,7 @@ unsigned int PointerScriptingInterface::createStylus(const QVariant& properties)
/**jsdoc
* A trigger mechanism for Ray Pointers.
*
- * @typedef {Object} Pointers.Trigger
+ * @typedef {object} Pointers.Trigger
* @property {Controller.Standard|Controller.Actions|function} action This can be a built-in Controller action, like Controller.Standard.LTClick, or a function that evaluates to >= 1.0 when you want to trigger button
.
* @property {string} button Which button to trigger. "Primary", "Secondary", "Tertiary", and "Focus" are currently supported. Only "Primary" will trigger clicks on web surfaces. If "Focus" is triggered,
* it will try to set the entity or overlay focus to the object at which the Pointer is aimed. Buttons besides the first three will still trigger events, but event.button will be "None".
diff --git a/interface/src/scripting/WindowScriptingInterface.cpp b/interface/src/scripting/WindowScriptingInterface.cpp
index 6f6e83842c..af9b5c8a46 100644
--- a/interface/src/scripting/WindowScriptingInterface.cpp
+++ b/interface/src/scripting/WindowScriptingInterface.cpp
@@ -522,7 +522,7 @@ int WindowScriptingInterface::openMessageBox(QString title, QString text, int bu
* 0x8000000
hifi://
then that URL is navigated to in Interface, otherwise the URL is opened in the application the OS
+ * associates with the URL's scheme (e.g., a Web browser for http://
).
* @function Window.openUrl
- * @param {string} url - The resource to open
+ * @param {string} url - The URL to open.
*/
void openUrl(const QUrl& url);
/**jsdoc
- * (Android only) Open the requested Activity and optionally back to the scene when the activity is done
+ * Open an Android activity and optionally return back to the scene when the activity is completed. Android only.
* @function Window.openAndroidActivity
- * @param {string} activityName - The name of the activity to open. One of "Home", "Login" or "Privacy Policy"
+ * @param {string} activityName - The name of the activity to open: one of "Home"
, "Login"
, or
+ * "Privacy Policy"
.
+ * @param {boolean} backToScene - If true
, the user is automatically returned back to the scene when the
+ * activity is completed.
*/
void openAndroidActivity(const QString& activityName, const bool backToScene);
diff --git a/interface/src/ui/overlays/Overlays.h b/interface/src/ui/overlays/Overlays.h
index 3ff782da99..3debf74f26 100644
--- a/interface/src/ui/overlays/Overlays.h
+++ b/interface/src/ui/overlays/Overlays.h
@@ -53,7 +53,7 @@ const OverlayID UNKNOWN_OVERLAY_ID = OverlayID();
* @property {number} distance - The distance from the {@link PickRay} origin to the intersection point.
* @property {Vec3} surfaceNormal - The normal of the overlay surface at the intersection point.
* @property {Vec3} intersection - The position of the intersection point.
- * @property {Object} extraInfo Additional intersection details, if available.
+ * @property {object} extraInfo Additional intersection details, if available.
*/
class RayToOverlayIntersectionResult {
public:
@@ -482,7 +482,7 @@ public slots:
/**jsdoc
* Check if there is an overlay of a given ID.
- * @function Overlays.isAddedOverly
+ * @function Overlays.isAddedOverlay
* @param {Uuid} overlayID - The ID to check.
* @returns {boolean} true
if an overlay with the given ID exists, false
otherwise.
*/
diff --git a/libraries/animation/src/AnimationCache.h b/libraries/animation/src/AnimationCache.h
index d8f8a13cde..4b0a8901f5 100644
--- a/libraries/animation/src/AnimationCache.h
+++ b/libraries/animation/src/AnimationCache.h
@@ -70,7 +70,7 @@ public:
* @function AnimationCache.prefetch
* @param {string} url - URL of the resource to prefetch.
* @param {object} [extra=null]
- * @returns {Resource}
+ * @returns {ResourceObject}
*/
/**jsdoc
@@ -79,7 +79,7 @@ public:
* @param {string} url - URL of the resource to load.
* @param {string} [fallback=""] - Fallback URL if load of the desired URL fails.
* @param {} [extra=null]
- * @returns {Resource}
+ * @returns {object}
*/
@@ -87,7 +87,7 @@ public:
* Returns animation resource for particular animation.
* @function AnimationCache.getAnimation
* @param {string} url - URL to load.
- * @returns {Resource} animation
+ * @returns {AnimationObject} animation
*/
Q_INVOKABLE AnimationPointer getAnimation(const QString& url) { return getAnimation(QUrl(url)); }
Q_INVOKABLE AnimationPointer getAnimation(const QUrl& url);
@@ -104,6 +104,17 @@ private:
Q_DECLARE_METATYPE(AnimationPointer)
+/**jsdoc
+ * @class AnimationObject
+ *
+ * @hifi-interface
+ * @hifi-client-entity
+ * @hifi-server-entity
+ * @hifi-assignment-client
+ *
+ * @property {string[]} jointNames
+ * @property {FBXAnimationFrame[]} frames
+ */
/// An animation loaded from the network.
class Animation : public Resource {
Q_OBJECT
@@ -118,9 +129,16 @@ public:
virtual bool isLoaded() const override;
-
+ /**jsdoc
+ * @function AnimationObject.getJointNames
+ * @returns {string[]}
+ */
Q_INVOKABLE QStringList getJointNames() const;
+ /**jsdoc
+ * @function AnimationObject.getFrames
+ * @returns {FBXAnimationFrame[]}
+ */
Q_INVOKABLE QVectorController.Hardware
properties.true
then the
* entity's properties other than locked
cannot be changed, and the entity cannot be deleted.
* @property {boolean} visible=true - Whether or not the entity is rendered. If true
then the entity is rendered.
- * @property {boolean} canCastShadows=true - Whether or not the entity casts shadows. Currently applicable only to
+ * @property {boolean} canCastShadow=true - Whether or not the entity can cast a shadow. Currently applicable only to
* {@link Entities.EntityType|Model} and {@link Entities.EntityType|Shape} entities. Shadows are cast if inside a
* {@link Entities.EntityType|Zone} entity with castShadows
enabled in its
* {@link Entities.EntityProperties-Zone|keyLight} property.
@@ -1398,7 +1398,7 @@ QScriptValue EntityItemProperties::copyToScriptValue(QScriptEngine* engine, bool
/**jsdoc
* The axis-aligned bounding box of an entity.
- * @typedef Entities.BoundingBox
+ * @typedef {object} Entities.BoundingBox
* @property {Vec3} brn - The bottom right near (minimum axes values) corner of the AA box.
* @property {Vec3} tfl - The top far left (maximum axes values) corner of the AA box.
* @property {Vec3} center - The center of the AA box.
diff --git a/libraries/entities/src/KeyLightPropertyGroup.h b/libraries/entities/src/KeyLightPropertyGroup.h
index 2be33787de..b966b78fc7 100644
--- a/libraries/entities/src/KeyLightPropertyGroup.h
+++ b/libraries/entities/src/KeyLightPropertyGroup.h
@@ -35,7 +35,7 @@ class ReadBitstreamToTreeParams;
* @property {Vec3} direction=0,-1,0 - The direction the light is shining.
* @property {boolean} castShadows=false - If true
then shadows are cast. Shadows are cast by avatars, plus
* {@link Entities.EntityType|Model} and {@link Entities.EntityType|Shape} entities that have their
- * {@link Entities.EntityProperties|canCastShadows}
property set to true
.
+ * {@link Entities.EntityProperties|canCastShadow}
property set to true
.
*/
class KeyLightPropertyGroup : public PropertyGroup {
public:
diff --git a/libraries/fbx/src/FBX.h b/libraries/fbx/src/FBX.h
index 239908f86c..fc94236c96 100644
--- a/libraries/fbx/src/FBX.h
+++ b/libraries/fbx/src/FBX.h
@@ -258,6 +258,11 @@ public:
QHash"hifi:/" address, an IP address (e.g.,
+ * @param {string} address - The address to go to: a "hifi://" address, an IP address (e.g.,
* "127.0.0.1"
or "localhost"
), a domain name, a named path on a domain (starts with
* "/"
), a position or position and orientation, or a user (starts with "@"
).
* @param {boolean} fromSuggestions=false - Set to true
if the address is obtained from the "Goto" dialog.
diff --git a/libraries/networking/src/DomainHandler.h b/libraries/networking/src/DomainHandler.h
index 08908dbaf6..4d98391104 100644
--- a/libraries/networking/src/DomainHandler.h
+++ b/libraries/networking/src/DomainHandler.h
@@ -137,7 +137,7 @@ public:
*
*
*
- * @typedef Window.ConnectionRefusedReason
+ * @typedef {number} Window.ConnectionRefusedReason
*/
enum class ConnectionRefusedReason : uint8_t {
Unknown,
diff --git a/libraries/networking/src/ResourceCache.h b/libraries/networking/src/ResourceCache.h
index 18840cd11e..a4bd352563 100644
--- a/libraries/networking/src/ResourceCache.h
+++ b/libraries/networking/src/ResourceCache.h
@@ -87,7 +87,7 @@ private:
class ScriptableResource : public QObject {
/**jsdoc
- * @constructor Resource
+ * @class ResourceObject
*
* @hifi-interface
* @hifi-client-entity
@@ -97,11 +97,6 @@ class ScriptableResource : public QObject {
* @property {string} url - URL of this resource.
* @property {Resource.State} state - Current loading state.
*/
- /**jsdoc
- * @namespace Resource
- * @variation 0
- * @property {Resource.State} State
- */
Q_OBJECT
Q_PROPERTY(QUrl url READ getURL)
Q_PROPERTY(int state READ getState NOTIFY stateChanged)
@@ -109,8 +104,7 @@ class ScriptableResource : public QObject {
public:
/**jsdoc
- * @name Resource.State
- * @static
+ * @typedef {object} Resource.State
* @property {number} QUEUED - The resource is queued up, waiting to be loaded.
* @property {number} LOADING - The resource is downloading.
* @property {number} LOADED - The resource has finished downloaded by is not complete.
@@ -131,7 +125,7 @@ public:
/**jsdoc
* Release this resource.
- * @function Resource#release
+ * @function ResourceObject#release
*/
Q_INVOKABLE void release();
@@ -146,7 +140,7 @@ signals:
/**jsdoc
* Triggered when download progress for this resource has changed.
- * @function Resource#progressChanged
+ * @function ResourceObject#progressChanged
* @param {number} bytesReceived - Byytes downloaded so far.
* @param {number} bytesTotal - Total number of bytes in the resource.
* @returns {Signal}
@@ -155,7 +149,7 @@ signals:
/**jsdoc
* Triggered when resource loading state has changed.
- * @function Resource#stateChanged
+ * @function ResourceObject#stateChanged
* @param {Resource.State} state - New state.
* @returns {Signal}
*/
@@ -262,7 +256,7 @@ protected slots:
* @function ResourceCache.prefetch
* @param {string} url - URL of the resource to prefetch.
* @param {object} [extra=null]
- * @returns {Resource}
+ * @returns {ResourceObject}
*/
// Prefetches a resource to be held by the QScriptEngine.
// Left as a protected member so subclasses can overload prefetch
@@ -275,8 +269,9 @@ protected slots:
* @param {string} url - URL of the resource to load.
* @param {string} [fallback=""] - Fallback URL if load of the desired URL fails.
* @param {} [extra=null]
- * @returns {Resource}
+ * @returns {object}
*/
+ // FIXME: The return type is not recognized by JavaScript.
/// Loads a resource from the specified URL and returns it.
/// If the caller is on a different thread than the ResourceCache,
/// returns an empty smart pointer and loads its asynchronously.
diff --git a/libraries/script-engine/src/AssetScriptingInterface.h b/libraries/script-engine/src/AssetScriptingInterface.h
index 7f7a3a68b0..72d6901fb5 100644
--- a/libraries/script-engine/src/AssetScriptingInterface.h
+++ b/libraries/script-engine/src/AssetScriptingInterface.h
@@ -121,7 +121,7 @@ public:
/**jsdoc
* A set of properties that can be passed to {@link Assets.getAsset}.
- * @typedef {Object} Assets.GetOptions
+ * @typedef {object} Assets.GetOptions
* @property {string} [url] an "atp:" style URL, hash, or relative mapped path to fetch
* @property {string} [responseType=text] the desired reponse type (text | arraybuffer | json)
* @property {boolean} [decompress=false] whether to attempt gunzip decompression on the fetched data
@@ -137,7 +137,7 @@ public:
/**jsdoc
* Result value returned by {@link Assets.getAsset}.
- * @typedef {Object} Assets~getAssetResult
+ * @typedef {object} Assets~getAssetResult
* @property {string} [url] the resolved "atp:" style URL for the fetched asset
* @property {string} [hash] the resolved hash for the fetched asset
* @property {string|ArrayBuffer|Object} [response] response data (possibly converted per .responseType value)
@@ -159,7 +159,7 @@ public:
/**jsdoc
* A set of properties that can be passed to {@link Assets.putAsset}.
- * @typedef {Object} Assets.PutOptions
+ * @typedef {object} Assets.PutOptions
* @property {ArrayBuffer|string} [data] byte buffer or string value representing the new asset's content
* @property {string} [path=null] ATP path mapping to automatically create (upon successful upload to hash)
* @property {boolean} [compress=false] whether to gzip compress data before uploading
@@ -174,7 +174,7 @@ public:
/**jsdoc
* Result value returned by {@link Assets.putAsset}.
- * @typedef {Object} Assets~putAssetResult
+ * @typedef {object} Assets~putAssetResult
* @property {string} [url] the resolved "atp:" style URL for the uploaded asset (based on .path if specified, otherwise on the resulting ATP hash)
* @property {string} [path] the uploaded asset's resulting ATP path (or undefined if no path mapping was assigned)
* @property {string} [hash] the uploaded asset's resulting ATP hash
diff --git a/libraries/script-engine/src/Quat.h b/libraries/script-engine/src/Quat.h
index 1ccdfdbf31..76b7ac45e3 100644
--- a/libraries/script-engine/src/Quat.h
+++ b/libraries/script-engine/src/Quat.h
@@ -43,7 +43,7 @@
* @hifi-server-entity
* @hifi-assignment-client
*
- * @property IDENTITY {Quat} { x: 0, y: 0, z: 0, w: 1 }
: The identity rotation, i.e., no rotation.
+ * @property {Quat} IDENTITY - { x: 0, y: 0, z: 0, w: 1 }
: The identity rotation, i.e., no rotation.
* Read-only.
* @example Print the IDENTITY
value.
* print(JSON.stringify(Quat.IDENTITY)); // { x: 0, y: 0, z: 0, w: 1 }
diff --git a/libraries/script-engine/src/SceneScriptingInterface.h b/libraries/script-engine/src/SceneScriptingInterface.h
index fdfbc6f6c0..da42cf2df3 100644
--- a/libraries/script-engine/src/SceneScriptingInterface.h
+++ b/libraries/script-engine/src/SceneScriptingInterface.h
@@ -21,7 +21,7 @@
namespace SceneScripting {
/**jsdoc
- * @typedef Scene.Stage.Location
+ * @typedef {object} Scene.Stage.Location
* @property {number} longitude
* @property {number} latitude
* @property {number} altitude
@@ -49,7 +49,7 @@ namespace SceneScripting {
using LocationPointer = std::unique_ptr;
/**jsdoc
- * @typedef Scene.Stage.Time
+ * @typedef {object} Scene.Stage.Time
* @property {number} hour
* @property {number} day
*/
@@ -73,7 +73,7 @@ namespace SceneScripting {
using TimePointer = std::unique_ptr