From 8976961bfb68b7c57e91b7b48ecd158253d9ac10 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Thu, 19 Oct 2017 16:27:39 -0700 Subject: [PATCH 01/20] add build config to draco install dir --- cmake/externals/draco/CMakeLists.txt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/cmake/externals/draco/CMakeLists.txt b/cmake/externals/draco/CMakeLists.txt index 44ddd6d3de..6a894e76b6 100644 --- a/cmake/externals/draco/CMakeLists.txt +++ b/cmake/externals/draco/CMakeLists.txt @@ -13,7 +13,7 @@ ExternalProject_Add( ${EXTERNAL_NAME} URL http://hifi-public.s3.amazonaws.com/dependencies/draco-1.1.0.zip URL_MD5 208f8b04c91d5f1c73d731a3ea37c5bb - CONFIGURE_COMMAND CMAKE_ARGS ${ANDROID_CMAKE_ARGS} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX:PATH= ${EXTRA_CMAKE_FLAGS} + CONFIGURE_COMMAND CMAKE_ARGS ${ANDROID_CMAKE_ARGS} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX:PATH=-$ ${EXTRA_CMAKE_FLAGS} LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 @@ -23,10 +23,11 @@ ExternalProject_Add( set_target_properties(${EXTERNAL_NAME} PROPERTIES FOLDER "hidden/externals") ExternalProject_Get_Property(${EXTERNAL_NAME} INSTALL_DIR) +set(SUFFIXED_INSTALL_DIR "${INSTALL_DIR}-$") string(TOUPPER ${EXTERNAL_NAME} EXTERNAL_NAME_UPPER) -set(${EXTERNAL_NAME_UPPER}_INCLUDE_DIRS ${INSTALL_DIR}/include CACHE PATH "List of Draco include directories") +set(${EXTERNAL_NAME_UPPER}_INCLUDE_DIRS ${SUFFIXED_INSTALL_DIR}/include CACHE PATH "List of Draco include directories") if (UNIX) set(LIB_PREFIX "lib") @@ -35,6 +36,6 @@ elseif (WIN32) set(LIB_EXT "lib") endif () -set(${EXTERNAL_NAME_UPPER}_LIBRARY ${INSTALL_DIR}/lib/${LIB_PREFIX}draco.${LIB_EXT} CACHE FILEPATH "Path to Draco release library") -set(${EXTERNAL_NAME_UPPER}_ENCODER_LIBRARY ${INSTALL_DIR}/lib/${LIB_PREFIX}dracoenc.${LIB_EXT} CACHE FILEPATH "Path to Draco encoder release library") -set(${EXTERNAL_NAME_UPPER}_DECODER_LIBRARY ${INSTALL_DIR}/lib/${LIB_PREFIX}dracodec.${LIB_EXT} CACHE FILEPATH "Path to Draco decoder release library") +set(${EXTERNAL_NAME_UPPER}_LIBRARY ${SUFFIXED_INSTALL_DIR}/lib/${LIB_PREFIX}draco.${LIB_EXT} CACHE FILEPATH "Path to Draco release library") +set(${EXTERNAL_NAME_UPPER}_ENCODER_LIBRARY ${SUFFIXED_INSTALL_DIR}/lib/${LIB_PREFIX}dracoenc.${LIB_EXT} CACHE FILEPATH "Path to Draco encoder release library") +set(${EXTERNAL_NAME_UPPER}_DECODER_LIBRARY ${SUFFIXED_INSTALL_DIR}/lib/${LIB_PREFIX}dracodec.${LIB_EXT} CACHE FILEPATH "Path to Draco decoder release library") From b5f1793863506ed6b9518c7af325fd0530b6bf2d Mon Sep 17 00:00:00 2001 From: David Back Date: Mon, 23 Oct 2017 14:21:18 -0700 Subject: [PATCH 02/20] add a tablet contextual mode flag to HMDScriptingInterface used to keep tablet in place --- interface/resources/qml/hifi/tablet/TabletRoot.qml | 2 +- interface/src/scripting/HMDScriptingInterface.cpp | 4 +++- interface/src/scripting/HMDScriptingInterface.h | 5 ++++- scripts/system/tablet-ui/tabletUI.js | 8 +++++++- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/interface/resources/qml/hifi/tablet/TabletRoot.qml b/interface/resources/qml/hifi/tablet/TabletRoot.qml index ba9d06eee3..a161741049 100644 --- a/interface/resources/qml/hifi/tablet/TabletRoot.qml +++ b/interface/resources/qml/hifi/tablet/TabletRoot.qml @@ -219,7 +219,7 @@ Item { function setShown(value) { if (value === true) { - HMD.openTablet() + HMD.openTablet(HMD.tabletContextualMode) // pass in current contextual mode flag to maintain flag (otherwise uses default false argument) } else { HMD.closeTablet() } diff --git a/interface/src/scripting/HMDScriptingInterface.cpp b/interface/src/scripting/HMDScriptingInterface.cpp index 39d3164f1f..0b6800395f 100644 --- a/interface/src/scripting/HMDScriptingInterface.cpp +++ b/interface/src/scripting/HMDScriptingInterface.cpp @@ -100,10 +100,12 @@ void HMDScriptingInterface::deactivateHMDHandMouse() { void HMDScriptingInterface::closeTablet() { _showTablet = false; + _tabletContextualMode = false; } -void HMDScriptingInterface::openTablet() { +void HMDScriptingInterface::openTablet(bool contextualMode) { _showTablet = true; + _tabletContextualMode = contextualMode; } QScriptValue HMDScriptingInterface::getHUDLookAtPosition2D(QScriptContext* context, QScriptEngine* engine) { diff --git a/interface/src/scripting/HMDScriptingInterface.h b/interface/src/scripting/HMDScriptingInterface.h index e5040b1f90..76bab77cbb 100644 --- a/interface/src/scripting/HMDScriptingInterface.h +++ b/interface/src/scripting/HMDScriptingInterface.h @@ -30,6 +30,7 @@ class HMDScriptingInterface : public AbstractHMDScriptingInterface, public Depen Q_PROPERTY(glm::quat orientation READ getOrientation) Q_PROPERTY(bool mounted READ isMounted NOTIFY mountedChanged) Q_PROPERTY(bool showTablet READ getShouldShowTablet) + Q_PROPERTY(bool tabletContextualMode READ getTabletContextualMode) Q_PROPERTY(QUuid tabletID READ getCurrentTabletFrameID WRITE setCurrentTabletFrameID) Q_PROPERTY(QUuid homeButtonID READ getCurrentHomeButtonID WRITE setCurrentHomeButtonID) Q_PROPERTY(QUuid homeButtonHighlightID READ getCurrentHomeButtonHightlightID WRITE setCurrentHomeButtonHightlightID) @@ -75,7 +76,7 @@ public: Q_INVOKABLE void closeTablet(); - Q_INVOKABLE void openTablet(); + Q_INVOKABLE void openTablet(bool contextualMode = false); signals: bool shouldShowHandControllersChanged(); @@ -91,6 +92,7 @@ public: void toggleShouldShowTablet() { _showTablet = !_showTablet; } void setShouldShowTablet(bool value) { _showTablet = value; } bool getShouldShowTablet() const { return _showTablet; } + bool getTabletContextualMode() const { return _tabletContextualMode; } void setCurrentTabletFrameID(QUuid tabletID) { _tabletUIID = tabletID; } QUuid getCurrentTabletFrameID() const { return _tabletUIID; } @@ -106,6 +108,7 @@ public: private: bool _showTablet { false }; + bool _tabletContextualMode { false }; QUuid _tabletUIID; // this is the entityID of the tablet frame QUuid _tabletScreenID; // this is the overlayID which is part of (a child of) the tablet-ui. QUuid _homeButtonID; diff --git a/scripts/system/tablet-ui/tabletUI.js b/scripts/system/tablet-ui/tabletUI.js index 554729f61e..c10ded5774 100644 --- a/scripts/system/tablet-ui/tabletUI.js +++ b/scripts/system/tablet-ui/tabletUI.js @@ -124,7 +124,13 @@ print("TABLET in showTabletUI, already rezzed"); } var tabletProperties = {}; - UIWebTablet.calculateTabletAttachmentProperties(activeHand, true, tabletProperties); + if (HMD.tabletContextualMode) + print("DBACK tabletContextualMode"); + else + print("DBACK NOT tabletContextualMode"); + if (!HMD.tabletContextualMode) { // contextual mode forces tablet in place -> don't update attachment + UIWebTablet.calculateTabletAttachmentProperties(activeHand, true, tabletProperties); + } tabletProperties.visible = true; Overlays.editOverlay(HMD.tabletID, tabletProperties); Overlays.editOverlay(HMD.homeButtonID, { visible: true }); From 80dc98b2c2403c71f1011fed6134292dd5dcae28 Mon Sep 17 00:00:00 2001 From: David Back Date: Mon, 23 Oct 2017 14:23:45 -0700 Subject: [PATCH 03/20] remove prints --- scripts/system/tablet-ui/tabletUI.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/scripts/system/tablet-ui/tabletUI.js b/scripts/system/tablet-ui/tabletUI.js index c10ded5774..17821c737e 100644 --- a/scripts/system/tablet-ui/tabletUI.js +++ b/scripts/system/tablet-ui/tabletUI.js @@ -124,10 +124,6 @@ print("TABLET in showTabletUI, already rezzed"); } var tabletProperties = {}; - if (HMD.tabletContextualMode) - print("DBACK tabletContextualMode"); - else - print("DBACK NOT tabletContextualMode"); if (!HMD.tabletContextualMode) { // contextual mode forces tablet in place -> don't update attachment UIWebTablet.calculateTabletAttachmentProperties(activeHand, true, tabletProperties); } From 08a6eb4dd399ef4f5cdeca95ae4ab8fb50efe97f Mon Sep 17 00:00:00 2001 From: David Back Date: Tue, 24 Oct 2017 15:50:09 -0700 Subject: [PATCH 04/20] reset tablet contextual mode back to false when toggling tablet show/hide --- interface/src/scripting/HMDScriptingInterface.cpp | 9 +++++++++ interface/src/scripting/HMDScriptingInterface.h | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/interface/src/scripting/HMDScriptingInterface.cpp b/interface/src/scripting/HMDScriptingInterface.cpp index 0b6800395f..31b8f74e9e 100644 --- a/interface/src/scripting/HMDScriptingInterface.cpp +++ b/interface/src/scripting/HMDScriptingInterface.cpp @@ -108,6 +108,15 @@ void HMDScriptingInterface::openTablet(bool contextualMode) { _tabletContextualMode = contextualMode; } +void HMDScriptingInterface::toggleShouldShowTablet() { + setShouldShowTablet(!getShouldShowTablet()); +} + +void HMDScriptingInterface::setShouldShowTablet(bool value) { + _showTablet = value; + _tabletContextualMode = false; +} + QScriptValue HMDScriptingInterface::getHUDLookAtPosition2D(QScriptContext* context, QScriptEngine* engine) { glm::vec3 hudIntersection; auto instance = DependencyManager::get(); diff --git a/interface/src/scripting/HMDScriptingInterface.h b/interface/src/scripting/HMDScriptingInterface.h index 76bab77cbb..ef8ea95704 100644 --- a/interface/src/scripting/HMDScriptingInterface.h +++ b/interface/src/scripting/HMDScriptingInterface.h @@ -89,8 +89,8 @@ public: bool isMounted() const; - void toggleShouldShowTablet() { _showTablet = !_showTablet; } - void setShouldShowTablet(bool value) { _showTablet = value; } + void toggleShouldShowTablet(); + void setShouldShowTablet(bool value); bool getShouldShowTablet() const { return _showTablet; } bool getTabletContextualMode() const { return _tabletContextualMode; } From 7dc475c695b9a931132bbb6ea1180f0665709b32 Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Thu, 5 Oct 2017 13:24:51 -0700 Subject: [PATCH 05/20] Update domain server settings Move requests that require access token to go through DS Update various styling and ease of use on DS settings page Update domain server settings CP CP --- .../resources/describe-settings.json | 5 +- domain-server/resources/web/css/style.css | 26 +- domain-server/resources/web/header.html | 4 +- .../resources/web/js/domain-server.js | 3 +- .../resources/web/settings/index.shtml | 5 +- .../resources/web/settings/js/settings.js | 360 +++++++++++++++--- domain-server/src/DomainServer.cpp | 199 ++++++++++ .../embedded-webserver/src/HTTPConnection.cpp | 24 +- .../embedded-webserver/src/HTTPConnection.h | 2 + 9 files changed, 567 insertions(+), 61 deletions(-) diff --git a/domain-server/resources/describe-settings.json b/domain-server/resources/describe-settings.json index 19f1718370..44713accdb 100644 --- a/domain-server/resources/describe-settings.json +++ b/domain-server/resources/describe-settings.json @@ -14,7 +14,8 @@ { "name": "id", "label": "Domain ID", - "help": "This is your High Fidelity domain ID. If you do not want your domain to be registered in the High Fidelity metaverse you can leave this blank." + "help": "This is your High Fidelity domain ID. If you do not want your domain to be registered in the High Fidelity metaverse you can leave this blank.", + "advanced": true }, { "name": "automatic_networking", @@ -1513,4 +1514,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/domain-server/resources/web/css/style.css b/domain-server/resources/web/css/style.css index 553f408e15..e157e17b8e 100644 --- a/domain-server/resources/web/css/style.css +++ b/domain-server/resources/web/css/style.css @@ -1,6 +1,7 @@ body { position: relative; padding-bottom: 30px; + margin-top: 70px; } [hidden] { @@ -81,7 +82,7 @@ span.port { #setup-sidebar.affix { position: fixed; - top: 15px; + top: 70px; } #setup-sidebar button { @@ -255,3 +256,26 @@ table .headers + .headers td { -webkit-transform: scale(1.0); } } + +/* From https://gist.github.com/alexandrevicenzi/680147013e902a4eaa5d */ +.glyphicon-refresh-animate { + -animation: spin .7s infinite linear; + -ms-animation: spin .7s infinite linear; + -webkit-animation: spinw .7s infinite linear; + -moz-animation: spinm .7s infinite linear; +} + +@keyframes spin { + from { transform: scale(1) rotate(0deg);} + to { transform: scale(1) rotate(360deg);} +} + +@-webkit-keyframes spinw { + from { -webkit-transform: rotate(0deg);} + to { -webkit-transform: rotate(360deg);} +} + +@-moz-keyframes spinm { + from { -moz-transform: rotate(0deg);} + to { -moz-transform: rotate(360deg);} +} diff --git a/domain-server/resources/web/header.html b/domain-server/resources/web/header.html index a37e9a6ff0..803b36d121 100644 --- a/domain-server/resources/web/header.html +++ b/domain-server/resources/web/header.html @@ -13,7 +13,7 @@ -