From 987fb561249d8194e834cfc586c6743cc1d7d08f Mon Sep 17 00:00:00 2001 From: Zander Otavka Date: Fri, 7 Aug 2015 11:51:22 -0700 Subject: [PATCH] Simplify applied transformations in scripts. --- examples/controlPanel.js | 5 ++--- examples/example/ui/overlayPanelExample.js | 5 +---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/examples/controlPanel.js b/examples/controlPanel.js index 3561bdfcb4..76fbd49577 100644 --- a/examples/controlPanel.js +++ b/examples/controlPanel.js @@ -24,8 +24,7 @@ var ADDRESS_BAR_IMAGE_URL = HIFI_PUBLIC_BUCKET + "images/tools/address-bar-toggl var panel = new OverlayPanel({ anchorPositionBinding: { avatar: "MyAvatar" }, - offsetPosition: { x: 0, y: 0.4, z: 1 }, - offsetRotation: { w: 0, x: 0, y: 1, z: 0 }, + offsetPosition: { x: 0, y: 0.4, z: -1 }, visible: false }); @@ -210,7 +209,7 @@ function onMouseUp(event) { if (event.isRightButton && mouseDown.maxDistance < 10) { panel.setProperties({ visible: !panel.visible, - anchorRotation: Quat.multiply(MyAvatar.orientation, { x: 0, y: 1, z: 0, w: 0 }) + anchorRotation: MyAvatar.orientation }); } diff --git a/examples/example/ui/overlayPanelExample.js b/examples/example/ui/overlayPanelExample.js index e3c66dd532..c27123c9ad 100644 --- a/examples/example/ui/overlayPanelExample.js +++ b/examples/example/ui/overlayPanelExample.js @@ -20,10 +20,7 @@ var BLUE_SQUARE_IMAGE_URL = HIFI_PUBLIC_BUCKET + "images/blue-square.svg"; var mainPanel = new OverlayPanel({ anchorPositionBinding: { avatar: "MyAvatar" }, - anchorPosition: { x: 0, y: 0, z: 0 }, - anchorRotation: { w: 1, x: 0, y: 0, z: 0 }, - offsetPosition: { x: 0, y: 0.4, z: 1 }, - offsetRotation: { w: 0, x: 0, y: 1, z: 0 }, + offsetPosition: { x: 0, y: 0.4, z: -1 }, isFacingAvatar: false });