mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 17:14:59 +02:00
Doc review
This commit is contained in:
parent
5e311a86ee
commit
eeb7f5ca8d
10 changed files with 133 additions and 100 deletions
|
@ -17,7 +17,8 @@
|
|||
|
||||
/**jsdoc
|
||||
* The <code>"far-grab"</code> {@link Entities.ActionType|ActionType} moves and rotates an entity to a target position and
|
||||
* orientation, optionally relative to another entity, such that the entity doesn't collide with the user's avatar.
|
||||
* orientation, optionally relative to another entity. Collisions between the entity and the user's avatar are disabled during
|
||||
* the far-grab.
|
||||
* It has arguments in addition to the common {@link Entities.ActionArguments|ActionArguments}.
|
||||
*
|
||||
* @typedef {object} Entities.ActionArguments-FarGrab
|
||||
|
|
|
@ -417,8 +417,8 @@ bool AvatarActionHold::updateArguments(QVariantMap arguments) {
|
|||
}
|
||||
|
||||
/**jsdoc
|
||||
* The <code>"hold"</code> {@link Entities.ActionType|ActionType} positions and rotates an entity relative to an avatar's hand,
|
||||
* without collisions between the entity and the holding avatar.
|
||||
* The <code>"hold"</code> {@link Entities.ActionType|ActionType} positions and rotates an entity relative to an avatar's hand.
|
||||
* Collisions between the entity and the user's avatar are disabled during the hold.
|
||||
* It has arguments in addition to the common {@link Entities.ActionArguments|ActionArguments}.
|
||||
*
|
||||
* @typedef {object} Entities.ActionArguments-Hold
|
||||
|
|
|
@ -102,12 +102,12 @@ variables. These argument variables are used by the code which is run when bull
|
|||
* </thead>
|
||||
* <tbody>
|
||||
* <tr><td><code>"far-grab"</code></td><td>Avatar action</td>
|
||||
* <td>Moves and rotates an entity to a target position and orientation, optionally relative to another entity, such that
|
||||
* the entity doesn't collide with the user's avatar.</td>
|
||||
* <td>Moves and rotates an entity to a target position and orientation, optionally relative to another entity. Collisions
|
||||
* between the entity and the user's avatar are disabled during the far-grab.</td>
|
||||
* <td>{@link Entities.ActionArguments-FarGrab}</td></tr>
|
||||
* <tr><td><code>"hold"</code></td><td>Avatar action</td>
|
||||
* <td>Positions and rotates an entity relative to an avatar's hand, without collisions between the entity and the holding
|
||||
* avatar.</td>
|
||||
* <td>Positions and rotates an entity relative to an avatar's hand. Collisions between the entity and the user's avatar
|
||||
* are disabled during the hold.</td>
|
||||
* <td>{@link Entities.ActionArguments-Hold}</td></tr>
|
||||
* <tr><td><code>"offset"</code></td><td>Object action</td>
|
||||
* <td>Moves an entity so that it is a set distance away from a target point.</td>
|
||||
|
|
|
@ -447,8 +447,9 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
|
|||
* @typedef {object} Entities.EntityProperties
|
||||
* @property {Uuid} id - The ID of the entity. <em>Read-only.</em>
|
||||
* @property {string} name="" - A name for the entity. Need not be unique.
|
||||
* @property {Entities.EntityType} type - The entity type. You cannot change the type of an entity after it's created.
|
||||
* <em>Read-only.</em>
|
||||
* @property {Entities.EntityType} type - The entity type. You cannot change the type of an entity after it's created. (Though
|
||||
* its value may switch among <code>"Box"</code>, <code>"Shape"</code>, and <code>"Sphere"</code> depending on changes to
|
||||
* the <code>shape</code> property set for entities of these types.) <em>Read-only.</em>
|
||||
* @property {boolean} clientOnly=false - If <code>true</code> then the entity is an avatar entity, otherwise it is a server
|
||||
* entity. <em>Read-only.</em>
|
||||
* @property {Uuid} owningAvatarID=Uuid.NULL - The session ID of the owning avatar if <code>clientOnly</code> is
|
||||
|
@ -510,7 +511,7 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
|
|||
* <code>10.0</code>. The higher the value, the more quickly it slows down. Examples: <code>0.1</code> for ice,
|
||||
* <code>0.9</code> for sandpaper.
|
||||
* @property {number} density=1000 - The density of the entity in kg/m<sup>3</sup>, <code>100</code> for balsa wood –
|
||||
* <code>10000</code> for silver. The density is used in conjunction with the entity's collision volume to work out its
|
||||
* <code>10000</code> for silver. The density is used in conjunction with the entity's bounding box volume to work out its
|
||||
* mass in the application of physics.
|
||||
*
|
||||
* @property {boolean} collisionless=false - Whether or not the entity should collide with items per its
|
||||
|
@ -528,13 +529,17 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
|
|||
* @property {string} href="" - A "hifi://" metaverse address that a user is taken to when they click on the entity.
|
||||
* @property {string} description="" - A description of the <code>href</code> property value.
|
||||
*
|
||||
* @property {string} userData="" - Intended to be used to store extra data about the entity in JSON format. WARNING: Other
|
||||
* apps such as the Create app can also use this property, so make sure you handle data stored by other apps.
|
||||
* @property {string} userData="" - Used to store extra data about the entity in JSON format. WARNING: Other apps such as the
|
||||
* Create app can also use this property, so make sure you handle data stored by other apps — edit only your bit and
|
||||
* leave the rest of the data intact. You can use <code>JSON.parse()</code> to parse the string into a JavaScript object
|
||||
* which you can manipulate the properties of, and use <code>JSON.stringify()</code> to convert the object into a string to
|
||||
* put in the property.
|
||||
*
|
||||
* @property {string} script="" - The URL of the client entity script, if any, that is attached to the entity.
|
||||
* @property {number} scriptTimestamp=0 - Intended to be used to indicate when the client entity script was loaded. Should be
|
||||
* an integer number of milliseconds since midnight GMT on January 1, 1970 (e.g., as supplied by <code>Date.now()</code>.
|
||||
* If you update the property's value, the <code>script</code> is re-downloaded and reloaded.
|
||||
* If you update the property's value, the <code>script</code> is re-downloaded and reloaded. This is how the "reload"
|
||||
* button beside the "script URL" field in properties tab of the Create app works.
|
||||
* @property {string} serverScripts="" - The URL of the server entity script, if any, that is attached to the entity.
|
||||
*
|
||||
* @property {Uuid} parentID=Uuid.NULL - The ID of the entity or avatar that this entity is parented to. {@link Uuid|Uuid.NULL}
|
||||
|
@ -564,7 +569,8 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
|
|||
* @property {string} actionData="" - Base-64 encoded compressed dump of the actions associated with the entity. This property
|
||||
* is typically not used in scripts directly; rather, functions that manipulate an entity's actions update it.
|
||||
* The size of this property increases with the number of actions. Because this property value has to fit within a High
|
||||
* Fidelity datagram packet there is a limit to the number of actions that an entity can have.
|
||||
* Fidelity datagram packet there is a limit to the number of actions that an entity can have, and edits which would result
|
||||
* in overflow are rejected.
|
||||
* <em>Read-only.</em>
|
||||
* @property {Entities.RenderInfo} renderInfo - Information on the cost of rendering the entity. Currently information is only
|
||||
* provided for <code>Model</code> entities. <em>Read-only.</em>
|
||||
|
@ -603,9 +609,10 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
|
|||
|
||||
/**jsdoc
|
||||
* The <code>"Box"</code> {@link Entities.EntityType|EntityType} is the same as the <code>"Shape"</code>
|
||||
* {@link Entities.EntityType|EntityType} except that its initial <code>shape</code> value is always set to <code>"Cube"</code>
|
||||
* when the entity is created. This property value can subsequently be changed (i.e. so that the entity is no longer displayed
|
||||
* as a cube).
|
||||
* {@link Entities.EntityType|EntityType} except that its <code>shape</code> value is always set to <code>"Cube"</code>
|
||||
* when the entity is created. If its <code>shape</code> property value is subsequently changed then the entity's
|
||||
* <code>type</code> will be reported as <code>"Sphere"</code> if the <code>shape</code> is set to <code>"Sphere"</code>,
|
||||
* otherwise it will be reported as <code>"Shape"</code>.
|
||||
* @typedef {object} Entities.EntityProperties-Box
|
||||
*/
|
||||
|
||||
|
@ -619,7 +626,7 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
|
|||
* @property {number} intensity=1 - The brightness of the light.
|
||||
* @property {number} falloffRadius=0.1 - The distance from the light's center at which intensity is reduced by 25%.
|
||||
* @property {boolean} isSpotlight=false - If <code>true</code> then the light is directional, emitting along the entity's
|
||||
* negative z-axis; otherwise the light is a point light which emanates in all directions.
|
||||
* local negative z-axis; otherwise the light is a point light which emanates in all directions.
|
||||
* @property {number} exponent=0 - Affects the softness of the spotlight beam: the higher the value the softer the beam.
|
||||
* @property {number} cutoff=1.57 - Affects the size of the spotlight beam: the higher the value the larger the beam.
|
||||
* @example <caption>Create a spotlight pointing at the ground.</caption>
|
||||
|
@ -724,15 +731,16 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
|
|||
* @typedef {object} Entities.EntityProperties-Model
|
||||
* @property {Vec3} dimensions=0.1,0.1,0.1 - The dimensions of the entity. When adding an entity, if no <code>dimensions</code>
|
||||
* value is specified then the model is automatically sized to its
|
||||
* <code>{@link Entityes.EntityProperties|naturalDimensions}</code>.
|
||||
* <code>{@link Entities.EntityProperties|naturalDimensions}</code>.
|
||||
* @property {Color} color=255,255,255 - <em>Currently not used.</em>
|
||||
* @property {string} modelURL="" - The URL of the FBX of OBJ model. Baked FBX models' URLs end in ".baked.fbx".<br />
|
||||
* Note: If the name ends with <code>"default-image-model.fbx"</code> then the entity is considered to be an "Image"
|
||||
* entity, in which case the <code>textures</code> property should be set per the example.
|
||||
* @property {string} textures="" - A JSON string of texture name, URL pairs used when rendering the model in place of the
|
||||
* model's original textures. Only the texture names and URLs to be overridden need be specified; original textures are
|
||||
* used where there are no overrides. You can use <code>JSON.stringify()</code> to convert a JavaScript object of name, URL
|
||||
* pairs into a JSON string.
|
||||
* model's original textures. Use a texture name from the <code>originanlTextures</code> property to override that texture.
|
||||
* Only the texture names and URLs to be overridden need be specified; original textures are used where there are no
|
||||
* overrides. You can use <code>JSON.stringify()</code> to convert a JavaScript object of name, URL pairs into a JSON
|
||||
* string.
|
||||
* @property {string} originalTextures="{}" - A JSON string of texture name, URL pairs used in the model. The property value is
|
||||
* filled in after the entity has finished rezzing (i.e., textures have loaded). You can use <code>JSON.parse()</code> to
|
||||
* parse the JSON string into a JavaScript object of name, URL pairs. <em>Read-only.</em>
|
||||
|
@ -773,7 +781,7 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
|
|||
* dimensions: { x: 0.0945, y: 0.0921, z: 0.0423 },
|
||||
* lifetime: 300 // Delete after 5 minutes.
|
||||
* });
|
||||
* @example <caption>Crate an "Image" entity like the Create app.</caption>
|
||||
* @example <caption>Create an "Image" entity like you can in the Create app.</caption>
|
||||
* var IMAGE_MODEL = "https://hifi-content.s3.amazonaws.com/DomainContent/production/default-image-model.fbx";
|
||||
* var DEFAULT_IMAGE = "https://hifi-content.s3.amazonaws.com/DomainContent/production/no-image.jpg";
|
||||
* var entity = Entities.addEntity({
|
||||
|
@ -807,7 +815,8 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
|
|||
* @property {number} emitSpeed=5 - The speed, in m/s, that each particle is emitted at.
|
||||
* @property {number} speedSpread=1 - The spread in speeds at which particles are emitted at. If <code>emitSpeed == 5</code>
|
||||
* and <code>speedSpread == 1</code>, particles will be emitted with speeds in the range 4m/s – 6m/s.
|
||||
* @property {vec3} emitAcceleration=0,-9.8,0 - The acceleration that is applied to each particle during its lifetime.
|
||||
* @property {vec3} emitAcceleration=0,-9.8,0 - The acceleration that is applied to each particle during its lifetime. The
|
||||
* default is Earth's gravity value.
|
||||
* @property {vec3} accelerationSpread=0,0,0 - The spread in accelerations that each particle is given. If
|
||||
* <code>emitAccelerations == {x: 0, y: -9.8, z: 0}</code> and <code>accelerationSpread ==
|
||||
* {x: 0, y: 1, z: 0}</code>, each particle will have an acceleration in the range, <code>{x: 0, y: -10.8, z: 0}</code>
|
||||
|
@ -818,40 +827,46 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
|
|||
* otherwise they stay with the entity's dimensions.
|
||||
*
|
||||
* @property {Quat} emitOrientation=-0.707,0,0,0.707 - The orientation of particle emission relative to the entity's axes. By
|
||||
* default, particles emit along the entity's z-axis, and <code>azimuthStart</code> and <code>azimuthFinish</code> are
|
||||
* relative to the entity's x-axis. The default value is a rotation of -90 degrees about the x-axis, i.e., the particles
|
||||
* emit vertically.
|
||||
* default, particles emit along the entity's local z-axis, and <code>azimuthStart</code> and <code>azimuthFinish</code>
|
||||
* are relative to the entity's local x-axis. The default value is a rotation of -90 degrees about the local x-axis, i.e.,
|
||||
* the particles emit vertically.
|
||||
* @property {vec3} emitDimensions=0,0,0 - The dimensions of the ellipsoid from which particles are emitted.
|
||||
* @property {number} emitRadiusStart=1 - The starting radius within the ellipsoid at which particles start being emitted;
|
||||
* range <code>0.0</code> – <code>1.0</code> for the ellipsoid center to the ellipsoid surface, respectively.
|
||||
* Particles are emitted from the portion of the ellipsoid that lies between <code>emitRadiusStart</code> and the
|
||||
* ellipsoid's surface.
|
||||
* @property {number} polarStart=0 - The angle in radians from the entity's z-axis at which particles start being emitted
|
||||
* @property {number} polarStart=0 - The angle in radians from the entity's local z-axis at which particles start being emitted
|
||||
* within the ellipsoid; range <code>0</code> – <code>Math.PI</code>. Particles are emitted from the portion of the
|
||||
* ellipsoid that lies between <code>polarStart<code> and <code>polarFinish</code>.
|
||||
* @property {number} polarFinish=0 - The angle in radians from the entity's z-axis at which particles stop being emitted
|
||||
* @property {number} polarFinish=0 - The angle in radians from the entity's local z-axis at which particles stop being emitted
|
||||
* within the ellipsoid; range <code>0</code> – <code>Math.PI</code>. Particles are emitted from the portion of the
|
||||
* ellipsoid that lies between <code>polarStart<code> and <code>polarFinish</code>.
|
||||
* @property {number} azimuthStart=-Math.PI - The angle in radians from the entity's x-axis about the entity's z-axis at which
|
||||
* particles start being emitted; range <code>-Math.PI</code> – <code>Math.PI</code>. Particles are emitted from the
|
||||
* portion of the ellipsoid that lies between <code>azimuthStart<code> and <code>azimuthFinish</code>.
|
||||
* @property {number} azimuthFinish=Math.PI - The angle in radians from the entity's x-axis about the entity's z-axis at which
|
||||
* particles stop being emitted; range <code>-Math.PI</code> – <code>Math.PI</code>. Particles are emitted from the
|
||||
* portion of the ellipsoid that lies between <code>azimuthStart<code> and <code>azimuthFinish</code>.
|
||||
* @property {number} azimuthStart=-Math.PI - The angle in radians from the entity's local x-axis about the entity's local
|
||||
* z-axis at which particles start being emitted; range <code>-Math.PI</code> – <code>Math.PI</code>. Particles are
|
||||
* emitted from the portion of the ellipsoid that lies between <code>azimuthStart<code> and <code>azimuthFinish</code>.
|
||||
* @property {number} azimuthFinish=Math.PI - The angle in radians from the entity's local x-axis about the entity's local
|
||||
* z-axis at which particles stop being emitted; range <code>-Math.PI</code> – <code>Math.PI</code>. Particles are
|
||||
* emitted from the portion of the ellipsoid that lies between <code>azimuthStart<code> and <code>azimuthFinish</code>.
|
||||
*
|
||||
* @property {string} textures="" - The URL of a JPG or PNG image file to display for each particle. If you want transparency,
|
||||
* use PNG format.
|
||||
* @property {number} particleRadius=0.025 - The radius of each particle at the middle of its life.
|
||||
* @property {number} radiusStart=0.025 - The radius of each particle at the start of its life.
|
||||
* @property {number} radiusFinish=0.025 - The radius of each particle at the end of its life.
|
||||
* @property {number} radiusStart=0.025 - The radius of each particle at the start of its life. If not explicitly set, the
|
||||
* <code>particleRadius</code> value is used.
|
||||
* @property {number} radiusFinish=0.025 - The radius of each particle at the end of its life. If not explicitly set, the
|
||||
* <code>particleRadius</code> value is used.
|
||||
* @property {number} radiusSpread=0 - <em>Currently not used.</em>
|
||||
* @property {Color} color=255,255,255 - The color of each particle at the middle of its life.
|
||||
* @property {Color} colorStart=255,255,255 - The color of each particle at the start of its life.
|
||||
* @property {color} colorFinish=255,255,255 - The color of each particle at the end of its life.
|
||||
* @property {Color} colorStart=255,255,255 - The color of each particle at the start of its life. If not explicitly set, the
|
||||
* <code>color</code> value is used.
|
||||
* @property {Color} colorFinish=255,255,255 - The color of each particle at the end of its life. If not explicitly set, the
|
||||
* <code>color</code> value is used.
|
||||
* @property {Color} colorSpread=0,0,0 - <em>Currently not used.</em>
|
||||
* @property {number} alpha=1 - The alpha of each particle at the middle of its life.
|
||||
* @property {number} alphaStart=1 - The alpha of each particle at the start of its life.
|
||||
* @property {number} alphaFinish=1 - The alpha of each particle at the end of its life.
|
||||
* @property {number} alphaStart=1 - The alpha of each particle at the start of its life. If not explicitly set, the
|
||||
* <code>alpha</code> value is used.
|
||||
* @property {number} alphaFinish=1 - The alpha of each particle at the end of its life. If not explicitly set, the
|
||||
* <code>alpha</code> value is used.
|
||||
* @property {number} alphaSpread=0 - <em>Currently not used.</em>
|
||||
*
|
||||
* @property {ShapeType} shapeType="none" - <em>Currently not used.</em> <em>Read-only.</em>
|
||||
|
@ -939,24 +954,24 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
|
|||
* rejected.
|
||||
* @property {Entities.PolyVoxSurfaceStyle} voxelSurfaceStyle=2 - The style of rendering the voxels' surface and how
|
||||
* neighboring PolyVox entities are joined.
|
||||
* @property {string} xTextureURL="" - URL of the texture to map to surfaces perpendicular to the entity's x-axis. JPG or PNG
|
||||
* format. If no texture is specified the surfaces display white.
|
||||
* @property {string} yTextureURL="" - URL of the texture to map to surfaces perpendicular to the entity's y-axis. JPG or PNG
|
||||
* format. If no texture is specified the surfaces display white.
|
||||
* @property {string} zTextureURL="" - URL of the texture to map to surfaces perpendicular to the entity's z-axis. JPG or PNG
|
||||
* format. If no texture is specified the surfaces display white.
|
||||
* @property {Uuid} xNNeighborID=Uuid.NULL - ID of the neighboring PolyVox entity in the entity's -ve x-axis direction, if you
|
||||
* want them joined. Set to {@link Uuid|Uuid.NULL} if there is none or you don't want to join them.
|
||||
* @property {Uuid} yNNeighborID=Uuid.NULL - ID of the neighboring PolyVox entity in the entity's -ve y-axis direction, if you
|
||||
* want them joined. Set to {@link Uuid|Uuid.NULL} if there is none or you don't want to join them.
|
||||
* @property {Uuid} zNNeighborID=Uuid.NULL - ID of the neighboring PolyVox entity in the entity's -ve z-axis direction, if you
|
||||
* want them joined. Set to {@link Uuid|Uuid.NULL} if there is none or you don't want to join them.
|
||||
* @property {Uuid} xPNeighborID=Uuid.NULL - ID of the neighboring PolyVox entity in the entity's +ve x-axis direction, if you
|
||||
* want them joined. Set to {@link Uuid|Uuid.NULL} if there is none or you don't want to join them.
|
||||
* @property {Uuid} yPNeighborID=Uuid.NULL - ID of the neighboring PolyVox entity in the entity's +ve y-axis direction, if you
|
||||
* want them joined. Set to {@link Uuid|Uuid.NULL} if there is none or you don't want to join them.
|
||||
* @property {Uuid} zPNeighborID=Uuid.NULL - ID of the neighboring PolyVox entity in the entity's +ve z-axis direction, if you
|
||||
* want them joined. Set to {@link Uuid|Uuid.NULL} if there is none or you don't want to join them.
|
||||
* @property {string} xTextureURL="" - URL of the texture to map to surfaces perpendicular to the entity's local x-axis. JPG or
|
||||
* PNG format. If no texture is specified the surfaces display white.
|
||||
* @property {string} yTextureURL="" - URL of the texture to map to surfaces perpendicular to the entity's local y-axis. JPG or
|
||||
* PNG format. If no texture is specified the surfaces display white.
|
||||
* @property {string} zTextureURL="" - URL of the texture to map to surfaces perpendicular to the entity's local z-axis. JPG or
|
||||
* PNG format. If no texture is specified the surfaces display white.
|
||||
* @property {Uuid} xNNeighborID=Uuid.NULL - ID of the neighboring PolyVox entity in the entity's -ve local x-axis direction,
|
||||
* if you want them joined. Set to {@link Uuid|Uuid.NULL} if there is none or you don't want to join them.
|
||||
* @property {Uuid} yNNeighborID=Uuid.NULL - ID of the neighboring PolyVox entity in the entity's -ve local y-axis direction,
|
||||
* if you want them joined. Set to {@link Uuid|Uuid.NULL} if there is none or you don't want to join them.
|
||||
* @property {Uuid} zNNeighborID=Uuid.NULL - ID of the neighboring PolyVox entity in the entity's -ve local z-axis direction,
|
||||
* if you want them joined. Set to {@link Uuid|Uuid.NULL} if there is none or you don't want to join them.
|
||||
* @property {Uuid} xPNeighborID=Uuid.NULL - ID of the neighboring PolyVox entity in the entity's +ve local x-axis direction,
|
||||
* if you want them joined. Set to {@link Uuid|Uuid.NULL} if there is none or you don't want to join them.
|
||||
* @property {Uuid} yPNeighborID=Uuid.NULL - ID of the neighboring PolyVox entity in the entity's +ve local y-axis direction,
|
||||
* if you want them joined. Set to {@link Uuid|Uuid.NULL} if there is none or you don't want to join them.
|
||||
* @property {Uuid} zPNeighborID=Uuid.NULL - ID of the neighboring PolyVox entity in the entity's +ve local z-axis direction,
|
||||
* if you want them joined. Set to {@link Uuid|Uuid.NULL} if there is none or you don't want to join them.
|
||||
* @example <caption>Create a textured PolyVox sphere.</caption>
|
||||
* var position = Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0.5, z: -8 }));
|
||||
* var texture = "http://public.highfidelity.com/cozza13/tuscany/Concrete2.jpg";
|
||||
|
@ -991,9 +1006,10 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
|
|||
|
||||
/**jsdoc
|
||||
* The <code>"Sphere"</code> {@link Entities.EntityType|EntityType} is the same as the <code>"Shape"</code>
|
||||
* {@link Entities.EntityType|EntityType} except that its initial <code>shape</code> value is always set to
|
||||
* <code>"Sphere"</code> when the entity is created. This property value can subsequently be changed (i.e. so that the entity
|
||||
* is no longer displayed as a sphere).
|
||||
* {@link Entities.EntityType|EntityType} except that its <code>shape</code> value is always set to <code>"Sphere"</code>
|
||||
* when the entity is created. If its <code>shape</code> property value is subsequently changed then the entity's
|
||||
* <code>type</code> will be reported as <code>"Box"</code> if the <code>shape</code> is set to <code>"Cube"</code>,
|
||||
* otherwise it will be reported as <code>"Shape"</code>.
|
||||
* @typedef {object} Entities.EntityProperties-Sphere
|
||||
*/
|
||||
|
||||
|
@ -1030,7 +1046,9 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
|
|||
* @property {Vec3} dimensions=0.1,0.1,0.01 - The dimensions of the entity.
|
||||
* @property {string} sourceUrl="" - The URL of the Web page to display. This value does not change as you or others navigate
|
||||
* on the Web entity.
|
||||
* @property {number} dpi=30 - The resolution to display the page at, in dots per inch
|
||||
* @property {number} dpi=30 - The resolution to display the page at, in dots per inch. If you convert this to dots per meter
|
||||
* (multiply by 1 / 0.0254 = 39.3701) then multiply <code>dimensions.x</code> and <code>dimensions.y</code> by that value
|
||||
* you get the resolution in pixels.
|
||||
* @example <caption>Create a Web entity displaying at 1920 x 1080 resolution.</caption>
|
||||
* var METERS_TO_INCHES = 39.3701;
|
||||
* var entity = Entities.addEntity({
|
||||
|
@ -1050,6 +1068,7 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
|
|||
|
||||
/**jsdoc
|
||||
* The <code>"Zone"</code> {@link Entities.EntityType|EntityType} is a volume of lighting effects and avatar permissions.
|
||||
* Avatar interaction events such as {@link Entities.enterEntity} are also often used with a Zone entity.
|
||||
* It has properties in addition to the common {@link Entities.EntityProperties|EntityProperties}.
|
||||
* @typedef {object} Entities.EntityProperties-Zone
|
||||
* @property {Vec3} dimensions=0.1,0.1,0.1 - The size of the volume in which the zone's lighting effects and avatar permissions
|
||||
|
@ -1247,7 +1266,7 @@ QScriptValue EntityItemProperties::copyToScriptValue(QScriptEngine* engine, bool
|
|||
COPY_PROPERTY_TO_QSCRIPTVALUE_GETTER(PROP_SHAPE_TYPE, shapeType, getShapeTypeAsString());
|
||||
}
|
||||
|
||||
// FIXME: Shouldn't provide a shapeType property for Box and Sphere entities?
|
||||
// FIXME: Shouldn't provide a shapeType property for Box and Sphere entities.
|
||||
if (_type == EntityTypes::Box) {
|
||||
COPY_PROPERTY_TO_QSCRIPTVALUE_GETTER(PROP_SHAPE_TYPE, shapeType, QString("Box"));
|
||||
}
|
||||
|
|
|
@ -186,8 +186,8 @@ public slots:
|
|||
/**jsdoc
|
||||
* Check whether or not you can make changes to the asset server's assets.
|
||||
* @function Entities.canWriteAssets
|
||||
* @returns {boolean} <code>true</code> if the domain server will allow the script to make changes to the to the asset
|
||||
* server's assets, otherwise <code>false</code>.
|
||||
* @returns {boolean} <code>true</code> if the domain server will allow the script to make changes to the asset server's
|
||||
* assets, otherwise <code>false</code>.
|
||||
*/
|
||||
Q_INVOKABLE bool canWriteAssets();
|
||||
|
||||
|
@ -481,7 +481,7 @@ public slots:
|
|||
Q_INVOKABLE bool getServerScriptStatus(QUuid entityID, QScriptValue callback);
|
||||
|
||||
/**jsdoc
|
||||
* Get metadata for "magic" entity properties such as <code>script</code> and <code>serverScripts</code>.
|
||||
* Get metadata for certain entity properties such as <code>script</code> and <code>serverScripts</code>.
|
||||
* @function Entities.queryPropertyMetadata
|
||||
* @param {Uuid} entityID - The ID of the entity to get the metadata for.
|
||||
* @param {string} property - The property name to get the metadata for.
|
||||
|
@ -491,7 +491,7 @@ public slots:
|
|||
* @throws Throws an error if <code>property</code> is not handled yet or <code>callback</code> is not a function.
|
||||
*/
|
||||
/**jsdoc
|
||||
* Get metadata for "magic" entity properties such as <code>script</code> and <code>serverScripts</code>.
|
||||
* Get metadata for certain entity properties such as <code>script</code> and <code>serverScripts</code>.
|
||||
* @function Entities.queryPropertyMetadata
|
||||
* @param {Uuid} entityID - The ID of the entity to get the metadata for.
|
||||
* @param {string} property - The property name to get the metadata for.
|
||||
|
@ -513,8 +513,9 @@ public slots:
|
|||
|
||||
|
||||
/**jsdoc
|
||||
* Set whether or not ray picks intersect the bounding box of {@link Entities.EntityType|Light} entities. Ray picks are
|
||||
* done using {@link Entities.findRayIntersection|findRayIntersection}or
|
||||
* Set whether or not ray picks intersect the bounding box of {@link Entities.EntityType|Light} entities. By default, Light
|
||||
* entities are not intersected. The setting lasts for the Interface session. Ray picks are done using
|
||||
* {@link Entities.findRayIntersection|findRayIntersection} or
|
||||
* {@link Entities.findRayIntersectionBlocking|findRayIntersectionBlocking}, or the {@link Picks} and {@link RayPick}
|
||||
* APIs.
|
||||
* @function Entities.setLightsArePickable
|
||||
|
@ -526,7 +527,7 @@ public slots:
|
|||
|
||||
/**jsdoc
|
||||
* Get whether or not ray picks intersect the bounding box of {@link Entities.EntityType|Light} entities. Ray picks are
|
||||
* done using {@link Entities.findRayIntersection|findRayIntersection}or
|
||||
* done using {@link Entities.findRayIntersection|findRayIntersection} or
|
||||
* {@link Entities.findRayIntersectionBlocking|findRayIntersectionBlocking}, or the {@link Picks} and {@link RayPick}
|
||||
* APIs.
|
||||
* @function Entities.getLightsArePickable
|
||||
|
@ -537,8 +538,9 @@ public slots:
|
|||
Q_INVOKABLE bool getLightsArePickable() const;
|
||||
|
||||
/**jsdoc
|
||||
* Set whether or not ray picks intersect the bounding box of {@link Entities.EntityType|Zone} entities. Ray picks are
|
||||
* done using {@link Entities.findRayIntersection|findRayIntersection}or
|
||||
* Set whether or not ray picks intersect the bounding box of {@link Entities.EntityType|Zone} entities. By default, Light
|
||||
* entities are not intersected. The setting lasts for the Interface session. Ray picks are done using
|
||||
* {@link Entities.findRayIntersection|findRayIntersection} or
|
||||
* {@link Entities.findRayIntersectionBlocking|findRayIntersectionBlocking}, or the {@link Picks} and {@link RayPick}
|
||||
* APIs.
|
||||
* @function Entities.setZonesArePickable
|
||||
|
@ -550,7 +552,7 @@ public slots:
|
|||
|
||||
/**jsdoc
|
||||
* Get whether or not ray picks intersect the bounding box of {@link Entities.EntityType|Zone} entities. Ray picks are
|
||||
* done using {@link Entities.findRayIntersection|findRayIntersection}or
|
||||
* done using {@link Entities.findRayIntersection|findRayIntersection} or
|
||||
* {@link Entities.findRayIntersectionBlocking|findRayIntersectionBlocking}, or the {@link Picks} and {@link RayPick}
|
||||
* APIs.
|
||||
* @function Entities.getZonesArePickable
|
||||
|
@ -584,8 +586,8 @@ public slots:
|
|||
* @function Entities.setVoxelSphere
|
||||
* @param {Uuid} entityID - The ID of the {@link Entities.EntityType|PolyVox} entity.
|
||||
* @param {Vec3} center - The center of the sphere of voxels to set, in world coordinates.
|
||||
* @param {number} radius - If radius of the sphere of voxels to set, in world coordinates.
|
||||
* @param {number} value - If <code>value % 256 == 0</code> then the each voxel is cleared, otherwise each voxel is set.
|
||||
* @param {number} radius - The radius of the sphere of voxels to set, in world coordinates.
|
||||
* @param {number} value - If <code>value % 256 == 0</code> then each voxel is cleared, otherwise each voxel is set.
|
||||
* @example <caption>Create a PolyVox sphere.</caption>
|
||||
* var position = Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0.5, z: -8 }));
|
||||
* var polyVox = Entities.addEntity({
|
||||
|
@ -607,7 +609,7 @@ public slots:
|
|||
* @param {Vec3} start - The center of the sphere of voxels to set, in world coordinates.
|
||||
* @param {Vec3} end - The center of the sphere of voxels to set, in world coordinates.
|
||||
* @param {number} radius - The radius of the capsule cylinder and spherical ends, in world coordinates.
|
||||
* @param {number} value - If <code>value % 256 == 0</code> then the each voxel is cleared, otherwise each voxel is set.
|
||||
* @param {number} value - If <code>value % 256 == 0</code> then each voxel is cleared, otherwise each voxel is set.
|
||||
* @example <caption>Create a PolyVox capsule shape.</caption>
|
||||
* var position = Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0.5, z: -8 }));
|
||||
* var polyVox = Entities.addEntity({
|
||||
|
@ -631,7 +633,7 @@ public slots:
|
|||
* @param {Vec3} position - The position relative to the minimum axes values corner of the entity. The
|
||||
* <code>position</code> coordinates are rounded to the nearest integer to get the voxel coordinate. The minimum axes
|
||||
* corner voxel is <code>{ x: 0, y: 0, z: 0 }</code>.
|
||||
* @param {number} value - If <code>value % 256 == 0</code> then the voxel is cleared, otherwise the voxel is set.
|
||||
* @param {number} value - If <code>value % 256 == 0</code> then voxel is cleared, otherwise the voxel is set.
|
||||
* @example <caption>Create a cube PolyVox entity and clear the minimum axes corner voxel.</caption>
|
||||
* var entity = Entities.addEntity({
|
||||
* type: "PolyVox",
|
||||
|
@ -650,7 +652,7 @@ public slots:
|
|||
* Set the values of all voxels in a {@link Entities.EntityType|PolyVox} entity.
|
||||
* @function Entities.setAllVoxels
|
||||
* @param {Uuid} entityID - The ID of the {@link Entities.EntityType|PolyVox} entity.
|
||||
* @param {number} value - If <code>value % 256 == 0</code> then the each voxel is cleared, otherwise each voxel is set.
|
||||
* @param {number} value - If <code>value % 256 == 0</code> then each voxel is cleared, otherwise each voxel is set.
|
||||
* @example <caption>Create a PolyVox cube.</caption>
|
||||
* var entity = Entities.addEntity({
|
||||
* type: "PolyVox",
|
||||
|
@ -671,7 +673,7 @@ public slots:
|
|||
* @param {Vec3} lowPosition - The position of the minimum axes value corner of the cube of voxels to set, in voxel
|
||||
* coordinates.
|
||||
* @param {Vec3} cuboidSize - The size of the cube of voxels to set, in voxel coordinates.
|
||||
* @param {number} value - If <code>value % 256 == 0</code> then the each voxel is cleared, otherwise each voxel is set.
|
||||
* @param {number} value - If <code>value % 256 == 0</code> then each voxel is cleared, otherwise each voxel is set.
|
||||
* @example <caption>Create a PolyVox cube and clear the voxels in one corner.</caption>
|
||||
* var polyVox = Entities.addEntity({
|
||||
* type: "PolyVox",
|
||||
|
@ -745,7 +747,7 @@ public slots:
|
|||
* @param {Vec3} voxelCoords - The voxel coordinates. May be fractional and outside the entity's bounding box.
|
||||
* @returns {Vec3} The local coordinates of the <code>voxelCoords</code> if the <code>entityID</code> is a
|
||||
* {@link Entities.EntityType|PolyVox} entity, otherwise {@link Vec3|Vec3.ZERO}.
|
||||
* @example <caption>Get the world dimensions of a voxel in a PolyVox entity.</code>
|
||||
* @example <caption>Get the world dimensions of a voxel in a PolyVox entity.</caption>
|
||||
* var polyVox = Entities.addEntity({
|
||||
* type: "PolyVox",
|
||||
* position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0.5, z: -8 })),
|
||||
|
@ -849,7 +851,7 @@ public slots:
|
|||
* @param {Entities.ActionType} actionType - The type of action.
|
||||
* @param {Uuid} entityID - The ID of the entity to add the action to.
|
||||
* @param {Entities.ActionArguments} arguments - Configure the action.
|
||||
* @returns {Uuid} The ID of the action added if successful, otherwise <code>null</code>.
|
||||
* @returns {Uuid} The ID of the action added if successfully added, otherwise <code>null</code>.
|
||||
* @example <caption>Constrain a cube to move along a vertical line.</caption>
|
||||
* var entityID = Entities.addEntity({
|
||||
* type: "Box",
|
||||
|
@ -919,7 +921,7 @@ public slots:
|
|||
Q_INVOKABLE glm::vec3 getAbsoluteJointTranslationInObjectFrame(const QUuid& entityID, int jointIndex);
|
||||
|
||||
/**jsdoc
|
||||
* Get the trannslation of a joint in a {@link Entities.EntityType|Model} entity relative to the entity's coordinate frame.
|
||||
* Get the translation of a joint in a {@link Entities.EntityType|Model} entity relative to the entity's coordinate frame.
|
||||
* @function Entities.getAbsoluteJointRotationInObjectFrame
|
||||
* @param {Uuid} entityID - The ID of the entity.
|
||||
* @param {number} jointIndex - The integer index of the joint.
|
||||
|
@ -1068,7 +1070,8 @@ public slots:
|
|||
|
||||
|
||||
/**jsdoc
|
||||
* Get the IDs of entities, overlays, and avatars that are directly parented to an entity.
|
||||
* Get the IDs of entities, overlays, and avatars that are directly parented to an entity. To get all descendants of an
|
||||
* entity, recurse on the IDs returned by the function.
|
||||
* @function Entities.getChildrenIDs
|
||||
* @param {Uuid} parentID - The ID of the entity to get the children IDs of.
|
||||
* @returns {Uuid[]} An array of entity, overlay, and avatar IDs that are parented directly to the <code>parentID</code>
|
||||
|
@ -1133,11 +1136,11 @@ public slots:
|
|||
Q_INVOKABLE QVector<QUuid> getChildrenIDsOfJoint(const QUuid& parentID, int jointIndex);
|
||||
|
||||
/**jsdoc
|
||||
* Check whether an entity or overlay has a an entity as an ancestor (parent, parent's parent, etc.).
|
||||
* Check whether an entity or overlay has an entity as an ancestor (parent, parent's parent, etc.).
|
||||
* @function Entities.isChildOfParent
|
||||
* @param {Uuid} childID - The ID of the child entity or overlay to test for being a child, grandchild, etc.
|
||||
* @param {Uuid} parentID - The ID of the parent entity to test for being a parent, grandparent, etc.
|
||||
* @returns {boolean} <code>true</code> if the <code>childID></code> entity or overlay has the <code>parentID</code> entity
|
||||
* @returns {boolean} <code>true</code> if the <code>childID</code> entity or overlay has the <code>parentID</code> entity
|
||||
* as a parent or grandparent etc., otherwise <code>false</code>.
|
||||
* @example <caption>Check that a grandchild entity is a child of its grandparent.</caption>
|
||||
* function createEntity(description, position, parent) {
|
||||
|
@ -1273,8 +1276,8 @@ public slots:
|
|||
* but a {@link Entities.EntityType|Shape} entity doesn't.
|
||||
* @function Entities.wantsHandControllerPointerEvents
|
||||
* @param {Uuid} entityID - The ID of the entity.
|
||||
* @returns {boolean} <code>true</code> if the entity entity can be found and it wants hand controller pointer events,
|
||||
* otherwise <code>false</code>.
|
||||
* @returns {boolean} <code>true</code> if the entity can be found and it wants hand controller pointer events, otherwise
|
||||
* <code>false</code>.
|
||||
*/
|
||||
Q_INVOKABLE bool wantsHandControllerPointerEvents(QUuid id);
|
||||
|
||||
|
@ -1657,7 +1660,7 @@ signals:
|
|||
|
||||
/**jsdoc
|
||||
* Triggered when an avatar leaves an entity.
|
||||
* @function Entities.enterEntity
|
||||
* @function Entities.leaveEntity
|
||||
* @param {Uuid} entityID - The ID of the entity that the avatar left.
|
||||
* @returns {Signal}
|
||||
*/
|
||||
|
|
|
@ -42,8 +42,12 @@ public:
|
|||
* <tr><th>Value</th><th>Description</th><th>Properties</th></tr>
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <tr><td><code>"Box"</code></td><td>A rectangular prism. This is identical to the <code>Shape</code> EntityType except
|
||||
* that it is always created with an initial <code>shape</code> property value of <code>"Cube"</code>.</td>
|
||||
* <tr><td><code>"Box"</code></td><td>A rectangular prism. This is a synonym of <code>"Shape"</code> for the case
|
||||
* where the entity's <code>shape</code> property value is <code>"Cube"</code>.<br />
|
||||
* If an entity is created with its <code>type</code>
|
||||
* set to <code>"Box"</code> it will always be created with a <code>shape</code> property value of
|
||||
* <code>"Cube"</code>. If an entity of type <code>Shape</code> or <code>Sphere</code> has its <code>shape</code> set
|
||||
* to <code>"Cube"</code> then its <code>type</code> will be reported as <code>"Box"</code>.
|
||||
* <td>{@link Entities.EntityProperties-Box|EntityProperties-Box}</td></tr>
|
||||
* <tr><td><code>"Light"</code></td><td>A local lighting effect.</td>
|
||||
* <td>{@link Entities.EntityProperties-Light|EntityProperties-Light}</td></tr>
|
||||
|
@ -62,10 +66,14 @@ public:
|
|||
* <tr><td><code>"PolyVox"</code></td><td>A set of textured voxels.</td>
|
||||
* <td>{@link Entities.EntityProperties-PolyVox|EntityProperties-PolyVox}</td></tr>
|
||||
* <tr><td><code>"Shape"</code></td><td>A basic entity such as a cube.
|
||||
* See also, the <code>Box</code> and <code>Sphere</code> entity types.</td>
|
||||
* See also, the <code>"Box"</code> and <code>"Sphere"</code> entity types.</td>
|
||||
* <td>{@link Entities.EntityProperties-Shape|EntityProperties-Shape}</td></tr>
|
||||
* <tr><td><code>"Sphere"</code></td><td>A sphere. This is identical to the <code>Shape</code> EntityType except that it is
|
||||
* always created with an initial <code>shape</code> property value of <code>"Sphere"</code>.</td>
|
||||
* <tr><td><code>"Sphere"</code></td><td>A sphere. This is a synonym of <code>"Shape"</code> for the case
|
||||
* where the entity's <code>shape</code> property value is <code>"Sphere"</code>.<br />
|
||||
* If an entity is created with its <code>type</code>
|
||||
* set to <code>"Sphere"</code> it will always be created with a <code>shape</code> property value of
|
||||
* <code>"Sphere"</code>. If an entity of type <code>Box</code> or <code>Shape</code> has its <code>shape</code> set
|
||||
* to <code>"Sphere"</code> then its <code>type</code> will be reported as <code>"Sphere"</code>.
|
||||
* <td>{@link Entities.EntityProperties-Sphere|EntityProperties-Sphere}</td></tr>
|
||||
* <tr><td><code>"Text"</code></td><td>A pane of text oriented in space.</td>
|
||||
* <td>{@link Entities.EntityProperties-Text|EntityProperties-Text}</td></tr>
|
||||
|
|
|
@ -57,7 +57,7 @@ static const float INITIAL_KEY_LIGHT_ALTITUDE{ 200.0f };
|
|||
*
|
||||
* @property {boolean} hazeAltitudeEffect=false - If <code>true</code> then haze decreases with altitude as defined by the
|
||||
* entity's local coordinate system; <code>hazeBaseRef</code> and </code>hazeCeiling</code> are used.
|
||||
* @property {number} hazeBaseRef=0 - The y-azis value in the entity's local coordinate system at which the haze density starts
|
||||
* @property {number} hazeBaseRef=0 - The y-axis value in the entity's local coordinate system at which the haze density starts
|
||||
* reducing with altitude.
|
||||
* @property {number} hazeCeiling=200 - The y-axis value in the entity's local coordinate system at which the haze density has
|
||||
* reduced to 5%.
|
||||
|
|
|
@ -106,8 +106,8 @@ NetworkMaterialResource::ParsedMaterials NetworkMaterialResource::parseJSONMater
|
|||
* @typedef {object} Material
|
||||
* @property {string} name="" - A name for the material.
|
||||
* @property {string} model="hifi_pbr" - <em>Currently not used.</em>
|
||||
* @property {Vec3Color|RGBS} emissive - The emissive color. A {@link Vec3Color} value is treated as sRGB. A {@link RGBS} value
|
||||
* can be either RGB or sRGB.
|
||||
* @property {Vec3Color|RGBS} emissive - The emissive color, i.e., the color that the material emits. A {@link Vec3Color} value
|
||||
* is treated as sRGB. A {@link RGBS} value can be either RGB or sRGB.
|
||||
* @property {number} opacity=1.0 - The opacity, <code>0.0</code> – <code>1.0</code>.
|
||||
* @property {boolean} unlit=false - If <code>true</code>, the material is not lit.
|
||||
* @property {Vec3Color|RGBS} albedo - The albedo color. A {@link Vec3Color} value is treated as sRGB. A {@link RGBS} value can
|
||||
|
|
|
@ -37,7 +37,7 @@ private slots:
|
|||
public slots:
|
||||
|
||||
/**jsdoc
|
||||
* Set the maximum number of entity packets that the client send per second.
|
||||
* Set the maximum number of entity packets that the client can send per second.
|
||||
* @function Entities.setPacketsPerSecond
|
||||
* @param {number} packetsPerSecond - Integer maximum number of entity packets that the client can send per second.
|
||||
*/
|
||||
|
@ -53,7 +53,8 @@ public slots:
|
|||
int getPacketsPerSecond() const { return _packetSender->getPacketsPerSecond(); }
|
||||
|
||||
/**jsdoc
|
||||
* Check whether servers exist for the client to send entity packets to.
|
||||
* Check whether servers exist for the client to send entity packets to, i.e., whether you are connected to a domain and
|
||||
* its entity server is working.
|
||||
* @function Entities.serversExist
|
||||
* @returns {boolean} <code>true</code> if servers exist for the client to send entity packets to, otherwise
|
||||
* <code>false</code>.
|
||||
|
|
|
@ -79,7 +79,8 @@ const int16_t BULLET_COLLISION_MASK_COLLISIONLESS = 0;
|
|||
* <tr><td><code>16</code></td><td>Other avatars.</td></tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
* <p>The values for the collision types that are enabled are added together to give the CollisionMask value.</p>
|
||||
* <p>The values for the collision types that are enabled are added together to give the CollisionMask value. For example, a
|
||||
* value of <code>31</code> means that an entity will collide with all item types.</p>
|
||||
* @typedef {number} Entities.CollisionMask
|
||||
*/
|
||||
|
||||
|
|
Loading…
Reference in a new issue