"Box"
, "Shape"
, and "Sphere"
depending on changes to
* the shape
property set for entities of these types.) Read-only.
- * @property {boolean} clientOnly=false - If true
then the entity is an avatar entity; otherwise it is a server
- * entity. An avatar entity follows you to each domain you visit, rendering at the same world coordinates unless it's
- * parented to your avatar. Value cannot be changed after the entity is created.clientOnly
parameter in
+ * @property {EntityHostType} entityHostType="domain" - How this entity will behave, including if and how it is sent to other people.
+ * The value can only be set at entity creation by using the entityHostType
parameter in
* {@link Entities.addEntity}.
- * @property {Uuid} owningAvatarID=Uuid.NULL - The session ID of the owning avatar if clientOnly
is
+ * @property {boolean} avatarEntity=false - If true
then the entity is an avatar entity; An avatar entity follows you to each domain you visit,
+ * rendering at the same world coordinates unless it's parented to your avatar. Value cannot be changed after the entity is created.entityHostType
parameter in
+ * {@link Entities.addEntity}. clientOnly
is an alias.
+ * @property {boolean} localEntity=false - If true
then the entity is a local entity; Local entities only render for you and are not sent over the wire.
+ * Value cannot be changed after the entity is created.entityHostType
parameter in
+ * {@link Entities.addEntity}.
+ * @property {Uuid} owningAvatarID=Uuid.NULL - The session ID of the owning avatar if avatarEntity
is
* true
, otherwise {@link Uuid|Uuid.NULL}. Read-only.
*
* @property {string} created - The UTC date and time that the entity was created, in ISO 8601 format as
@@ -594,7 +624,7 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
* @property {number} parentJointIndex=65535 - The joint of the entity or avatar that this entity is parented to. Use
* 65535
or -1
to parent to the entity or avatar's position and orientation rather than a joint.
* @property {Vec3} localPosition=0,0,0 - The position of the entity relative to its parent if the entity is parented,
- * otherwise the same value as position
. If the entity is parented to an avatar and is clientOnly
+ * otherwise the same value as position
. If the entity is parented to an avatar and is an avatarEntity
* so that it scales with the avatar, this value remains the original local position value while the avatar scale changes.
* @property {Quat} localRotation=0,0,0,1 - The rotation of the entity relative to its parent if the entity is parented,
* otherwise the same value as rotation
.
@@ -602,8 +632,8 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
* otherwise the same value as velocity
.
* @property {Vec3} localAngularVelocity=0,0,0 - The angular velocity of the entity relative to its parent if the entity is
* parented, otherwise the same value as position
.
- * @property {Vec3} localDimensions - The dimensions of the entity. If the entity is parented to an avatar and is
- * clientOnly
so that it scales with the avatar, this value remains the original dimensions value while the
+ * @property {Vec3} localDimensions - The dimensions of the entity. If the entity is parented to an avatar and is an
+ * avatarEntity
so that it scales with the avatar, this value remains the original dimensions value while the
* avatar scale changes.
*
* @property {Entities.BoundingBox} boundingBox - The axis-aligned bounding box that tightly encloses the entity.
@@ -628,7 +658,7 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
* @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
.
+ * avatar entities: their avatarEntity
property will be set to true
.
* @property {Uuid} cloneOriginID - The ID of the entity that this entity was cloned from.
*
* @property {Entities.Grab} grab - The grab-related properties.
@@ -739,7 +769,7 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
* overlay's ID.
* To apply a material to an avatar, set the material entity's parentID
property to the avatar's session UUID.
* To apply a material to your avatar such that it persists across domains and log-ins, create the material as an avatar entity
- * by setting the clientOnly
parameter in {@link Entities.addEntity} to true
.
+ * by setting the entityHostType
parameter in {@link Entities.addEntity} to "avatar"
.
* Material entities render as non-scalable spheres if they don't have their parent set.
* @typedef {object} Entities.EntityProperties-Material
* @property {string} materialURL="" - URL to a {@link MaterialResource}. If you append ?name
to the URL, the
@@ -754,7 +784,8 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
* Otherwise the property value is parsed as an unsigned integer, specifying the mesh index to modify. Invalid values are
* parsed to 0
.
* @property {string} materialMappingMode="uv" - How the material is mapped to the entity. Either "uv"
or
- * "projected"
. Currently, only "uv"
is supported.
+ * "projected"
. In "uv" mode, the material will be evaluated within the UV space of the mesh it is applied to. In
+ * "projected" mode, the 3D transform of the Material Entity will be used to evaluate the texture coordinates for the material.
* @property {Vec2} materialMappingPos=0,0 - Offset position in UV-space of the top left of the material, range
* { x: 0, y: 0 }
– { x: 1, y: 1 }
.
* @property {Vec2} materialMappingScale=1,1 - How much to scale the material within the parent's UV-space.
@@ -762,6 +793,8 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
* @property {string} materialData="" - Used to store {@link MaterialResource} data as a JSON string. You can use
* JSON.parse()
to parse the string into a JavaScript object which you can manipulate the properties of, and
* use JSON.stringify()
to convert the object into a string to put in the property.
+ * @property {boolean} materialRepeat=true - If true, the material will repeat. If false, fragments outside of texCoord 0 - 1 will be discarded.
+ * Works in both "uv" and "projected" modes.
* @example How an entity is sent over the wire.
+ *Value | Description |
---|---|
domain | Domain entities are sent over the entity server to everyone else |
avatar | Avatar entities are sent over the avatar entity and are associated with one avatar |
local | Local entities are not sent over the wire and will only render for you, locally |
true
, or if clientOnly
is set true
in
- * the properties, the entity is created as an avatar entity; otherwise it is created on the server. An avatar entity
+ * @param {EntityHostType} [entityHostType="domain"] - If "avatar"
the entity is created as an avatar entity. An avatar entity
* follows you to each domain you visit, rendering at the same world coordinates unless it's parented to your avatar.
+ * If "local"
, the entity is created as a local entity, which will only render for you and isn't sent over the wire.
+ * Otherwise it is created as a normal entity and sent over the entity server.
* @returns {Uuid} The ID of the entity if successfully created, otherwise {@link Uuid|Uuid.NULL}.
* @example