mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-08 13:34:01 +02:00
commit
eae5215d94
39 changed files with 143 additions and 97 deletions
|
@ -717,7 +717,7 @@ private:
|
|||
* <tr><td><code>NavigationFocused</code></td><td>number</td><td>number</td><td><em>Not used.</em></td></tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
* @typedef Controller.Hardware-Application
|
||||
* @typedef {object} Controller.Hardware-Application
|
||||
*/
|
||||
|
||||
static const QString STATE_IN_HMD = "InHMD";
|
||||
|
|
|
@ -25,7 +25,7 @@ class FancyCamera : public Camera {
|
|||
|
||||
// FIXME: JSDoc 3.5.5 doesn't augment @property definitions. The following definition is repeated in Camera.h.
|
||||
/**jsdoc
|
||||
* @property cameraEntity {Uuid} The ID of the entity that the camera position and orientation follow when the camera is in
|
||||
* @property {Uuid} cameraEntity The ID of the entity that the camera position and orientation follow when the camera is in
|
||||
* entity mode.
|
||||
*/
|
||||
Q_PROPERTY(QUuid cameraEntity READ getCameraEntity WRITE setCameraEntity)
|
||||
|
|
|
@ -121,7 +121,7 @@ class MyAvatar : public Avatar {
|
|||
* while flying.
|
||||
* @property {number} hmdRollControlDeadZone=8 - The amount of HMD roll, in degrees, required before your avatar turns if
|
||||
* <code>hmdRollControlEnabled</code> 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. <em>Read-only.</em>
|
||||
|
|
|
@ -22,21 +22,22 @@
|
|||
* @hifi-interface
|
||||
* @hifi-client-entity
|
||||
*
|
||||
* @property PICK_NOTHING {number} A filter flag. Don't intersect with anything. <em>Read-only.</em>
|
||||
* @property PICK_ENTITIES {number} A filter flag. Include entities when intersecting. <em>Read-only.</em>
|
||||
* @property PICK_OVERLAYS {number} A filter flag. Include overlays when intersecting. <em>Read-only.</em>
|
||||
* @property PICK_AVATARS {number} A filter flag. Include avatars when intersecting. <em>Read-only.</em>
|
||||
* @property PICK_HUD {number} A filter flag. Include the HUD sphere when intersecting in HMD mode. <em>Read-only.</em>
|
||||
* @property PICK_COARSE {number} A filter flag. Pick against coarse meshes, instead of exact meshes. <em>Read-only.</em>
|
||||
* @property PICK_INCLUDE_INVISIBLE {number} A filter flag. Include invisible objects when intersecting. <em>Read-only.</em>
|
||||
* @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. <em>Read-only.</em>
|
||||
* @property {number} PICK_ENTITIES A filter flag. Include entities when intersecting. <em>Read-only.</em>
|
||||
* @property {number} PICK_OVERLAYS A filter flag. Include overlays when intersecting. <em>Read-only.</em>
|
||||
* @property {number} PICK_AVATARS A filter flag. Include avatars when intersecting. <em>Read-only.</em>
|
||||
* @property {number} PICK_HUD A filter flag. Include the HUD sphere when intersecting in HMD mode. <em>Read-only.</em>
|
||||
* @property {number} PICK_COARSE A filter flag. Pick against coarse meshes, instead of exact meshes. <em>Read-only.</em>
|
||||
* @property {number} PICK_INCLUDE_INVISIBLE A filter flag. Include invisible objects when intersecting. <em>Read-only.</em>
|
||||
* @property {number} PICK_INCLUDE_NONCOLLIDABLE A filter flag. Include non-collidable objects when intersecting.
|
||||
* <em>Read-only.</em>
|
||||
* @property PICK_ALL_INTERSECTIONS {number} <em>Read-only.</em>
|
||||
* @property INTERSECTED_NONE {number} An intersection type. Intersected nothing with the given filter flags. <em>Read-only.</em>
|
||||
* @property INTERSECTED_ENTITY {number} An intersection type. Intersected an entity. <em>Read-only.</em>
|
||||
* @property INTERSECTED_OVERLAY {number} An intersection type. Intersected an overlay. <em>Read-only.</em>
|
||||
* @property INTERSECTED_AVATAR {number} An intersection type. Intersected an avatar. <em>Read-only.</em>
|
||||
* @property INTERSECTED_HUD {number} An intersection type. Intersected the HUD sphere. <em>Read-only.</em>
|
||||
* @property {number} PICK_ALL_INTERSECTIONS <em>Read-only.</em>
|
||||
* @property {number} INTERSECTED_NONE An intersection type. Intersected nothing with the given filter flags.
|
||||
* <em>Read-only.</em>
|
||||
* @property {number} INTERSECTED_ENTITY An intersection type. Intersected an entity. <em>Read-only.</em>
|
||||
* @property {number} INTERSECTED_OVERLAY An intersection type. Intersected an overlay. <em>Read-only.</em>
|
||||
* @property {number} INTERSECTED_AVATAR An intersection type. Intersected an avatar. <em>Read-only.</em>
|
||||
* @property {number} INTERSECTED_HUD An intersection type. Intersected the HUD sphere. <em>Read-only.</em>
|
||||
* @property {number} perFrameTimeBudget - The max number of usec to spend per frame updating Pick results. <em>Read-only.</em>
|
||||
*/
|
||||
|
||||
|
@ -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.
|
||||
|
|
|
@ -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 <code>type</code> 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 <code>button</code>.
|
||||
* @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".
|
||||
|
|
|
@ -522,7 +522,7 @@ int WindowScriptingInterface::openMessageBox(QString title, QString text, int bu
|
|||
* <tr> <td><strong>RestoreDefaults</strong></td> <td><code>0x8000000</code></td> <td>"Restore Defaults"</td> </tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
* @typedef Window.MessageBoxButton
|
||||
* @typedef {number} Window.MessageBoxButton
|
||||
*/
|
||||
int WindowScriptingInterface::createMessageBox(QString title, QString text, int buttons, int defaultButton) {
|
||||
auto messageBox = DependencyManager::get<OffscreenUi>()->createMessageBox(OffscreenUi::ICON_INFORMATION, title, text,
|
||||
|
|
|
@ -470,7 +470,7 @@ public slots:
|
|||
* </tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
* @typedef Window.DisplayTexture
|
||||
* @typedef {string} Window.DisplayTexture
|
||||
*/
|
||||
bool setDisplayTexture(const QString& name);
|
||||
|
||||
|
@ -523,16 +523,21 @@ public slots:
|
|||
int openMessageBox(QString title, QString text, int buttons, int defaultButton);
|
||||
|
||||
/**jsdoc
|
||||
* Open the given resource in the Interface window or in a web browser depending on the url scheme
|
||||
* Open a URL in the Interface window or other application, depending on the URL's scheme. If the URL starts with
|
||||
* <code>hifi://</code> 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 <code>http://</code>).
|
||||
* @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. <em>Android only.</em>
|
||||
* @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 <code>"Home"</code>, <code>"Login"</code>, or
|
||||
* <code>"Privacy Policy"</code>.
|
||||
* @param {boolean} backToScene - If <code>true</code>, the user is automatically returned back to the scene when the
|
||||
* activity is completed.
|
||||
*/
|
||||
void openAndroidActivity(const QString& activityName, const bool backToScene);
|
||||
|
||||
|
|
|
@ -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} <code>true</code> if an overlay with the given ID exists, <code>false</code> otherwise.
|
||||
*/
|
||||
|
|
|
@ -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 QVector<FBXAnimationFrame> getFrames() const;
|
||||
|
||||
const QVector<FBXAnimationFrame>& getFramesReference() const;
|
||||
|
|
|
@ -77,6 +77,17 @@ private:
|
|||
|
||||
typedef QSharedPointer<Sound> SharedSoundPointer;
|
||||
|
||||
/**jsdoc
|
||||
* @class SoundObject
|
||||
*
|
||||
* @hifi-interface
|
||||
* @hifi-client-entity
|
||||
* @hifi-server-entity
|
||||
* @hifi-assignment-client
|
||||
*
|
||||
* @property {boolean} downloaded
|
||||
* @property {number} duration
|
||||
*/
|
||||
class SoundScriptingInterface : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
|
@ -90,6 +101,10 @@ public:
|
|||
bool isReady() const { return _sound->isReady(); }
|
||||
float getDuration() { return _sound->getDuration(); }
|
||||
|
||||
/**jsdoc
|
||||
* @function SoundObject.ready
|
||||
* @returns {Signal}
|
||||
*/
|
||||
signals:
|
||||
void ready();
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ public:
|
|||
* @function SoundCache.prefetch
|
||||
* @param {string} url - URL of the resource to prefetch.
|
||||
* @param {object} [extra=null]
|
||||
* @returns {Resource}
|
||||
* @returns {ResourceObject}
|
||||
*/
|
||||
|
||||
/**jsdoc
|
||||
|
@ -73,14 +73,14 @@ 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}
|
||||
*/
|
||||
|
||||
|
||||
/**jsdoc
|
||||
* @function SoundCache.getSound
|
||||
* @param {string} url
|
||||
* @returns {object}
|
||||
* @returns {SoundObject}
|
||||
*/
|
||||
Q_INVOKABLE SharedSoundPointer getSound(const QUrl& url);
|
||||
protected:
|
||||
|
|
|
@ -292,7 +292,7 @@ public:
|
|||
*/
|
||||
/**jsdoc
|
||||
* Information about a single joint in an Avatar's skeleton hierarchy.
|
||||
* @typedef MyAvatar.SkeletonJoint
|
||||
* @typedef {object} MyAvatar.SkeletonJoint
|
||||
* @property {string} name - Joint name.
|
||||
* @property {number} index - Joint index.
|
||||
* @property {number} parentIndex - Index of this joint's parent (-1 if no parent).
|
||||
|
|
|
@ -2363,7 +2363,7 @@ glm::vec3 AvatarData::getAbsoluteJointTranslationInObjectFrame(int index) const
|
|||
}
|
||||
|
||||
/**jsdoc
|
||||
* @typedef AttachmentData
|
||||
* @typedef {object} AttachmentData
|
||||
* @property {string} modelUrl
|
||||
* @property {string} jointName
|
||||
* @property {Vec3} translation
|
||||
|
|
|
@ -578,8 +578,7 @@ public:
|
|||
* @param {Quat} rotation - The rotation of the joint relative to its parent.
|
||||
* @param {Vec3} translation - The translation of the joint relative to its parent.
|
||||
* @example <caption>Set your avatar to it's default T-pose for a while.<br />
|
||||
* <img alt="Avatar in T-pose" src="https://docs.highfidelity.com/user/pages/06.api-reference/25.myavatar/t-pose.png" />
|
||||
* </caption>
|
||||
* <img alt="Avatar in T-pose" src="https://docs.highfidelity.com/images/t-pose.png" /></caption>
|
||||
* // Set all joint translations and rotations to defaults.
|
||||
* var i, length, rotation, translation;
|
||||
* for (i = 0, length = MyAvatar.getJointNames().length; i < length; i++) {
|
||||
|
@ -680,8 +679,7 @@ public:
|
|||
* @param {string} name - The name of the joint.
|
||||
* @param {Quat} rotation - The rotation of the joint relative to its parent.
|
||||
* @example <caption>Set your avatar to its default T-pose then rotate its right arm.<br />
|
||||
* <img alt="Avatar in T-pose with arm rotated"
|
||||
* src="https://docs.highfidelity.com/user/pages/06.api-reference/25.myavatar/armpose.png" /></caption>
|
||||
* <img alt="Avatar in T-pose with arm rotated" src="https://docs.highfidelity.com/images/armpose.png" /></caption>
|
||||
* // Set all joint translations and rotations to defaults.
|
||||
* var i, length, rotation, translation;
|
||||
* for (i = 0, length = MyAvatar.getJointNames().length; i < length; i++) {
|
||||
|
@ -713,8 +711,7 @@ public:
|
|||
* @param {Vec3} translation - The translation of the joint relative to its parent.
|
||||
* @example <caption>Stretch your avatar's neck. Depending on the avatar you are using, you will either see a gap between
|
||||
* the head and body or you will see the neck stretched.<br />
|
||||
* <img alt="Avatar with neck stretched"
|
||||
* src="https://docs.highfidelity.com/user/pages/06.api-reference/25.myavatar/stretched-neck.png" /></caption>
|
||||
* <img alt="Avatar with neck stretched" src="https://docs.highfidelity.com/images/stretched-neck.png" /></caption>
|
||||
* // Stretch your avatar's neck.
|
||||
* MyAvatar.setJointTranslation("Neck", { x: 0, y: 25, z: 0 });
|
||||
*
|
||||
|
@ -798,8 +795,7 @@ public:
|
|||
* @param {Quat[]} jointRotations - The rotations for all joints in the avatar. The values are in the same order as the
|
||||
* array returned by {@link MyAvatar.getJointNames} or {@link Avatar.getJointNames}.
|
||||
* @example <caption>Set your avatar to its default T-pose then rotate its right arm.<br />
|
||||
* <img alt="Avatar in T-pose" src="https://docs.highfidelity.com/user/pages/06.api-reference/25.myavatar/armpose.png" />
|
||||
* </caption>
|
||||
* <img alt="Avatar in T-pose" src="https://docs.highfidelity.com/images/armpose.png" /></caption>
|
||||
* // Set all joint translations and rotations to defaults.
|
||||
* var i, length, rotation, translation;
|
||||
* for (i = 0, length = MyAvatar.getJointNames().length; i < length; i++) {
|
||||
|
|
|
@ -307,7 +307,7 @@ namespace controller {
|
|||
* action.</td></tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
* @typedef Controller.Actions
|
||||
* @typedef {object} Controller.Actions
|
||||
*/
|
||||
// Device functions
|
||||
Input::NamedVector ActionsDevice::getAvailableInputs() const {
|
||||
|
|
|
@ -79,7 +79,7 @@ enum Hand {
|
|||
* {@link Controller.Hardware-Vive}.</td></tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
* @typedef Controller.Hardware
|
||||
* @typedef {object} Controller.Hardware
|
||||
* @example <caption>List all the currently available <code>Controller.Hardware</code> properties.</caption>
|
||||
* function printProperties(string, item) {
|
||||
* print(string);
|
||||
|
|
|
@ -231,7 +231,7 @@ void StandardController::focusOutEvent() {
|
|||
*
|
||||
* </tbody>
|
||||
* </table>
|
||||
* @typedef Controller.Standard
|
||||
* @typedef {object} Controller.Standard
|
||||
*/
|
||||
Input::NamedVector StandardController::getAvailableInputs() const {
|
||||
static Input::NamedVector availableInputs {
|
||||
|
|
|
@ -46,7 +46,7 @@ bool operator!=(const AnimationPropertyGroup& a, const AnimationPropertyGroup& b
|
|||
|
||||
/**jsdoc
|
||||
* The AnimationProperties are used to configure an animation.
|
||||
* @typedef Entities.AnimationProperties
|
||||
* @typedef {object} Entities.AnimationProperties
|
||||
* @property {string} url="" - The URL of the FBX file that has the animation.
|
||||
* @property {number} fps=30 - The speed in frames/s that the animation is played at.
|
||||
* @property {number} firstFrame=0 - The first frame to play in the animation.
|
||||
|
|
|
@ -486,7 +486,7 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
|
|||
* @property {boolean} locked=false - Whether or not the entity can be edited or deleted. If <code>true</code> then the
|
||||
* entity's properties other than <code>locked</code> cannot be changed, and the entity cannot be deleted.
|
||||
* @property {boolean} visible=true - Whether or not the entity is rendered. If <code>true</code> 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 <code>castShadows</code> 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.
|
||||
|
|
|
@ -35,7 +35,7 @@ class ReadBitstreamToTreeParams;
|
|||
* @property {Vec3} direction=0,-1,0 - The direction the light is shining.
|
||||
* @property {boolean} castShadows=false - If <code>true</code> then shadows are cast. Shadows are cast by avatars, plus
|
||||
* {@link Entities.EntityType|Model} and {@link Entities.EntityType|Shape} entities that have their
|
||||
* <code>{@link Entities.EntityProperties|canCastShadows}</code> property set to <code>true</code>.
|
||||
* <code>{@link Entities.EntityProperties|canCastShadow}</code> property set to <code>true</code>.
|
||||
*/
|
||||
class KeyLightPropertyGroup : public PropertyGroup {
|
||||
public:
|
||||
|
|
|
@ -258,6 +258,11 @@ public:
|
|||
QHash<QString, size_t> texcoordSetMap;
|
||||
};
|
||||
|
||||
/**jsdoc
|
||||
* @typedef {object} FBXAnimationFrame
|
||||
* @property {Quat[]} rotations
|
||||
* @property {Vec3[]} translations
|
||||
*/
|
||||
/// A single animation frame extracted from an FBX document.
|
||||
class FBXAnimationFrame {
|
||||
public:
|
||||
|
|
|
@ -279,7 +279,7 @@ controller::Input KeyboardMouseDevice::InputDevice::makeInput(KeyboardMouseDevic
|
|||
* moved down. The data value is how far the average position of all touch points moved.</td></tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
* @typedef Controller.Hardware-Keyboard
|
||||
* @typedef {object} Controller.Hardware-Keyboard
|
||||
* @todo <em>Currently, the mouse wheel in an ordinary mouse generates left/right wheel events instead of up/down.</em>
|
||||
*/
|
||||
controller::Input::NamedVector KeyboardMouseDevice::InputDevice::getAvailableInputs() const {
|
||||
|
|
|
@ -179,7 +179,7 @@ public:
|
|||
* @function ModelCache.prefetch
|
||||
* @param {string} url - URL of the resource to prefetch.
|
||||
* @param {object} [extra=null]
|
||||
* @returns {Resource}
|
||||
* @returns {ResourceObject}
|
||||
*/
|
||||
|
||||
/**jsdoc
|
||||
|
@ -188,7 +188,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}
|
||||
*/
|
||||
|
||||
|
||||
|
|
|
@ -195,7 +195,7 @@ public:
|
|||
* @function TextureCache.prefetch
|
||||
* @param {string} url - URL of the resource to prefetch.
|
||||
* @param {object} [extra=null]
|
||||
* @returns {Resource}
|
||||
* @returns {ResourceObject}
|
||||
*/
|
||||
|
||||
/**jsdoc
|
||||
|
@ -204,7 +204,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}
|
||||
*/
|
||||
|
||||
|
||||
|
@ -261,7 +261,7 @@ protected:
|
|||
* @param {string} url
|
||||
* @param {number} type
|
||||
* @param {number} [maxNumPixels=67108864]
|
||||
* @returns {Resource}
|
||||
* @returns {ResourceObject}
|
||||
*/
|
||||
// Overload ResourceCache::prefetch to allow specifying texture type for loads
|
||||
Q_INVOKABLE ScriptableResource* prefetch(const QUrl& url, int type, int maxNumPixels = ABSOLUTE_MAX_TEXTURE_NUM_PIXELS);
|
||||
|
|
|
@ -138,7 +138,7 @@ public:
|
|||
* </tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
* @typedef location.LookupTrigger
|
||||
* @typedef {number} location.LookupTrigger
|
||||
*/
|
||||
enum LookupTrigger {
|
||||
UserInput,
|
||||
|
@ -184,7 +184,7 @@ public slots:
|
|||
/**jsdoc
|
||||
* Go to a specified metaverse address.
|
||||
* @function location.handleLookupString
|
||||
* @param {string} address - The address to go to: a <code>"hifi:/"<code> address, an IP address (e.g.,
|
||||
* @param {string} address - The address to go to: a <code>"hifi://"<code> address, an IP address (e.g.,
|
||||
* <code>"127.0.0.1"</code> or <code>"localhost"</code>), a domain name, a named path on a domain (starts with
|
||||
* <code>"/"</code>), a position or position and orientation, or a user (starts with <code>"@"</code>).
|
||||
* @param {boolean} fromSuggestions=false - Set to <code>true</code> if the address is obtained from the "Goto" dialog.
|
||||
|
|
|
@ -137,7 +137,7 @@ public:
|
|||
* </tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
* @typedef Window.ConnectionRefusedReason
|
||||
* @typedef {number} Window.ConnectionRefusedReason
|
||||
*/
|
||||
enum class ConnectionRefusedReason : uint8_t {
|
||||
Unknown,
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
* @hifi-server-entity
|
||||
* @hifi-assignment-client
|
||||
*
|
||||
* @property IDENTITY {Quat} <code>{ x: 0, y: 0, z: 0, w: 1 }</code> : The identity rotation, i.e., no rotation.
|
||||
* @property {Quat} IDENTITY - <code>{ x: 0, y: 0, z: 0, w: 1 }</code> : The identity rotation, i.e., no rotation.
|
||||
* <em>Read-only.</em>
|
||||
* @example <caption>Print the <code>IDENTITY</code> value.</caption>
|
||||
* print(JSON.stringify(Quat.IDENTITY)); // { x: 0, y: 0, z: 0, w: 1 }
|
||||
|
|
|
@ -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<Location>;
|
||||
|
||||
/**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<Time>;
|
||||
|
||||
/**jsdoc
|
||||
* @typedef Scene.Stage.KeyLight
|
||||
* @typedef {object} Scene.Stage.KeyLight
|
||||
* @property {Vec3} color
|
||||
* @property {number} intensity
|
||||
* @property {number} ambientIntensity
|
||||
|
|
|
@ -558,6 +558,16 @@ static void scriptableResourceFromScriptValue(const QScriptValue& value, Scripta
|
|||
resource = static_cast<ScriptableResourceRawPtr>(value.toQObject());
|
||||
}
|
||||
|
||||
/**jsdoc
|
||||
* @namespace Resource
|
||||
*
|
||||
* @hifi-interface
|
||||
* @hifi-client-entity
|
||||
* @hifi-server-entity
|
||||
* @hifi-assignment-client
|
||||
*
|
||||
* @property {Resource.State} State
|
||||
*/
|
||||
static QScriptValue createScriptableResourcePrototype(ScriptEnginePointer engine) {
|
||||
auto prototype = engine->newObject();
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
* @hifi-server-entity
|
||||
* @hifi-assignment-client
|
||||
*
|
||||
* @property NULL {Uuid} The null UUID, <code>{00000000-0000-0000-0000-000000000000}</code>.
|
||||
* @property {Uuid} NULL - The null UUID, <code>{00000000-0000-0000-0000-000000000000}</code>.
|
||||
*/
|
||||
|
||||
/// Scriptable interface for a UUID helper class object. Used exclusively in the JavaScript API
|
||||
|
|
|
@ -42,8 +42,7 @@
|
|||
/**jsdoc
|
||||
* The Vec3 API facilities for generating and manipulating 3-dimensional vectors. High Fidelity uses a right-handed
|
||||
* Cartesian coordinate system where the y-axis is the "up" and the negative z-axis is the "front" direction.
|
||||
* <img alt="High Fidelity coordinate system"
|
||||
* src="https://docs.highfidelity.com/user/pages/06.api-reference/43.vec3/opengl-coord-system.jpg" />
|
||||
* <img alt="High Fidelity coordinate system" src="https://docs.highfidelity.com/images/opengl-coord-system.jpg" />
|
||||
*
|
||||
* @namespace Vec3
|
||||
* @variation 0
|
||||
|
|
|
@ -44,13 +44,14 @@ class Camera : public QObject {
|
|||
* @hifi-interface
|
||||
* @hifi-client-entity
|
||||
*
|
||||
* @property position {Vec3} The position of the camera. You can set this value only when the camera is in independent mode.
|
||||
* @property orientation {Quat} The orientation of the camera. You can set this value only when the camera is in independent
|
||||
* @property {Vec3} position - The position of the camera. You can set this value only when the camera is in independent
|
||||
* mode.
|
||||
* @property mode {Camera.Mode} The camera mode.
|
||||
* @property frustum {ViewFrustum} The camera frustum.
|
||||
* @property cameraEntity {Uuid} The ID of the entity that is used for the camera position and orientation when the camera
|
||||
* is in entity mode.
|
||||
* @property {Quat} orientation - The orientation of the camera. You can set this value only when the camera is in
|
||||
* independent mode.
|
||||
* @property {Camera.Mode} mode - The camera mode.
|
||||
* @property {ViewFrustum} frustum - The camera frustum.
|
||||
* @property {Uuid} cameraEntity - The ID of the entity that is used for the camera position and orientation when the
|
||||
* camera is in entity mode.
|
||||
*/
|
||||
// FIXME: The cameraEntity property definition is copied from FancyCamera.h.
|
||||
Q_PROPERTY(glm::vec3 position READ getPosition WRITE setPosition)
|
||||
|
|
|
@ -20,7 +20,7 @@ public:
|
|||
/**jsdoc
|
||||
* Creates a new button, adds it to this and returns it.
|
||||
* @function QmlFragmentClass#addButton
|
||||
* @param properties {Object} button properties
|
||||
* @param properties {object} button properties
|
||||
* @returns {TabletButtonProxy}
|
||||
*/
|
||||
Q_INVOKABLE QObject* addButton(const QVariant& properties);
|
||||
|
|
|
@ -493,7 +493,7 @@ protected:
|
|||
int _stableOrder;
|
||||
|
||||
/**jsdoc
|
||||
* @typedef TabletButtonProxy.ButtonProperties
|
||||
* @typedef {object} TabletButtonProxy.ButtonProperties
|
||||
* @property {string} icon - URL to button icon. (50 x 50)
|
||||
* @property {string} hoverIcon - URL to button icon, displayed during mouse hover. (50 x 50)
|
||||
* @property {string} activeHoverIcon - URL to button icon used when button is active, and during mouse hover. (50 x 50)
|
||||
|
|
|
@ -442,7 +442,7 @@ void OculusControllerManager::TouchDevice::stopHapticPulse(bool leftHand) {
|
|||
* <tr><td><code>RightHand</code></td><td>number</td><td>{@link Pose}</td><td>right hand pose.</td></tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
* @typedef Controller.Hardware-OculusTouch
|
||||
* @typedef {object} Controller.Hardware-OculusTouch
|
||||
*/
|
||||
controller::Input::NamedVector OculusControllerManager::TouchDevice::getAvailableInputs() const {
|
||||
using namespace controller;
|
||||
|
|
|
@ -1297,7 +1297,7 @@ void ViveControllerManager::InputDevice::setConfigFromString(const QString& valu
|
|||
* <tr><td><code>TrackedObject15</code></td><td>number</td><td>{@link Pose}</td><td>Tracker 15 pose.</td></tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
* @typedef Controller.Hardware-Vive
|
||||
* @typedef {object} Controller.Hardware-Vive
|
||||
*/
|
||||
controller::Input::NamedVector ViveControllerManager::InputDevice::getAvailableInputs() const {
|
||||
using namespace controller;
|
||||
|
|
|
@ -45,6 +45,7 @@ exports.handlers = {
|
|||
'../../libraries/controllers/src/controllers/impl/',
|
||||
'../../libraries/display-plugins/src/display-plugins/',
|
||||
'../../libraries/entities/src',
|
||||
'../../libraries/fbx/src',
|
||||
'../../libraries/graphics/src/graphics/',
|
||||
'../../libraries/graphics-scripting/src/graphics-scripting/',
|
||||
'../../libraries/input-plugins/src/input-plugins',
|
||||
|
|
Loading…
Reference in a new issue