diff --git a/interface/src/AboutUtil.h b/interface/src/AboutUtil.h index 06c04cc9df..767e69842d 100644 --- a/interface/src/AboutUtil.h +++ b/interface/src/AboutUtil.h @@ -15,6 +15,17 @@ #include +/**jsdoc + * @namespace HifiAbout + * + * @hifi-interface + * @hifi-client-entity + * + * @property {string} buildDate + * @property {string} buildVersion + * @property {string} qtVersion + */ + class AboutUtil : public QObject { Q_OBJECT @@ -30,6 +41,11 @@ public: QString getQtVersion() const; public slots: + + /**jsdoc + * @function HifiAbout.openUrl + * @param {string} url + */ void openUrl(const QString &url) const; private: AboutUtil(QObject* parent = nullptr); diff --git a/interface/src/avatar/MyAvatar.h b/interface/src/avatar/MyAvatar.h index 514dd9dcaf..7afb234da4 100644 --- a/interface/src/avatar/MyAvatar.h +++ b/interface/src/avatar/MyAvatar.h @@ -464,7 +464,7 @@ public: Q_INVOKABLE bool getClearOverlayWhenMoving() const { return _clearOverlayWhenMoving; } /**jsdoc * @function MyAvatar.setClearOverlayWhenMoving - * @returns {boolean} + * @param {boolean} on */ Q_INVOKABLE void setClearOverlayWhenMoving(bool on) { _clearOverlayWhenMoving = on; } diff --git a/interface/src/raypick/PickScriptingInterface.cpp b/interface/src/raypick/PickScriptingInterface.cpp index 8da6e7c615..74459ca624 100644 --- a/interface/src/raypick/PickScriptingInterface.cpp +++ b/interface/src/raypick/PickScriptingInterface.cpp @@ -36,7 +36,7 @@ unsigned int PickScriptingInterface::createPick(const PickQuery::PickType type, * @typedef {object} Picks.RayPickProperties * @property {boolean} [enabled=false] If this Pick should start enabled or not. Disabled Picks do not updated their pick results. * @property {number} [filter=Picks.PICK_NOTHING] The filter for this Pick to use, constructed using filter flags combined using bitwise OR. - * @property {float} [maxDistance=0.0] The max distance at which this Pick will intersect. 0.0 = no max. < 0.0 is invalid. + * @property {number} [maxDistance=0.0] The max distance at which this Pick will intersect. 0.0 = no max. < 0.0 is invalid. * @property {string} [joint] Only for Joint or Mouse Ray Picks. If "Mouse", it will create a Ray Pick that follows the system mouse, in desktop or HMD. * If "Avatar", it will create a Joint Ray Pick that follows your avatar's head. Otherwise, it will create a Joint Ray Pick that follows the given joint, if it * exists on your current avatar. @@ -103,7 +103,7 @@ unsigned int PickScriptingInterface::createRayPick(const QVariant& properties) { * @property {number} [hand=-1] An integer. 0 == left, 1 == right. Invalid otherwise. * @property {boolean} [enabled=false] If this Pick should start enabled or not. Disabled Picks do not updated their pick results. * @property {number} [filter=Picks.PICK_NOTHING] The filter for this Pick to use, constructed using filter flags combined using bitwise OR. - * @property {float} [maxDistance=0.0] The max distance at which this Pick will intersect. 0.0 = no max. < 0.0 is invalid. + * @property {number} [maxDistance=0.0] The max distance at which this Pick will intersect. 0.0 = no max. < 0.0 is invalid. */ unsigned int PickScriptingInterface::createStylusPick(const QVariant& properties) { QVariantMap propMap = properties.toMap(); diff --git a/interface/src/raypick/PickScriptingInterface.h b/interface/src/raypick/PickScriptingInterface.h index 5ef5d27d74..0ee091716d 100644 --- a/interface/src/raypick/PickScriptingInterface.h +++ b/interface/src/raypick/PickScriptingInterface.h @@ -104,7 +104,7 @@ public: * @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. - * @property {float} distance The distance to the intersection point from the origin of the ray. + * @property {number} distance The distance to the intersection point from the origin of the ray. * @property {Vec3} intersection The intersection point in world-space. * @property {Vec3} surfaceNormal The surface normal at the intersected point. All NANs if type == INTERSECTED_HUD. * @property {Variant} extraInfo Additional intersection details when available for Model objects. @@ -118,7 +118,7 @@ public: * @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. - * @property {float} distance The distance to the intersection point from the origin of the ray. + * @property {number} distance The distance to the intersection point from the origin of the ray. * @property {Vec3} intersection The intersection point in world-space. * @property {Vec3} surfaceNormal The surface normal at the intersected point. All NANs if type == INTERSECTED_HUD. * @property {Variant} extraInfo Additional intersection details when available for Model objects. diff --git a/interface/src/raypick/PointerScriptingInterface.h b/interface/src/raypick/PointerScriptingInterface.h index 49eb40504d..628af84790 100644 --- a/interface/src/raypick/PointerScriptingInterface.h +++ b/interface/src/raypick/PointerScriptingInterface.h @@ -136,7 +136,7 @@ public: * Sets the length of this Pointer. No effect on Stylus Pointers. * @function Pointers.setLength * @param {number} uid The ID of the Pointer, as returned by {@link Pointers.createPointer}. - * @param {float} length The desired length of the Pointer. + * @param {number} length The desired length of the Pointer. */ Q_INVOKABLE void setLength(unsigned int uid, float length) const { DependencyManager::get()->setLength(uid, length); } diff --git a/interface/src/scripting/WindowScriptingInterface.h b/interface/src/scripting/WindowScriptingInterface.h index 452d9681ca..29eb6421e1 100644 --- a/interface/src/scripting/WindowScriptingInterface.h +++ b/interface/src/scripting/WindowScriptingInterface.h @@ -318,7 +318,6 @@ public slots: * {@link Window.stillSnapshotTaken|stillSnapshotTaken} is emitted; when a still image plus moving images are captured, * {@link Window.processingGifStarted|processingGifStarted} and {@link Window.processingGifCompleted|processingGifCompleted} * are emitted. The path to store the snapshots and the length of the animated GIF to capture are specified in Settings > - * NOTE: to provide a non-default value - all previous parameters must be provided. * General > Snapshots. * @function Window.takeSnapshot * @param {boolean} [notify=true] - This value is passed on through the {@link Window.stillSnapshotTaken|stillSnapshotTaken} @@ -328,7 +327,7 @@ public slots: * @param {number} [aspectRatio=0] - The width/height ratio of the snapshot required. If the value is 0 the * full resolution is used (window dimensions in desktop mode; HMD display dimensions in HMD mode), otherwise one of the * dimensions is adjusted in order to match the aspect ratio. - * @param {string} [filename=""] - If this parameter is not given, the image will be saved as 'hifi-snap-by--YYYY-MM-DD_HH-MM-SS'. + * @param {string} [filename=""] - If this parameter is not given, the image will be saved as "hifi-snap-by-<user name>-YYYY-MM-DD_HH-MM-SS". * If this parameter is "" then the image will be saved as ".jpg". * Otherwise, the image will be saved to this filename, with an appended ".jpg". * @@ -360,32 +359,28 @@ public slots: /**jsdoc * Takes a still snapshot of the current view from the secondary camera that can be set up through the {@link Render} API. - * NOTE: to provide a non-default value - all previous parameters must be provided. * @function Window.takeSecondaryCameraSnapshot * @param {boolean} [notify=true] - This value is passed on through the {@link Window.stillSnapshotTaken|stillSnapshotTaken} * signal. - * @param {string} [filename=""] - If this parameter is not given, the image will be saved as 'hifi-snap-by--YYYY-MM-DD_HH-MM-SS'. + * @param {string} [filename=""] - If this parameter is not given, the image will be saved as "hifi-snap-by-<user name>-YYYY-MM-DD_HH-MM-SS". * If this parameter is "" then the image will be saved as ".jpg". * Otherwise, the image will be saved to this filename, with an appended ".jpg". - * - * var filename = QString(); */ void takeSecondaryCameraSnapshot(const bool& notify = true, const QString& filename = QString()); /**jsdoc - * Takes a 360 snapshot given a position of the secondary camera (which does not need to have been previously set up). - * @function Window.takeSecondaryCamera360Snapshot - * @param {vec3} [cameraPosition] - The (x, y, z) position of the camera for the 360 snapshot - * @param {boolean} [cubemapOutputFormat=false] - If true then the snapshot is saved as a cube map image, - * otherwise is saved as an equirectangular image. + * Takes a 360° snapshot at a given position for the secondary camera. The secondary camera does not need to have been + * set up. + * @function Window.takeSecondaryCamera360Snapshot + * @param {Vec3} cameraPosition - The position of the camera for the snapshot. + * @param {boolean} [cubemapOutputFormat=false] - If true then the snapshot is saved as a cube map image, + * otherwise is saved as an equirectangular image. * @param {boolean} [notify=true] - This value is passed on through the {@link Window.stillSnapshotTaken|stillSnapshotTaken} * signal. - * @param {string} [filename=""] - If this parameter is not given, the image will be saved as 'hifi-snap-by--YYYY-MM-DD_HH-MM-SS'. - * If this parameter is "" then the image will be saved as ".jpg". - * Otherwise, the image will be saved to this filename, with an appended ".jpg". - * - * var filename = QString(); - */ + * @param {string} [filename=""] - If this parameter is not supplied, the image will be saved as "hifi-snap-by-<user name>-YYYY-MM-DD_HH-MM-SS". + * If this parameter is "" then the image will be saved as ".jpg". + * Otherwise, the image will be saved to this filename, with an appended ".jpg". + */ void takeSecondaryCamera360Snapshot(const glm::vec3& cameraPosition, const bool& cubemapOutputFormat = false, const bool& notify = true, const QString& filename = QString()); /**jsdoc @@ -616,7 +611,8 @@ signals: void stillSnapshotTaken(const QString& pathStillSnapshot, bool notify); /**jsdoc - * Triggered when a still equirectangular snapshot has been taken by calling {@link Window.takeSecondaryCamera360Snapshot|takeSecondaryCamera360Snapshot} + * Triggered when a still 360° snapshot has been taken by calling + * {@link Window.takeSecondaryCamera360Snapshot|takeSecondaryCamera360Snapshot}. * @function Window.snapshot360Taken * @param {string} pathStillSnapshot - The path and name of the snapshot image file. * @param {boolean} notify - The value of the notify parameter that {@link Window.takeSecondaryCamera360Snapshot|takeSecondaryCamera360Snapshot} diff --git a/libraries/entities/src/EntityItemProperties.cpp b/libraries/entities/src/EntityItemProperties.cpp index 9aa15ee8a6..84e248b74d 100644 --- a/libraries/entities/src/EntityItemProperties.cpp +++ b/libraries/entities/src/EntityItemProperties.cpp @@ -597,6 +597,15 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const { * @property {Entities.RenderInfo} renderInfo - Information on the cost of rendering the entity. Currently information is only * provided for Model entities. Read-only. * + * @property {boolean} cloneable=false - If true then the entity can be cloned via {@link Entities.cloneEntity}. + * @property {number} cloneLifetime=300 - The entity lifetime for clones created from this entity. + * @property {number} cloneLimit=0 - The total number of clones of this entity that can exist in the domain at any given time. + * @property {boolean} cloneDynamic=false - If true then clones created from this entity will have their + * dynamic property set to true. + * @property {boolean} cloneAvatarEntity=false - If true then clones created from this entity will be created as + * avatar entities: their clientOnly property will be set to true. + * @property {Uuid} cloneOriginID - The ID of the entity that this entity was cloned from. + * * @property {string} itemName="" - Certifiable name of the Marketplace item. * @property {string} itemDescription="" - Certifiable description of the Marketplace item. * @property {string} itemCategories="" - Certifiable category of the Marketplace item. diff --git a/libraries/entities/src/EntityScriptingInterface.h b/libraries/entities/src/EntityScriptingInterface.h index e63f3ad855..50df825e5f 100644 --- a/libraries/entities/src/EntityScriptingInterface.h +++ b/libraries/entities/src/EntityScriptingInterface.h @@ -225,12 +225,12 @@ public slots: bool collisionless, const glm::vec3& position, const glm::vec3& gravity); /**jsdoc - * Request a clone of an entity. Only entities that have been marked as 'cloneable' will be able to be cloned using this method. - * A cloned entity has most of the properties of the orignal entity, and can be requested from clients that do not have rez permissions. - * The client requests a clone from the entity server, which returns back the entityID of a valid clone if the operation was allowed. + * Create a clone of an entity. A clone can be created by a client that doesn't have rez permissions in the current domain. + * The entity must have its cloneable property set to true. The clone has a modified name, other + * properties set per its clone related-properties, and its clone-related properties are set to defaults. * @function Entities.cloneEntity - * @param {Uuid} entityIDToClone - the ID of the entity to clone - * @returns {Entities.EntityID} The ID of the newly created clone + * @param {Uuid} entityID - The ID of the entity to clone. + * @returns {Uuid} The ID of the new entity if successfully cloned, otherwise {@link Uuid|Uuid.NULL}. */ Q_INVOKABLE QUuid cloneEntity(QUuid entityIDToClone); diff --git a/libraries/task/src/task/Config.h b/libraries/task/src/task/Config.h index 20de5c850e..00fa01808b 100644 --- a/libraries/task/src/task/Config.h +++ b/libraries/task/src/task/Config.h @@ -127,9 +127,29 @@ public: double getCPURunTime() const { return _msCPURunTime; } // Describe the node graph data connections of the associated Job/Task + /**jsdoc + * @function Render.isTask + * @returns {boolean} + */ Q_INVOKABLE virtual bool isTask() const { return false; } + + /**jsdoc + * @function Render.getSubConfigs + * @returns {object[]} + */ Q_INVOKABLE virtual QObjectList getSubConfigs() const { return QObjectList(); } + + /**jsdoc + * @function Render.getNumSubs + * @returns {number} + */ Q_INVOKABLE virtual int getNumSubs() const { return 0; } + + /**jsdoc + * @function Render.getSubConfig + * @param {number} index + * @returns {object} + */ Q_INVOKABLE virtual QObject* getSubConfig(int i) const { return nullptr; } public slots: