From 08688dc9ed791a72dfe7b60da558b66e5daa0de5 Mon Sep 17 00:00:00 2001 From: Daniela Date: Fri, 8 Sep 2017 17:56:11 +0100 Subject: [PATCH] Refactoring. --- scripts/system/bubble.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/scripts/system/bubble.js b/scripts/system/bubble.js index 7772a52187..6c5714ee07 100644 --- a/scripts/system/bubble.js +++ b/scripts/system/bubble.js @@ -28,7 +28,7 @@ dimensions: { x: 1.0, y: 0.75, z: 1.0 }, position: { x: MyAvatar.position.x, y: -MyAvatar.scale * 2 + MyAvatar.position.y + MyAvatar.scale * BUBBLE_HEIGHT_SCALE, z: MyAvatar.position.z }, //rotation: Quat.fromPitchYawRollDegrees(MyAvatar.bodyPitch, 0, MyAvatar.bodyRoll), - rotation: Quat.multiply(MyAvatar.orientation, Quat.fromVec3Degrees({x: 0.0, y: 180.0, z: 0.0})), + rotation: Quat.multiply(MyAvatar.orientation, Quat.fromVec3Degrees({x: 0.0, y: 180.0, z: 0.0})), scale: { x: 2 * MyAvatar.sensorToWorldScale, y: MyAvatar.scale * 0.5 + 0.2 * MyAvatar.sensorToWorldScale, z: 2 * MyAvatar.sensorToWorldScale }, visible: false, ignoreRayIntersection: true @@ -64,16 +64,16 @@ Overlays.editOverlay(bubbleOverlay, { position: { - x: MyAvatar.position.x, - y: -MyAvatar.scale * 2 + MyAvatar.position.y + MyAvatar.scale * BUBBLE_HEIGHT_SCALE, - z: MyAvatar.position.z - }, + x: MyAvatar.position.x, + y: -MyAvatar.scale * 2 + MyAvatar.position.y + MyAvatar.scale * BUBBLE_HEIGHT_SCALE, + z: MyAvatar.position.z + }, rotation: Quat.multiply(MyAvatar.orientation, Quat.fromVec3Degrees({x: 0.0, y: 180.0, z: 0.0})), scale: { - x: 2 * MyAvatar.sensorToWorldScale, - y: MyAvatar.scale * 0.5 + 0.2 * MyAvatar.sensorToWorldScale, - z: 2 * MyAvatar.sensorToWorldScale - }, + x: 2 * MyAvatar.sensorToWorldScale, + y: MyAvatar.scale * 0.5 + 0.2 * MyAvatar.sensorToWorldScale, + z: 2 * MyAvatar.sensorToWorldScale + }, visible: true }); bubbleOverlayTimestamp = Date.now(); @@ -115,7 +115,7 @@ z: MyAvatar.position.z }, rotation: Quat.multiply(MyAvatar.orientation, Quat.fromVec3Degrees({x: 0.0, y: 180.0, z: 0.0})), - scale: { + scale: { x: 2 * MyAvatar.sensorToWorldScale, y: ((1 - ((BUBBLE_RAISE_ANIMATION_DURATION_MS - delay) / BUBBLE_RAISE_ANIMATION_DURATION_MS)) * MyAvatar.scale * 0.5 + 0.2 * MyAvatar.sensorToWorldScale), z: 2 * MyAvatar.sensorToWorldScale @@ -130,7 +130,7 @@ z: MyAvatar.position.z }, rotation: Quat.multiply(MyAvatar.orientation, Quat.fromVec3Degrees({x: 0.0, y: 180.0, z: 0.0})), - scale: { + scale: { x: 2 * MyAvatar.sensorToWorldScale, y: MyAvatar.scale * 0.5 + 0.2 * MyAvatar.sensorToWorldScale, z: 2 * MyAvatar.sensorToWorldScale