Merge conflicts
21
interface/resources/icons/tablet-icons/EmoteAppIcon.svg
Normal file
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 22.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 100 100.8" style="enable-background:new 0 0 100 100.8;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#FFFFFF;}
|
||||
</style>
|
||||
<path class="st0" d="M26.7,83.9c7.3,1.2,14.8,1.8,22.1,1.8c0.4,0,0.8,0,1.2,0c7.8-0.1,15.6-0.8,23.4-2.2l0,0
|
||||
c5.7-1.1,11.3-6.6,12.5-12.3C87.3,64.2,88,57,88,50s-0.7-14.2-2.1-21.2c-1.2-5.6-6.8-11.1-12.5-12.2c-7.7-1.4-15.6-2.2-23.4-2.2
|
||||
c-7.7-0.1-15.6,0.5-23.4,1.8c-5.7,1-11.4,6.5-12.6,12.3c-1.4,7.2-2.1,14.4-2.1,21.6s0.7,14.4,2.1,21.7
|
||||
C15.3,77.4,20.9,82.9,26.7,83.9z M20.9,29.8c0.6-2.9,4-6.3,6.9-6.8c7-1.1,14-1.7,21-1.7c0.4,0,0.8,0,1.2,0
|
||||
c7.4,0.1,14.8,0.8,22.1,2.1c2.9,0.6,6.4,3.9,6.9,6.7c1.3,6.6,1.9,13.3,1.9,19.9c0,6.6-0.6,13.3-1.9,19.8c-0.6,2.8-4,6.2-6.9,6.8
|
||||
c-7.3,1.3-14.8,2.1-22.1,2.1c-7.4,0.1-14.8-0.5-22.1-1.7c-2.9-0.5-6.3-3.9-6.9-6.7c-1.3-6.7-2-13.5-2-20.3
|
||||
C19,43.3,19.6,36.4,20.9,29.8z"/>
|
||||
<path class="st0" d="M32.3,61.4c-0.5,1.3-0.1,2.8,0.9,3.8c0.3,0.3,7.2,6.6,15.9,6.6c0.8,0,1.7-0.1,2.6-0.2
|
||||
c9.8-1.5,15.5-11.1,15.8-11.5c0.7-1.2,0.6-2.8-0.2-3.9c-0.9-1.1-2.3-1.6-3.7-1.3c-9.2,2.5-18.6,3.9-28.1,4.2
|
||||
C34,59.1,32.8,60,32.3,61.4z"/>
|
||||
<circle class="st0" cx="36.5" cy="42.8" r="9"/>
|
||||
<path class="st0" d="M61.4,44.1h6.1c1.9,0,3.3-1.5,3.3-3.3c0-1.9-1.5-3.3-3.3-3.3h-6.1c-1.9,0-3.3,1.5-3.3,3.3
|
||||
C58.1,42.7,59.6,44.1,61.4,44.1z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 1.5 KiB |
BIN
interface/resources/images/preview-privacy.png
Normal file
After Width: | Height: | Size: 52 KiB |
|
@ -23,11 +23,14 @@ TextField {
|
|||
property bool isSearchField: false
|
||||
property string label: ""
|
||||
property real controlHeight: height + (textFieldLabel.visible ? textFieldLabel.height + 1 : 0)
|
||||
property bool hasDefocusedBorder: true;
|
||||
property bool hasRoundedBorder: false
|
||||
property int roundedBorderRadius: 4
|
||||
property bool error: false;
|
||||
property bool hasClearButton: false;
|
||||
property alias textColor: textField.color
|
||||
property string leftPlaceholderGlyph: "";
|
||||
property string leftPermanentGlyph: "";
|
||||
property string centerPlaceholderGlyph: "";
|
||||
|
||||
FontLoader { id: firaSansSemiBold; source: "../../fonts/FiraSans-SemiBold.ttf"; }
|
||||
FontLoader { id: hifiGlyphs; source: "../../fonts/hifi-glyphs.ttf"; }
|
||||
|
@ -113,12 +116,12 @@ TextField {
|
|||
}
|
||||
}
|
||||
border.color: textField.error ? hifi.colors.redHighlight :
|
||||
(textField.activeFocus ? hifi.colors.primaryHighlight : (isFaintGrayColorScheme ? hifi.colors.lightGrayText : hifi.colors.lightGray))
|
||||
(textField.activeFocus ? hifi.colors.primaryHighlight : (hasDefocusedBorder ? (isFaintGrayColorScheme ? hifi.colors.lightGrayText : hifi.colors.lightGray) : color))
|
||||
border.width: textField.activeFocus || hasRoundedBorder || textField.error ? 1 : 0
|
||||
radius: isSearchField ? textField.height / 2 : (hasRoundedBorder ? 4 : 0)
|
||||
radius: isSearchField ? textField.height / 2 : (hasRoundedBorder ? roundedBorderRadius : 0)
|
||||
|
||||
HiFiGlyphs {
|
||||
text: textField.leftPlaceholderGlyph;
|
||||
text: textField.leftPermanentGlyph;
|
||||
color: textColor;
|
||||
size: hifi.fontSizes.textFieldSearchIcon;
|
||||
anchors.left: parent.left;
|
||||
|
@ -128,6 +131,15 @@ TextField {
|
|||
}
|
||||
|
||||
HiFiGlyphs {
|
||||
text: textField.centerPlaceholderGlyph;
|
||||
color: textColor;
|
||||
size: parent.height;
|
||||
anchors.horizontalCenter: parent.horizontalCenter;
|
||||
anchors.verticalCenter: parent.verticalCenter;
|
||||
visible: text && !textField.focus && textField.text === "";
|
||||
}
|
||||
|
||||
HiFiGlyphs {
|
||||
text: hifi.glyphs.search
|
||||
color: textColor
|
||||
size: hifi.fontSizes.textFieldSearchIcon
|
||||
|
@ -158,7 +170,7 @@ TextField {
|
|||
property color placeholderTextColor: isFaintGrayColorScheme ? hifi.colors.lightGrayText : hifi.colors.lightGray
|
||||
selectedTextColor: hifi.colors.black
|
||||
selectionColor: hifi.colors.primaryHighlight
|
||||
leftPadding: (isSearchField ? textField.height - 2 : 0) + hifi.dimensions.textPadding
|
||||
leftPadding: hasRoundedBorder ? textField.height / 2 : ((isSearchField || textField.leftPermanentGlyph !== "") ? textField.height - 2 : 0) + hifi.dimensions.textPadding
|
||||
rightPadding: (hasClearButton ? textField.height - 2 : 0) + hifi.dimensions.textPadding
|
||||
|
||||
|
||||
|
|
|
@ -388,7 +388,7 @@ Rectangle {
|
|||
//
|
||||
Item {
|
||||
id: tabButtonsContainer;
|
||||
visible: !needsLogIn.visible && root.activeView !== "passphraseChange" && root.activeView !== "securityImageChange";
|
||||
visible: !needsLogIn.visible && root.activeView !== "passphraseChange" && root.activeView !== "securityImageChange" && sendMoney.currentActiveView !== "sendMoneyStep";
|
||||
property int numTabs: 5;
|
||||
// Size
|
||||
width: root.width;
|
||||
|
|
|
@ -29,13 +29,13 @@ Item {
|
|||
property string userName;
|
||||
property string profilePicUrl;
|
||||
|
||||
height: 65;
|
||||
height: 75;
|
||||
width: parent.width;
|
||||
|
||||
Rectangle {
|
||||
id: mainContainer;
|
||||
// Style
|
||||
color: root.isSelected ? hifi.colors.faintGray : hifi.colors.white;
|
||||
color: root.isSelected ? hifi.colors.faintGray80 : hifi.colors.white;
|
||||
// Size
|
||||
anchors.left: parent.left;
|
||||
anchors.right: parent.right;
|
||||
|
@ -49,7 +49,7 @@ Item {
|
|||
anchors.verticalCenter: parent.verticalCenter;
|
||||
anchors.left: parent.left;
|
||||
anchors.leftMargin: 36;
|
||||
height: root.height - 15;
|
||||
height: 50;
|
||||
width: visible ? height : 0;
|
||||
clip: true;
|
||||
Image {
|
||||
|
@ -83,15 +83,15 @@ Item {
|
|||
RalewaySemiBold {
|
||||
id: userName;
|
||||
anchors.left: avatarImage.right;
|
||||
anchors.leftMargin: 16;
|
||||
anchors.leftMargin: 12;
|
||||
anchors.top: parent.top;
|
||||
anchors.bottom: parent.bottom;
|
||||
anchors.right: chooseButton.visible ? chooseButton.left : parent.right;
|
||||
anchors.rightMargin: chooseButton.visible ? 10 : 0;
|
||||
// Text size
|
||||
size: 20;
|
||||
size: 18;
|
||||
// Style
|
||||
color: hifi.colors.baseGray;
|
||||
color: hifi.colors.blueAccent;
|
||||
text: root.userName;
|
||||
elide: Text.ElideRight;
|
||||
// Alignment
|
||||
|
@ -107,9 +107,9 @@ Item {
|
|||
colorScheme: hifi.colorSchemes.dark;
|
||||
anchors.verticalCenter: parent.verticalCenter;
|
||||
anchors.right: parent.right;
|
||||
anchors.rightMargin: 24;
|
||||
height: root.height - 20;
|
||||
width: 110;
|
||||
anchors.rightMargin: 28;
|
||||
height: 35;
|
||||
width: 100;
|
||||
text: "CHOOSE";
|
||||
onClicked: {
|
||||
var msg = { method: 'chooseConnection', userName: root.userName, profilePicUrl: root.profilePicUrl };
|
||||
|
|
|
@ -29,6 +29,7 @@ Item {
|
|||
property string displayName;
|
||||
property string userName;
|
||||
property string profilePic;
|
||||
property string textColor: hifi.colors.white;
|
||||
|
||||
Item {
|
||||
visible: root.isDisplayingNearby;
|
||||
|
@ -46,7 +47,7 @@ Item {
|
|||
// Text size
|
||||
size: 18;
|
||||
// Style
|
||||
color: hifi.colors.baseGray;
|
||||
color: root.textColor;
|
||||
verticalAlignment: Text.AlignBottom;
|
||||
elide: Text.ElideRight;
|
||||
}
|
||||
|
@ -63,7 +64,7 @@ Item {
|
|||
// Text size
|
||||
size: 16;
|
||||
// Style
|
||||
color: hifi.colors.baseGray;
|
||||
color: root.textColor;
|
||||
verticalAlignment: Text.AlignTop;
|
||||
elide: Text.ElideRight;
|
||||
}
|
||||
|
@ -108,7 +109,7 @@ Item {
|
|||
// Text size
|
||||
size: 16;
|
||||
// Style
|
||||
color: hifi.colors.baseGray;
|
||||
color: root.textColor;
|
||||
verticalAlignment: Text.AlignVCenter;
|
||||
elide: Text.ElideRight;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#1398BB;}
|
||||
</style>
|
||||
<path class="st0" d="M256.8,42C138.5,42,42.2,138.3,42.2,256.6s96.3,214.6,214.6,214.6c118.3,0,214.6-96.3,214.6-214.6
|
||||
S375.1,42,256.8,42z M256.8,444.4C153.2,444.4,69,360.1,69,256.6C69,153,153.2,68.7,256.8,68.7c103.6,0,187.8,84.3,187.8,187.8
|
||||
C444.6,360.1,360.4,444.4,256.8,444.4z"/>
|
||||
<circle class="st0" cx="260.6" cy="189.4" r="60.6"/>
|
||||
<path class="st0" d="M306.4,282.6h-87.6c-36.5,0-66.4,30.2-66.4,66.7v33.9c29.3,22.6,65.4,36.1,105,36.1c44.4,0,84.7-17,115.2-44.7
|
||||
v-25.3C372.7,312.7,342.9,282.6,306.4,282.6z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 921 B |
After Width: | Height: | Size: 58 KiB |
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#1398BB;}
|
||||
</style>
|
||||
<path class="st0" d="M144.3,155c-8.7-8.8-16.7-17.1-25.2-25.7c-22.4,25.4-36.6,53.9-43.6,86.2c-26.9,125.7,81.2,241.5,208.6,223.4
|
||||
C385.9,424.4,458,329.2,443.5,228.2c-4.4-30.6-15.4-58.9-34.1-83.9c-1.6-2.2-3.3-4.3-4.7-6.6c-4.4-7.4-3.1-14.9,3-19.5
|
||||
c6-4.5,14.2-3.6,19.2,3.5c8.2,11.7,16.6,23.4,22.9,36.1c41.9,84.9,25.7,181.7-41,248.7c-67,67.4-175.1,81.3-257.1,33.3
|
||||
c-35.3-20.7-63.1-48.6-82.7-84.5c-41-75-31.5-172.5,23.4-237.9c2.2-2.7,4.4-5.4,7.1-8.7c-8.1-8.5-16.1-16.9-24-25.3
|
||||
c-7.2-7.7-7.9-16.1-1.9-22.1c5.9-5.9,15-5.1,22.1,2.4c56.8,59.5,113.6,119,170.4,178.6c7.2,7.6,7.8,15.4,1.9,21.4
|
||||
c-6.1,6.2-14.7,5.5-22-2c-10.2-10.4-20.2-21-30.3-31.5c-17.4,24.7-3.3,62,27.2,72.5c23,7.9,48.8-2,60.7-23.1
|
||||
c1.2-2.1,2.3-4.3,3.7-6.3c4.5-6.6,11.7-8.6,18.3-5c6.6,3.5,8.9,10.5,5.9,18.1c-12.4,31.6-47.9,52.2-82.3,47.7
|
||||
c-36.1-4.8-64.3-32.6-68.4-67.7c-2.4-20.7,2.4-39.7,14.9-57.5c-10.4-10.9-20.8-21.6-31.7-33c-9.7,10.8-16.2,22.7-20.9,35.7
|
||||
c-31.3,86.4,38.9,175.1,130.1,164.3c74-8.7,122.3-80.9,103.3-154.3c-3.4-13.1-1-20.2,7.8-22.7c9.5-2.8,15.2,1.8,19.2,15.4
|
||||
c20.1,67.4-16,144.8-79.8,175.3c-67.5,32.2-147.5,9.7-188.8-49c-37.8-53.8-36.1-127.7,4.7-179.1C141.2,159.4,142.5,157.4,144.3,155z
|
||||
"/>
|
||||
<path class="st0" d="M236.2,262.2c-4.2-13.6,3.4-28.2,16.8-32.4c13.5-4.2,28.1,3.3,32.5,16.8c4.5,13.9-3.1,28.4-17.2,32.7
|
||||
C254.6,283.5,240.4,275.9,236.2,262.2z"/>
|
||||
<path class="st0" d="M319.6,101.9c-3.7-11,1.8-22.3,12.7-26c11.3-3.9,22.8,1.9,26.4,13.2c3.5,11-2.3,22.2-13.2,25.8
|
||||
C334.5,118.5,323.3,112.9,319.6,101.9z"/>
|
||||
<path class="st0" d="M214.9,66.2c3.2,10.2-2.2,20.5-12.5,23.6c-9.8,3-20-2.3-23.3-12c-3.3-9.9,2.2-20.8,12-24
|
||||
C201.1,50.5,211.8,56.2,214.9,66.2z"/>
|
||||
<path class="st0" d="M230.8,164.6c-3.7-11,1.8-22.3,12.7-26c11.3-3.9,22.8,1.9,26.4,13.2c3.5,11-2.3,22.2-13.2,25.8
|
||||
C245.7,181.2,234.5,175.6,230.8,164.6z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 2.1 KiB |
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 143.1 414.2" style="enable-background:new 0 0 143.1 414.2;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#B9B9B9;}
|
||||
.st1{fill:#EE982D;}
|
||||
.st2{fill:#FF630A;}
|
||||
</style>
|
||||
<path class="st0" d="M78.8,7.1c3.9,4.3,7.7,8.7,11.8,12.9c3.7,3.8,5.1,7.9,4.4,12.9c-1,7.1-1.8,14-7.1,20.1
|
||||
c-4.2,4.7-1.3,12,4.6,14.5c5.6,2.3,11.1,4.6,16.7,7c8.1,3.5,12.3,9.6,13.2,17.4c0.8,6.3,0.8,12.6,1.2,18.9c0.1,2.2,0.3,4.3,0.7,6.4
|
||||
c0.3,2.2,1.9,4.4-1.3,6.1c-0.6,0.3-0.6,2.2-0.3,3.3c5.4,25.1-0.3,49.7-4.9,74.3c-1.2,6.3-3.1,12-5.5,17.9
|
||||
c-2.3,5.5-0.9,12.4-0.4,18.7c0.6,7.8,2,15.5,3.2,23.7c-2.5,0.5-4.5,1.4-6.3,1.2c-6.1-0.5-6.8,2.6-6.4,6.7c0.7,6.6,1.1,13.3,2.4,19.8
|
||||
c0.6,3.3,3.5,6.1,4.5,9.4c5,15.6,1.1,30.9-1.3,46.5c-1.7,10.6-0.6,21.5-1.5,32.2c-0.5,6.5-1.5,13.3-4,19.4c-2.2,5.4-9,3.9-14.1,4
|
||||
c-2.8,0.1-5.6-0.3-8.2-1.1c-1.2-0.3-2.6-2.2-2.5-3.3c0.1-1.9,0.7-4.1,1.9-5.7c11.5-16,9.1-33.7,8.2-51.2c-0.5-9.8-1.6-19.6-2.9-29.3
|
||||
c-1.2-8.8-3.1-17.5-5-26.2c-1.2-5.5-3.4-10.9-4.4-16.5c-0.8-3.9-2.4-5.3-7.4-3.8c-0.5,8.5-3.1,17.7-0.9,25.9
|
||||
c2.7,10.1,4.5,20,3.3,30.2c-1,8.8-2.9,17.5-3.9,26.2c-0.7,6.6-1.1,13,1.7,19.8c2.4,5.9,0.6,13.1,0.3,19.7c0,0.9-2.1,2.3-3.4,2.5
|
||||
c-4.8,0.7-9.8,0.8-14.5,1.6c-5.1,0.9-9.9,3-15,3.6c-5.7,0.6-11.5,0.1-17.3,0.1c-2.4-4,0-6.2,3.2-8.4c6.9-4.5,13.7-9,20.5-13.6
|
||||
c6.4-4.4,7.5-10.2,6.6-17.1c-2.1-17.2-6.4-34.1-5.2-51.6c0.8-11.3-0.7-22.5-4.2-33.5c-1.7-5.2-3.4-9.1-10.4-7.8
|
||||
c-0.4-0.8-0.9-1.2-0.9-1.7c-0.4-17.6-1.7-35.3-0.9-52.9c0.6-12.6,3.9-25,6-37.5c0.1-0.6,0.9-1.5,0.7-1.8c-5-8,2.9-15.7,0.6-23.9
|
||||
c-2.2-8-3.5-16.4-3.7-24.6c-0.2-6.9,2.3-13.8,2.8-20.7c0.8-12.2,8.8-18.8,20.6-23c7.3-2.6,9.1-5.2,8.2-11.3c-0.1-1.1-0.6-2.7-1.4-3
|
||||
c-10-4.1-8.9-12.3-9.9-19.9c-0.9-7.2-2.7-14.2-3.6-21.4c-0.3-2.9,0.2-5.9,3.6-8.1c6.4-4,13.1-5.3,20.7-3.4
|
||||
C73.7,8.3,76.3,7.4,78.8,7.1z M107.1,130.2c-1,0-2,0.1-3.1,0.1c0,3.1-0.2,6.1,0,9.2c0.7,9.3,5.9,19-2.4,27.7
|
||||
c-0.2,0.2-0.2,0.6-0.1,0.9c1.9,7.2,3.8,14.5,5.6,21.7c0.7-0.1,1.4-0.1,2.1-0.2C108.5,169.9,107.8,150,107.1,130.2z"/>
|
||||
<circle class="st1" cx="70.9" cy="109.9" r="26"/>
|
||||
<circle class="st2" cx="70.9" cy="109.9" r="19"/>
|
||||
</svg>
|
After Width: | Height: | Size: 2.3 KiB |
|
@ -0,0 +1,30 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 143.1 414.2" style="enable-background:new 0 0 143.1 414.2;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#B9B9B9;}
|
||||
.st1{fill:#009175;}
|
||||
.st2{fill:#1FC6A6;}
|
||||
.st3{fill:#FFFFFF;}
|
||||
</style>
|
||||
<path class="st0" d="M78.8,7.1c3.9,4.3,7.7,8.7,11.8,12.9c3.7,3.8,5.1,7.9,4.4,12.9c-1,7.1-1.8,14-7.1,20.1
|
||||
c-4.2,4.7-1.3,12,4.6,14.5c5.6,2.3,11.1,4.6,16.7,7c8.1,3.5,12.3,9.6,13.2,17.4c0.8,6.3,0.8,12.6,1.2,18.9c0.1,2.2,0.3,4.3,0.7,6.4
|
||||
c0.3,2.2,1.9,4.4-1.3,6.1c-0.6,0.3-0.6,2.2-0.3,3.3c5.4,25.1-0.3,49.7-4.9,74.3c-1.2,6.3-3.1,12-5.5,17.9
|
||||
c-2.3,5.5-0.9,12.4-0.4,18.7c0.6,7.8,2,15.5,3.2,23.7c-2.5,0.5-4.5,1.4-6.3,1.2c-6.1-0.5-6.8,2.6-6.4,6.7c0.7,6.6,1.1,13.3,2.4,19.8
|
||||
c0.6,3.3,3.5,6.1,4.5,9.4c5,15.6,1.1,30.9-1.3,46.5c-1.7,10.6-0.6,21.5-1.5,32.2c-0.5,6.5-1.5,13.3-4,19.4c-2.2,5.4-9,3.9-14.1,4
|
||||
c-2.8,0.1-5.6-0.3-8.2-1.1c-1.2-0.3-2.6-2.2-2.5-3.3c0.1-1.9,0.7-4.1,1.9-5.7c11.5-16,9.1-33.7,8.2-51.2c-0.5-9.8-1.6-19.6-2.9-29.3
|
||||
c-1.2-8.8-3.1-17.5-5-26.2c-1.2-5.5-3.4-10.9-4.4-16.5c-0.8-3.9-2.4-5.3-7.4-3.8c-0.5,8.5-3.1,17.7-0.9,25.9
|
||||
c2.7,10.1,4.5,20,3.3,30.2c-1,8.8-2.9,17.5-3.9,26.2c-0.7,6.6-1.1,13,1.7,19.8c2.4,5.9,0.6,13.1,0.3,19.7c0,0.9-2.1,2.3-3.4,2.5
|
||||
c-4.8,0.7-9.8,0.8-14.5,1.6c-5.1,0.9-9.9,3-15,3.6c-5.7,0.6-11.5,0.1-17.3,0.1c-2.4-4,0-6.2,3.2-8.4c6.9-4.5,13.7-9,20.5-13.6
|
||||
c6.4-4.4,7.5-10.2,6.6-17.1c-2.1-17.2-6.4-34.1-5.2-51.6c0.8-11.3-0.7-22.5-4.2-33.5c-1.7-5.2-3.4-9.1-10.4-7.8
|
||||
c-0.4-0.8-0.9-1.2-0.9-1.7c-0.4-17.6-1.7-35.3-0.9-52.9c0.6-12.6,3.9-25,6-37.5c0.1-0.6,0.9-1.5,0.7-1.8c-5-8,2.9-15.7,0.6-23.9
|
||||
c-2.2-8-3.5-16.4-3.7-24.6c-0.2-6.9,2.3-13.8,2.8-20.7c0.8-12.2,8.8-18.8,20.6-23c7.3-2.6,9.1-5.2,8.2-11.3c-0.1-1.1-0.6-2.7-1.4-3
|
||||
c-10-4.1-8.9-12.3-9.9-19.9c-0.9-7.2-2.7-14.2-3.6-21.4c-0.3-2.9,0.2-5.9,3.6-8.1c6.4-4,13.1-5.3,20.7-3.4
|
||||
C73.7,8.3,76.3,7.4,78.8,7.1z M107.1,130.2c-1,0-2,0.1-3.1,0.1c0,3.1-0.2,6.1,0,9.2c0.7,9.3,5.9,19-2.4,27.7
|
||||
c-0.2,0.2-0.2,0.6-0.1,0.9c1.9,7.2,3.8,14.5,5.6,21.7c0.7-0.1,1.4-0.1,2.1-0.2C108.5,169.9,107.8,150,107.1,130.2z"/>
|
||||
<circle class="st1" cx="70.9" cy="109.9" r="26"/>
|
||||
<circle class="st2" cx="70.9" cy="109.9" r="23"/>
|
||||
<path class="st3" d="M70.9,127.8c-9.9,0-17.9-8-17.9-17.9s8-17.9,17.9-17.9s17.9,8,17.9,17.9S80.7,127.8,70.9,127.8z M70.9,94.8
|
||||
c-8.3,0-15.1,6.8-15.1,15.1s6.8,15.1,15.1,15.1S86,118.3,86,109.9S79.2,94.8,70.9,94.8z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 2.5 KiB |
|
@ -209,6 +209,7 @@
|
|||
#include "commerce/QmlCommerce.h"
|
||||
|
||||
#include "webbrowser/WebBrowserSuggestionsEngine.h"
|
||||
#include <DesktopPreviewProvider.h>
|
||||
|
||||
// On Windows PC, NVidia Optimus laptop, we want to enable NVIDIA GPU
|
||||
// FIXME seems to be broken.
|
||||
|
@ -631,6 +632,7 @@ bool setupEssentials(int& argc, char** argv, bool runningMarkerExisted) {
|
|||
DependencyManager::set<PointerScriptingInterface>();
|
||||
DependencyManager::set<PickScriptingInterface>();
|
||||
DependencyManager::set<Cursor::Manager>();
|
||||
DependencyManager::set<DesktopPreviewProvider>();
|
||||
DependencyManager::set<AccountManager>(std::bind(&Application::getUserAgent, qApp));
|
||||
DependencyManager::set<StatTracker>();
|
||||
DependencyManager::set<ScriptEngines>(ScriptEngine::CLIENT_SCRIPT);
|
||||
|
@ -5763,6 +5765,7 @@ void Application::registerScriptEngineWithApplicationServices(ScriptEnginePointe
|
|||
scriptEngine->registerFunction("OverlayWindow", QmlWindowClass::constructor);
|
||||
|
||||
scriptEngine->registerGlobalObject("Menu", MenuScriptingInterface::getInstance());
|
||||
scriptEngine->registerGlobalObject("DesktopPreviewProvider", DependencyManager::get<DesktopPreviewProvider>().data());
|
||||
scriptEngine->registerGlobalObject("Stats", Stats::getInstance());
|
||||
scriptEngine->registerGlobalObject("Settings", SettingsScriptingInterface::getInstance());
|
||||
scriptEngine->registerGlobalObject("Snapshot", DependencyManager::get<Snapshot>().data());
|
||||
|
|
|
@ -175,4 +175,8 @@ QVariantMap PointerScriptingInterface::getPrevPickResult(unsigned int uid) const
|
|||
result = pickResult->toVariantMap();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
void PointerScriptingInterface::setDoesHover(unsigned int uid, bool hover) const {
|
||||
DependencyManager::get<PointerManager>()->setDoesHover(uid, hover);
|
||||
}
|
||||
|
|
|
@ -202,6 +202,14 @@ public:
|
|||
*/
|
||||
Q_INVOKABLE void setLockEndUUID(unsigned int uid, const QUuid& objectID, bool isOverlay, const glm::mat4& offsetMat = glm::mat4()) const { DependencyManager::get<PointerManager>()->setLockEndUUID(uid, objectID, isOverlay, offsetMat); }
|
||||
|
||||
/**jsdoc
|
||||
* Sets whether or not a pointer should generate hover events.
|
||||
* @function Pointers.setDoesHover
|
||||
* @param {boolean} uid - The ID of the Pointer, as returned by {@link Pointers.createPointer}.
|
||||
* @param {boolean} hover - If <code>true</code> then the pointer generates hover events, otherwise it does not.
|
||||
*/
|
||||
Q_INVOKABLE void setDoesHover(unsigned int uid, bool hove) const;
|
||||
|
||||
/**jsdoc
|
||||
* Check if a Pointer is associated with the left hand.
|
||||
* @function Pointers.isLeftHand
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include "../Logging.h"
|
||||
#include "../CompositorHelper.h"
|
||||
|
||||
#include "DesktopPreviewProvider.h"
|
||||
#include "render-utils/hmd_ui_vert.h"
|
||||
#include "render-utils/hmd_ui_frag.h"
|
||||
|
||||
|
@ -254,17 +255,9 @@ void HmdDisplayPlugin::internalPresent() {
|
|||
swapBuffers();
|
||||
|
||||
} else if (_clearPreviewFlag) {
|
||||
QImage image;
|
||||
if (_vsyncEnabled) {
|
||||
image = QImage(PathUtils::resourcesPath() + "images/preview.png");
|
||||
} else {
|
||||
image = QImage(PathUtils::resourcesPath() + "images/preview-disabled.png");
|
||||
}
|
||||
|
||||
image = image.mirrored();
|
||||
image = image.convertToFormat(QImage::Format_RGBA8888);
|
||||
if (!_previewTexture) {
|
||||
_previewTexture = gpu::Texture::createStrict(
|
||||
QImage image = DesktopPreviewProvider::getInstance()->getPreviewDisabledImage(_vsyncEnabled);
|
||||
_previewTexture = gpu::Texture::createStrict(
|
||||
gpu::Element(gpu::VEC4, gpu::NUINT8, gpu::RGBA),
|
||||
image.width(), image.height(),
|
||||
gpu::Texture::MAX_NUM_MIPS,
|
||||
|
@ -274,7 +267,6 @@ void HmdDisplayPlugin::internalPresent() {
|
|||
_previewTexture->setStoredMipFormat(gpu::Element(gpu::VEC4, gpu::NUINT8, gpu::RGBA));
|
||||
_previewTexture->assignStoredMip(0, image.byteCount(), image.constBits());
|
||||
_previewTexture->setAutoGenerateMips(true);
|
||||
}
|
||||
|
||||
auto viewport = getViewportForSourceSize(uvec2(_previewTexture->getDimensions()));
|
||||
|
||||
|
|
|
@ -1394,8 +1394,14 @@ void ModelEntityRenderer::doRenderUpdateSynchronousTyped(const ScenePointer& sce
|
|||
// That is where _currentFrame and _lastAnimated were updated.
|
||||
if (_animating) {
|
||||
DETAILED_PROFILE_RANGE(simulation_physics, "Animate");
|
||||
|
||||
if (!jointsMapped()) {
|
||||
mapJoints(entity, model->getJointNames());
|
||||
//else the joint have been mapped before but we have a new animation to load
|
||||
} else if (_animation && (_animation->getURL().toString() != entity->getAnimationURL())) {
|
||||
_animation = DependencyManager::get<AnimationCache>()->getAnimation(entity->getAnimationURL());
|
||||
_jointMappingCompleted = false;
|
||||
mapJoints(entity, model->getJointNames());
|
||||
}
|
||||
if (!(entity->getAnimationFirstFrame() < 0) && !(entity->getAnimationFirstFrame() > entity->getAnimationLastFrame())) {
|
||||
animate(entity);
|
||||
|
|
|
@ -368,6 +368,7 @@ public:
|
|||
void* getPhysicsInfo() const { return _physicsInfo; }
|
||||
|
||||
void setPhysicsInfo(void* data) { _physicsInfo = data; }
|
||||
|
||||
EntityTreeElementPointer getElement() const { return _element; }
|
||||
EntityTreePointer getTree() const;
|
||||
virtual SpatialParentTree* getParentTree() const override;
|
||||
|
|
|
@ -256,25 +256,32 @@ void EntityMotionState::setWorldTransform(const btTransform& worldTrans) {
|
|||
assert(_entity);
|
||||
assert(entityTreeIsLocked());
|
||||
measureBodyAcceleration();
|
||||
bool positionSuccess;
|
||||
_entity->setWorldPosition(bulletToGLM(worldTrans.getOrigin()) + ObjectMotionState::getWorldOffset(), positionSuccess, false);
|
||||
if (!positionSuccess) {
|
||||
static QString repeatedMessage =
|
||||
LogHandler::getInstance().addRepeatedMessageRegex("EntityMotionState::setWorldTransform "
|
||||
"setPosition failed.*");
|
||||
qCDebug(physics) << "EntityMotionState::setWorldTransform setPosition failed" << _entity->getID();
|
||||
|
||||
// If transform or velocities are flagged as dirty it means a network or scripted change
|
||||
// occured between the beginning and end of the stepSimulation() and we DON'T want to apply
|
||||
// these physics simulation results.
|
||||
uint32_t flags = _entity->getDirtyFlags() & (Simulation::DIRTY_TRANSFORM | Simulation::DIRTY_VELOCITIES);
|
||||
if (!flags) {
|
||||
// flags are clear
|
||||
_entity->setWorldTransform(bulletToGLM(worldTrans.getOrigin()), bulletToGLM(worldTrans.getRotation()));
|
||||
_entity->setWorldVelocity(getBodyLinearVelocity());
|
||||
_entity->setWorldAngularVelocity(getBodyAngularVelocity());
|
||||
_entity->setLastSimulated(usecTimestampNow());
|
||||
} else {
|
||||
// only set properties NOT flagged
|
||||
if (!(flags & Simulation::DIRTY_TRANSFORM)) {
|
||||
_entity->setWorldTransform(bulletToGLM(worldTrans.getOrigin()), bulletToGLM(worldTrans.getRotation()));
|
||||
}
|
||||
if (!(flags & Simulation::DIRTY_LINEAR_VELOCITY)) {
|
||||
_entity->setWorldVelocity(getBodyLinearVelocity());
|
||||
}
|
||||
if (!(flags & Simulation::DIRTY_ANGULAR_VELOCITY)) {
|
||||
_entity->setWorldAngularVelocity(getBodyAngularVelocity());
|
||||
}
|
||||
if (flags != (Simulation::DIRTY_TRANSFORM | Simulation::DIRTY_VELOCITIES)) {
|
||||
_entity->setLastSimulated(usecTimestampNow());
|
||||
}
|
||||
}
|
||||
bool orientationSuccess;
|
||||
_entity->setWorldOrientation(bulletToGLM(worldTrans.getRotation()), orientationSuccess, false);
|
||||
if (!orientationSuccess) {
|
||||
static QString repeatedMessage =
|
||||
LogHandler::getInstance().addRepeatedMessageRegex("EntityMotionState::setWorldTransform "
|
||||
"setOrientation failed.*");
|
||||
qCDebug(physics) << "EntityMotionState::setWorldTransform setOrientation failed" << _entity->getID();
|
||||
}
|
||||
_entity->setVelocity(getBodyLinearVelocity());
|
||||
_entity->setAngularVelocity(getBodyAngularVelocity());
|
||||
_entity->setLastSimulated(usecTimestampNow());
|
||||
|
||||
if (_entity->getSimulatorID().isNull()) {
|
||||
_loopsWithoutOwner++;
|
||||
|
@ -530,9 +537,7 @@ void EntityMotionState::sendUpdate(OctreeEditPacketSender* packetSender, uint32_
|
|||
|
||||
if (!_body->isActive()) {
|
||||
// make sure all derivatives are zero
|
||||
_entity->setVelocity(Vectors::ZERO);
|
||||
_entity->setAngularVelocity(Vectors::ZERO);
|
||||
_entity->setAcceleration(Vectors::ZERO);
|
||||
zeroCleanObjectVelocities();
|
||||
_numInactiveUpdates++;
|
||||
} else {
|
||||
glm::vec3 gravity = _entity->getGravity();
|
||||
|
@ -559,9 +564,7 @@ void EntityMotionState::sendUpdate(OctreeEditPacketSender* packetSender, uint32_
|
|||
if (movingSlowly) {
|
||||
// velocities might not be zero, but we'll fake them as such, which will hopefully help convince
|
||||
// other simulating observers to deactivate their own copies
|
||||
glm::vec3 zero(0.0f);
|
||||
_entity->setVelocity(zero);
|
||||
_entity->setAngularVelocity(zero);
|
||||
zeroCleanObjectVelocities();
|
||||
}
|
||||
}
|
||||
_numInactiveUpdates = 0;
|
||||
|
@ -818,3 +821,22 @@ bool EntityMotionState::shouldBeLocallyOwned() const {
|
|||
void EntityMotionState::upgradeOutgoingPriority(uint8_t priority) {
|
||||
_outgoingPriority = glm::max<uint8_t>(_outgoingPriority, priority);
|
||||
}
|
||||
|
||||
void EntityMotionState::zeroCleanObjectVelocities() const {
|
||||
// If transform or velocities are flagged as dirty it means a network or scripted change
|
||||
// occured between the beginning and end of the stepSimulation() and we DON'T want to apply
|
||||
// these physics simulation results.
|
||||
uint32_t flags = _entity->getDirtyFlags() & (Simulation::DIRTY_TRANSFORM | Simulation::DIRTY_VELOCITIES);
|
||||
if (!flags) {
|
||||
_entity->setWorldVelocity(glm::vec3(0.0f));
|
||||
_entity->setWorldAngularVelocity(glm::vec3(0.0f));
|
||||
} else {
|
||||
if (!(flags & Simulation::DIRTY_LINEAR_VELOCITY)) {
|
||||
_entity->setWorldVelocity(glm::vec3(0.0f));
|
||||
}
|
||||
if (!(flags & Simulation::DIRTY_ANGULAR_VELOCITY)) {
|
||||
_entity->setWorldAngularVelocity(glm::vec3(0.0f));
|
||||
}
|
||||
}
|
||||
_entity->setAcceleration(glm::vec3(0.0f));
|
||||
}
|
||||
|
|
|
@ -87,6 +87,7 @@ public:
|
|||
protected:
|
||||
// changes _outgoingPriority only if priority is larger
|
||||
void upgradeOutgoingPriority(uint8_t priority);
|
||||
void zeroCleanObjectVelocities() const;
|
||||
|
||||
#ifdef WANT_DEBUG_ENTITY_TREE_LOCKS
|
||||
bool entityTreeIsLocked() const;
|
||||
|
|
|
@ -64,6 +64,12 @@ bool Pointer::isMouse() const {
|
|||
return DependencyManager::get<PickManager>()->isMouse(_pickUID);
|
||||
}
|
||||
|
||||
void Pointer::setDoesHover(bool doesHover) {
|
||||
withWriteLock([&] {
|
||||
_hover = doesHover;
|
||||
});
|
||||
}
|
||||
|
||||
void Pointer::update(unsigned int pointerID) {
|
||||
// This only needs to be a read lock because update won't change any of the properties that can be modified from scripts
|
||||
withReadLock([&] {
|
||||
|
@ -95,7 +101,8 @@ void Pointer::generatePointerEvents(unsigned int pointerID, const PickResultPoin
|
|||
}
|
||||
|
||||
// Hover events
|
||||
bool doHover = shouldHover(pickResult);
|
||||
bool doHover = _hover && shouldHover(pickResult);
|
||||
|
||||
Pointer::PickedObject hoveredObject = getHoveredObject(pickResult);
|
||||
PointerEvent hoveredEvent = buildPointerEvent(hoveredObject, pickResult);
|
||||
hoveredEvent.setType(PointerEvent::Move);
|
||||
|
@ -104,7 +111,7 @@ void Pointer::generatePointerEvents(unsigned int pointerID, const PickResultPoin
|
|||
hoveredEvent.setMoveOnHoverLeave(moveOnHoverLeave);
|
||||
|
||||
// if shouldHover && !_prevDoHover, only send hoverBegin
|
||||
if (_enabled && _hover && doHover && !_prevDoHover) {
|
||||
if (_enabled && doHover && !_prevDoHover) {
|
||||
if (hoveredObject.type == ENTITY) {
|
||||
emit pointerManager->hoverBeginEntity(hoveredObject.objectID, hoveredEvent);
|
||||
} else if (hoveredObject.type == OVERLAY) {
|
||||
|
@ -112,7 +119,7 @@ void Pointer::generatePointerEvents(unsigned int pointerID, const PickResultPoin
|
|||
} else if (hoveredObject.type == HUD) {
|
||||
emit pointerManager->hoverBeginHUD(hoveredEvent);
|
||||
}
|
||||
} else if (_enabled && _hover && doHover) {
|
||||
} else if (_enabled && doHover) {
|
||||
if (hoveredObject.type == OVERLAY) {
|
||||
if (_prevHoveredObject.type == OVERLAY) {
|
||||
if (hoveredObject.objectID == _prevHoveredObject.objectID) {
|
||||
|
@ -229,7 +236,7 @@ void Pointer::generatePointerEvents(unsigned int pointerID, const PickResultPoin
|
|||
}
|
||||
|
||||
// if we disable the pointer or disable hovering, send hoverEnd events after triggerEnd
|
||||
if (_hover && ((!_enabled && _prevEnabled) || (!doHover && _prevDoHover))) {
|
||||
if ((!_enabled && _prevEnabled) || (!doHover && _prevDoHover)) {
|
||||
if (_prevHoveredObject.type == ENTITY) {
|
||||
emit pointerManager->hoverEndEntity(_prevHoveredObject.objectID, hoveredEvent);
|
||||
} else if (_prevHoveredObject.type == OVERLAY) {
|
||||
|
|
|
@ -62,6 +62,8 @@ public:
|
|||
virtual void setLength(float length) {}
|
||||
virtual void setLockEndUUID(const QUuid& objectID, bool isOverlay, const glm::mat4& offsetMat = glm::mat4()) {}
|
||||
|
||||
virtual void setDoesHover(bool hover);
|
||||
|
||||
void update(unsigned int pointerID);
|
||||
virtual void updateVisuals(const PickResultPointer& pickResult) = 0;
|
||||
void generatePointerEvents(unsigned int pointerID, const PickResultPointer& pickResult);
|
||||
|
@ -101,7 +103,6 @@ private:
|
|||
std::unordered_map<std::string, PickedObject> _triggeredObjects;
|
||||
|
||||
PointerEvent::Button chooseButton(const std::string& button);
|
||||
|
||||
};
|
||||
|
||||
#endif // hifi_Pick_h
|
||||
|
|
|
@ -122,6 +122,13 @@ void PointerManager::setLockEndUUID(unsigned int uid, const QUuid& objectID, boo
|
|||
}
|
||||
}
|
||||
|
||||
void PointerManager::setDoesHover(unsigned int uid, bool hover) const {
|
||||
auto pointer = find(uid);
|
||||
if (pointer) {
|
||||
pointer->setDoesHover(hover);
|
||||
}
|
||||
}
|
||||
|
||||
bool PointerManager::isLeftHand(unsigned int uid) {
|
||||
auto pointer = find(uid);
|
||||
if (pointer) {
|
||||
|
|
|
@ -37,6 +37,7 @@ public:
|
|||
|
||||
void setLength(unsigned int uid, float length) const;
|
||||
void setLockEndUUID(unsigned int uid, const QUuid& objectID, bool isOverlay, const glm::mat4& offsetMat = glm::mat4()) const;
|
||||
void setDoesHover(unsigned int uid, bool hover) const;
|
||||
|
||||
void update();
|
||||
|
||||
|
|
|
@ -186,7 +186,7 @@ float specularDistribution(SurfaceData surface) {
|
|||
// Add geometric factors G1(n,l) and G1(n,v)
|
||||
float smithInvG1NdotL = evalSmithInvG1(surface.roughness4, surface.ndotl);
|
||||
denom *= surface.smithInvG1NdotV * smithInvG1NdotL;
|
||||
// Don't divide by PI as it will be done later
|
||||
// Don't divide by PI as this is part of the light normalization factor
|
||||
float power = surface.roughness4 / denom;
|
||||
return power;
|
||||
}
|
||||
|
@ -202,12 +202,11 @@ vec4 evalPBRShading(float metallic, vec3 fresnel, SurfaceData surface) {
|
|||
vec3 specular = fresnelColor * power * angleAttenuation;
|
||||
float diffuse = (1.0 - metallic) * angleAttenuation * (1.0 - fresnelColor.x);
|
||||
|
||||
diffuse /= 3.1415926;
|
||||
// Diffuse is divided by PI but specular isn't because an infinitesimal volume light source
|
||||
// has a multiplier of PI, says Naty Hoffman.
|
||||
// We don't divided by PI, as the "normalized" equations state we should, because we decide, as Naty Hoffman, that
|
||||
// we wish to have a similar color as raw albedo on a perfectly diffuse surface perpendicularly lit
|
||||
// by a white light of intensity 1. But this is an arbitrary normalization of what light intensity "means".
|
||||
// (see http://blog.selfshadow.com/publications/s2013-shading-course/hoffman/s2013_pbs_physics_math_notes.pdf
|
||||
// page 23 paragraph "Punctual light sources")
|
||||
|
||||
return vec4(specular, diffuse);
|
||||
}
|
||||
|
||||
|
@ -222,9 +221,9 @@ vec4 evalPBRShadingDielectric(SurfaceData surface, float fresnel) {
|
|||
vec3 specular = vec3(fresnelScalar) * power * angleAttenuation;
|
||||
float diffuse = angleAttenuation * (1.0 - fresnelScalar);
|
||||
|
||||
diffuse /= 3.1415926;
|
||||
// Diffuse is divided by PI but specular isn't because an infinitesimal volume light source
|
||||
// has a multiplier of PI, says Naty Hoffman.
|
||||
// We don't divided by PI, as the "normalized" equations state we should, because we decide, as Naty Hoffman, that
|
||||
// we wish to have a similar color as raw albedo on a perfectly diffuse surface perpendicularly lit
|
||||
// by a white light of intensity 1. But this is an arbitrary normalization of what light intensity "means".
|
||||
// (see http://blog.selfshadow.com/publications/s2013-shading-course/hoffman/s2013_pbs_physics_math_notes.pdf
|
||||
// page 23 paragraph "Punctual light sources")
|
||||
return vec4(specular, diffuse);
|
||||
|
@ -239,8 +238,9 @@ vec4 evalPBRShadingMetallic(SurfaceData surface, vec3 fresnel) {
|
|||
float power = specularDistribution(surface);
|
||||
vec3 specular = fresnelColor * power * angleAttenuation;
|
||||
|
||||
// Specular isn't divided by PI because an infinitesimal volume light source
|
||||
// has a multiplier of PI, says Naty Hoffman.
|
||||
// We don't divided by PI, as the "normalized" equations state we should, because we decide, as Naty Hoffman, that
|
||||
// we wish to have a similar color as raw albedo on a perfectly diffuse surface perpendicularly lit
|
||||
// by a white light of intensity 1. But this is an arbitrary normalization of what light intensity "means".
|
||||
// (see http://blog.selfshadow.com/publications/s2013-shading-course/hoffman/s2013_pbs_physics_math_notes.pdf
|
||||
// page 23 paragraph "Punctual light sources")
|
||||
return vec4(specular, 0.f);
|
||||
|
|
|
@ -253,6 +253,7 @@ glm::vec2 getFacingDir2D(const glm::mat4& m);
|
|||
|
||||
inline bool isNaN(const glm::vec3& value) { return isNaN(value.x) || isNaN(value.y) || isNaN(value.z); }
|
||||
inline bool isNaN(const glm::quat& value) { return isNaN(value.w) || isNaN(value.x) || isNaN(value.y) || isNaN(value.z); }
|
||||
inline bool isNaN(const glm::mat3& value) { return isNaN(value * glm::vec3(1.0f)); }
|
||||
|
||||
glm::mat4 orthoInverse(const glm::mat4& m);
|
||||
|
||||
|
|
|
@ -464,6 +464,36 @@ glm::vec3 SpatiallyNestable::localToWorldDimensions(const glm::vec3& dimensions,
|
|||
return dimensions;
|
||||
}
|
||||
|
||||
void SpatiallyNestable::setWorldTransform(const glm::vec3& position, const glm::quat& orientation) {
|
||||
// guard against introducing NaN into the transform
|
||||
if (isNaN(orientation) || isNaN(position)) {
|
||||
return;
|
||||
}
|
||||
|
||||
bool changed = false;
|
||||
bool success = true;
|
||||
Transform parentTransform = getParentTransform(success);
|
||||
_transformLock.withWriteLock([&] {
|
||||
Transform myWorldTransform;
|
||||
Transform::mult(myWorldTransform, parentTransform, _transform);
|
||||
if (myWorldTransform.getRotation() != orientation) {
|
||||
changed = true;
|
||||
myWorldTransform.setRotation(orientation);
|
||||
}
|
||||
if (myWorldTransform.getTranslation() != position) {
|
||||
changed = true;
|
||||
myWorldTransform.setTranslation(position);
|
||||
}
|
||||
if (changed) {
|
||||
Transform::inverseMult(_transform, parentTransform, myWorldTransform);
|
||||
_translationChanged = usecTimestampNow();
|
||||
}
|
||||
});
|
||||
if (success && changed) {
|
||||
locationChanged(false);
|
||||
}
|
||||
}
|
||||
|
||||
glm::vec3 SpatiallyNestable::getWorldPosition(bool& success) const {
|
||||
return getTransform(success).getTranslation();
|
||||
}
|
||||
|
|
|
@ -87,6 +87,7 @@ public:
|
|||
|
||||
virtual Transform getParentTransform(bool& success, int depth = 0) const;
|
||||
|
||||
void setWorldTransform(const glm::vec3& position, const glm::quat& orientation);
|
||||
virtual glm::vec3 getWorldPosition(bool& success) const;
|
||||
virtual glm::vec3 getWorldPosition() const;
|
||||
virtual void setWorldPosition(const glm::vec3& position, bool& success, bool tellPhysics = true);
|
||||
|
|
46
libraries/ui/src/DesktopPreviewProvider.cpp
Normal file
|
@ -0,0 +1,46 @@
|
|||
#include "DesktopPreviewProvider.h"
|
||||
#include <PathUtils.h>
|
||||
#include <QMetaEnum>
|
||||
#include <QtPlugin>
|
||||
#include <cassert>
|
||||
|
||||
DesktopPreviewProvider::DesktopPreviewProvider() {
|
||||
}
|
||||
|
||||
constexpr const char* DesktopPreviewProvider::imagePaths[];
|
||||
|
||||
QSharedPointer<DesktopPreviewProvider> DesktopPreviewProvider::getInstance() {
|
||||
static QSharedPointer<DesktopPreviewProvider> instance = DependencyManager::get<DesktopPreviewProvider>();
|
||||
return instance;
|
||||
}
|
||||
|
||||
QImage DesktopPreviewProvider::getPreviewDisabledImage(bool vsyncEnabled) const {
|
||||
|
||||
auto imageIndex = vsyncEnabled ? VSYNC : m_previewDisabledReason;
|
||||
assert(imageIndex >= 0 && imageIndex <= VSYNC);
|
||||
|
||||
return !m_previewDisabled[imageIndex].isNull() ? m_previewDisabled[imageIndex] : loadPreviewImage(m_previewDisabled[imageIndex], PathUtils::resourcesPath() + imagePaths[imageIndex]);
|
||||
}
|
||||
|
||||
void DesktopPreviewProvider::setPreviewDisabledReason(PreviewDisabledReasons reason) {
|
||||
if (reason == VSYNC) {
|
||||
qDebug() << "Preview disabled reason can't be forced to " << QMetaEnum::fromType<DesktopPreviewProvider::PreviewDisabledReasons>().valueToKey(reason);
|
||||
return; // Not settable via this interface, as VSYNC is controlled by HMD plugin..
|
||||
}
|
||||
|
||||
m_previewDisabledReason = reason;
|
||||
}
|
||||
|
||||
void DesktopPreviewProvider::setPreviewDisabledReason(const QString& reasonString) {
|
||||
PreviewDisabledReasons reason = USER;
|
||||
bool ok = false;
|
||||
|
||||
reason = (PreviewDisabledReasons) QMetaEnum::fromType<DesktopPreviewProvider::PreviewDisabledReasons>().keyToValue(reasonString.toLatin1().data(), &ok);
|
||||
if (ok) {
|
||||
setPreviewDisabledReason(reason);
|
||||
}
|
||||
}
|
||||
|
||||
QImage& DesktopPreviewProvider::loadPreviewImage(QImage& image, const QString& path) const {
|
||||
return image = QImage(path).mirrored().convertToFormat(QImage::Format_RGBA8888);
|
||||
}
|
47
libraries/ui/src/DesktopPreviewProvider.h
Normal file
|
@ -0,0 +1,47 @@
|
|||
//
|
||||
// Created by Alexander Ivash on 2018/01/08
|
||||
// Copyright 2018 High Fidelity, Inc.
|
||||
//
|
||||
// Distributed under the Apache License, Version 2.0.
|
||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
#include <DependencyManager.h>
|
||||
#include <QImage>
|
||||
|
||||
class DesktopPreviewProvider : public QObject, public Dependency {
|
||||
SINGLETON_DEPENDENCY
|
||||
Q_OBJECT
|
||||
|
||||
DesktopPreviewProvider();
|
||||
DesktopPreviewProvider(const DesktopPreviewProvider& other) = delete;
|
||||
|
||||
constexpr static const char* imagePaths[] = {
|
||||
"images/preview-disabled.png", // USER
|
||||
"images/preview-privacy.png", // SECURE_SCREEN
|
||||
"images/preview.png", // VSYNC
|
||||
};
|
||||
|
||||
public:
|
||||
enum PreviewDisabledReasons {
|
||||
USER = 0,
|
||||
SECURE_SCREEN,
|
||||
VSYNC // Not settable via this interface, as VSYNC is controlled by HMD plugin..
|
||||
};
|
||||
Q_ENUM(PreviewDisabledReasons)
|
||||
|
||||
static QSharedPointer<DesktopPreviewProvider> getInstance();
|
||||
|
||||
QImage getPreviewDisabledImage(bool vsyncEnabled) const;
|
||||
void setPreviewDisabledReason(PreviewDisabledReasons reason);
|
||||
|
||||
public slots:
|
||||
void setPreviewDisabledReason(const QString& reason);
|
||||
|
||||
private:
|
||||
QImage& loadPreviewImage(QImage& image, const QString& path) const;
|
||||
|
||||
PreviewDisabledReasons m_previewDisabledReason = { USER };
|
||||
|
||||
mutable QImage m_previewDisabled[3];
|
||||
};
|
|
@ -31,6 +31,8 @@
|
|||
const QString SYSTEM_TOOLBAR = "com.highfidelity.interface.toolbar.system";
|
||||
const QString SYSTEM_TABLET = "com.highfidelity.interface.tablet.system";
|
||||
const QString TabletScriptingInterface::QML = "hifi/tablet/TabletRoot.qml";
|
||||
const QString BUTTON_SORT_ORDER_KEY = "sortOrder";
|
||||
const int DEFAULT_BUTTON_SORT_ORDER = 100;
|
||||
|
||||
static QString getUsername() {
|
||||
QString username = "Unknown user";
|
||||
|
@ -74,11 +76,21 @@ QVariant TabletButtonListModel::data(const QModelIndex& index, int role) const {
|
|||
}
|
||||
|
||||
TabletButtonProxy* TabletButtonListModel::addButton(const QVariant& properties) {
|
||||
auto tabletButtonProxy = QSharedPointer<TabletButtonProxy>(new TabletButtonProxy(properties.toMap()));
|
||||
QVariantMap newProperties = properties.toMap();
|
||||
if (newProperties.find(BUTTON_SORT_ORDER_KEY) == newProperties.end()) {
|
||||
newProperties[BUTTON_SORT_ORDER_KEY] = DEFAULT_BUTTON_SORT_ORDER;
|
||||
}
|
||||
int index = computeNewButtonIndex(newProperties);
|
||||
auto button = QSharedPointer<TabletButtonProxy>(new TabletButtonProxy(newProperties));
|
||||
beginResetModel();
|
||||
_buttons.push_back(tabletButtonProxy);
|
||||
int numButtons = (int)_buttons.size();
|
||||
if (index < numButtons) {
|
||||
_buttons.insert(_buttons.begin() + index, button);
|
||||
} else {
|
||||
_buttons.push_back(button);
|
||||
}
|
||||
endResetModel();
|
||||
return tabletButtonProxy.data();
|
||||
return button.data();
|
||||
}
|
||||
|
||||
void TabletButtonListModel::removeButton(TabletButtonProxy* button) {
|
||||
|
@ -92,6 +104,20 @@ void TabletButtonListModel::removeButton(TabletButtonProxy* button) {
|
|||
endResetModel();
|
||||
}
|
||||
|
||||
int TabletButtonListModel::computeNewButtonIndex(const QVariantMap& newButtonProperties) {
|
||||
int numButtons = (int)_buttons.size();
|
||||
int newButtonSortOrder = newButtonProperties[BUTTON_SORT_ORDER_KEY].toInt();
|
||||
if (newButtonSortOrder == DEFAULT_BUTTON_SORT_ORDER) return numButtons;
|
||||
for (int i = 0; i < numButtons; i++) {
|
||||
QVariantMap tabletButtonProperties = _buttons[i]->getProperties();
|
||||
int tabletButtonSortOrder = tabletButtonProperties[BUTTON_SORT_ORDER_KEY].toInt();
|
||||
if (newButtonSortOrder <= tabletButtonSortOrder) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return numButtons;
|
||||
}
|
||||
|
||||
TabletButtonsProxyModel::TabletButtonsProxyModel(QObject *parent)
|
||||
: QSortFilterProxyModel(parent) {
|
||||
}
|
||||
|
|
|
@ -115,6 +115,7 @@ protected:
|
|||
friend class TabletProxy;
|
||||
TabletButtonProxy* addButton(const QVariant& properties);
|
||||
void removeButton(TabletButtonProxy* button);
|
||||
int computeNewButtonIndex(const QVariantMap& newButtonProperties);
|
||||
using List = std::list<QSharedPointer<TabletButtonProxy>>;
|
||||
static QHash<int, QByteArray> _roles;
|
||||
static Qt::ItemFlags _flags;
|
||||
|
|
|
@ -22,8 +22,7 @@
|
|||
|
||||
var button = tablet.addButton({
|
||||
icon: Script.resolvePath("dynamicsTests.svg"),
|
||||
text: "Dynamics",
|
||||
sortOrder: 15
|
||||
text: "Dynamics"
|
||||
});
|
||||
|
||||
|
||||
|
|
|
@ -32,8 +32,7 @@
|
|||
var button = tablet.addButton({
|
||||
text: TABLET_BUTTON_NAME,
|
||||
icon: ICON_URL,
|
||||
activeIcon: ACTIVE_ICON_URL,
|
||||
sortOrder: 1
|
||||
activeIcon: ACTIVE_ICON_URL
|
||||
});
|
||||
|
||||
var hasEventBridge = false;
|
||||
|
|
|
@ -30,8 +30,7 @@
|
|||
var button = tablet.addButton({
|
||||
text: TABLET_BUTTON_NAME,
|
||||
icon: ICON_URL,
|
||||
activeIcon: ACTIVE_ICON_URL,
|
||||
sortOrder: 1
|
||||
activeIcon: ACTIVE_ICON_URL
|
||||
});
|
||||
|
||||
var hasEventBridge = false;
|
||||
|
|
|
@ -31,8 +31,7 @@
|
|||
var button = tablet.addButton({
|
||||
text: TABLET_BUTTON_NAME,
|
||||
icon: ICON_URL,
|
||||
activeIcon: ACTIVE_ICON_URL,
|
||||
sortOrder: 1
|
||||
activeIcon: ACTIVE_ICON_URL
|
||||
});
|
||||
|
||||
var hasEventBridge = false;
|
||||
|
|
|
@ -945,8 +945,7 @@
|
|||
tabletButton = tablet.addButton({
|
||||
icon: tabletButtonIcon,
|
||||
activeIcon: tabletButtonActiveIcon,
|
||||
text: tabletButtonName,
|
||||
sortOrder: 0
|
||||
text: tabletButtonName
|
||||
});
|
||||
|
||||
Messages.subscribe(channelName);
|
||||
|
|
|
@ -562,9 +562,11 @@
|
|||
break;
|
||||
case 'disableHmdPreview':
|
||||
isHmdPreviewDisabled = Menu.isOptionChecked("Disable Preview");
|
||||
DesktopPreviewProvider.setPreviewDisabledReason("SECURE_SCREEN");
|
||||
Menu.setIsOptionChecked("Disable Preview", true);
|
||||
break;
|
||||
case 'maybeEnableHmdPreview':
|
||||
DesktopPreviewProvider.setPreviewDisabledReason("USER");
|
||||
Menu.setIsOptionChecked("Disable Preview", isHmdPreviewDisabled);
|
||||
break;
|
||||
case 'passphraseReset':
|
||||
|
@ -591,10 +593,16 @@
|
|||
getConnectionData(false);
|
||||
break;
|
||||
case 'enable_ChooseRecipientNearbyMode':
|
||||
Script.update.connect(updateOverlays);
|
||||
if (!isUpdateOverlaysWired) {
|
||||
Script.update.connect(updateOverlays);
|
||||
isUpdateOverlaysWired = true;
|
||||
}
|
||||
break;
|
||||
case 'disable_ChooseRecipientNearbyMode':
|
||||
Script.update.disconnect(updateOverlays);
|
||||
if (isUpdateOverlaysWired) {
|
||||
Script.update.disconnect(updateOverlays);
|
||||
isUpdateOverlaysWired = false;
|
||||
}
|
||||
removeOverlays();
|
||||
break;
|
||||
default:
|
||||
|
@ -635,7 +643,11 @@
|
|||
// -Called when the TabletScriptingInterface::screenChanged() signal is emitted. The "type" argument can be either the string
|
||||
// value of "Home", "Web", "Menu", "QML", or "Closed". The "url" argument is only valid for Web and QML.
|
||||
function onTabletScreenChanged(type, url) {
|
||||
onWalletScreen = (type === "QML" && url === WALLET_QML_SOURCE);
|
||||
var onWalletScreenNow = (type === "QML" && url === WALLET_QML_SOURCE);
|
||||
if (!onWalletScreenNow && onWalletScreen) {
|
||||
DesktopPreviewProvider.setPreviewDisabledReason("USER");
|
||||
}
|
||||
onWalletScreen = onWalletScreenNow;
|
||||
wireEventBridge(onWalletScreen);
|
||||
// Change button to active when window is first openend, false otherwise.
|
||||
if (button) {
|
||||
|
@ -675,14 +687,18 @@
|
|||
}
|
||||
}
|
||||
var isWired = false;
|
||||
var isUpdateOverlaysWired = false;
|
||||
function off() {
|
||||
if (isWired) { // It is not ok to disconnect these twice, hence guard.
|
||||
Users.usernameFromIDReply.disconnect(usernameFromIDReply);
|
||||
Script.update.disconnect(updateOverlays);
|
||||
Controller.mousePressEvent.disconnect(handleMouseEvent);
|
||||
Controller.mouseMoveEvent.disconnect(handleMouseMoveEvent);
|
||||
isWired = false;
|
||||
}
|
||||
if (isUpdateOverlaysWired) {
|
||||
Script.update.disconnect(updateOverlays);
|
||||
isUpdateOverlaysWired = false;
|
||||
}
|
||||
triggerMapping.disable(); // It's ok if we disable twice.
|
||||
triggerPressMapping.disable(); // see above
|
||||
removeOverlays();
|
||||
|
|
|
@ -44,7 +44,12 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js");
|
|||
this.highVarianceCount = 0;
|
||||
this.veryhighVarianceCount = 0;
|
||||
this.tabletID = null;
|
||||
this.TABLET_UI_UUIDS = [];
|
||||
this.blacklist = [];
|
||||
this.leftPointerDoesHover = true;
|
||||
this.leftPointerDoesHoverChanged = false;
|
||||
this.rightPointerDoesHover = true;
|
||||
this.rightPointerDoesHoverChanged = false;
|
||||
this.pointerManager = new PointerManager();
|
||||
|
||||
// a module can occupy one or more "activity" slots while it's running. If all the required slots for a module are
|
||||
|
@ -122,6 +127,10 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js");
|
|||
return getControllerWorldLocation(Controller.Standard.RightHand, true);
|
||||
};
|
||||
|
||||
this.isTabletID = function (uuid) {
|
||||
return _this.TABLET_UI_UUIDS.indexOf(uuid) !== -1;
|
||||
};
|
||||
|
||||
this.updateTimings = function () {
|
||||
_this.intervalCount++;
|
||||
var thisInterval = Date.now();
|
||||
|
@ -148,11 +157,35 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js");
|
|||
this.setIgnorePointerItems = function() {
|
||||
if (HMD.tabletID !== this.tabletID) {
|
||||
this.tabletID = HMD.tabletID;
|
||||
this.TABLET_UI_UUIDS = [HMD.tabletID, HMD.tabletScreenID, HMD.homeButtonID, HMD.homeButtonHighlightID];
|
||||
Pointers.setIgnoreItems(_this.leftPointer, _this.blacklist);
|
||||
Pointers.setIgnoreItems(_this.rightPointer, _this.blacklist);
|
||||
}
|
||||
};
|
||||
|
||||
this.updateDoesHover = function(handLaser, doesHover) {
|
||||
if (handLaser.doesHover !== undefined) {
|
||||
if (handLaser.hand === LEFT_HAND && _this.leftPointerDoesHover !== doesHover) {
|
||||
_this.leftPointerDoesHover = doesHover;
|
||||
_this.leftPointerDoesHoverChanged = true;
|
||||
} else if (handLaser.hand === RIGHT_HAND && _this.rightPointerDoesHover !== doesHover) {
|
||||
_this.rightPointerDoesHover = doesHover;
|
||||
_this.rightPointerDoesHoverChanged = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.updateHovering = function () {
|
||||
if (_this.leftPointerDoesHoverChanged) {
|
||||
Pointers.setDoesHover(_this.leftPointer, _this.leftPointerDoesHover);
|
||||
_this.leftPointerDoesHoverChanged = false;
|
||||
}
|
||||
if (_this.rightPointerDoesHoverChanged) {
|
||||
Pointers.setDoesHover(_this.rightPointer, _this.rightPointerDoesHover);
|
||||
_this.rightPointerDoesHoverChanged = false;
|
||||
}
|
||||
};
|
||||
|
||||
this.update = function () {
|
||||
try {
|
||||
_this.updateInternal();
|
||||
|
@ -324,6 +357,8 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js");
|
|||
_this.runningPluginNames[orderedPluginName] = true;
|
||||
_this.markSlots(candidatePlugin, orderedPluginName);
|
||||
_this.pointerManager.makePointerVisible(candidatePlugin.parameters.handLaser);
|
||||
_this.updateDoesHover(candidatePlugin.parameters.handLaser,
|
||||
candidatePlugin.parameters.handLaser.doesHover);
|
||||
if (DEBUG) {
|
||||
print("controllerDispatcher running " + orderedPluginName);
|
||||
}
|
||||
|
@ -354,12 +389,15 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js");
|
|||
Script.beginProfileRange("dispatch.run." + runningPluginName);
|
||||
}
|
||||
var runningness = plugin.run(controllerData, deltaTime);
|
||||
if (!runningness.active) {
|
||||
if (runningness.active) {
|
||||
_this.updateDoesHover(plugin.parameters.handLaser, plugin.parameters.handLaser.doesHover);
|
||||
} else {
|
||||
// plugin is finished running, for now. remove it from the list
|
||||
// of running plugins and mark its activity-slots as "not in use"
|
||||
delete _this.runningPluginNames[runningPluginName];
|
||||
_this.markSlots(plugin, false);
|
||||
_this.pointerManager.makePointerInvisible(plugin.parameters.handLaser);
|
||||
_this.updateDoesHover(plugin.parameters.handLaser, true);
|
||||
if (DEBUG) {
|
||||
print("controllerDispatcher stopping " + runningPluginName);
|
||||
}
|
||||
|
@ -372,6 +410,8 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js");
|
|||
}
|
||||
}
|
||||
_this.pointerManager.updatePointersRenderState(controllerData.triggerClicks, controllerData.triggerValues);
|
||||
_this.updateHovering();
|
||||
|
||||
if (PROFILE) {
|
||||
Script.endProfileRange("dispatch.run");
|
||||
}
|
||||
|
|
|
@ -87,41 +87,89 @@ Script.include("/~/system/libraries/controllers.js");
|
|||
return MyAvatar.getDominantHand() === "right" ? 1 : 0;
|
||||
};
|
||||
|
||||
this.dominantHandOverride = false;
|
||||
this.letOtherHandRunFirst = function (controllerData, pointingAt) {
|
||||
// If both hands are ready to run, let the other hand run first if it is the dominant hand so that it gets the
|
||||
// highlight.
|
||||
var isOtherTriggerPressed = controllerData.triggerValues[this.otherHand] > TRIGGER_OFF_VALUE;
|
||||
var isLetOtherHandRunFirst = !this.getOtherModule().running
|
||||
&& this.getDominantHand() === this.otherHand
|
||||
&& (this.parameters.handLaser.allwaysOn || isOtherTriggerPressed);
|
||||
if (isLetOtherHandRunFirst) {
|
||||
var otherHandPointingAt = controllerData.rayPicks[this.otherHand].objectID;
|
||||
if (this.isTabletID(otherHandPointingAt)) {
|
||||
otherHandPointingAt = HMD.tabletID;
|
||||
}
|
||||
isLetOtherHandRunFirst = pointingAt === otherHandPointingAt;
|
||||
}
|
||||
return isLetOtherHandRunFirst;
|
||||
};
|
||||
|
||||
this.hoverItem = null;
|
||||
|
||||
this.isTabletID = function (uuid) {
|
||||
return [HMD.tabletID, HMD.tabletScreenID, HMD.homeButtonID, HMD.homeButtonHighlightID].indexOf(uuid) !== -1;
|
||||
};
|
||||
|
||||
this.isReady = function(controllerData) {
|
||||
var otherModuleRunning = this.getOtherModule().running;
|
||||
otherModuleRunning = otherModuleRunning && this.getDominantHand() !== this.hand; // Auto-swap to dominant hand.
|
||||
var isTriggerPressed = controllerData.triggerValues[this.hand] > TRIGGER_OFF_VALUE
|
||||
&& controllerData.triggerValues[this.otherHand] <= TRIGGER_OFF_VALUE;
|
||||
if ((!otherModuleRunning || isTriggerPressed)
|
||||
&& (this.isPointingAtOverlay(controllerData) || this.isPointingAtWebEntity(controllerData))) {
|
||||
if (this.isPointingAtOverlay(controllerData) || this.isPointingAtWebEntity(controllerData)) {
|
||||
this.updateAllwaysOn();
|
||||
if (isTriggerPressed) {
|
||||
this.dominantHandOverride = true; // Override dominant hand.
|
||||
this.getOtherModule().dominantHandOverride = false;
|
||||
}
|
||||
|
||||
var isTriggerPressed = controllerData.triggerValues[this.hand] > TRIGGER_OFF_VALUE;
|
||||
if (this.parameters.handLaser.allwaysOn || isTriggerPressed) {
|
||||
return makeRunningValues(true, [], []);
|
||||
var pointingAt = controllerData.rayPicks[this.hand].objectID;
|
||||
if (this.isTabletID(pointingAt)) {
|
||||
pointingAt = HMD.tabletID;
|
||||
}
|
||||
|
||||
if (!this.letOtherHandRunFirst(controllerData, pointingAt)) {
|
||||
|
||||
if (pointingAt !== this.getOtherModule().hoverItem) {
|
||||
this.parameters.handLaser.doesHover = true;
|
||||
this.hoverItem = pointingAt;
|
||||
} else {
|
||||
this.parameters.handLaser.doesHover = false;
|
||||
this.hoverItem = null;
|
||||
}
|
||||
|
||||
return makeRunningValues(true, [], []);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.parameters.handLaser.doesHover = false;
|
||||
this.hoverItem = null;
|
||||
|
||||
return makeRunningValues(false, [], []);
|
||||
};
|
||||
|
||||
this.run = function(controllerData, deltaTime) {
|
||||
var otherModuleRunning = this.getOtherModule().running;
|
||||
otherModuleRunning = otherModuleRunning && this.getDominantHand() !== this.hand; // Auto-swap to dominant hand.
|
||||
otherModuleRunning = otherModuleRunning || this.getOtherModule().dominantHandOverride; // Override dominant hand.
|
||||
var grabModuleNeedsToRun = this.grabModuleWantsNearbyOverlay(controllerData);
|
||||
if (!otherModuleRunning && !grabModuleNeedsToRun && (controllerData.triggerValues[this.hand] > TRIGGER_OFF_VALUE
|
||||
|| this.parameters.handLaser.allwaysOn
|
||||
var isTriggerPressed = controllerData.triggerValues[this.hand] > TRIGGER_OFF_VALUE;
|
||||
if (!grabModuleNeedsToRun && (isTriggerPressed || this.parameters.handLaser.allwaysOn
|
||||
&& (this.isPointingAtOverlay(controllerData) || this.isPointingAtWebEntity(controllerData)))) {
|
||||
this.running = true;
|
||||
|
||||
var pointingAt = controllerData.rayPicks[this.hand].objectID;
|
||||
if (this.isTabletID(pointingAt)) {
|
||||
pointingAt = HMD.tabletID;
|
||||
}
|
||||
|
||||
if (pointingAt !== this.getOtherModule().hoverItem || isTriggerPressed) {
|
||||
this.parameters.handLaser.doesHover = true;
|
||||
this.hoverItem = pointingAt;
|
||||
} else {
|
||||
this.parameters.handLaser.doesHover = false;
|
||||
this.hoverItem = null;
|
||||
}
|
||||
|
||||
return makeRunningValues(true, [], []);
|
||||
}
|
||||
this.deleteContextOverlay();
|
||||
this.running = false;
|
||||
this.dominantHandOverride = false;
|
||||
|
||||
this.parameters.handLaser.doesHover = false;
|
||||
this.hoverItem = null;
|
||||
|
||||
return makeRunningValues(false, [], []);
|
||||
};
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ var activeTimer = false; // used to cancel active timer if a user plays an amima
|
|||
var activeEmote = false; // to keep track of the currently playing emote
|
||||
|
||||
button = tablet.addButton({
|
||||
//icon: "icons/tablet-icons/emote.svg", // TODO - we need graphics for this
|
||||
icon: "icons/tablet-icons/EmoteAppIcon.svg",
|
||||
text: EMOTE_LABEL,
|
||||
sortOrder: EMOTE_APP_SORT_ORDER
|
||||
});
|
||||
|
|
|
@ -37,8 +37,7 @@
|
|||
tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
button = tablet.addButton({
|
||||
icon: "icons/tablet-icons/goto-i.svg",
|
||||
text: buttonName,
|
||||
sortOrder: 8
|
||||
text: buttonName
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -41,8 +41,7 @@ if (Settings.getValue("HUDUIEnabled")) {
|
|||
button = tablet.addButton({
|
||||
icon: "icons/tablet-icons/goto-i.svg",
|
||||
activeIcon: "icons/tablet-icons/goto-a.svg",
|
||||
text: buttonName,
|
||||
sortOrder: 8
|
||||
text: buttonName
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -44,11 +44,11 @@
|
|||
input[type=button] {
|
||||
font-family: 'Raleway';
|
||||
font-weight: bold;
|
||||
font-size: 13px;
|
||||
font-size: 20px;
|
||||
text-transform: uppercase;
|
||||
vertical-align: top;
|
||||
height: 28px;
|
||||
min-width: 120px;
|
||||
height: 105px;
|
||||
min-width: 190px;
|
||||
padding: 0px 18px;
|
||||
margin-right: 6px;
|
||||
border-radius: 5px;
|
||||
|
@ -98,14 +98,14 @@
|
|||
</div>
|
||||
<div class="content">
|
||||
<p>Click an emotion to Emote:<p>
|
||||
<p><input type="button" class="emote-button white" value="Crying"></p>
|
||||
<p><input type="button" class="emote-button white" value="Surprised"></p>
|
||||
<p><input type="button" class="emote-button white" value="Dancing"></p>
|
||||
<p><input type="button" class="emote-button white" value="Cheering"></p>
|
||||
<p><input type="button" class="emote-button white" value="Waving"></p>
|
||||
<p><input type="button" class="emote-button white" value="Fall"></p>
|
||||
<p><input type="button" class="emote-button white" value="Pointing"></p>
|
||||
<p><input type="button" class="emote-button white" value="Clapping"></p>
|
||||
<p><input type="button" class="emote-button white" value="Crying">
|
||||
<input type="button" class="emote-button white" value="Surprised"></p>
|
||||
<p><input type="button" class="emote-button white" value="Dancing">
|
||||
<input type="button" class="emote-button white" value="Cheering"></p>
|
||||
<p><input type="button" class="emote-button white" value="Waving">
|
||||
<input type="button" class="emote-button white" value="Fall"></p>
|
||||
<p><input type="button" class="emote-button white" value="Pointing">
|
||||
<input type="button" class="emote-button white" value="Clapping"></p>
|
||||
</div>
|
||||
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
|
||||
|
|
|
@ -539,8 +539,14 @@
|
|||
return startingUp;
|
||||
}
|
||||
|
||||
function onDomainConnectionRefused(reason) {
|
||||
createNotification("Connection refused: " + reason, NotificationType.CONNECTION_REFUSED);
|
||||
function onDomainConnectionRefused(reason, reasonCode) {
|
||||
// the "login error" reason means that the DS couldn't decrypt the username signature
|
||||
// since this eventually resolves itself for good actors we don't need to show a notification for it
|
||||
var LOGIN_ERROR_REASON_CODE = 2;
|
||||
|
||||
if (reasonCode != LOGIN_ERROR_REASON_CODE) {
|
||||
createNotification("Connection refused: " + reason, NotificationType.CONNECTION_REFUSED);
|
||||
}
|
||||
}
|
||||
|
||||
function onEditError(msg) {
|
||||
|
|
|
@ -10,8 +10,7 @@
|
|||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var button = tablet.addButton({
|
||||
icon: Script.resolvePath("assets/images/run.svg"),
|
||||
text: "RUN",
|
||||
sortOrder: 15
|
||||
text: "RUN"
|
||||
});
|
||||
|
||||
function onClicked() {
|
||||
|
|
|
@ -37,8 +37,7 @@
|
|||
var button = tablet.addButton({
|
||||
icon: "icons/tablet-icons/users-i.svg",
|
||||
activeIcon: "icons/tablet-icons/users-a.svg",
|
||||
text: "USERS",
|
||||
sortOrder: 11
|
||||
text: "USERS"
|
||||
});
|
||||
|
||||
var onUsersScreen = false;
|
||||
|
|
|
@ -31,8 +31,7 @@ var activeButton = tablet.addButton({
|
|||
icon: whiteIcon,
|
||||
activeIcon: blackIcon,
|
||||
text: APP_NAME,
|
||||
isActive: isActive,
|
||||
sortOrder: 11
|
||||
isActive: isActive
|
||||
});
|
||||
|
||||
if (isActive) {
|
||||
|
|
|
@ -32,8 +32,7 @@
|
|||
var button = tablet.addButton({
|
||||
icon: ICONS.icon,
|
||||
activeIcon: ICONS.activeIcon,
|
||||
text: TABLET_BUTTON_NAME,
|
||||
sortOrder: 1
|
||||
text: TABLET_BUTTON_NAME
|
||||
});
|
||||
|
||||
var hasEventBridge = false;
|
||||
|
|