mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-13 03:52:45 +02:00
Simplify applied transformations in scripts.
This commit is contained in:
parent
743e73874f
commit
987fb56124
2 changed files with 3 additions and 7 deletions
|
@ -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
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue