From d533e3b341c6b657c3386d3a31b68ff0828749d0 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Thu, 9 Aug 2018 17:29:13 -0700 Subject: [PATCH 1/2] adding domainLimitedScale property --- interface/src/avatar/MyAvatar.h | 5 +++-- libraries/avatars/src/AvatarData.h | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/interface/src/avatar/MyAvatar.h b/interface/src/avatar/MyAvatar.h index b34eb4386d..a824da8232 100644 --- a/interface/src/avatar/MyAvatar.h +++ b/interface/src/avatar/MyAvatar.h @@ -143,7 +143,8 @@ class MyAvatar : public Avatar { * registration point of the 3D model. * * @property {Vec3} position - * @property {number} scale + * @property {number} scale - The target scale in which the avatar is set to by the user. + * @property {number} domainLimitedScale - The avatar's scale limited by the domain. * @property {number} density Read-only. * @property {Vec3} handPosition * @property {number} bodyYaw - The rotation left or right about an axis running from the head to the feet of the avatar. @@ -982,7 +983,7 @@ public: /**jsdoc * @function MyAvatar.getAvatarScale - * @returns {number} + * @returns {number} */ Q_INVOKABLE float getAvatarScale(); diff --git a/libraries/avatars/src/AvatarData.h b/libraries/avatars/src/AvatarData.h index 0f850aaf24..72bdda34f3 100644 --- a/libraries/avatars/src/AvatarData.h +++ b/libraries/avatars/src/AvatarData.h @@ -364,6 +364,7 @@ class AvatarData : public QObject, public SpatiallyNestable { // The following properties have JSDoc in MyAvatar.h and ScriptableAvatar.h Q_PROPERTY(glm::vec3 position READ getWorldPosition WRITE setPositionViaScript) Q_PROPERTY(float scale READ getTargetScale WRITE setTargetScale) + Q_PROPERTY(float domainLimitedScale READ getDomainLimitedScale) Q_PROPERTY(float density READ getDensity) Q_PROPERTY(glm::vec3 handPosition READ getHandPosition WRITE setHandPosition) Q_PROPERTY(float bodyYaw READ getBodyYaw WRITE setBodyYaw) From 769e7eab03da9e8a4cc0e2b3317b99ff9cd4a91a Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Thu, 9 Aug 2018 17:38:58 -0700 Subject: [PATCH 2/2] removing domainLimitedScale property and changing read property of scale --- interface/src/avatar/MyAvatar.h | 3 +-- libraries/avatars/src/AvatarData.h | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/interface/src/avatar/MyAvatar.h b/interface/src/avatar/MyAvatar.h index a824da8232..92bb352499 100644 --- a/interface/src/avatar/MyAvatar.h +++ b/interface/src/avatar/MyAvatar.h @@ -143,8 +143,7 @@ class MyAvatar : public Avatar { * registration point of the 3D model. * * @property {Vec3} position - * @property {number} scale - The target scale in which the avatar is set to by the user. - * @property {number} domainLimitedScale - The avatar's scale limited by the domain. + * @property {number} scale - Returns the clamped scale of the avatar. * @property {number} density Read-only. * @property {Vec3} handPosition * @property {number} bodyYaw - The rotation left or right about an axis running from the head to the feet of the avatar. diff --git a/libraries/avatars/src/AvatarData.h b/libraries/avatars/src/AvatarData.h index 72bdda34f3..2eeb5cae2a 100644 --- a/libraries/avatars/src/AvatarData.h +++ b/libraries/avatars/src/AvatarData.h @@ -363,8 +363,7 @@ class AvatarData : public QObject, public SpatiallyNestable { // The following properties have JSDoc in MyAvatar.h and ScriptableAvatar.h Q_PROPERTY(glm::vec3 position READ getWorldPosition WRITE setPositionViaScript) - Q_PROPERTY(float scale READ getTargetScale WRITE setTargetScale) - Q_PROPERTY(float domainLimitedScale READ getDomainLimitedScale) + Q_PROPERTY(float scale READ getDomainLimitedScale WRITE setTargetScale) Q_PROPERTY(float density READ getDensity) Q_PROPERTY(glm::vec3 handPosition READ getHandPosition WRITE setHandPosition) Q_PROPERTY(float bodyYaw READ getBodyYaw WRITE setBodyYaw)