From 4b52c21d1cb24e4e8ecda3d2eb30c42f1553989c Mon Sep 17 00:00:00 2001 From: David Rowe Date: Tue, 20 Mar 2018 09:51:10 +1300 Subject: [PATCH] JSDoc that an entity's clientOnly property can be set at entity creation --- libraries/entities/src/EntityItemProperties.cpp | 7 +++++-- libraries/entities/src/EntityScriptingInterface.h | 6 +++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/libraries/entities/src/EntityItemProperties.cpp b/libraries/entities/src/EntityItemProperties.cpp index d348101b66..a6eea8c892 100644 --- a/libraries/entities/src/EntityItemProperties.cpp +++ b/libraries/entities/src/EntityItemProperties.cpp @@ -451,8 +451,11 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const { * @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 "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. 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.
+ * The value can also be set at entity creation by using the clientOnly parameter in + * {@link Entities.addEntity}. * @property {Uuid} owningAvatarID=Uuid.NULL - The session ID of the owning avatar if clientOnly is * true, otherwise {@link Uuid|Uuid.NULL}. Read-only. * diff --git a/libraries/entities/src/EntityScriptingInterface.h b/libraries/entities/src/EntityScriptingInterface.h index b483225390..9613a7a310 100644 --- a/libraries/entities/src/EntityScriptingInterface.h +++ b/libraries/entities/src/EntityScriptingInterface.h @@ -203,9 +203,9 @@ public slots: * Add a new entity with specified properties. * @function Entities.addEntity * @param {Entities.EntityProperties} properties - The properties of the entity to create. - * @param {boolean} [clientOnly=false] - If true, the entity is created as an avatar entity, otherwise it - * is created on the server. An avatar entity follows you to each domain you visit, rendering at the same world - * coordinates unless it's parented to your avatar. + * @param {boolean} [clientOnly=false] - If 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 + * follows you to each domain you visit, rendering at the same world coordinates unless it's parented to your avatar. * @returns {Uuid} The ID of the entity if successfully created, otherwise {@link Uuid|Uuid.NULL}. * @example Create a box entity in front of your avatar. * var entityID = Entities.addEntity({