From 813c58a1fb23d90a35d82e680ac0dce558510cd9 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 17 Jul 2018 11:53:55 -0700 Subject: [PATCH 001/210] adding check to see if near grabbing is ready --- .../controllerModules/webSurfaceLaserInput.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js b/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js index a2fe0bfcd4..1706fadbb7 100644 --- a/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js +++ b/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js @@ -42,6 +42,16 @@ Script.include("/~/system/libraries/controllers.js"); return true; } } + nearGrabName = this.hand === RIGHT_HAND ? "RightNearParentingGrabEntity" : "LeftNearParentingGrabEntity"; + nearGrabModule = getEnabledModuleByName(nearGrabName); + if (nearGrabModule) { + return nearGrabModule.isReady(controllerData).active; + } + nearGrabName = this.hand === RIGHT_HAND ? "RightNearActionGrabEntity" : "LeftNearActionGrabEntity"; + nearGrabModule = getEnabledModuleByName(nearGrabName); + if (nearGrabModule) { + return nearGrabModule.isReady(controllerData).active; + } } return false; }; From eb7bde1bfca86eecf2ef8d291313f9dfe61c3603 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 17 Jul 2018 15:38:56 -0700 Subject: [PATCH 002/210] switching near grab priority to be before web surface laser --- .../highlightNearbyEntities.js | 2 +- .../controllerModules/inEditMode.js | 2 +- .../controllerModules/inVREditMode.js | 2 +- .../controllerModules/nearActionGrabEntity.js | 2 +- .../nearGrabHyperLinkEntity.js | 2 +- .../controllerModules/nearParentGrabEntity.js | 2 +- .../controllerModules/nearTrigger.js | 2 +- .../controllerModules/webSurfaceLaserInput.js | 32 +++++++++++++++++-- 8 files changed, 36 insertions(+), 10 deletions(-) diff --git a/scripts/system/controllers/controllerModules/highlightNearbyEntities.js b/scripts/system/controllers/controllerModules/highlightNearbyEntities.js index bc09ebee7a..3a33082f64 100644 --- a/scripts/system/controllers/controllerModules/highlightNearbyEntities.js +++ b/scripts/system/controllers/controllerModules/highlightNearbyEntities.js @@ -37,7 +37,7 @@ this.highlightedEntities = []; this.parameters = dispatcherUtils.makeDispatcherModuleParameters( - 480, + 120, this.hand === dispatcherUtils.RIGHT_HAND ? ["rightHand"] : ["leftHand"], [], 100); diff --git a/scripts/system/controllers/controllerModules/inEditMode.js b/scripts/system/controllers/controllerModules/inEditMode.js index a724c2037b..0c24e64af7 100644 --- a/scripts/system/controllers/controllerModules/inEditMode.js +++ b/scripts/system/controllers/controllerModules/inEditMode.js @@ -30,7 +30,7 @@ Script.include("/~/system/libraries/utils.js"); this.reticleMaxY; this.parameters = makeDispatcherModuleParameters( - 160, + 200, this.hand === RIGHT_HAND ? ["rightHand", "rightHandEquip", "rightHandTrigger"] : ["leftHand", "leftHandEquip", "leftHandTrigger"], [], 100, diff --git a/scripts/system/controllers/controllerModules/inVREditMode.js b/scripts/system/controllers/controllerModules/inVREditMode.js index 7b78d5e1c4..02863cf935 100644 --- a/scripts/system/controllers/controllerModules/inVREditMode.js +++ b/scripts/system/controllers/controllerModules/inVREditMode.js @@ -21,7 +21,7 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); this.disableModules = false; var NO_HAND_LASER = -1; // Invalid hand parameter so that default laser is not displayed. this.parameters = makeDispatcherModuleParameters( - 200, // Not too high otherwise the tablet laser doesn't work. + 240, // Not too high otherwise the tablet laser doesn't work. this.hand === RIGHT_HAND ? ["rightHand", "rightHandEquip", "rightHandTrigger"] : ["leftHand", "leftHandEquip", "leftHandTrigger"], diff --git a/scripts/system/controllers/controllerModules/nearActionGrabEntity.js b/scripts/system/controllers/controllerModules/nearActionGrabEntity.js index f528c6f80f..f3574c668f 100644 --- a/scripts/system/controllers/controllerModules/nearActionGrabEntity.js +++ b/scripts/system/controllers/controllerModules/nearActionGrabEntity.js @@ -26,7 +26,7 @@ Script.include("/~/system/libraries/cloneEntityUtils.js"); this.hapticTargetID = null; this.parameters = makeDispatcherModuleParameters( - 500, + 140, this.hand === RIGHT_HAND ? ["rightHand"] : ["leftHand"], [], 100); diff --git a/scripts/system/controllers/controllerModules/nearGrabHyperLinkEntity.js b/scripts/system/controllers/controllerModules/nearGrabHyperLinkEntity.js index 962ae89bb9..366fcd3032 100644 --- a/scripts/system/controllers/controllerModules/nearGrabHyperLinkEntity.js +++ b/scripts/system/controllers/controllerModules/nearGrabHyperLinkEntity.js @@ -21,7 +21,7 @@ this.hyperlink = ""; this.parameters = makeDispatcherModuleParameters( - 485, + 125, this.hand === RIGHT_HAND ? ["rightHand"] : ["leftHand"], [], 100); diff --git a/scripts/system/controllers/controllerModules/nearParentGrabEntity.js b/scripts/system/controllers/controllerModules/nearParentGrabEntity.js index 38334f5523..ea55ee33f9 100644 --- a/scripts/system/controllers/controllerModules/nearParentGrabEntity.js +++ b/scripts/system/controllers/controllerModules/nearParentGrabEntity.js @@ -39,7 +39,7 @@ Script.include("/~/system/libraries/cloneEntityUtils.js"); this.cloneAllowed = true; this.parameters = makeDispatcherModuleParameters( - 500, + 140, this.hand === RIGHT_HAND ? ["rightHand"] : ["leftHand"], [], 100); diff --git a/scripts/system/controllers/controllerModules/nearTrigger.js b/scripts/system/controllers/controllerModules/nearTrigger.js index 6a9cd9fbcd..f1126dedc3 100644 --- a/scripts/system/controllers/controllerModules/nearTrigger.js +++ b/scripts/system/controllers/controllerModules/nearTrigger.js @@ -29,7 +29,7 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); this.startSent = false; this.parameters = makeDispatcherModuleParameters( - 480, + 120, this.hand === RIGHT_HAND ? ["rightHandTrigger", "rightHand"] : ["leftHandTrigger", "leftHand"], [], 100); diff --git a/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js b/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js index 1706fadbb7..527ba0bd2f 100644 --- a/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js +++ b/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js @@ -22,7 +22,7 @@ Script.include("/~/system/libraries/controllers.js"); this.running = false; this.parameters = makeDispatcherModuleParameters( - 120, + 160, this.hand === RIGHT_HAND ? ["rightHand"] : ["leftHand"], [], 100, @@ -60,6 +60,30 @@ Script.include("/~/system/libraries/controllers.js"); return this.hand === RIGHT_HAND ? leftOverlayLaserInput : rightOverlayLaserInput; }; + this.isPointingAtGrabbableEntity = function(controllerData, triggerPressed) { + // we are searching for an entity that is not a web entity. We want to be able to + // grab a non-web entity if the ray-pick intersects one. + var intersection = controllerData.rayPicks[this.hand]; + if(intersection.type === Picks.INTERSECTED_ENTITY) { + // is pointing at an entity. + var entityProperty = Entities.getEntityProperties(intersection.objectID); + var entityType = entityProperty.type; + var isGrabbable = entityIsGrabbable(entityProperty); + return (isGrabbable && triggerPressed && entityType !== "Web"); + } else if (intersection.type === Picks.INTERSECTED_OVERLAY) { + var objectID = intersection.objectID; + if ((HMD.tabletID && objectID === HMD.tabletID) || + (HMD.tabletScreenID && objectID === HMD.tabletScreenID) || + (HMD.homeButtonID && objectID === HMD.homeButtonID)) { + return true; + } else { + var overlayType = Overlays.getOverlayType(objectID); + return overlayType === "web3d" || triggerPressed; + } + } + return false; + } + this.isPointingAtTriggerable = function(controllerData, triggerPressed) { // allow pointing at tablet, unlocked web entities, or web overlays automatically without pressing trigger, // but for pointing at locked web entities or non-web overlays user must be pressing trigger @@ -113,7 +137,8 @@ Script.include("/~/system/libraries/controllers.js"); var isTriggerPressed = controllerData.triggerValues[this.hand] > TRIGGER_OFF_VALUE && controllerData.triggerValues[this.otherHand] <= TRIGGER_OFF_VALUE; var allowThisModule = !otherModuleRunning || isTriggerPressed; - if (allowThisModule && this.isPointingAtTriggerable(controllerData, isTriggerPressed)) { + if (allowThisModule && this.isPointingAtTriggerable(controllerData, isTriggerPressed)) { + //this.isPointingAtGrabbableEntity(controllerData, isTriggerPressed)) { this.updateAllwaysOn(); if (isTriggerPressed) { this.dominantHandOverride = true; // Override dominant hand. @@ -134,7 +159,8 @@ Script.include("/~/system/libraries/controllers.js"); var allowThisModule = !otherModuleRunning && !grabModuleNeedsToRun; var isTriggerPressed = controllerData.triggerValues[this.hand] > TRIGGER_OFF_VALUE; var laserOn = isTriggerPressed || this.parameters.handLaser.allwaysOn; - if (allowThisModule && (laserOn && this.isPointingAtTriggerable(controllerData, isTriggerPressed))) { + if (allowThisModule && (laserOn && this.isPointingAtTriggerable(controllerData, isTriggerPressed)) && + this.isPointingAtGrabbableEntity(controllerData, isTriggerPressed)) { this.running = true; return makeRunningValues(true, [], []); } From 30ca5a8cbd08a7fb440ea4baaf336c74c7a3e770 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 17 Jul 2018 16:44:49 -0700 Subject: [PATCH 003/210] code cleanup to use web laser if laser is not pointing at grabbable entity --- .../controllerModules/webSurfaceLaserInput.js | 22 +++++-------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js b/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js index 527ba0bd2f..9e07e125e7 100644 --- a/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js +++ b/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js @@ -64,25 +64,15 @@ Script.include("/~/system/libraries/controllers.js"); // we are searching for an entity that is not a web entity. We want to be able to // grab a non-web entity if the ray-pick intersects one. var intersection = controllerData.rayPicks[this.hand]; - if(intersection.type === Picks.INTERSECTED_ENTITY) { + if (intersection.type === Picks.INTERSECTED_ENTITY) { // is pointing at an entity. var entityProperty = Entities.getEntityProperties(intersection.objectID); var entityType = entityProperty.type; var isGrabbable = entityIsGrabbable(entityProperty); return (isGrabbable && triggerPressed && entityType !== "Web"); - } else if (intersection.type === Picks.INTERSECTED_OVERLAY) { - var objectID = intersection.objectID; - if ((HMD.tabletID && objectID === HMD.tabletID) || - (HMD.tabletScreenID && objectID === HMD.tabletScreenID) || - (HMD.homeButtonID && objectID === HMD.homeButtonID)) { - return true; - } else { - var overlayType = Overlays.getOverlayType(objectID); - return overlayType === "web3d" || triggerPressed; - } } return false; - } + }; this.isPointingAtTriggerable = function(controllerData, triggerPressed) { // allow pointing at tablet, unlocked web entities, or web overlays automatically without pressing trigger, @@ -137,8 +127,8 @@ Script.include("/~/system/libraries/controllers.js"); var isTriggerPressed = controllerData.triggerValues[this.hand] > TRIGGER_OFF_VALUE && controllerData.triggerValues[this.otherHand] <= TRIGGER_OFF_VALUE; var allowThisModule = !otherModuleRunning || isTriggerPressed; - if (allowThisModule && this.isPointingAtTriggerable(controllerData, isTriggerPressed)) { - //this.isPointingAtGrabbableEntity(controllerData, isTriggerPressed)) { + if (allowThisModule && this.isPointingAtTriggerable(controllerData, isTriggerPressed) && + !this.isPointingAtGrabbableEntity(controllerData, isTriggerPressed)) { this.updateAllwaysOn(); if (isTriggerPressed) { this.dominantHandOverride = true; // Override dominant hand. @@ -159,8 +149,8 @@ Script.include("/~/system/libraries/controllers.js"); var allowThisModule = !otherModuleRunning && !grabModuleNeedsToRun; var isTriggerPressed = controllerData.triggerValues[this.hand] > TRIGGER_OFF_VALUE; var laserOn = isTriggerPressed || this.parameters.handLaser.allwaysOn; - if (allowThisModule && (laserOn && this.isPointingAtTriggerable(controllerData, isTriggerPressed)) && - this.isPointingAtGrabbableEntity(controllerData, isTriggerPressed)) { + if (allowThisModule && (laserOn && this.isPointingAtTriggerable(controllerData, isTriggerPressed)) && + !this.isPointingAtGrabbableEntity(controllerData, isTriggerPressed)) { this.running = true; return makeRunningValues(true, [], []); } From ac642f126a02ebb66303fee75f8dc3bf7ff06922 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 17 Jul 2018 20:52:50 -0700 Subject: [PATCH 004/210] adding extra conditional to ensure all modules are checked --- .../controllers/controllerModules/webSurfaceLaserInput.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js b/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js index 9e07e125e7..03c8a65637 100644 --- a/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js +++ b/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js @@ -44,12 +44,12 @@ Script.include("/~/system/libraries/controllers.js"); } nearGrabName = this.hand === RIGHT_HAND ? "RightNearParentingGrabEntity" : "LeftNearParentingGrabEntity"; nearGrabModule = getEnabledModuleByName(nearGrabName); - if (nearGrabModule) { + if (nearGrabModule && nearGrabModule.isReady(controllerData)) { return nearGrabModule.isReady(controllerData).active; } nearGrabName = this.hand === RIGHT_HAND ? "RightNearActionGrabEntity" : "LeftNearActionGrabEntity"; nearGrabModule = getEnabledModuleByName(nearGrabName); - if (nearGrabModule) { + if (nearGrabModule && nearGrabModule.isReady(controllerData)) { return nearGrabModule.isReady(controllerData).active; } } From 5276d84aa5ccbb75f19f640cf60af794dba7d516 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Thu, 19 Jul 2018 17:08:12 -0700 Subject: [PATCH 005/210] pushing what i coded out loud - it broke the way grabbing works --- .../controllers/controllerDispatcher.js | 1 + .../controllerModules/webSurfaceLaserInput.js | 56 +++++++++++++------ 2 files changed, 40 insertions(+), 17 deletions(-) diff --git a/scripts/system/controllers/controllerDispatcher.js b/scripts/system/controllers/controllerDispatcher.js index 4002fd297b..09d09248fc 100644 --- a/scripts/system/controllers/controllerDispatcher.js +++ b/scripts/system/controllers/controllerDispatcher.js @@ -298,6 +298,7 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); triggerValues: [_this.leftTriggerValue, _this.rightTriggerValue], triggerClicks: [_this.leftTriggerClicked, _this.rightTriggerClicked], secondaryValues: [_this.leftSecondaryValue, _this.rightSecondaryValue], + pointers: [_this.leftPointer, _this.rightPointer ], controllerLocations: controllerLocations, nearbyEntityProperties: nearbyEntityProperties, nearbyEntityPropertiesByID: nearbyEntityPropertiesByID, diff --git a/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js b/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js index 03c8a65637..3ee50d0f75 100644 --- a/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js +++ b/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js @@ -5,11 +5,12 @@ // Distributed under the Apache License, Version 2.0. // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -/* global Script, Entities, Controller, RIGHT_HAND, LEFT_HAND, enableDispatcherModule, disableDispatcherModule, - makeRunningValues, Messages, Quat, Vec3, makeDispatcherModuleParameters, Overlays, ZERO_VEC, HMD, - INCHES_TO_METERS, DEFAULT_REGISTRATION_POINT, getGrabPointSphereOffset, COLORS_GRAB_SEARCHING_HALF_SQUEEZE, - COLORS_GRAB_SEARCHING_FULL_SQUEEZE, COLORS_GRAB_DISTANCE_HOLD, DEFAULT_SEARCH_SPHERE_DISTANCE, TRIGGER_ON_VALUE, - TRIGGER_OFF_VALUE, getEnabledModuleByName, PICK_MAX_DISTANCE, ContextOverlay, Picks, makeLaserParams +/* global Script, Entities, Controller, RIGHT_HAND, LEFT_HAND, getControllerWorldLocation, + enableDispatcherModule, disableDispatcherModule, makeRunningValues, Messages, Quat, Vec3, + makeDispatcherModuleParameters, Overlays, ZERO_VEC, HMD, INCHES_TO_METERS, DEFAULT_REGISTRATION_POINT, + getGrabPointSphereOffset, COLORS_GRAB_SEARCHING_HALF_SQUEEZE, COLORS_GRAB_SEARCHING_FULL_SQUEEZE, + COLORS_GRAB_DISTANCE_HOLD, DEFAULT_SEARCH_SPHERE_DISTANCE, TRIGGER_ON_VALUE, TRIGGER_OFF_VALUE, + getEnabledModuleByName, PICK_MAX_DISTANCE, ContextOverlay, Picks, makeLaserParams */ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); @@ -19,6 +20,8 @@ Script.include("/~/system/libraries/controllers.js"); function WebSurfaceLaserInput(hand) { this.hand = hand; this.otherHand = this.hand === RIGHT_HAND ? LEFT_HAND : RIGHT_HAND; + this.ignoredEntities = []; + this.lastObjectID = null; this.running = false; this.parameters = makeDispatcherModuleParameters( @@ -60,16 +63,20 @@ Script.include("/~/system/libraries/controllers.js"); return this.hand === RIGHT_HAND ? leftOverlayLaserInput : rightOverlayLaserInput; }; - this.isPointingAtGrabbableEntity = function(controllerData, triggerPressed) { + this.isPointingAtNearGrabbableEntity = function(controllerData, triggerPressed) { // we are searching for an entity that is not a web entity. We want to be able to // grab a non-web entity if the ray-pick intersects one. var intersection = controllerData.rayPicks[this.hand]; if (intersection.type === Picks.INTERSECTED_ENTITY) { // is pointing at an entity. - var entityProperty = Entities.getEntityProperties(intersection.objectID); - var entityType = entityProperty.type; - var isGrabbable = entityIsGrabbable(entityProperty); - return (isGrabbable && triggerPressed && entityType !== "Web"); + var entityProperties = Entities.getEntityProperties(intersection.objectID); + var entityType = entityProperties.type; + if (entityIsGrabbable(entityProperties)) { + // check if entity is near grabbable. + var distance = Vec3.distance(entityProperties.position, controllerData.controllerLocations[this.hand].position); + if (distance <= NEAR_GRAB_RADIUS * MyAvatar.sensorToWorldScale) + return (triggerPressed && entityType !== "Web"); + } } return false; }; @@ -78,21 +85,30 @@ Script.include("/~/system/libraries/controllers.js"); // allow pointing at tablet, unlocked web entities, or web overlays automatically without pressing trigger, // but for pointing at locked web entities or non-web overlays user must be pressing trigger var intersection = controllerData.rayPicks[this.hand]; + var objectID = intersection.objectID; if (intersection.type === Picks.INTERSECTED_OVERLAY) { - var objectID = intersection.objectID; if ((HMD.tabletID && objectID === HMD.tabletID) || (HMD.tabletScreenID && objectID === HMD.tabletScreenID) || (HMD.homeButtonID && objectID === HMD.homeButtonID)) { + this.lastObjectID = objectID; return true; } else { var overlayType = Overlays.getOverlayType(objectID); + this.lastObjectID = objectID; return overlayType === "web3d" || triggerPressed; } } else if (intersection.type === Picks.INTERSECTED_ENTITY) { - var entityProperty = Entities.getEntityProperties(intersection.objectID); - var entityType = entityProperty.type; - var isLocked = entityProperty.locked; - return entityType === "Web" && (!isLocked || triggerPressed); + var entityProperty = Entities.getEntityProperties(objectID); + if (entityProperty.type === "Web") { + var isLocked = entityProperty.locked; + this.lastObjectID = objectID; + return (!isLocked || triggerPressed); + } else if (this.ignoredEntities.indexOf(objectID) === -1 && triggerPressed && this.lastObjectID !== objectID) { + // ignore, preserve whether it's running or not. + console.log("I'm here"); + Pointers.setIgnoreItems(controllerData.pointers[this.hand], [objectID]); + this.ignoredEntities.push(objectID); + } } return false; }; @@ -110,6 +126,11 @@ Script.include("/~/system/libraries/controllers.js"); } }; + this.reAddIgnoredEntities = function(controllerData) { + Pointers.setIncludeItems(controllerData.pointers[this.hand], this.ignoredEntities); + this.ignoredEntities = []; + } + this.updateAllwaysOn = function() { var PREFER_STYLUS_OVER_LASER = "preferStylusOverLaser"; this.parameters.handLaser.allwaysOn = !Settings.getValue(PREFER_STYLUS_OVER_LASER, false); @@ -128,7 +149,7 @@ Script.include("/~/system/libraries/controllers.js"); controllerData.triggerValues[this.otherHand] <= TRIGGER_OFF_VALUE; var allowThisModule = !otherModuleRunning || isTriggerPressed; if (allowThisModule && this.isPointingAtTriggerable(controllerData, isTriggerPressed) && - !this.isPointingAtGrabbableEntity(controllerData, isTriggerPressed)) { + !this.isPointingAtNearGrabbableEntity(controllerData, isTriggerPressed)) { this.updateAllwaysOn(); if (isTriggerPressed) { this.dominantHandOverride = true; // Override dominant hand. @@ -150,11 +171,12 @@ Script.include("/~/system/libraries/controllers.js"); var isTriggerPressed = controllerData.triggerValues[this.hand] > TRIGGER_OFF_VALUE; var laserOn = isTriggerPressed || this.parameters.handLaser.allwaysOn; if (allowThisModule && (laserOn && this.isPointingAtTriggerable(controllerData, isTriggerPressed)) && - !this.isPointingAtGrabbableEntity(controllerData, isTriggerPressed)) { + !this.isPointingAtNearGrabbableEntity(controllerData, isTriggerPressed)) { this.running = true; return makeRunningValues(true, [], []); } this.deleteContextOverlay(); + this.reAddIgnoredEntities(controllerData); this.running = false; this.dominantHandOverride = false; return makeRunningValues(false, [], []); From 4e3a6cb320b8ea8507512c8d5a7ab54a52cf737f Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Fri, 20 Jul 2018 11:18:20 -0700 Subject: [PATCH 006/210] adding ignore for far-/near- grabbable entities when operating on web surface --- .../controllerModules/webSurfaceLaserInput.js | 35 ++++++------------- 1 file changed, 10 insertions(+), 25 deletions(-) diff --git a/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js b/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js index 3ee50d0f75..16e2c1a4f7 100644 --- a/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js +++ b/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js @@ -20,8 +20,6 @@ Script.include("/~/system/libraries/controllers.js"); function WebSurfaceLaserInput(hand) { this.hand = hand; this.otherHand = this.hand === RIGHT_HAND ? LEFT_HAND : RIGHT_HAND; - this.ignoredEntities = []; - this.lastObjectID = null; this.running = false; this.parameters = makeDispatcherModuleParameters( @@ -71,11 +69,15 @@ Script.include("/~/system/libraries/controllers.js"); // is pointing at an entity. var entityProperties = Entities.getEntityProperties(intersection.objectID); var entityType = entityProperties.type; - if (entityIsGrabbable(entityProperties)) { + if (entityIsGrabbable(entityProperties) && entityType !== "Web") { // check if entity is near grabbable. var distance = Vec3.distance(entityProperties.position, controllerData.controllerLocations[this.hand].position); - if (distance <= NEAR_GRAB_RADIUS * MyAvatar.sensorToWorldScale) - return (triggerPressed && entityType !== "Web"); + if (distance <= NEAR_GRAB_RADIUS * MyAvatar.sensorToWorldScale) { + return triggerPressed; + } else { + // far-grabbable, but still return it as true anyway + return false; + } } } return false; @@ -90,25 +92,15 @@ Script.include("/~/system/libraries/controllers.js"); if ((HMD.tabletID && objectID === HMD.tabletID) || (HMD.tabletScreenID && objectID === HMD.tabletScreenID) || (HMD.homeButtonID && objectID === HMD.homeButtonID)) { - this.lastObjectID = objectID; return true; } else { var overlayType = Overlays.getOverlayType(objectID); - this.lastObjectID = objectID; return overlayType === "web3d" || triggerPressed; } } else if (intersection.type === Picks.INTERSECTED_ENTITY) { var entityProperty = Entities.getEntityProperties(objectID); - if (entityProperty.type === "Web") { - var isLocked = entityProperty.locked; - this.lastObjectID = objectID; - return (!isLocked || triggerPressed); - } else if (this.ignoredEntities.indexOf(objectID) === -1 && triggerPressed && this.lastObjectID !== objectID) { - // ignore, preserve whether it's running or not. - console.log("I'm here"); - Pointers.setIgnoreItems(controllerData.pointers[this.hand], [objectID]); - this.ignoredEntities.push(objectID); - } + var isLocked = entityProperty.locked; + return (!isLocked || triggerPressed || entityProperty.type === "Web"); } return false; }; @@ -126,11 +118,6 @@ Script.include("/~/system/libraries/controllers.js"); } }; - this.reAddIgnoredEntities = function(controllerData) { - Pointers.setIncludeItems(controllerData.pointers[this.hand], this.ignoredEntities); - this.ignoredEntities = []; - } - this.updateAllwaysOn = function() { var PREFER_STYLUS_OVER_LASER = "preferStylusOverLaser"; this.parameters.handLaser.allwaysOn = !Settings.getValue(PREFER_STYLUS_OVER_LASER, false); @@ -148,8 +135,7 @@ Script.include("/~/system/libraries/controllers.js"); var isTriggerPressed = controllerData.triggerValues[this.hand] > TRIGGER_OFF_VALUE && controllerData.triggerValues[this.otherHand] <= TRIGGER_OFF_VALUE; var allowThisModule = !otherModuleRunning || isTriggerPressed; - if (allowThisModule && this.isPointingAtTriggerable(controllerData, isTriggerPressed) && - !this.isPointingAtNearGrabbableEntity(controllerData, isTriggerPressed)) { + if (allowThisModule && this.isPointingAtTriggerable(controllerData, isTriggerPressed)) { this.updateAllwaysOn(); if (isTriggerPressed) { this.dominantHandOverride = true; // Override dominant hand. @@ -176,7 +162,6 @@ Script.include("/~/system/libraries/controllers.js"); return makeRunningValues(true, [], []); } this.deleteContextOverlay(); - this.reAddIgnoredEntities(controllerData); this.running = false; this.dominantHandOverride = false; return makeRunningValues(false, [], []); From be5fdef974c66ec7a4525acddb07d48870b5adba Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Fri, 20 Jul 2018 15:26:55 -0700 Subject: [PATCH 007/210] adding check in isReady for grabbing non-web entitys --- .../controllers/controllerDispatcher.js | 48 ++++++++++++++++++- .../controllerModules/webSurfaceLaserInput.js | 19 ++++---- 2 files changed, 57 insertions(+), 10 deletions(-) diff --git a/scripts/system/controllers/controllerDispatcher.js b/scripts/system/controllers/controllerDispatcher.js index 09d09248fc..8dbf4a6789 100644 --- a/scripts/system/controllers/controllerDispatcher.js +++ b/scripts/system/controllers/controllerDispatcher.js @@ -31,6 +31,7 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); var PROFILE = false; var DEBUG = false; + var DEBUG_OVERLAY = true; if (typeof Test !== "undefined") { PROFILE = true; @@ -48,6 +49,7 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); this.tabletID = null; this.blacklist = []; this.pointerManager = new PointerManager(); + this.debugOverlayID = null; // a module can occupy one or more "activity" slots while it's running. If all the required slots for a module are // not set to false (not in use), a module cannot start. When a module is using a slot, that module's name @@ -298,7 +300,6 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); triggerValues: [_this.leftTriggerValue, _this.rightTriggerValue], triggerClicks: [_this.leftTriggerClicked, _this.rightTriggerClicked], secondaryValues: [_this.leftSecondaryValue, _this.rightSecondaryValue], - pointers: [_this.leftPointer, _this.rightPointer ], controllerLocations: controllerLocations, nearbyEntityProperties: nearbyEntityProperties, nearbyEntityPropertiesByID: nearbyEntityPropertiesByID, @@ -378,6 +379,48 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); } } _this.pointerManager.updatePointersRenderState(controllerData.triggerClicks, controllerData.triggerValues); + + if (DEBUG_OVERLAY) { + if (!_this.debugOverlayID) { + + var textWidth = 0.4; + var textHeight = 0.3; + var numberOfLines = 15; + var textMargin = 0.02; + var lineHeight = (textHeight - (2 * textMargin)) / numberOfLines; + + _this.debugOverlayID = Overlays.addOverlay("text3d", { + localPosition: { x: 0.3, y: 0.2, z: 1.1 }, + localRotation: { x: 0.0, y: 0.0, z: 0.0, w: 1.0 }, + parentID: MyAvatar.sessionUUID, + parentJointIndex: MyAvatar.getJointIndex("Head"), + dimensions: { x: textWidth, y: textHeight }, + backgroundColor: { red: 0, green: 0, blue: 0 }, + color: { red: 255, green: 255, blue: 255 }, + topMargin: textMargin, + leftMargin: textMargin, + bottomMargin: textMargin, + rightMargin: textMargin, + text: "", + lineHeight: lineHeight, + alpha: 0.9, + backgroundAlpha: 0.9, + ignoreRayIntersection: true, + visible: true, + isFacingAvatar: true + }); + } + + var debugText = ""; + Object.keys(_this.runningPluginNames).forEach(function (pluginName) { + if (_this.runningPluginNames[pluginName]) { + var plugin = controllerDispatcherPlugins[pluginName]; + debugText += pluginName + ": " + plugin.parameters.priority + "\n"; + } + }); + Overlays.editOverlay(_this.debugOverlayID, { text: debugText }); + } + if (PROFILE) { Script.endProfileRange("dispatch.run"); } @@ -481,6 +524,9 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); this.cleanup = function () { Controller.disableMapping(MAPPING_NAME); _this.pointerManager.removePointers(); + if (_this.debugOverlayID) { + Overlays.deleteOverlay(_this.debugOverlayID); + } Pointers.removePointer(this.mouseRayPick); Selection.disableListHighlight(DISPATCHER_HOVERING_LIST); }; diff --git a/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js b/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js index 16e2c1a4f7..16cf2eef5c 100644 --- a/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js +++ b/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js @@ -5,12 +5,11 @@ // Distributed under the Apache License, Version 2.0. // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -/* global Script, Entities, Controller, RIGHT_HAND, LEFT_HAND, getControllerWorldLocation, - enableDispatcherModule, disableDispatcherModule, makeRunningValues, Messages, Quat, Vec3, - makeDispatcherModuleParameters, Overlays, ZERO_VEC, HMD, INCHES_TO_METERS, DEFAULT_REGISTRATION_POINT, - getGrabPointSphereOffset, COLORS_GRAB_SEARCHING_HALF_SQUEEZE, COLORS_GRAB_SEARCHING_FULL_SQUEEZE, - COLORS_GRAB_DISTANCE_HOLD, DEFAULT_SEARCH_SPHERE_DISTANCE, TRIGGER_ON_VALUE, TRIGGER_OFF_VALUE, - getEnabledModuleByName, PICK_MAX_DISTANCE, ContextOverlay, Picks, makeLaserParams +/* global Script, Entities, Controller, RIGHT_HAND, LEFT_HAND, enableDispatcherModule, disableDispatcherModule, + makeRunningValues, Messages, Quat, Vec3, makeDispatcherModuleParameters, Overlays, ZERO_VEC, HMD, + INCHES_TO_METERS, DEFAULT_REGISTRATION_POINT, getGrabPointSphereOffset, COLORS_GRAB_SEARCHING_HALF_SQUEEZE, + COLORS_GRAB_SEARCHING_FULL_SQUEEZE, COLORS_GRAB_DISTANCE_HOLD, DEFAULT_SEARCH_SPHERE_DISTANCE, TRIGGER_ON_VALUE, + TRIGGER_OFF_VALUE, getEnabledModuleByName, PICK_MAX_DISTANCE, ContextOverlay, Picks, makeLaserParams */ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); @@ -76,7 +75,7 @@ Script.include("/~/system/libraries/controllers.js"); return triggerPressed; } else { // far-grabbable, but still return it as true anyway - return false; + return true; } } } @@ -99,8 +98,9 @@ Script.include("/~/system/libraries/controllers.js"); } } else if (intersection.type === Picks.INTERSECTED_ENTITY) { var entityProperty = Entities.getEntityProperties(objectID); + var entityType = entityProperty.type; var isLocked = entityProperty.locked; - return (!isLocked || triggerPressed || entityProperty.type === "Web"); + return (!isLocked || triggerPressed || entityType === "Web"); } return false; }; @@ -135,7 +135,8 @@ Script.include("/~/system/libraries/controllers.js"); var isTriggerPressed = controllerData.triggerValues[this.hand] > TRIGGER_OFF_VALUE && controllerData.triggerValues[this.otherHand] <= TRIGGER_OFF_VALUE; var allowThisModule = !otherModuleRunning || isTriggerPressed; - if (allowThisModule && this.isPointingAtTriggerable(controllerData, isTriggerPressed)) { + if (allowThisModule && this.isPointingAtTriggerable(controllerData, isTriggerPressed) && + !this.isPointingAtNearGrabbableEntity(controllerData, isTriggerPressed)) { this.updateAllwaysOn(); if (isTriggerPressed) { this.dominantHandOverride = true; // Override dominant hand. From 32886d67d98b7d2b964b25e39ce1a821a05593fe Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Fri, 20 Jul 2018 17:17:36 -0700 Subject: [PATCH 008/210] optimizing near-/far- grabbable entities a bit --- .../controllers/controllerDispatcher.js | 74 +++---- .../system/controllers/controllerModules/' | 181 ++++++++++++++++++ .../controllerModules/webSurfaceLaserInput.js | 12 +- 3 files changed, 223 insertions(+), 44 deletions(-) create mode 100644 scripts/system/controllers/controllerModules/' diff --git a/scripts/system/controllers/controllerDispatcher.js b/scripts/system/controllers/controllerDispatcher.js index 8dbf4a6789..399ccf0ba3 100644 --- a/scripts/system/controllers/controllerDispatcher.js +++ b/scripts/system/controllers/controllerDispatcher.js @@ -380,46 +380,46 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); } _this.pointerManager.updatePointersRenderState(controllerData.triggerClicks, controllerData.triggerValues); - if (DEBUG_OVERLAY) { - if (!_this.debugOverlayID) { +/* if (DEBUG_OVERLAY) {*/ + //if (!_this.debugOverlayID) { - var textWidth = 0.4; - var textHeight = 0.3; - var numberOfLines = 15; - var textMargin = 0.02; - var lineHeight = (textHeight - (2 * textMargin)) / numberOfLines; + //var textWidth = 0.4; + //var textHeight = 0.3; + //var numberOfLines = 15; + //var textMargin = 0.02; + //var lineHeight = (textHeight - (2 * textMargin)) / numberOfLines; - _this.debugOverlayID = Overlays.addOverlay("text3d", { - localPosition: { x: 0.3, y: 0.2, z: 1.1 }, - localRotation: { x: 0.0, y: 0.0, z: 0.0, w: 1.0 }, - parentID: MyAvatar.sessionUUID, - parentJointIndex: MyAvatar.getJointIndex("Head"), - dimensions: { x: textWidth, y: textHeight }, - backgroundColor: { red: 0, green: 0, blue: 0 }, - color: { red: 255, green: 255, blue: 255 }, - topMargin: textMargin, - leftMargin: textMargin, - bottomMargin: textMargin, - rightMargin: textMargin, - text: "", - lineHeight: lineHeight, - alpha: 0.9, - backgroundAlpha: 0.9, - ignoreRayIntersection: true, - visible: true, - isFacingAvatar: true - }); - } + //_this.debugOverlayID = Overlays.addOverlay("text3d", { + //localPosition: { x: 0.3, y: 0.2, z: 1.1 }, + //localRotation: { x: 0.0, y: 0.0, z: 0.0, w: 1.0 }, + //parentID: MyAvatar.sessionUUID, + //parentJointIndex: MyAvatar.getJointIndex("Head"), + //dimensions: { x: textWidth, y: textHeight }, + //backgroundColor: { red: 0, green: 0, blue: 0 }, + //color: { red: 255, green: 255, blue: 255 }, + //topMargin: textMargin, + //leftMargin: textMargin, + //bottomMargin: textMargin, + //rightMargin: textMargin, + //text: "", + //lineHeight: lineHeight, + //alpha: 0.9, + //backgroundAlpha: 0.9, + //ignoreRayIntersection: true, + //visible: true, + //isFacingAvatar: true + //}); + //} - var debugText = ""; - Object.keys(_this.runningPluginNames).forEach(function (pluginName) { - if (_this.runningPluginNames[pluginName]) { - var plugin = controllerDispatcherPlugins[pluginName]; - debugText += pluginName + ": " + plugin.parameters.priority + "\n"; - } - }); - Overlays.editOverlay(_this.debugOverlayID, { text: debugText }); - } + //var debugText = ""; + //Object.keys(_this.runningPluginNames).forEach(function (pluginName) { + //if (_this.runningPluginNames[pluginName]) { + //var plugin = controllerDispatcherPlugins[pluginName]; + //debugText += pluginName + ": " + plugin.parameters.priority + "\n"; + //} + //}); + //Overlays.editOverlay(_this.debugOverlayID, { text: debugText }); + /*}*/ if (PROFILE) { Script.endProfileRange("dispatch.run"); diff --git a/scripts/system/controllers/controllerModules/' b/scripts/system/controllers/controllerModules/' new file mode 100644 index 0000000000..8217e0d022 --- /dev/null +++ b/scripts/system/controllers/controllerModules/' @@ -0,0 +1,181 @@ +"use strict"; + +// webSurfaceLaserInput.js +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html + +/* global Script, Entities, Controller, RIGHT_HAND, LEFT_HAND, enableDispatcherModule, disableDispatcherModule, + makeRunningValues, Messages, Quat, Vec3, makeDispatcherModuleParameters, Overlays, ZERO_VEC, HMD, + INCHES_TO_METERS, DEFAULT_REGISTRATION_POINT, getGrabPointSphereOffset, COLORS_GRAB_SEARCHING_HALF_SQUEEZE, + COLORS_GRAB_SEARCHING_FULL_SQUEEZE, COLORS_GRAB_DISTANCE_HOLD, DEFAULT_SEARCH_SPHERE_DISTANCE, TRIGGER_ON_VALUE, + TRIGGER_OFF_VALUE, getEnabledModuleByName, PICK_MAX_DISTANCE, ContextOverlay, Picks, makeLaserParams +*/ + +Script.include("/~/system/libraries/controllerDispatcherUtils.js"); +Script.include("/~/system/libraries/controllers.js"); + +(function() { + function WebSurfaceLaserInput(hand) { + this.hand = hand; + this.otherHand = this.hand === RIGHT_HAND ? LEFT_HAND : RIGHT_HAND; + this.running = false; + + this.parameters = makeDispatcherModuleParameters( + 160, + this.hand === RIGHT_HAND ? ["rightHand"] : ["leftHand"], + [], + 100, + makeLaserParams(hand, true)); + + this.grabModuleWantsNearbyOverlay = function(controllerData) { + if (controllerData.triggerValues[this.hand] > TRIGGER_ON_VALUE) { + var nearGrabName = this.hand === RIGHT_HAND ? "RightNearParentingGrabOverlay" : "LeftNearParentingGrabOverlay"; + var nearGrabModule = getEnabledModuleByName(nearGrabName); + if (nearGrabModule) { + var candidateOverlays = controllerData.nearbyOverlayIDs[this.hand]; + var grabbableOverlays = candidateOverlays.filter(function(overlayID) { + return Overlays.getProperty(overlayID, "grabbable"); + }); + var target = nearGrabModule.getTargetID(grabbableOverlays, controllerData); + if (target) { + return true; + } + } + nearGrabName = this.hand === RIGHT_HAND ? "RightNearParentingGrabEntity" : "LeftNearParentingGrabEntity"; + nearGrabModule = getEnabledModuleByName(nearGrabName); + if (nearGrabModule && nearGrabModule.isReady(controllerData)) { + return nearGrabModule.isReady(controllerData).active; + } + nearGrabName = this.hand === RIGHT_HAND ? "RightNearActionGrabEntity" : "LeftNearActionGrabEntity"; + nearGrabModule = getEnabledModuleByName(nearGrabName); + if (nearGrabModule && nearGrabModule.isReady(controllerData)) { + return nearGrabModule.isReady(controllerData).active; + } + } + return false; + }; + + this.getOtherModule = function() { + return this.hand === RIGHT_HAND ? leftOverlayLaserInput : rightOverlayLaserInput; + }; + + this.isPointingAtNearGrabbableEntity = function(controllerData, triggerPressed) { + // we are searching for an entity that is not a web entity. We want to be able to + // grab a non-web entity if the ray-pick intersects one. + var intersection = controllerData.rayPicks[this.hand]; + if (intersection.type === Picks.INTERSECTED_ENTITY) { + // is pointing at an entity. + var entityProperties = Entities.getEntityProperties(intersection.objectID); + var entityType = entityProperties.type; + if (entityIsGrabbable(entityProperties) && entityType !== "Web") { + // check if entity is near grabbable. + var distance = Vec3.distance(entityProperties.position, controllerData.controllerLocations[this.hand].position); + if (distance >= NEAR_GRAB_RADIUS * MyAvatar.sensorToWorldScale) { + // far-grabbable, but still return it as true anyway + return true; + } + } + } + return false; + }; + + this.isPointingAtTriggerable = function(controllerData, triggerPressed) { + // allow pointing at tablet, unlocked web entities, or web overlays automatically without pressing trigger, + // but for pointing at locked web entities or non-web overlays user must be pressing trigger + var intersection = controllerData.rayPicks[this.hand]; + var objectID = intersection.objectID; + if (intersection.type === Picks.INTERSECTED_OVERLAY) { + if ((HMD.tabletID && objectID === HMD.tabletID) || + (HMD.tabletScreenID && objectID === HMD.tabletScreenID) || + (HMD.homeButtonID && objectID === HMD.homeButtonID)) { + return true; + } else { + var overlayType = Overlays.getOverlayType(objectID); + return overlayType === "web3d" || triggerPressed; + } + } else if (intersection.type === Picks.INTERSECTED_ENTITY) { + var entityProperty = Entities.getEntityProperties(objectID); + var entityType = entityProperty.type; + var isLocked = entityProperty.locked; + return (!isLocked || triggerPressed || entityType === "Web"); + } + return false; + }; + + this.deleteContextOverlay = function() { + var farGrabModule = getEnabledModuleByName(this.hand === RIGHT_HAND + ? "RightFarActionGrabEntity" : "LeftFarActionGrabEntity"); + if (farGrabModule) { + var entityWithContextOverlay = farGrabModule.entityWithContextOverlay; + + if (entityWithContextOverlay) { + ContextOverlay.destroyContextOverlay(entityWithContextOverlay); + farGrabModule.entityWithContextOverlay = false; + } + } + }; + + this.updateAllwaysOn = function() { + var PREFER_STYLUS_OVER_LASER = "preferStylusOverLaser"; + this.parameters.handLaser.allwaysOn = !Settings.getValue(PREFER_STYLUS_OVER_LASER, false); + }; + + this.getDominantHand = function() { + return MyAvatar.getDominantHand() === "right" ? 1 : 0; + }; + + this.dominantHandOverride = false; + + 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; + var allowThisModule = !otherModuleRunning || isTriggerPressed; + if (allowThisModule && this.isPointingAtTriggerable(controllerData, isTriggerPressed) && + (controllerData.nearbyEntityProperties[this.hand] !== [])) { + this.updateAllwaysOn(); + if (isTriggerPressed) { + this.dominantHandOverride = true; // Override dominant hand. + this.getOtherModule().dominantHandOverride = false; + } + if (this.parameters.handLaser.allwaysOn || isTriggerPressed) { + return makeRunningValues(true, [], []); + } + } + 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); + var allowThisModule = !otherModuleRunning && !grabModuleNeedsToRun; + var isTriggerPressed = controllerData.triggerValues[this.hand] > TRIGGER_OFF_VALUE; + var laserOn = isTriggerPressed || this.parameters.handLaser.allwaysOn; + if (allowThisModule && (laserOn && this.isPointingAtTriggerable(controllerData, isTriggerPressed)) && + (controllerData.nearbyEntityProperties[this.hand] !== [] || (this.isPointingAtNearGrabbableEntity(controllerData, isTriggerPressed)))) { + this.running = true; + return makeRunningValues(true, [], []); + } + this.deleteContextOverlay(); + this.running = false; + this.dominantHandOverride = false; + return makeRunningValues(false, [], []); + }; + } + + var leftOverlayLaserInput = new WebSurfaceLaserInput(LEFT_HAND); + var rightOverlayLaserInput = new WebSurfaceLaserInput(RIGHT_HAND); + + enableDispatcherModule("LeftWebSurfaceLaserInput", leftOverlayLaserInput); + enableDispatcherModule("RightWebSurfaceLaserInput", rightOverlayLaserInput); + + function cleanup() { + disableDispatcherModule("LeftWebSurfaceLaserInput"); + disableDispatcherModule("RightWebSurfaceLaserInput"); + } + Script.scriptEnding.connect(cleanup); +}()); diff --git a/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js b/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js index 16cf2eef5c..dd7bccf667 100644 --- a/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js +++ b/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js @@ -60,7 +60,7 @@ Script.include("/~/system/libraries/controllers.js"); return this.hand === RIGHT_HAND ? leftOverlayLaserInput : rightOverlayLaserInput; }; - this.isPointingAtNearGrabbableEntity = function(controllerData, triggerPressed) { + this.isPointingAtFarGrabbableEntity = function(controllerData, triggerPressed) { // we are searching for an entity that is not a web entity. We want to be able to // grab a non-web entity if the ray-pick intersects one. var intersection = controllerData.rayPicks[this.hand]; @@ -71,9 +71,7 @@ Script.include("/~/system/libraries/controllers.js"); if (entityIsGrabbable(entityProperties) && entityType !== "Web") { // check if entity is near grabbable. var distance = Vec3.distance(entityProperties.position, controllerData.controllerLocations[this.hand].position); - if (distance <= NEAR_GRAB_RADIUS * MyAvatar.sensorToWorldScale) { - return triggerPressed; - } else { + if (distance >= NEAR_GRAB_RADIUS * MyAvatar.sensorToWorldScale) { // far-grabbable, but still return it as true anyway return true; } @@ -135,8 +133,8 @@ Script.include("/~/system/libraries/controllers.js"); var isTriggerPressed = controllerData.triggerValues[this.hand] > TRIGGER_OFF_VALUE && controllerData.triggerValues[this.otherHand] <= TRIGGER_OFF_VALUE; var allowThisModule = !otherModuleRunning || isTriggerPressed; - if (allowThisModule && this.isPointingAtTriggerable(controllerData, isTriggerPressed) && - !this.isPointingAtNearGrabbableEntity(controllerData, isTriggerPressed)) { + if (allowThisModule && this.isPointingAtTriggerable(controllerData, isTriggerPressed) && + (controllerData.nearbyEntityProperties[this.hand] !== [])) { this.updateAllwaysOn(); if (isTriggerPressed) { this.dominantHandOverride = true; // Override dominant hand. @@ -158,7 +156,7 @@ Script.include("/~/system/libraries/controllers.js"); var isTriggerPressed = controllerData.triggerValues[this.hand] > TRIGGER_OFF_VALUE; var laserOn = isTriggerPressed || this.parameters.handLaser.allwaysOn; if (allowThisModule && (laserOn && this.isPointingAtTriggerable(controllerData, isTriggerPressed)) && - !this.isPointingAtNearGrabbableEntity(controllerData, isTriggerPressed)) { + (controllerData.nearbyEntityProperties[this.hand] !== [] || !(this.isPointingAtFarGrabbableEntity(controllerData, isTriggerPressed)))) { this.running = true; return makeRunningValues(true, [], []); } From 1880c49d0358b535156d00671499f14fddab2979 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Fri, 20 Jul 2018 17:18:58 -0700 Subject: [PATCH 009/210] removing garbage file --- .../system/controllers/controllerModules/' | 181 ------------------ 1 file changed, 181 deletions(-) delete mode 100644 scripts/system/controllers/controllerModules/' diff --git a/scripts/system/controllers/controllerModules/' b/scripts/system/controllers/controllerModules/' deleted file mode 100644 index 8217e0d022..0000000000 --- a/scripts/system/controllers/controllerModules/' +++ /dev/null @@ -1,181 +0,0 @@ -"use strict"; - -// webSurfaceLaserInput.js -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html - -/* global Script, Entities, Controller, RIGHT_HAND, LEFT_HAND, enableDispatcherModule, disableDispatcherModule, - makeRunningValues, Messages, Quat, Vec3, makeDispatcherModuleParameters, Overlays, ZERO_VEC, HMD, - INCHES_TO_METERS, DEFAULT_REGISTRATION_POINT, getGrabPointSphereOffset, COLORS_GRAB_SEARCHING_HALF_SQUEEZE, - COLORS_GRAB_SEARCHING_FULL_SQUEEZE, COLORS_GRAB_DISTANCE_HOLD, DEFAULT_SEARCH_SPHERE_DISTANCE, TRIGGER_ON_VALUE, - TRIGGER_OFF_VALUE, getEnabledModuleByName, PICK_MAX_DISTANCE, ContextOverlay, Picks, makeLaserParams -*/ - -Script.include("/~/system/libraries/controllerDispatcherUtils.js"); -Script.include("/~/system/libraries/controllers.js"); - -(function() { - function WebSurfaceLaserInput(hand) { - this.hand = hand; - this.otherHand = this.hand === RIGHT_HAND ? LEFT_HAND : RIGHT_HAND; - this.running = false; - - this.parameters = makeDispatcherModuleParameters( - 160, - this.hand === RIGHT_HAND ? ["rightHand"] : ["leftHand"], - [], - 100, - makeLaserParams(hand, true)); - - this.grabModuleWantsNearbyOverlay = function(controllerData) { - if (controllerData.triggerValues[this.hand] > TRIGGER_ON_VALUE) { - var nearGrabName = this.hand === RIGHT_HAND ? "RightNearParentingGrabOverlay" : "LeftNearParentingGrabOverlay"; - var nearGrabModule = getEnabledModuleByName(nearGrabName); - if (nearGrabModule) { - var candidateOverlays = controllerData.nearbyOverlayIDs[this.hand]; - var grabbableOverlays = candidateOverlays.filter(function(overlayID) { - return Overlays.getProperty(overlayID, "grabbable"); - }); - var target = nearGrabModule.getTargetID(grabbableOverlays, controllerData); - if (target) { - return true; - } - } - nearGrabName = this.hand === RIGHT_HAND ? "RightNearParentingGrabEntity" : "LeftNearParentingGrabEntity"; - nearGrabModule = getEnabledModuleByName(nearGrabName); - if (nearGrabModule && nearGrabModule.isReady(controllerData)) { - return nearGrabModule.isReady(controllerData).active; - } - nearGrabName = this.hand === RIGHT_HAND ? "RightNearActionGrabEntity" : "LeftNearActionGrabEntity"; - nearGrabModule = getEnabledModuleByName(nearGrabName); - if (nearGrabModule && nearGrabModule.isReady(controllerData)) { - return nearGrabModule.isReady(controllerData).active; - } - } - return false; - }; - - this.getOtherModule = function() { - return this.hand === RIGHT_HAND ? leftOverlayLaserInput : rightOverlayLaserInput; - }; - - this.isPointingAtNearGrabbableEntity = function(controllerData, triggerPressed) { - // we are searching for an entity that is not a web entity. We want to be able to - // grab a non-web entity if the ray-pick intersects one. - var intersection = controllerData.rayPicks[this.hand]; - if (intersection.type === Picks.INTERSECTED_ENTITY) { - // is pointing at an entity. - var entityProperties = Entities.getEntityProperties(intersection.objectID); - var entityType = entityProperties.type; - if (entityIsGrabbable(entityProperties) && entityType !== "Web") { - // check if entity is near grabbable. - var distance = Vec3.distance(entityProperties.position, controllerData.controllerLocations[this.hand].position); - if (distance >= NEAR_GRAB_RADIUS * MyAvatar.sensorToWorldScale) { - // far-grabbable, but still return it as true anyway - return true; - } - } - } - return false; - }; - - this.isPointingAtTriggerable = function(controllerData, triggerPressed) { - // allow pointing at tablet, unlocked web entities, or web overlays automatically without pressing trigger, - // but for pointing at locked web entities or non-web overlays user must be pressing trigger - var intersection = controllerData.rayPicks[this.hand]; - var objectID = intersection.objectID; - if (intersection.type === Picks.INTERSECTED_OVERLAY) { - if ((HMD.tabletID && objectID === HMD.tabletID) || - (HMD.tabletScreenID && objectID === HMD.tabletScreenID) || - (HMD.homeButtonID && objectID === HMD.homeButtonID)) { - return true; - } else { - var overlayType = Overlays.getOverlayType(objectID); - return overlayType === "web3d" || triggerPressed; - } - } else if (intersection.type === Picks.INTERSECTED_ENTITY) { - var entityProperty = Entities.getEntityProperties(objectID); - var entityType = entityProperty.type; - var isLocked = entityProperty.locked; - return (!isLocked || triggerPressed || entityType === "Web"); - } - return false; - }; - - this.deleteContextOverlay = function() { - var farGrabModule = getEnabledModuleByName(this.hand === RIGHT_HAND - ? "RightFarActionGrabEntity" : "LeftFarActionGrabEntity"); - if (farGrabModule) { - var entityWithContextOverlay = farGrabModule.entityWithContextOverlay; - - if (entityWithContextOverlay) { - ContextOverlay.destroyContextOverlay(entityWithContextOverlay); - farGrabModule.entityWithContextOverlay = false; - } - } - }; - - this.updateAllwaysOn = function() { - var PREFER_STYLUS_OVER_LASER = "preferStylusOverLaser"; - this.parameters.handLaser.allwaysOn = !Settings.getValue(PREFER_STYLUS_OVER_LASER, false); - }; - - this.getDominantHand = function() { - return MyAvatar.getDominantHand() === "right" ? 1 : 0; - }; - - this.dominantHandOverride = false; - - 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; - var allowThisModule = !otherModuleRunning || isTriggerPressed; - if (allowThisModule && this.isPointingAtTriggerable(controllerData, isTriggerPressed) && - (controllerData.nearbyEntityProperties[this.hand] !== [])) { - this.updateAllwaysOn(); - if (isTriggerPressed) { - this.dominantHandOverride = true; // Override dominant hand. - this.getOtherModule().dominantHandOverride = false; - } - if (this.parameters.handLaser.allwaysOn || isTriggerPressed) { - return makeRunningValues(true, [], []); - } - } - 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); - var allowThisModule = !otherModuleRunning && !grabModuleNeedsToRun; - var isTriggerPressed = controllerData.triggerValues[this.hand] > TRIGGER_OFF_VALUE; - var laserOn = isTriggerPressed || this.parameters.handLaser.allwaysOn; - if (allowThisModule && (laserOn && this.isPointingAtTriggerable(controllerData, isTriggerPressed)) && - (controllerData.nearbyEntityProperties[this.hand] !== [] || (this.isPointingAtNearGrabbableEntity(controllerData, isTriggerPressed)))) { - this.running = true; - return makeRunningValues(true, [], []); - } - this.deleteContextOverlay(); - this.running = false; - this.dominantHandOverride = false; - return makeRunningValues(false, [], []); - }; - } - - var leftOverlayLaserInput = new WebSurfaceLaserInput(LEFT_HAND); - var rightOverlayLaserInput = new WebSurfaceLaserInput(RIGHT_HAND); - - enableDispatcherModule("LeftWebSurfaceLaserInput", leftOverlayLaserInput); - enableDispatcherModule("RightWebSurfaceLaserInput", rightOverlayLaserInput); - - function cleanup() { - disableDispatcherModule("LeftWebSurfaceLaserInput"); - disableDispatcherModule("RightWebSurfaceLaserInput"); - } - Script.scriptEnding.connect(cleanup); -}()); From a2aeacab649d77acc8399291f719ea7b0f16c758 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Mon, 23 Jul 2018 12:17:19 -0700 Subject: [PATCH 010/210] adding fix for near grabbing with web entity --- .../controllerModules/webSurfaceLaserInput.js | 25 ++++++------------- 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js b/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js index dd7bccf667..5009bec0f5 100644 --- a/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js +++ b/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js @@ -60,25 +60,14 @@ Script.include("/~/system/libraries/controllers.js"); return this.hand === RIGHT_HAND ? leftOverlayLaserInput : rightOverlayLaserInput; }; - this.isPointingAtFarGrabbableEntity = function(controllerData, triggerPressed) { - // we are searching for an entity that is not a web entity. We want to be able to - // grab a non-web entity if the ray-pick intersects one. + this.isPointingAtNearGrabbableEntity = function(controllerData, triggerPressed) { var intersection = controllerData.rayPicks[this.hand]; - if (intersection.type === Picks.INTERSECTED_ENTITY) { - // is pointing at an entity. - var entityProperties = Entities.getEntityProperties(intersection.objectID); - var entityType = entityProperties.type; - if (entityIsGrabbable(entityProperties) && entityType !== "Web") { - // check if entity is near grabbable. - var distance = Vec3.distance(entityProperties.position, controllerData.controllerLocations[this.hand].position); - if (distance >= NEAR_GRAB_RADIUS * MyAvatar.sensorToWorldScale) { - // far-grabbable, but still return it as true anyway - return true; - } - } + var objectID = intersection.objectID; + if(intersection.type === Picks.INTERSECTED_ENTITY) { + return (controllerData.nearbyEntityPropertiesByID[objectID] !== null && triggerPressed); } return false; - }; + } this.isPointingAtTriggerable = function(controllerData, triggerPressed) { // allow pointing at tablet, unlocked web entities, or web overlays automatically without pressing trigger, @@ -98,7 +87,7 @@ Script.include("/~/system/libraries/controllers.js"); var entityProperty = Entities.getEntityProperties(objectID); var entityType = entityProperty.type; var isLocked = entityProperty.locked; - return (!isLocked || triggerPressed || entityType === "Web"); + return entityType === "Web" && (!isLocked || triggerPressed); } return false; }; @@ -156,7 +145,7 @@ Script.include("/~/system/libraries/controllers.js"); var isTriggerPressed = controllerData.triggerValues[this.hand] > TRIGGER_OFF_VALUE; var laserOn = isTriggerPressed || this.parameters.handLaser.allwaysOn; if (allowThisModule && (laserOn && this.isPointingAtTriggerable(controllerData, isTriggerPressed)) && - (controllerData.nearbyEntityProperties[this.hand] !== [] || !(this.isPointingAtFarGrabbableEntity(controllerData, isTriggerPressed)))) { + (controllerData.nearbyEntityProperties[this.hand] !== [])) { this.running = true; return makeRunningValues(true, [], []); } From 1ec136a19c04a3f9e39ee7f691667a3713eb1231 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Mon, 23 Jul 2018 12:18:26 -0700 Subject: [PATCH 011/210] removing debug overlay statements --- .../controllers/controllerDispatcher.js | 45 ------------------- 1 file changed, 45 deletions(-) diff --git a/scripts/system/controllers/controllerDispatcher.js b/scripts/system/controllers/controllerDispatcher.js index 399ccf0ba3..91ab824a54 100644 --- a/scripts/system/controllers/controllerDispatcher.js +++ b/scripts/system/controllers/controllerDispatcher.js @@ -31,7 +31,6 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); var PROFILE = false; var DEBUG = false; - var DEBUG_OVERLAY = true; if (typeof Test !== "undefined") { PROFILE = true; @@ -380,47 +379,6 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); } _this.pointerManager.updatePointersRenderState(controllerData.triggerClicks, controllerData.triggerValues); -/* if (DEBUG_OVERLAY) {*/ - //if (!_this.debugOverlayID) { - - //var textWidth = 0.4; - //var textHeight = 0.3; - //var numberOfLines = 15; - //var textMargin = 0.02; - //var lineHeight = (textHeight - (2 * textMargin)) / numberOfLines; - - //_this.debugOverlayID = Overlays.addOverlay("text3d", { - //localPosition: { x: 0.3, y: 0.2, z: 1.1 }, - //localRotation: { x: 0.0, y: 0.0, z: 0.0, w: 1.0 }, - //parentID: MyAvatar.sessionUUID, - //parentJointIndex: MyAvatar.getJointIndex("Head"), - //dimensions: { x: textWidth, y: textHeight }, - //backgroundColor: { red: 0, green: 0, blue: 0 }, - //color: { red: 255, green: 255, blue: 255 }, - //topMargin: textMargin, - //leftMargin: textMargin, - //bottomMargin: textMargin, - //rightMargin: textMargin, - //text: "", - //lineHeight: lineHeight, - //alpha: 0.9, - //backgroundAlpha: 0.9, - //ignoreRayIntersection: true, - //visible: true, - //isFacingAvatar: true - //}); - //} - - //var debugText = ""; - //Object.keys(_this.runningPluginNames).forEach(function (pluginName) { - //if (_this.runningPluginNames[pluginName]) { - //var plugin = controllerDispatcherPlugins[pluginName]; - //debugText += pluginName + ": " + plugin.parameters.priority + "\n"; - //} - //}); - //Overlays.editOverlay(_this.debugOverlayID, { text: debugText }); - /*}*/ - if (PROFILE) { Script.endProfileRange("dispatch.run"); } @@ -524,9 +482,6 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); this.cleanup = function () { Controller.disableMapping(MAPPING_NAME); _this.pointerManager.removePointers(); - if (_this.debugOverlayID) { - Overlays.deleteOverlay(_this.debugOverlayID); - } Pointers.removePointer(this.mouseRayPick); Selection.disableListHighlight(DISPATCHER_HOVERING_LIST); }; From e4a5be668a15aa603e3210b2053c2bc62ad2536a Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Mon, 23 Jul 2018 12:29:01 -0700 Subject: [PATCH 012/210] adding check function for pointing at near grabbable entity --- scripts/system/controllers/controllerDispatcher.js | 2 -- .../controllers/controllerModules/webSurfaceLaserInput.js | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/system/controllers/controllerDispatcher.js b/scripts/system/controllers/controllerDispatcher.js index 91ab824a54..4002fd297b 100644 --- a/scripts/system/controllers/controllerDispatcher.js +++ b/scripts/system/controllers/controllerDispatcher.js @@ -48,7 +48,6 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); this.tabletID = null; this.blacklist = []; this.pointerManager = new PointerManager(); - this.debugOverlayID = null; // a module can occupy one or more "activity" slots while it's running. If all the required slots for a module are // not set to false (not in use), a module cannot start. When a module is using a slot, that module's name @@ -378,7 +377,6 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); } } _this.pointerManager.updatePointersRenderState(controllerData.triggerClicks, controllerData.triggerValues); - if (PROFILE) { Script.endProfileRange("dispatch.run"); } diff --git a/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js b/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js index 5009bec0f5..92423f0670 100644 --- a/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js +++ b/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js @@ -123,7 +123,7 @@ Script.include("/~/system/libraries/controllers.js"); controllerData.triggerValues[this.otherHand] <= TRIGGER_OFF_VALUE; var allowThisModule = !otherModuleRunning || isTriggerPressed; if (allowThisModule && this.isPointingAtTriggerable(controllerData, isTriggerPressed) && - (controllerData.nearbyEntityProperties[this.hand] !== [])) { + !this.isPointingAtNearGrabbableEntity(controllerData, isTriggerPressed)) { this.updateAllwaysOn(); if (isTriggerPressed) { this.dominantHandOverride = true; // Override dominant hand. @@ -145,7 +145,7 @@ Script.include("/~/system/libraries/controllers.js"); var isTriggerPressed = controllerData.triggerValues[this.hand] > TRIGGER_OFF_VALUE; var laserOn = isTriggerPressed || this.parameters.handLaser.allwaysOn; if (allowThisModule && (laserOn && this.isPointingAtTriggerable(controllerData, isTriggerPressed)) && - (controllerData.nearbyEntityProperties[this.hand] !== [])) { + !this.isPointingAtNearGrabbableEntity(controllerData, isTriggerPressed)) { this.running = true; return makeRunningValues(true, [], []); } From c0dfbac480ab9cbed8f7d2e90197a903439639ce Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 24 Jul 2018 10:04:51 -0700 Subject: [PATCH 013/210] adding comment for possible solution - still WIP --- .../controllers/controllerModules/webSurfaceLaserInput.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js b/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js index 92423f0670..ef9ff0c6ae 100644 --- a/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js +++ b/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js @@ -124,6 +124,7 @@ Script.include("/~/system/libraries/controllers.js"); var allowThisModule = !otherModuleRunning || isTriggerPressed; if (allowThisModule && this.isPointingAtTriggerable(controllerData, isTriggerPressed) && !this.isPointingAtNearGrabbableEntity(controllerData, isTriggerPressed)) { + //(controllerData.nearbyEntityProperties[this.hand] !== [])) { this.updateAllwaysOn(); if (isTriggerPressed) { this.dominantHandOverride = true; // Override dominant hand. @@ -146,6 +147,7 @@ Script.include("/~/system/libraries/controllers.js"); var laserOn = isTriggerPressed || this.parameters.handLaser.allwaysOn; if (allowThisModule && (laserOn && this.isPointingAtTriggerable(controllerData, isTriggerPressed)) && !this.isPointingAtNearGrabbableEntity(controllerData, isTriggerPressed)) { + //(controllerData.nearbyEntityProperties[this.hand] !== [])) { this.running = true; return makeRunningValues(true, [], []); } From 0b7d6cb7203a60e7f4b31154b4de8db01c498028 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Tue, 31 Jul 2018 14:10:19 -0700 Subject: [PATCH 014/210] start interstitial page work --- interface/src/Application.cpp | 12 ++++++++++++ interface/src/Application.h | 3 +++ libraries/audio-client/src/AudioClient.cpp | 8 ++++---- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 136e44855a..b638c51342 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -3412,6 +3412,16 @@ bool Application::isServerlessMode() const { return false; } +bool Application::isInterstitialPage() { + return _interstitialMode; +} + +void Application::setInterstitialMode(bool interstitialMode) { + if (_interstitialMode != interstitialMode) { + _interstitialMode = interstitialMode; + } +} + void Application::setIsServerlessMode(bool serverlessDomain) { auto tree = getEntities()->getTree(); if (tree) { @@ -5471,6 +5481,8 @@ static bool domainLoadingInProgress = false; void Application::update(float deltaTime) { PROFILE_RANGE_EX(app, __FUNCTION__, 0xffff0000, (uint64_t)_renderFrameCount + 1); + auto audioClient = DependencyManager::get(); + audioClient->setMuted(true); if (!_physicsEnabled) { if (!domainLoadingInProgress) { PROFILE_ASYNC_BEGIN(app, "Scene Loading", ""); diff --git a/interface/src/Application.h b/interface/src/Application.h index 94e561e550..c084c0033f 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -304,6 +304,7 @@ public: void saveNextPhysicsStats(QString filename); bool isServerlessMode() const; + bool isInterstitialMode() const; void replaceDomainContent(const QString& url); @@ -423,6 +424,7 @@ public slots: void setPreferredCursor(const QString& cursor); void setIsServerlessMode(bool serverlessDomain); + void setIsInterstitialMode(bool interstialMode); void loadServerlessDomain(QUrl domainURL); void updateVerboseLogging(); @@ -624,6 +626,7 @@ private: QSet _keysPressed; bool _enableProcessOctreeThread; + bool _interstitialMode { true }; OctreePacketProcessor _octreeProcessor; EntityEditPacketSender _entityEditSender; diff --git a/libraries/audio-client/src/AudioClient.cpp b/libraries/audio-client/src/AudioClient.cpp index c57360b09f..0eadcc5b66 100644 --- a/libraries/audio-client/src/AudioClient.cpp +++ b/libraries/audio-client/src/AudioClient.cpp @@ -668,7 +668,7 @@ void AudioClient::stop() { void AudioClient::handleAudioEnvironmentDataPacket(QSharedPointer message) { - char bitset; + /*char bitset; message->readPrimitive(&bitset); bool hasReverb = oneAtBit(bitset, HAS_REVERB_BIT); @@ -680,11 +680,11 @@ void AudioClient::handleAudioEnvironmentDataPacket(QSharedPointer message) { - + /* if (message->getType() == PacketType::SilentAudioFrame) { _silentInbound.increment(); } else { @@ -709,7 +709,7 @@ void AudioClient::handleAudioDataPacket(QSharedPointer message) // Audio output must exist and be correctly set up if we're going to process received audio _receivedAudioStream.parseData(*message); #endif - } +}*/ } AudioClient::Gate::Gate(AudioClient* audioClient) : From 048196ec6fb2d56b319509c6dd2c2959e82a9135 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Thu, 2 Aug 2018 11:39:06 -0700 Subject: [PATCH 015/210] disble sending avatar and audio packets during interstitial mode --- interface/src/Application.cpp | 61 ++++++--- interface/src/Application.h | 1 + interface/src/avatar/AvatarManager.cpp | 6 +- interface/src/avatar/MyAvatar.cpp | 1 + libraries/audio-client/src/AudioClient.cpp | 152 ++++++++++----------- libraries/audio-client/src/AudioClient.h | 2 + 6 files changed, 125 insertions(+), 98 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index b638c51342..bbce49b941 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -1372,6 +1372,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo }); connect(this, &Application::activeDisplayPluginChanged, reinterpret_cast(audioScriptingInterface.data()), &scripting::Audio::onContextChanged); + connect(this, &Application::interstitialModeChanged, audioIO.data(), &AudioClient::setInterstitialStatus); } // Create the rendering engine. This can be slow on some machines due to lots of @@ -2252,6 +2253,25 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo // Preload Tablet sounds DependencyManager::get()->preloadSounds(); + connect(this, &Application::interstitialModeChanged, this, [this] (bool interstitialMode) { + if (!interstitialMode) { + DependencyManager::get()->negotiateAudioFormat(); + _queryExpiry = SteadyClock::now(); + if (_avatarOverrideUrl.isValid()) { + getMyAvatar()->useFullAvatarURL(_avatarOverrideUrl); + } + static const QUrl empty{}; + if (getMyAvatar()->getFullAvatarURLFromPreferences() != getMyAvatar()->cannonicalSkeletonModelURL(empty)) { + getMyAvatar()->resetFullAvatarURL(); + } + getMyAvatar()->markIdentityDataChanged(); + getMyAvatar()->resetLastSent(); + + // transmit a "sendAll" packet to the AvatarMixer we just connected to. + getMyAvatar()->sendAvatarDataPacket(true); + } + }); + _pendingIdleEvent = false; _pendingRenderEvent = false; @@ -3412,13 +3432,14 @@ bool Application::isServerlessMode() const { return false; } -bool Application::isInterstitialPage() { +bool Application::isInterstitialMode() const { return _interstitialMode; } -void Application::setInterstitialMode(bool interstitialMode) { +void Application::setIsInterstitialMode(bool interstitialMode) { if (_interstitialMode != interstitialMode) { _interstitialMode = interstitialMode; + emit interstitialModeChanged(_interstitialMode); } } @@ -5481,8 +5502,6 @@ static bool domainLoadingInProgress = false; void Application::update(float deltaTime) { PROFILE_RANGE_EX(app, __FUNCTION__, 0xffff0000, (uint64_t)_renderFrameCount + 1); - auto audioClient = DependencyManager::get(); - audioClient->setMuted(true); if (!_physicsEnabled) { if (!domainLoadingInProgress) { PROFILE_ASYNC_BEGIN(app, "Scene Loading", ""); @@ -5504,6 +5523,7 @@ void Application::update(float deltaTime) { // scene is ready to compute its collision shape. if (nearbyEntitiesAreReadyForPhysics() && getMyAvatar()->isReadyForPhysics()) { _physicsEnabled = true; + setIsInterstitialMode(false); getMyAvatar()->updateMotionBehaviorFromMenu(); } } @@ -5909,7 +5929,7 @@ void Application::update(float deltaTime) { // send packet containing downstream audio stats to the AudioMixer { quint64 sinceLastNack = now - _lastSendDownstreamAudioStats; - if (sinceLastNack > TOO_LONG_SINCE_LAST_SEND_DOWNSTREAM_AUDIO_STATS) { + if (sinceLastNack > TOO_LONG_SINCE_LAST_SEND_DOWNSTREAM_AUDIO_STATS && !isInterstitialMode()) { _lastSendDownstreamAudioStats = now; QMetaObject::invokeMethod(DependencyManager::get().data(), "sendDownstreamAudioStatsPacket", Qt::QueuedConnection); @@ -6072,21 +6092,23 @@ void Application::updateRenderArgs(float deltaTime) { } void Application::queryAvatars() { - auto avatarPacket = NLPacket::create(PacketType::AvatarQuery); - auto destinationBuffer = reinterpret_cast(avatarPacket->getPayload()); - unsigned char* bufferStart = destinationBuffer; + if (!isInterstitialMode()) { + auto avatarPacket = NLPacket::create(PacketType::AvatarQuery); + auto destinationBuffer = reinterpret_cast(avatarPacket->getPayload()); + unsigned char* bufferStart = destinationBuffer; - uint8_t numFrustums = (uint8_t)_conicalViews.size(); - memcpy(destinationBuffer, &numFrustums, sizeof(numFrustums)); - destinationBuffer += sizeof(numFrustums); + uint8_t numFrustums = (uint8_t)_conicalViews.size(); + memcpy(destinationBuffer, &numFrustums, sizeof(numFrustums)); + destinationBuffer += sizeof(numFrustums); - for (const auto& view : _conicalViews) { - destinationBuffer += view.serialize(destinationBuffer); + for (const auto& view : _conicalViews) { + destinationBuffer += view.serialize(destinationBuffer); + } + + avatarPacket->setPayloadSize(destinationBuffer - bufferStart); + + DependencyManager::get()->broadcastToNodes(std::move(avatarPacket), NodeSet() << NodeType::AvatarMixer); } - - avatarPacket->setPayloadSize(destinationBuffer - bufferStart); - - DependencyManager::get()->broadcastToNodes(std::move(avatarPacket), NodeSet() << NodeType::AvatarMixer); } @@ -6293,6 +6315,7 @@ void Application::clearDomainOctreeDetails() { qCDebug(interfaceapp) << "Clearing domain octree details..."; resetPhysicsReadyInformation(); + setIsInterstitialMode(true); _octreeServerSceneStats.withWriteLock([&] { _octreeServerSceneStats.clear(); @@ -6367,11 +6390,11 @@ void Application::nodeActivated(SharedNodePointer node) { _octreeQuery.incrementConnectionID(); } - if (node->getType() == NodeType::AudioMixer) { + if (node->getType() == NodeType::AudioMixer && !isInterstitialMode()) { DependencyManager::get()->negotiateAudioFormat(); } - if (node->getType() == NodeType::AvatarMixer) { + if (node->getType() == NodeType::AvatarMixer && !isInterstitialMode()) { _queryExpiry = SteadyClock::now(); // new avatar mixer, send off our identity packet on next update loop diff --git a/interface/src/Application.h b/interface/src/Application.h index c084c0033f..6bdfef78e1 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -328,6 +328,7 @@ signals: void activeDisplayPluginChanged(); void uploadRequest(QString path); + void interstitialModeChanged(bool interstitialMode); public slots: QVector pasteEntities(float x, float y, float z); diff --git a/interface/src/avatar/AvatarManager.cpp b/interface/src/avatar/AvatarManager.cpp index fab512f787..0fcc253f53 100644 --- a/interface/src/avatar/AvatarManager.cpp +++ b/interface/src/avatar/AvatarManager.cpp @@ -121,7 +121,7 @@ void AvatarManager::updateMyAvatar(float deltaTime) { quint64 now = usecTimestampNow(); quint64 dt = now - _lastSendAvatarDataTime; - if (dt > MIN_TIME_BETWEEN_MY_AVATAR_DATA_SENDS) { + if (dt > MIN_TIME_BETWEEN_MY_AVATAR_DATA_SENDS && !qApp->isInterstitialMode()) { // send head/hand data to the avatar mixer and voxel server PerformanceTimer perfTimer("send"); _myAvatar->sendAvatarDataPacket(); @@ -755,13 +755,13 @@ void AvatarManager::setAvatarSortCoefficient(const QString& name, const QScriptV QString currentSessionUUID = avatar->getSessionUUID().toString(); if (specificAvatarIdentifiers.isEmpty() || specificAvatarIdentifiers.contains(currentSessionUUID)) { QJsonObject thisAvatarPalData; - + auto myAvatar = DependencyManager::get()->getMyAvatar(); if (currentSessionUUID == myAvatar->getSessionUUID().toString()) { currentSessionUUID = ""; } - + thisAvatarPalData.insert("sessionUUID", currentSessionUUID); thisAvatarPalData.insert("sessionDisplayName", avatar->getSessionDisplayName()); thisAvatarPalData.insert("audioLoudness", avatar->getAudioLoudness()); diff --git a/interface/src/avatar/MyAvatar.cpp b/interface/src/avatar/MyAvatar.cpp index 98fbd8fea2..ec5ca903a0 100755 --- a/interface/src/avatar/MyAvatar.cpp +++ b/interface/src/avatar/MyAvatar.cpp @@ -2212,6 +2212,7 @@ void MyAvatar::setHasScriptedBlendshapes(bool hasScriptedBlendshapes) { // send a forced avatarData update to make sure the script can send neutal blendshapes on unload // without having to wait for the update loop, make sure _hasScriptedBlendShapes is still true // before sending the update, or else it won't send the neutal blendshapes to the receiving clients + sendAvatarDataPacket(true); } _hasScriptedBlendShapes = hasScriptedBlendshapes; diff --git a/libraries/audio-client/src/AudioClient.cpp b/libraries/audio-client/src/AudioClient.cpp index 0eadcc5b66..a1487fa3ec 100644 --- a/libraries/audio-client/src/AudioClient.cpp +++ b/libraries/audio-client/src/AudioClient.cpp @@ -667,8 +667,7 @@ void AudioClient::stop() { } void AudioClient::handleAudioEnvironmentDataPacket(QSharedPointer message) { - - /*char bitset; + char bitset; message->readPrimitive(&bitset); bool hasReverb = oneAtBit(bitset, HAS_REVERB_BIT); @@ -680,11 +679,10 @@ void AudioClient::handleAudioEnvironmentDataPacket(QSharedPointer message) { - /* if (message->getType() == PacketType::SilentAudioFrame) { _silentInbound.increment(); } else { @@ -709,7 +707,7 @@ void AudioClient::handleAudioDataPacket(QSharedPointer message) // Audio output must exist and be correctly set up if we're going to process received audio _receivedAudioStream.parseData(*message); #endif -}*/ + } } AudioClient::Gate::Gate(AudioClient* audioClient) : @@ -1042,80 +1040,82 @@ void AudioClient::handleLocalEchoAndReverb(QByteArray& inputByteArray) { } void AudioClient::handleAudioInput(QByteArray& audioBuffer) { - if (_muted) { - _lastInputLoudness = 0.0f; - _timeSinceLastClip = 0.0f; - } else { - int16_t* samples = reinterpret_cast(audioBuffer.data()); - int numSamples = audioBuffer.size() / AudioConstants::SAMPLE_SIZE; - int numFrames = numSamples / (_isStereoInput ? AudioConstants::STEREO : AudioConstants::MONO); - - if (_isNoiseGateEnabled) { - // The audio gate includes DC removal - _audioGate->render(samples, samples, numFrames); - } else { - _audioGate->removeDC(samples, samples, numFrames); - } - - int32_t loudness = 0; - assert(numSamples < 65536); // int32_t loudness cannot overflow - bool didClip = false; - for (int i = 0; i < numSamples; ++i) { - const int32_t CLIPPING_THRESHOLD = (int32_t)(AudioConstants::MAX_SAMPLE_VALUE * 0.9f); - int32_t sample = std::abs((int32_t)samples[i]); - loudness += sample; - didClip |= (sample > CLIPPING_THRESHOLD); - } - _lastInputLoudness = (float)loudness / numSamples; - - if (didClip) { + if (!_interstitialMode) { + if (_muted) { + _lastInputLoudness = 0.0f; _timeSinceLastClip = 0.0f; - } else if (_timeSinceLastClip >= 0.0f) { - _timeSinceLastClip += (float)numSamples / (float)AudioConstants::SAMPLE_RATE; + } else { + int16_t* samples = reinterpret_cast(audioBuffer.data()); + int numSamples = audioBuffer.size() / AudioConstants::SAMPLE_SIZE; + int numFrames = numSamples / (_isStereoInput ? AudioConstants::STEREO : AudioConstants::MONO); + + if (_isNoiseGateEnabled) { + // The audio gate includes DC removal + _audioGate->render(samples, samples, numFrames); + } else { + _audioGate->removeDC(samples, samples, numFrames); + } + + int32_t loudness = 0; + assert(numSamples < 65536); // int32_t loudness cannot overflow + bool didClip = false; + for (int i = 0; i < numSamples; ++i) { + const int32_t CLIPPING_THRESHOLD = (int32_t)(AudioConstants::MAX_SAMPLE_VALUE * 0.9f); + int32_t sample = std::abs((int32_t)samples[i]); + loudness += sample; + didClip |= (sample > CLIPPING_THRESHOLD); + } + _lastInputLoudness = (float)loudness / numSamples; + + if (didClip) { + _timeSinceLastClip = 0.0f; + } else if (_timeSinceLastClip >= 0.0f) { + _timeSinceLastClip += (float)numSamples / (float)AudioConstants::SAMPLE_RATE; + } + + emit inputReceived(audioBuffer); } - emit inputReceived(audioBuffer); + emit inputLoudnessChanged(_lastInputLoudness); + + // state machine to detect gate opening and closing + bool audioGateOpen = (_lastInputLoudness != 0.0f); + bool openedInLastBlock = !_audioGateOpen && audioGateOpen; // the gate just opened + bool closedInLastBlock = _audioGateOpen && !audioGateOpen; // the gate just closed + _audioGateOpen = audioGateOpen; + + if (openedInLastBlock) { + emit noiseGateOpened(); + } else if (closedInLastBlock) { + emit noiseGateClosed(); + } + + // the codec must be flushed to silence before sending silent packets, + // so delay the transition to silent packets by one packet after becoming silent. + auto packetType = _shouldEchoToServer ? PacketType::MicrophoneAudioWithEcho : PacketType::MicrophoneAudioNoEcho; + if (!audioGateOpen && !closedInLastBlock) { + packetType = PacketType::SilentAudioFrame; + _silentOutbound.increment(); + } else { + _audioOutbound.increment(); + } + + Transform audioTransform; + audioTransform.setTranslation(_positionGetter()); + audioTransform.setRotation(_orientationGetter()); + + QByteArray encodedBuffer; + if (_encoder) { + _encoder->encode(audioBuffer, encodedBuffer); + } else { + encodedBuffer = audioBuffer; + } + + emitAudioPacket(encodedBuffer.data(), encodedBuffer.size(), _outgoingAvatarAudioSequenceNumber, _isStereoInput, + audioTransform, avatarBoundingBoxCorner, avatarBoundingBoxScale, + packetType, _selectedCodecName); + _stats.sentPacket(); } - - emit inputLoudnessChanged(_lastInputLoudness); - - // state machine to detect gate opening and closing - bool audioGateOpen = (_lastInputLoudness != 0.0f); - bool openedInLastBlock = !_audioGateOpen && audioGateOpen; // the gate just opened - bool closedInLastBlock = _audioGateOpen && !audioGateOpen; // the gate just closed - _audioGateOpen = audioGateOpen; - - if (openedInLastBlock) { - emit noiseGateOpened(); - } else if (closedInLastBlock) { - emit noiseGateClosed(); - } - - // the codec must be flushed to silence before sending silent packets, - // so delay the transition to silent packets by one packet after becoming silent. - auto packetType = _shouldEchoToServer ? PacketType::MicrophoneAudioWithEcho : PacketType::MicrophoneAudioNoEcho; - if (!audioGateOpen && !closedInLastBlock) { - packetType = PacketType::SilentAudioFrame; - _silentOutbound.increment(); - } else { - _audioOutbound.increment(); - } - - Transform audioTransform; - audioTransform.setTranslation(_positionGetter()); - audioTransform.setRotation(_orientationGetter()); - - QByteArray encodedBuffer; - if (_encoder) { - _encoder->encode(audioBuffer, encodedBuffer); - } else { - encodedBuffer = audioBuffer; - } - - emitAudioPacket(encodedBuffer.data(), encodedBuffer.size(), _outgoingAvatarAudioSequenceNumber, _isStereoInput, - audioTransform, avatarBoundingBoxCorner, avatarBoundingBoxScale, - packetType, _selectedCodecName); - _stats.sentPacket(); } void AudioClient::handleMicAudioInput() { @@ -2017,7 +2017,7 @@ void AudioClient::loadSettings() { _receivedAudioStream.setDynamicJitterBufferEnabled(dynamicJitterBufferEnabled.get()); _receivedAudioStream.setStaticJitterBufferFrames(staticJitterBufferFrames.get()); - qCDebug(audioclient) << "---- Initializing Audio Client ----"; + auto codecPlugins = PluginManager::getInstance()->getCodecPlugins(); for (auto& plugin : codecPlugins) { qCDebug(audioclient) << "Codec available:" << plugin->getName(); diff --git a/libraries/audio-client/src/AudioClient.h b/libraries/audio-client/src/AudioClient.h index 9ee7bcfeba..b665f85a13 100644 --- a/libraries/audio-client/src/AudioClient.h +++ b/libraries/audio-client/src/AudioClient.h @@ -188,6 +188,7 @@ public slots: void handleRecordedAudioInput(const QByteArray& audio); void reset(); void audioMixerKilled(); + void setInterstitialStatus(bool interstitialMode) { _interstitialMode = interstitialMode; } void setMuted(bool muted, bool emitSignal = true); bool isMuted() { return _muted; } @@ -417,6 +418,7 @@ private: QVector _activeLocalAudioInjectors; bool _isPlayingBackRecording { false }; + bool _interstitialMode { true }; CodecPluginPointer _codec; QString _selectedCodecName; From b9cfbfb3beae4d3ed0070d91e1bdac10c540a832 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Fri, 3 Aug 2018 09:59:21 -0700 Subject: [PATCH 016/210] adding interstitial page file to default sctipts --- interface/src/Application.cpp | 4 +- libraries/audio-client/src/AudioClient.cpp | 2 +- scripts/defaultScripts.js | 3 +- scripts/system/interstitialPage.js | 414 +++++++++++++++++++++ 4 files changed, 419 insertions(+), 4 deletions(-) create mode 100644 scripts/system/interstitialPage.js diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index bbce49b941..bbe107e69e 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -3713,7 +3713,7 @@ void Application::keyPressEvent(QKeyEvent* event) { _controllerScriptingInterface->emitKeyPressEvent(event); // send events to any registered scripts // if one of our scripts have asked to capture this event, then stop processing it - if (_controllerScriptingInterface->isKeyCaptured(event)) { + if (_controllerScriptingInterface->isKeyCaptured(event) || isInterstitialMode()) { return; } @@ -5603,7 +5603,7 @@ void Application::update(float deltaTime) { // Transfer the user inputs to the driveKeys // FIXME can we drop drive keys and just have the avatar read the action states directly? myAvatar->clearDriveKeys(); - if (_myCamera.getMode() != CAMERA_MODE_INDEPENDENT) { + if (_myCamera.getMode() != CAMERA_MODE_INDEPENDENT && !isInterstitialMode()) { if (!_controllerScriptingInterface->areActionsCaptured() && _myCamera.getMode() != CAMERA_MODE_MIRROR) { myAvatar->setDriveKey(MyAvatar::TRANSLATE_Z, -1.0f * userInputMapper->getActionState(controller::Action::TRANSLATE_Z)); myAvatar->setDriveKey(MyAvatar::TRANSLATE_Y, userInputMapper->getActionState(controller::Action::TRANSLATE_Y)); diff --git a/libraries/audio-client/src/AudioClient.cpp b/libraries/audio-client/src/AudioClient.cpp index a1487fa3ec..380d978fb1 100644 --- a/libraries/audio-client/src/AudioClient.cpp +++ b/libraries/audio-client/src/AudioClient.cpp @@ -2017,7 +2017,7 @@ void AudioClient::loadSettings() { _receivedAudioStream.setDynamicJitterBufferEnabled(dynamicJitterBufferEnabled.get()); _receivedAudioStream.setStaticJitterBufferFrames(staticJitterBufferFrames.get()); - + qCDebug(audioclient) << "---- Initializing Audio Client ----"; auto codecPlugins = PluginManager::getInstance()->getCodecPlugins(); for (auto& plugin : codecPlugins) { qCDebug(audioclient) << "Codec available:" << plugin->getName(); diff --git a/scripts/defaultScripts.js b/scripts/defaultScripts.js index b275660c0f..662120be34 100644 --- a/scripts/defaultScripts.js +++ b/scripts/defaultScripts.js @@ -31,7 +31,8 @@ var DEFAULT_SCRIPTS_COMBINED = [ "system/dialTone.js", "system/firstPersonHMD.js", "system/tablet-ui/tabletUI.js", - "system/emote.js" + "system/emote.js", + "system/interstitialpage" ]; var DEFAULT_SCRIPTS_SEPARATE = [ "system/controllers/controllerScripts.js", diff --git a/scripts/system/interstitialPage.js b/scripts/system/interstitialPage.js new file mode 100644 index 0000000000..af80e94605 --- /dev/null +++ b/scripts/system/interstitialPage.js @@ -0,0 +1,414 @@ +// +// interstitialPage.js +// scripts/system +// +// Created by Dante Ruiz on 08/02/2018. +// Copyright 2012 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 +// + +/* global Script, Controller, Overlays, Quat, MyAvatar, Entities, print, Vec3, AddressManager, Render, Window, Toolbars, + Camera, HMD*/ + +(function() { + var MAX_X_SIZE = 3; + var isVisible = true; + var defaultOffset = 1.5; + var hifi = "HighFidelity"; + var VOLUME = 0.4; + var tune = SoundCache.getSound("http://hifi-content.s3.amazonaws.com/alexia/LoadingScreens/crystals_and_voices.wav"); + var sample = null; + var MAX_LEFT_MARGIN = 1.9; + var INNER_CIRCLE_WIDTH = 4.7; + var DESTINATION_CARD_Y_OFFSET = 2; + var DEFAULT_TONE_MAPPING_EXPOSURE = 0.0; + var MIN_TONE_MAPPING_EXPOSURE = -5.0; + var SYSTEM_TOOL_BAR = "com.highfidelity.interface.toolbar.system"; + var MAX_ELAPSED_TIME = 5 * 1000; // time in ms + function isInFirstPerson() { + return (Camera.mode === "first person"); + } + + var toolbar = Toolbars.getToolbar(SYSTEM_TOOL_BAR); + var renderViewTask = Render.getConfig("RenderMainView"); + + var domainHostnameMap = { + eschatology: "Seth Alves", + blue: "Sam Cake", + thepines: "Roxie", + "dev-mobile": "HighFidelity", + "dev-mobile-master": "HighFidelity", + portalarium: "Bijou", + porange: "Caitlyn", + rust: hifi, + start: hifi, + miimusic: "Madysyn", + codex: "FluffyJenkins", + zaru: hifi, + help: hifi, + therealoasis: "Caitlyn", + vrmacy: "budgiebeats", + niccage: "OneLisa", + impromedia: "GeorgeDeac", + nest: "budgiebeats", + gabworld: "LeeGab", + vrtv: "GeoorgeDeac", + burrow: "budgiebeats", + leftcoast: "Lurks", + lazybones: "LazybonesJurassic", + skyriver: "Chamberlain", + chapel: "www.livin.today", + "hi-studio": hifi, + luskan: "jyoum", + arcadiabay: "Aitolda", + chime: hifi, + standupnow: "diva", + avreng: "GeorgeDeac", + atlas: "rocklin_guy", + steamedhams: "Alan_", + banff: hifi, + operahouse: hifi, + bankofhighfidelity: hifi, + tutorial: "WadeWatts", + nightsky: hifi, + garageband: hifi, + painting: hifi, + windwaker: "bijou", + fumbleland: "Lpasca", + monolith: "Nik", + bijou: "bijou", + morty: "bijou", + "hifiqa-rc-bots": hifi, + fightnight: hifi, + spirited: "Alan_", + "desert-oasis": "ryan", + springfield: "Alan_", + hall: "ryan", + "national-park": "ryan", + vector: "Nik", + bodymart: hifi, + "medievil-village": "ryan", + "villains-lair": "ryan", + "island-breeze": "ryan", + "classy-apartment": "ryan", + voxel: "FlameSoulis", + virtuoso: "noahglaseruc", + avatarisland: hifi, + ioab: "rocklin_guy", + tamait: "rocklin_guy", + konshulabs: "Konshu", + epic: "philip", + poopsburg: "Caitlyn", + east: hifi, + glitched: hifi, + calartsim: hifi, + calarts: hifi, + livin: "rocklin_guy", + fightclub: "philip", + thefactory: "whyroc", + wothal: "Alezia.Kurdis", + udacity: hifi, + json: "WadeWatts", + anonymous: "darlingnotin", + maker: hifi, + elisa: "elisahifi", + volxeltopia: hifi, + cupcake: hifi, + minigolf: hifi, + workshop: hifi, + vankh: "Alezia.Kurdis", + "the-crash-site": "WolfGang", + jjv360: "jjv3600", + distributed2: hifi, + anny: hifi, + university: hifi, + ludus: hifi, + stepford: "darlingnotin", + thespot: hifi + }; + + // Tips have a character limit of 69 + var userTips = [ + "Tip: Visit TheSpot to explore featured domains!", + "Tip: Visit our docs online to learn more about scripting!", + "Tip: Don't want others invading your personal space? Turn on the Bubble!", + "Tip: Want to make a friend? Shake hands with them in VR!", + "Tip: Enjoy live music? Visit Rust to dance your heart out!", + "Tip: Have you visited BodyMart to check out the new avatars recently?", + "Tip: Use the Create app to import models and create custom entities.", + "Tip: We're open source! Feel free to contribute to our code on GitHub!", + "Tip: What emotes have you used in the Emote app?", + "Tip: Take and share your snapshots with the everyone using the Snap app.", + "Tip: Did you know you can show websites in-world by creating a web entity?", + "Tip: Find out more information about domains by visiting our website!", + "Tip: Did you know you can get cool new apps from the Marketplace?", + "Tip: Print your snapshots from the Snap app to share with others!", + "Tip: Log in to make friends, visit new domains, and save avatars!" + ]; + + var loadingSphereID = Overlays.addOverlay("model", { + name: "Loading-Sphere", + position: Vec3.sum(Vec3.sum(MyAvatar.position, {x: 0.0, y: -1.0, z: 0.0}), Vec3.multiplyQbyV(MyAvatar.orientation, {x: 0, y: 0.95, z: 0})), + orientation: Quat.multiply(Quat.fromVec3Degrees({x: 0, y: 180, z: 0}), MyAvatar.orientation), + url: "http://hifi-content.s3.amazonaws.com/alexia/LoadingScreens/black-sphere.fbx", + dimensions: { x: 20, y: 20, z: 20 }, + alpha: 1, + visible: isVisible, + ignoreRayIntersection: true, + drawInFront: true, + grabbable: false + }); + + + var domainName = ""; + var domainNameTextID = Overlays.addOverlay("text3d", { + name: "Loading-Destination-Card-Text", + localPosition: { x: 0.0, y: DESTINATION_CARD_Y_OFFSET + 0.8, z: 5.45 }, + text: domainName, + textAlpha: 1, + backgroundAlpha: 0, + lineHeight: 0.42, + visible: isVisible, + ignoreRayIntersection: true, + drawInFront: true, + grabbable: false, + localOrientation: Quat.fromVec3Degrees({ x: 0, y: 180, z: 0 }), + parentID: loadingSphereID + }); + + var hostName = ""; + + var domainHostname = Overlays.addOverlay("text3d", { + name: "Loading-Hostname", + localPosition: { x: 0.0, y: DESTINATION_CARD_Y_OFFSET + 0.32, z: 5.45 }, + text: hostName, + textAlpha: 1, + backgroundAlpha: 0, + lineHeight: 0.13, + visible: isVisible, + ignoreRayIntersection: true, + drawInFront: true, + grabbable: false, + localOrientation: Quat.fromVec3Degrees({ x: 0, y: 180, z: 0 }), + parentID: loadingSphereID + }); + + var toolTip = ""; + + var domainToolTip = Overlays.addOverlay("text3d", { + name: "Loading-Tooltip", + localPosition: { x: 0.0 , y: DESTINATION_CARD_Y_OFFSET - 1.6, z: 5.45 }, + text: toolTip, + textAlpha: 1, + backgroundAlpha: 0, + lineHeight: 0.13, + visible: isVisible, + ignoreRayIntersection: true, + drawInFront: true, + grabbable: false, + localOrientation: Quat.fromVec3Degrees({ x: 0, y: 180, z: 0 }), + parentID: loadingSphereID + }); + + var loadingToTheSpotID = Overlays.addOverlay("image3d", { + name: "Loading-Destination-Card-Text", + localPosition: { x: 0.0 , y: DESTINATION_CARD_Y_OFFSET - 1.8, z: 5.45 }, + url: "http://hifi-content.s3.amazonaws.com/alexia/LoadingScreens/goTo_button.png", + alpha: 1, + dimensions: { x: 1.2, y: 0.6}, + visible: isVisible, + emissive: true, + ignoreRayIntersection: false, + drawInFront: true, + grabbable: false, + localOrientation: Quat.fromVec3Degrees({ x: 0.0, y: 180.0, z: 0.0 }), + parentID: loadingSphereID + }); + + var loadingBarPlacard = Overlays.addOverlay("image3d", { + name: "Loading-Bar-Placard", + localPosition: { x: 0.0 , y: DESTINATION_CARD_Y_OFFSET - 0.99, z: 5.45 }, + url: "http://hifi-content.s3.amazonaws.com/alexia/LoadingScreens/loadingBar_placard.png", + alpha: 1, + dimensions: { x: 4, y: 2.8}, + visible: isVisible, + emissive: true, + ignoreRayIntersection: false, + drawInFront: true, + grabbable: false, + localOrientation: Quat.fromVec3Degrees({ x: 0.0, y: 180.0, z: 0.0 }), + parentID: loadingSphereID + }); + + var loadingBarProgress = Overlays.addOverlay("image3d", { + name: "Loading-Bar-Progress", + localPosition: { x: 0.0 , y: DESTINATION_CARD_Y_OFFSET - 0.99, z: 5.45 }, + url: "http://hifi-content.s3.amazonaws.com/alexia/LoadingScreens/loadingBar_progress.png", + alpha: 1, + dimensions: { x: 4, y: 2.8}, + visible: isVisible, + emissive: true, + ignoreRayIntersection: false, + drawInFront: true, + grabbable: false, + localOrientation: Quat.fromVec3Degrees({ x: 0.0, y: 180.0, z: 0.0 }), + parentID: loadingSphereID + }); + + var TARGET_UPDATE_HZ = 60; // 50hz good enough, but we're using update + var BASIC_TIMER_INTERVAL_MS = 1000 / TARGET_UPDATE_HZ; + var timerset = false; + var lastInterval = Date.now(); + var timeElapsed = 0; + + + function getLeftMargin(overlayID, text) { + var textSize = Overlays.textSize(overlayID, text); + var sizeDifference = ((INNER_CIRCLE_WIDTH - textSize.width) / 2); + var leftMargin = -(MAX_LEFT_MARGIN - sizeDifference); + return leftMargin; + } + + + function domainChanged(domain) { + var name = AddressManager.placename; + domainName = name.charAt(0).toUpperCase() + name.slice(1); + var domainNameLeftMargin = getLeftMargin(domainNameTextID, domainName); + var textProperties = { + text: domainName, + leftMargin: domainNameLeftMargin + }; + + var BY = "by "; + var host = domainHostnameMap[location.placename]; + var text = BY + host; + var hostLeftMargin = getLeftMargin(domainHostname, text); + var hostnameProperties = { + text: BY + host, + leftMargin: hostLeftMargin + }; + + var randomIndex = Math.floor(Math.random() * userTips.length); + var tip = userTips[randomIndex]; + var tipLeftMargin = getLeftMargin(domainToolTip, tip); + var toolTipProperties = { + text: tip, + leftMargin: tipLeftMargin + }; + + var myAvatarDirection = Vec3.UNIT_NEG_Z; + var cardDirectionPrime = {x: 0 , y: 0, z: 5.5}; + var rotationDelta = Quat.rotationBetween(cardDirectionPrime, myAvatarDirection); + var overlayRotation = Quat.multiply(MyAvatar.orientation, rotationDelta); + var mainSphereProperties = { + orientation: overlayRotation + }; + + Overlays.editOverlay(loadingSphereID, mainSphereProperties); + Overlays.editOverlay(domainNameTextID, textProperties); + Overlays.editOverlay(domainHostname, hostnameProperties); + Overlays.editOverlay(domainToolTip, toolTipProperties); + } + + var THE_PLACE = "hifi://TheSpot"; + function clickedOnOverlay(overlayID, event) { + print(overlayID + " other: " + loadingToTheSpotID); + print(event.button === "Primary"); + if (loadingToTheSpotID === overlayID) { + if (timerset) { + timeElapsed = 0; + } + AddressManager.handleLookupString(THE_PLACE); + } + } + var previousCameraMode = Camera.mode; + var previousPhysicsStatus = 99999; + + function updateOverlays(physicsEnabled) { + var properties = { + visible: !physicsEnabled + }; + + var myAvatarDirection = Vec3.UNIT_NEG_Z; + var cardDirectionPrime = {x: 0 , y: 0, z: 5.5}; + var rotationDelta = Quat.rotationBetween(cardDirectionPrime, myAvatarDirection); + var overlayRotation = Quat.multiply(MyAvatar.orientation, rotationDelta); + var mainSphereProperties = { + visible: !physicsEnabled, + orientation: overlayRotation + }; + + if (!HMD.active) { + toolbar.writeProperty("visible", physicsEnabled); + MyAvatar.headOrientation = Quat.multiply(Quat.cancelOutRollAndPitch(MyAvatar.headOrientation), Quat.fromPitchYawRollDegrees(2.5, 0, 0)); + } + + renderViewTask.getConfig("LightingModel")["enableAmbientLight"] = physicsEnabled; + renderViewTask.getConfig("LightingModel")["enableDirectionalLight"] = physicsEnabled; + renderViewTask.getConfig("LightingModel")["enablePointLight"] = physicsEnabled; + Overlays.editOverlay(loadingSphereID, mainSphereProperties); + Overlays.editOverlay(loadingToTheSpotID, properties); + Overlays.editOverlay(domainNameTextID, properties); + Overlays.editOverlay(domainHostname, properties); + Overlays.editOverlay(domainToolTip, properties); + Overlays.editOverlay(loadingBarPlacard, properties); + Overlays.editOverlay(loadingBarProgress, properties); + } + + function update() { + var physicsEnabled = Window.isPhysicsEnabled(); + var thisInterval = Date.now(); + var deltaTime = (thisInterval - lastInterval); + lastInterval = thisInterval; + if (physicsEnabled !== previousPhysicsStatus) { + if (!physicsEnabled && !timerset) { + updateOverlays(physicsEnabled); + sample = Audio.playSound(tune, { + localOnly: true, + position: MyAvatar.headPosition, + volume: VOLUME + }); + timeElapsed = 0; + timerset = true; + } + previousPhysicsStatus = physicsEnabled; + } + + if (timerset) { + timeElapsed += deltaTime; + if (timeElapsed >= MAX_ELAPSED_TIME) { + updateOverlays(true); + sample.stop(); + sample = null; + timerset = false; + } + + } + + Overlays.editOverlay(loadingSphereID, { + position: Vec3.sum(Vec3.sum(MyAvatar.position, {x: 0.0, y: -1.7, z: 0.0}), Vec3.multiplyQbyV(MyAvatar.orientation, {x: 0, y: 0.95, z: 0})) + }); + Script.setTimeout(update, BASIC_TIMER_INTERVAL_MS); + } + + Script.setTimeout(update, BASIC_TIMER_INTERVAL_MS); + Overlays.mouseReleaseOnOverlay.connect(clickedOnOverlay); + Window.domainChanged.connect(domainChanged); + + function cleanup() { + Overlays.deleteOverlay(loadingSphereID); + Overlays.deleteOverlay(loadingToTheSpotID); + Overlays.deleteOverlay(domainNameTextID); + Overlays.deleteOverlay(domainHostname); + Overlays.deleteOverlay(domainToolTip); + Overlays.deleteOverlay(loadingBarPlacard); + Overlays.deleteOverlay(loadingBarProgress); + try { + } catch (e) { + } + } + + Script.scriptEnding.connect(cleanup); +}()); From a2717e2efa9af8405b496b5a91cf653dacdd62ac Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Fri, 3 Aug 2018 10:47:20 -0700 Subject: [PATCH 017/210] editing interstitialPage.js --- scripts/defaultScripts.js | 2 +- scripts/system/interstitialPage.js | 111 +---------------------------- 2 files changed, 4 insertions(+), 109 deletions(-) diff --git a/scripts/defaultScripts.js b/scripts/defaultScripts.js index 662120be34..a11ec98c40 100644 --- a/scripts/defaultScripts.js +++ b/scripts/defaultScripts.js @@ -32,7 +32,7 @@ var DEFAULT_SCRIPTS_COMBINED = [ "system/firstPersonHMD.js", "system/tablet-ui/tabletUI.js", "system/emote.js", - "system/interstitialpage" + "system/interstitialPage.js" ]; var DEFAULT_SCRIPTS_SEPARATE = [ "system/controllers/controllerScripts.js", diff --git a/scripts/system/interstitialPage.js b/scripts/system/interstitialPage.js index af80e94605..f90256b964 100644 --- a/scripts/system/interstitialPage.js +++ b/scripts/system/interstitialPage.js @@ -16,119 +16,18 @@ var MAX_X_SIZE = 3; var isVisible = true; var defaultOffset = 1.5; - var hifi = "HighFidelity"; var VOLUME = 0.4; var tune = SoundCache.getSound("http://hifi-content.s3.amazonaws.com/alexia/LoadingScreens/crystals_and_voices.wav"); var sample = null; var MAX_LEFT_MARGIN = 1.9; var INNER_CIRCLE_WIDTH = 4.7; var DESTINATION_CARD_Y_OFFSET = 2; - var DEFAULT_TONE_MAPPING_EXPOSURE = 0.0; - var MIN_TONE_MAPPING_EXPOSURE = -5.0; var SYSTEM_TOOL_BAR = "com.highfidelity.interface.toolbar.system"; var MAX_ELAPSED_TIME = 5 * 1000; // time in ms - function isInFirstPerson() { - return (Camera.mode === "first person"); - } var toolbar = Toolbars.getToolbar(SYSTEM_TOOL_BAR); var renderViewTask = Render.getConfig("RenderMainView"); - var domainHostnameMap = { - eschatology: "Seth Alves", - blue: "Sam Cake", - thepines: "Roxie", - "dev-mobile": "HighFidelity", - "dev-mobile-master": "HighFidelity", - portalarium: "Bijou", - porange: "Caitlyn", - rust: hifi, - start: hifi, - miimusic: "Madysyn", - codex: "FluffyJenkins", - zaru: hifi, - help: hifi, - therealoasis: "Caitlyn", - vrmacy: "budgiebeats", - niccage: "OneLisa", - impromedia: "GeorgeDeac", - nest: "budgiebeats", - gabworld: "LeeGab", - vrtv: "GeoorgeDeac", - burrow: "budgiebeats", - leftcoast: "Lurks", - lazybones: "LazybonesJurassic", - skyriver: "Chamberlain", - chapel: "www.livin.today", - "hi-studio": hifi, - luskan: "jyoum", - arcadiabay: "Aitolda", - chime: hifi, - standupnow: "diva", - avreng: "GeorgeDeac", - atlas: "rocklin_guy", - steamedhams: "Alan_", - banff: hifi, - operahouse: hifi, - bankofhighfidelity: hifi, - tutorial: "WadeWatts", - nightsky: hifi, - garageband: hifi, - painting: hifi, - windwaker: "bijou", - fumbleland: "Lpasca", - monolith: "Nik", - bijou: "bijou", - morty: "bijou", - "hifiqa-rc-bots": hifi, - fightnight: hifi, - spirited: "Alan_", - "desert-oasis": "ryan", - springfield: "Alan_", - hall: "ryan", - "national-park": "ryan", - vector: "Nik", - bodymart: hifi, - "medievil-village": "ryan", - "villains-lair": "ryan", - "island-breeze": "ryan", - "classy-apartment": "ryan", - voxel: "FlameSoulis", - virtuoso: "noahglaseruc", - avatarisland: hifi, - ioab: "rocklin_guy", - tamait: "rocklin_guy", - konshulabs: "Konshu", - epic: "philip", - poopsburg: "Caitlyn", - east: hifi, - glitched: hifi, - calartsim: hifi, - calarts: hifi, - livin: "rocklin_guy", - fightclub: "philip", - thefactory: "whyroc", - wothal: "Alezia.Kurdis", - udacity: hifi, - json: "WadeWatts", - anonymous: "darlingnotin", - maker: hifi, - elisa: "elisahifi", - volxeltopia: hifi, - cupcake: hifi, - minigolf: hifi, - workshop: hifi, - vankh: "Alezia.Kurdis", - "the-crash-site": "WolfGang", - jjv360: "jjv3600", - distributed2: hifi, - anny: hifi, - university: hifi, - ludus: hifi, - stepford: "darlingnotin", - thespot: hifi - }; - // Tips have a character limit of 69 var userTips = [ "Tip: Visit TheSpot to explore featured domains!", @@ -282,11 +181,10 @@ }; var BY = "by "; - var host = domainHostnameMap[location.placename]; - var text = BY + host; + var text = BY var hostLeftMargin = getLeftMargin(domainHostname, text); var hostnameProperties = { - text: BY + host, + text: BY, leftMargin: hostLeftMargin }; @@ -323,7 +221,7 @@ AddressManager.handleLookupString(THE_PLACE); } } - var previousCameraMode = Camera.mode; + var previousPhysicsStatus = 99999; function updateOverlays(physicsEnabled) { @@ -405,9 +303,6 @@ Overlays.deleteOverlay(domainToolTip); Overlays.deleteOverlay(loadingBarPlacard); Overlays.deleteOverlay(loadingBarProgress); - try { - } catch (e) { - } } Script.scriptEnding.connect(cleanup); From 237762620316fb48c7ea2ec779c0e9775ef6ac88 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Tue, 29 May 2018 13:22:20 -0700 Subject: [PATCH 018/210] exposing physics progress --- interface/src/Application.cpp | 5 +++++ interface/src/Application.h | 5 +++++ .../src/scripting/WindowScriptingInterface.cpp | 13 +++++++++++++ interface/src/scripting/WindowScriptingInterface.h | 4 ++++ 4 files changed, 27 insertions(+) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 12dbf823b3..496c133aeb 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -5301,6 +5301,7 @@ void Application::resetPhysicsReadyInformation() { _fullSceneCounterAtLastPhysicsCheck = 0; _nearbyEntitiesCountAtLastPhysicsCheck = 0; _nearbyEntitiesStabilityCount = 0; + _nearbyEntitiesReadyCount = 0; _physicsEnabled = false; } @@ -6546,6 +6547,7 @@ bool Application::nearbyEntitiesAreReadyForPhysics() { _nearbyEntitiesCountAtLastPhysicsCheck = nearbyCount; const uint32_t MINIMUM_NEARBY_ENTITIES_STABILITY_COUNT = 3; + uint32_t readyNearbyEntities = 0; if (_nearbyEntitiesStabilityCount >= MINIMUM_NEARBY_ENTITIES_STABILITY_COUNT) { // We've seen the same number of nearby entities for several stats packets in a row. assume we've got all // the local entities. @@ -6555,8 +6557,11 @@ bool Application::nearbyEntitiesAreReadyForPhysics() { HIFI_FCDEBUG(interfaceapp(), "Physics disabled until entity loads: " << entity->getID() << entity->getName()); // don't break here because we want all the relevant entities to start their downloads result = false; + } else { + readyNearbyEntities++; } } + _nearbyEntitiesReadyCount = readyNearbyEntities; return result; } return false; diff --git a/interface/src/Application.h b/interface/src/Application.h index 6bdfef78e1..88aea0379f 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -224,6 +224,10 @@ public: void setHmdTabletBecomesToolbarSetting(bool value); bool getPreferStylusOverLaser() { return _preferStylusOverLaserSetting.get(); } void setPreferStylusOverLaser(bool value); + + uint32_t getEntitiesStabilityCount() { return _nearbyEntitiesStabilityCount; } + uint32_t getNearbyEntitiesReadyCount() { return _nearbyEntitiesReadyCount; } + uint32_t getNearbyEntitiesCount() { return _nearbyEntitiesCountAtLastPhysicsCheck; } // FIXME: Remove setting completely or make available through JavaScript API? //bool getPreferAvatarFingerOverStylus() { return _preferAvatarFingerOverStylusSetting.get(); } bool getPreferAvatarFingerOverStylus() { return false; } @@ -723,6 +727,7 @@ private: uint32_t _fullSceneCounterAtLastPhysicsCheck { 0 }; // _fullSceneReceivedCounter last time we checked physics ready uint32_t _nearbyEntitiesCountAtLastPhysicsCheck { 0 }; // how many in-range entities last time we checked physics ready uint32_t _nearbyEntitiesStabilityCount { 0 }; // how many times has _nearbyEntitiesCountAtLastPhysicsCheck been the same + uint32_t _nearbyEntitiesReadyCount { 0 }; quint64 _lastPhysicsCheckTime { usecTimestampNow() }; // when did we last check to see if physics was ready bool _keyboardDeviceHasFocus { true }; diff --git a/interface/src/scripting/WindowScriptingInterface.cpp b/interface/src/scripting/WindowScriptingInterface.cpp index ba86925581..965e183023 100644 --- a/interface/src/scripting/WindowScriptingInterface.cpp +++ b/interface/src/scripting/WindowScriptingInterface.cpp @@ -584,3 +584,16 @@ void WindowScriptingInterface::onMessageBoxSelected(int button) { _messageBoxes.remove(id); } } + + +int WindowScriptingInterface::getPhysicsNearbyEntitiesReadyCount() { + return qApp->getNearbyEntitiesReadyCount(); +} + +int WindowScriptingInterface::getPhysicsNearbyEntitiesStabilityCount() { + return qApp->getEntitiesStabilityCount(); +} + +int WindowScriptingInterface::getPhysicsNearbyEntitiesCount() { + return qApp->getNearbyEntitiesCount(); +} diff --git a/interface/src/scripting/WindowScriptingInterface.h b/interface/src/scripting/WindowScriptingInterface.h index 77895e0e76..035dcae9d0 100644 --- a/interface/src/scripting/WindowScriptingInterface.h +++ b/interface/src/scripting/WindowScriptingInterface.h @@ -561,6 +561,10 @@ public slots: */ void closeMessageBox(int id); + int getPhysicsNearbyEntitiesReadyCount(); + int getPhysicsNearbyEntitiesStabilityCount(); + int getPhysicsNearbyEntitiesCount(); + private slots: void onWindowGeometryChanged(const QRect& geometry); void onMessageBoxSelected(int button); From 6a4a56cee38aa3dc14a0ac50ab72f7000a33055d Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Mon, 6 Aug 2018 17:42:21 -0700 Subject: [PATCH 019/210] imporving the interstitial page script --- interface/src/Application.cpp | 1 + .../scripting/WindowScriptingInterface.cpp | 3 + .../src/scripting/WindowScriptingInterface.h | 3 + interface/src/ui/Stats.cpp | 4 + scripts/defaultScripts.js | 4 +- scripts/system/interstitialPage.js | 169 ++++++++++-------- 6 files changed, 108 insertions(+), 76 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index ac14e2d636..a594756a80 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -3458,6 +3458,7 @@ bool Application::isInterstitialMode() const { void Application::setIsInterstitialMode(bool interstitialMode) { if (_interstitialMode != interstitialMode) { + qDebug() << "-------> interstitial mode changed: " << _interstitialMode << " ------------> "; _interstitialMode = interstitialMode; emit interstitialModeChanged(_interstitialMode); } diff --git a/interface/src/scripting/WindowScriptingInterface.cpp b/interface/src/scripting/WindowScriptingInterface.cpp index 965e183023..68be55f88a 100644 --- a/interface/src/scripting/WindowScriptingInterface.cpp +++ b/interface/src/scripting/WindowScriptingInterface.cpp @@ -53,6 +53,9 @@ WindowScriptingInterface::WindowScriptingInterface() { }); connect(qApp->getWindow(), &MainWindow::windowGeometryChanged, this, &WindowScriptingInterface::onWindowGeometryChanged); + connect(qApp, &Application::interstitialModeChanged, [this] (bool interstitialStatus) { + emit interstitialStatusChanged(interstitialStatus); + }); } WindowScriptingInterface::~WindowScriptingInterface() { diff --git a/interface/src/scripting/WindowScriptingInterface.h b/interface/src/scripting/WindowScriptingInterface.h index 035dcae9d0..7b0b6435f7 100644 --- a/interface/src/scripting/WindowScriptingInterface.h +++ b/interface/src/scripting/WindowScriptingInterface.h @@ -746,6 +746,9 @@ signals: */ void geometryChanged(QRect geometry); + + void interstitialStatusChanged(bool intersititalMode); + private: QString getPreviousBrowseLocation() const; void setPreviousBrowseLocation(const QString& location); diff --git a/interface/src/ui/Stats.cpp b/interface/src/ui/Stats.cpp index 6bb615948c..991dee9980 100644 --- a/interface/src/ui/Stats.cpp +++ b/interface/src/ui/Stats.cpp @@ -105,6 +105,10 @@ extern std::atomic DECIMATED_TEXTURE_COUNT; extern std::atomic RECTIFIED_TEXTURE_COUNT; void Stats::updateStats(bool force) { + + if (qApp->isInterstitialMode()) { + return; + } QQuickItem* parent = parentItem(); if (!force) { if (!Menu::getInstance()->isOptionChecked(MenuOption::Stats)) { diff --git a/scripts/defaultScripts.js b/scripts/defaultScripts.js index a11ec98c40..31510831c8 100644 --- a/scripts/defaultScripts.js +++ b/scripts/defaultScripts.js @@ -31,11 +31,11 @@ var DEFAULT_SCRIPTS_COMBINED = [ "system/dialTone.js", "system/firstPersonHMD.js", "system/tablet-ui/tabletUI.js", - "system/emote.js", - "system/interstitialPage.js" + "system/emote.js" ]; var DEFAULT_SCRIPTS_SEPARATE = [ "system/controllers/controllerScripts.js", + "system/interstitialPage.js" //"system/chat.js" ]; diff --git a/scripts/system/interstitialPage.js b/scripts/system/interstitialPage.js index f90256b964..6960272e11 100644 --- a/scripts/system/interstitialPage.js +++ b/scripts/system/interstitialPage.js @@ -13,9 +13,11 @@ Camera, HMD*/ (function() { - var MAX_X_SIZE = 3; - var isVisible = true; - var defaultOffset = 1.5; + var MAX_X_SIZE = 5; + var EPSILON = 0.25; + var isVisible = false; + var STABILITY = 3.0; + var defaultOffset = -0.5; var VOLUME = 0.4; var tune = SoundCache.getSound("http://hifi-content.s3.amazonaws.com/alexia/LoadingScreens/crystals_and_voices.wav"); var sample = null; @@ -50,14 +52,15 @@ var loadingSphereID = Overlays.addOverlay("model", { name: "Loading-Sphere", position: Vec3.sum(Vec3.sum(MyAvatar.position, {x: 0.0, y: -1.0, z: 0.0}), Vec3.multiplyQbyV(MyAvatar.orientation, {x: 0, y: 0.95, z: 0})), - orientation: Quat.multiply(Quat.fromVec3Degrees({x: 0, y: 180, z: 0}), MyAvatar.orientation), + orientation: Quat.multiply(Quat.fromVec3Degrees({x: 10, y: 180, z: 0}), MyAvatar.orientation), url: "http://hifi-content.s3.amazonaws.com/alexia/LoadingScreens/black-sphere.fbx", dimensions: { x: 20, y: 20, z: 20 }, alpha: 1, visible: isVisible, ignoreRayIntersection: true, drawInFront: true, - grabbable: false + grabbable: false, + parentID: MyAvatar.SELF_ID }); @@ -128,7 +131,7 @@ var loadingBarPlacard = Overlays.addOverlay("image3d", { name: "Loading-Bar-Placard", - localPosition: { x: 0.0 , y: DESTINATION_CARD_Y_OFFSET - 0.99, z: 5.45 }, + localPosition: { x: 0.0 , y: DESTINATION_CARD_Y_OFFSET - 0.99, z: 5.52 }, url: "http://hifi-content.s3.amazonaws.com/alexia/LoadingScreens/loadingBar_placard.png", alpha: 1, dimensions: { x: 4, y: 2.8}, @@ -161,6 +164,9 @@ var timerset = false; var lastInterval = Date.now(); var timeElapsed = 0; + var currentDomain = ""; + var timer = null; + var target = 0; function getLeftMargin(overlayID, text) { @@ -171,43 +177,58 @@ } + function resetValues() { + } + + function lerp(a, b, t) { + return ((1 - t) * a + t * b); + } + + function startInterstitialPage() { + if (timer === null) { + print("--------> start page <--------"); + updateOverlays(Window.isPhysicsEnabled()); + target = 0; + currentProgress = 0.1; + timer = Script.setTimeout(update, BASIC_TIMER_INTERVAL_MS); + } + } + function domainChanged(domain) { - var name = AddressManager.placename; - domainName = name.charAt(0).toUpperCase() + name.slice(1); - var domainNameLeftMargin = getLeftMargin(domainNameTextID, domainName); - var textProperties = { - text: domainName, - leftMargin: domainNameLeftMargin - }; + if (domain !== currentDomain) { + print("----------> domain changed <-------------->"); + var name = AddressManager.placename; + domainName = name.charAt(0).toUpperCase() + name.slice(1); + var domainNameLeftMargin = getLeftMargin(domainNameTextID, domainName); + var textProperties = { + text: domainName, + leftMargin: domainNameLeftMargin + }; - var BY = "by "; - var text = BY - var hostLeftMargin = getLeftMargin(domainHostname, text); - var hostnameProperties = { - text: BY, - leftMargin: hostLeftMargin - }; + var BY = "by "; + var text = BY + var hostLeftMargin = getLeftMargin(domainHostname, text); + var hostnameProperties = { + text: BY, + leftMargin: hostLeftMargin + }; - var randomIndex = Math.floor(Math.random() * userTips.length); - var tip = userTips[randomIndex]; - var tipLeftMargin = getLeftMargin(domainToolTip, tip); - var toolTipProperties = { - text: tip, - leftMargin: tipLeftMargin - }; + var randomIndex = Math.floor(Math.random() * userTips.length); + var tip = userTips[randomIndex]; + var tipLeftMargin = getLeftMargin(domainToolTip, tip); + var toolTipProperties = { + text: tip, + leftMargin: tipLeftMargin + }; - var myAvatarDirection = Vec3.UNIT_NEG_Z; - var cardDirectionPrime = {x: 0 , y: 0, z: 5.5}; - var rotationDelta = Quat.rotationBetween(cardDirectionPrime, myAvatarDirection); - var overlayRotation = Quat.multiply(MyAvatar.orientation, rotationDelta); - var mainSphereProperties = { - orientation: overlayRotation - }; + Overlays.editOverlay(domainNameTextID, textProperties); + Overlays.editOverlay(domainHostname, hostnameProperties); + Overlays.editOverlay(domainToolTip, toolTipProperties); - Overlays.editOverlay(loadingSphereID, mainSphereProperties); - Overlays.editOverlay(domainNameTextID, textProperties); - Overlays.editOverlay(domainHostname, hostnameProperties); - Overlays.editOverlay(domainToolTip, toolTipProperties); + + startInterstitialPage(); + currentDomain = domain; + } } var THE_PLACE = "hifi://TheSpot"; @@ -222,26 +243,18 @@ } } - var previousPhysicsStatus = 99999; + var currentProgress = 0.1; function updateOverlays(physicsEnabled) { var properties = { visible: !physicsEnabled }; - var myAvatarDirection = Vec3.UNIT_NEG_Z; - var cardDirectionPrime = {x: 0 , y: 0, z: 5.5}; - var rotationDelta = Quat.rotationBetween(cardDirectionPrime, myAvatarDirection); - var overlayRotation = Quat.multiply(MyAvatar.orientation, rotationDelta); var mainSphereProperties = { - visible: !physicsEnabled, - orientation: overlayRotation + visible: !physicsEnabled }; - if (!HMD.active) { - toolbar.writeProperty("visible", physicsEnabled); - MyAvatar.headOrientation = Quat.multiply(Quat.cancelOutRollAndPitch(MyAvatar.headOrientation), Quat.fromPitchYawRollDegrees(2.5, 0, 0)); - } + Menu.setIsOptionChecked("Show Overlays", physicsEnabled); renderViewTask.getConfig("LightingModel")["enableAmbientLight"] = physicsEnabled; renderViewTask.getConfig("LightingModel")["enableDirectionalLight"] = physicsEnabled; @@ -260,38 +273,46 @@ var thisInterval = Date.now(); var deltaTime = (thisInterval - lastInterval); lastInterval = thisInterval; - if (physicsEnabled !== previousPhysicsStatus) { - if (!physicsEnabled && !timerset) { - updateOverlays(physicsEnabled); - sample = Audio.playSound(tune, { - localOnly: true, - position: MyAvatar.headPosition, - volume: VOLUME - }); - timeElapsed = 0; - timerset = true; - } - previousPhysicsStatus = physicsEnabled; + timeElapsed += deltaTime; + + var nearbyEntitiesReadyCount = Window.getPhysicsNearbyEntitiesReadyCount(); + var stabilityCount = Window.getPhysicsNearbyEntitiesStabilityCount(); + var nearbyEntitiesCount = Window.getPhysicsNearbyEntitiesCount(); + + var stabilityPercentage = (stabilityCount / STABILITY); + if (stabilityPercentage > 1) { + stabilityPercentage = 1; } - if (timerset) { - timeElapsed += deltaTime; - if (timeElapsed >= MAX_ELAPSED_TIME) { - updateOverlays(true); - sample.stop(); - sample = null; - timerset = false; - } + var stabilityProgress = (MAX_X_SIZE * 0.75) * stabilityPercentage; + var entitiesLoadedPercentage = 1; + if (nearbyEntitiesCount > 0) { + entitiesLoadedPercentage = nearbyEntitiesReadyCount / nearbyEntitiesCount; } + var entitiesLoadedProgress = (MAX_X_SIZE * 0.25) * entitiesLoadedPercentage; + var progress = stabilityProgress + entitiesLoadedProgress; + if (progress >= target) { + target = progress; + } + currentProgress = lerp(currentProgress, target, 0.2); + var properties = { + localPosition: { x: -(currentProgress / 2) + 2, y: DESTINATION_CARD_Y_OFFSET - 0.99, z: 5.45 }, + dimensions: { + x: currentProgress, + y: 2.8 + } + }; - Overlays.editOverlay(loadingSphereID, { - position: Vec3.sum(Vec3.sum(MyAvatar.position, {x: 0.0, y: -1.7, z: 0.0}), Vec3.multiplyQbyV(MyAvatar.orientation, {x: 0, y: 0.95, z: 0})) - }); - Script.setTimeout(update, BASIC_TIMER_INTERVAL_MS); + Overlays.editOverlay(loadingBarProgress, properties); + if (physicsEnabled && (currentProgress >= (MAX_X_SIZE - EPSILON))) { + updateOverlays(physicsEnabled); + timer = null; + return; + } + timer = Script.setTimeout(update, BASIC_TIMER_INTERVAL_MS); } - Script.setTimeout(update, BASIC_TIMER_INTERVAL_MS); Overlays.mouseReleaseOnOverlay.connect(clickedOnOverlay); Window.domainChanged.connect(domainChanged); From a9fd034f09ca9e8b8f024d188549f92cd9326f53 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Tue, 7 Aug 2018 16:02:54 -0700 Subject: [PATCH 020/210] switching to location api --- interface/src/Application.cpp | 4 ++-- scripts/system/interstitialPage.js | 26 ++++++++++++-------------- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index a594756a80..39c24d7562 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -1640,7 +1640,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo audioClient->setMuted(!audioClient->isMuted()); } else if (action == controller::toInt(controller::Action::CYCLE_CAMERA)) { cycleCamera(); - } else if (action == controller::toInt(controller::Action::CONTEXT_MENU)) { + } else if (action == controller::toInt(controller::Action::CONTEXT_MENU) && !isInterstitialMode()) { toggleTabletUI(); } else if (action == controller::toInt(controller::Action::RETICLE_X)) { auto oldPos = getApplicationCompositor().getReticlePosition(); @@ -7806,7 +7806,7 @@ float Application::getRenderResolutionScale() const { } void Application::notifyPacketVersionMismatch() { - if (!_notifiedPacketVersionMismatchThisDomain) { + if (!_notifiedPacketVersionMismatchThisDomain && !isInterstitialMode()) { _notifiedPacketVersionMismatchThisDomain = true; QString message = "The location you are visiting is running an incompatible server version.\n"; diff --git a/scripts/system/interstitialPage.js b/scripts/system/interstitialPage.js index 6960272e11..b18d88d796 100644 --- a/scripts/system/interstitialPage.js +++ b/scripts/system/interstitialPage.js @@ -186,7 +186,6 @@ function startInterstitialPage() { if (timer === null) { - print("--------> start page <--------"); updateOverlays(Window.isPhysicsEnabled()); target = 0; currentProgress = 0.1; @@ -195,8 +194,9 @@ } function domainChanged(domain) { + print("domain changed: " + domain); if (domain !== currentDomain) { - print("----------> domain changed <-------------->"); + MyAvatar.restoreAnimation(); var name = AddressManager.placename; domainName = name.charAt(0).toUpperCase() + name.slice(1); var domainNameLeftMargin = getLeftMargin(domainNameTextID, domainName); @@ -205,13 +205,11 @@ leftMargin: domainNameLeftMargin }; - var BY = "by "; - var text = BY - var hostLeftMargin = getLeftMargin(domainHostname, text); + /*var hostLeftMargin = getLeftMargin(domainHostname, text); var hostnameProperties = { text: BY, leftMargin: hostLeftMargin - }; + };*/ var randomIndex = Math.floor(Math.random() * userTips.length); var tip = userTips[randomIndex]; @@ -222,7 +220,7 @@ }; Overlays.editOverlay(domainNameTextID, textProperties); - Overlays.editOverlay(domainHostname, hostnameProperties); + // Overlays.editOverlay(domainHostname, hostnameProperties); Overlays.editOverlay(domainToolTip, toolTipProperties); @@ -234,12 +232,9 @@ var THE_PLACE = "hifi://TheSpot"; function clickedOnOverlay(overlayID, event) { print(overlayID + " other: " + loadingToTheSpotID); - print(event.button === "Primary"); if (loadingToTheSpotID === overlayID) { - if (timerset) { - timeElapsed = 0; - } - AddressManager.handleLookupString(THE_PLACE); + print("-------> heading to theb spot <--------"); + location.handleLookupString(THE_PLACE); } } @@ -254,7 +249,7 @@ visible: !physicsEnabled }; - Menu.setIsOptionChecked("Show Overlays", physicsEnabled); + // Menu.setIsOptionChecked("Show Overlays", physicsEnabled); renderViewTask.getConfig("LightingModel")["enableAmbientLight"] = physicsEnabled; renderViewTask.getConfig("LightingModel")["enableDirectionalLight"] = physicsEnabled; @@ -314,7 +309,10 @@ } Overlays.mouseReleaseOnOverlay.connect(clickedOnOverlay); - Window.domainChanged.connect(domainChanged); + location.hostChanged.connect(domainChanged); + location.lookupResultsFinished.connect(function() { + print("connected: " + location.isConnected()); + }); function cleanup() { Overlays.deleteOverlay(loadingSphereID); From 0fed48bd0e7b8ce0411dc25f5944ed2d1a3d0d3d Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Wed, 8 Aug 2018 18:15:27 -0700 Subject: [PATCH 021/210] improving interstitial page --- scripts/system/interstitialPage.js | 199 ++++++++++++++++++++++++----- 1 file changed, 164 insertions(+), 35 deletions(-) diff --git a/scripts/system/interstitialPage.js b/scripts/system/interstitialPage.js index b18d88d796..76900bd77c 100644 --- a/scripts/system/interstitialPage.js +++ b/scripts/system/interstitialPage.js @@ -10,25 +10,30 @@ // /* global Script, Controller, Overlays, Quat, MyAvatar, Entities, print, Vec3, AddressManager, Render, Window, Toolbars, - Camera, HMD*/ + Camera, HMD, location, Account*/ (function() { + Script.include("/~/system/libraries/Xform.js"); + var DEBUG = true; var MAX_X_SIZE = 5; var EPSILON = 0.25; var isVisible = false; var STABILITY = 3.0; - var defaultOffset = -0.5; var VOLUME = 0.4; var tune = SoundCache.getSound("http://hifi-content.s3.amazonaws.com/alexia/LoadingScreens/crystals_and_voices.wav"); var sample = null; var MAX_LEFT_MARGIN = 1.9; var INNER_CIRCLE_WIDTH = 4.7; var DESTINATION_CARD_Y_OFFSET = 2; - var SYSTEM_TOOL_BAR = "com.highfidelity.interface.toolbar.system"; - var MAX_ELAPSED_TIME = 5 * 1000; // time in ms + var DEFAULT_Z_OFFSET = 5.45; - var toolbar = Toolbars.getToolbar(SYSTEM_TOOL_BAR); var renderViewTask = Render.getConfig("RenderMainView"); + var request = Script.require('request').request; + var BUTTON_PROPERTIES = { + text: "Interstitial" + }; + var tablet = null; + var button = null; // Tips have a character limit of 69 var userTips = [ @@ -49,12 +54,14 @@ "Tip: Log in to make friends, visit new domains, and save avatars!" ]; + var DEFAULT_DIMENSIONS = { x: 20, y: 20, z: 20 }; + var loadingSphereID = Overlays.addOverlay("model", { name: "Loading-Sphere", position: Vec3.sum(Vec3.sum(MyAvatar.position, {x: 0.0, y: -1.0, z: 0.0}), Vec3.multiplyQbyV(MyAvatar.orientation, {x: 0, y: 0.95, z: 0})), - orientation: Quat.multiply(Quat.fromVec3Degrees({x: 10, y: 180, z: 0}), MyAvatar.orientation), + orientation: Quat.multiply(Quat.fromVec3Degrees({x: 0, y: 180, z: 0}), MyAvatar.orientation), url: "http://hifi-content.s3.amazonaws.com/alexia/LoadingScreens/black-sphere.fbx", - dimensions: { x: 20, y: 20, z: 20 }, + dimensions: DEFAULT_DIMENSIONS, alpha: 1, visible: isVisible, ignoreRayIntersection: true, @@ -63,11 +70,23 @@ parentID: MyAvatar.SELF_ID }); + var anchorOverlay = Overlays.addOverlay("cube", { + dimensions: {x: 0.2, y: 0.2, z: 0.2}, + visible: true, + grabbable: false, + ignoreRayIntersection: true, + localPosition: {x: 0.0, y: getAnchorLocalYOffset(), z: DEFAULT_Z_OFFSET }, + orientation: Quat.multiply(Quat.fromVec3Degrees({x: 0, y: 180, z: 0}), MyAvatar.orientation), + solid: true, + drawInFront: true, + parentID: MyAvatar.SELF_ID + }); - var domainName = ""; + + var domainName = "Test"; var domainNameTextID = Overlays.addOverlay("text3d", { name: "Loading-Destination-Card-Text", - localPosition: { x: 0.0, y: DESTINATION_CARD_Y_OFFSET + 0.8, z: 5.45 }, + localPosition: { x: 0.0, y: 0.8, z: 0.0 }, text: domainName, textAlpha: 1, backgroundAlpha: 0, @@ -77,15 +96,15 @@ drawInFront: true, grabbable: false, localOrientation: Quat.fromVec3Degrees({ x: 0, y: 180, z: 0 }), - parentID: loadingSphereID + parentID: anchorOverlay }); - var hostName = ""; + var domainText = ""; - var domainHostname = Overlays.addOverlay("text3d", { + var domainDescription = Overlays.addOverlay("text3d", { name: "Loading-Hostname", - localPosition: { x: 0.0, y: DESTINATION_CARD_Y_OFFSET + 0.32, z: 5.45 }, - text: hostName, + localPosition: { x: 0.0, y: 0.32, z: 0.0 }, + text: domainText, textAlpha: 1, backgroundAlpha: 0, lineHeight: 0.13, @@ -94,14 +113,14 @@ drawInFront: true, grabbable: false, localOrientation: Quat.fromVec3Degrees({ x: 0, y: 180, z: 0 }), - parentID: loadingSphereID + parentID: anchorOverlay }); var toolTip = ""; var domainToolTip = Overlays.addOverlay("text3d", { name: "Loading-Tooltip", - localPosition: { x: 0.0 , y: DESTINATION_CARD_Y_OFFSET - 1.6, z: 5.45 }, + localPosition: { x: 0.0 , y: -1.6, z: 0.0 }, text: toolTip, textAlpha: 1, backgroundAlpha: 0, @@ -111,12 +130,12 @@ drawInFront: true, grabbable: false, localOrientation: Quat.fromVec3Degrees({ x: 0, y: 180, z: 0 }), - parentID: loadingSphereID + parentID: anchorOverlay }); var loadingToTheSpotID = Overlays.addOverlay("image3d", { name: "Loading-Destination-Card-Text", - localPosition: { x: 0.0 , y: DESTINATION_CARD_Y_OFFSET - 1.8, z: 5.45 }, + localPosition: { x: 0.0 , y: -1.8, z: 0.0 }, url: "http://hifi-content.s3.amazonaws.com/alexia/LoadingScreens/goTo_button.png", alpha: 1, dimensions: { x: 1.2, y: 0.6}, @@ -126,12 +145,12 @@ drawInFront: true, grabbable: false, localOrientation: Quat.fromVec3Degrees({ x: 0.0, y: 180.0, z: 0.0 }), - parentID: loadingSphereID + parentID: anchorOverlay }); var loadingBarPlacard = Overlays.addOverlay("image3d", { name: "Loading-Bar-Placard", - localPosition: { x: 0.0 , y: DESTINATION_CARD_Y_OFFSET - 0.99, z: 5.52 }, + localPosition: { x: 0.0 , y: -0.99, z: 0.07 }, url: "http://hifi-content.s3.amazonaws.com/alexia/LoadingScreens/loadingBar_placard.png", alpha: 1, dimensions: { x: 4, y: 2.8}, @@ -141,12 +160,12 @@ drawInFront: true, grabbable: false, localOrientation: Quat.fromVec3Degrees({ x: 0.0, y: 180.0, z: 0.0 }), - parentID: loadingSphereID + parentID: anchorOverlay }); var loadingBarProgress = Overlays.addOverlay("image3d", { name: "Loading-Bar-Progress", - localPosition: { x: 0.0 , y: DESTINATION_CARD_Y_OFFSET - 0.99, z: 5.45 }, + localPosition: { x: 0.0 , y: -0.99, z: 0.0 }, url: "http://hifi-content.s3.amazonaws.com/alexia/LoadingScreens/loadingBar_progress.png", alpha: 1, dimensions: { x: 4, y: 2.8}, @@ -156,7 +175,7 @@ drawInFront: true, grabbable: false, localOrientation: Quat.fromVec3Degrees({ x: 0.0, y: 180.0, z: 0.0 }), - parentID: loadingSphereID + parentID: anchorOverlay }); var TARGET_UPDATE_HZ = 60; // 50hz good enough, but we're using update @@ -169,6 +188,16 @@ var target = 0; + function getAnchorLocalYOffset() { + var loadingSpherePosition = Overlays.getProperty(loadingSphereID, "position"); + var loadingSphereOrientation = Overlays.getProperty(loadingSphereID, "rotation"); + var overlayXform = new Xform(loadingSphereOrientation, loadingSpherePosition); + var worldToOverlayXform = overlayXform.inv(); + var headPosition = MyAvatar.getHeadPosition(); + var headPositionInOverlaySpace = worldToOverlayXform.xformPoint(headPosition); + return headPositionInOverlaySpace.y; + } + function getLeftMargin(overlayID, text) { var textSize = Overlays.textSize(overlayID, text); var sizeDifference = ((INNER_CIRCLE_WIDTH - textSize.width) / 2); @@ -176,7 +205,6 @@ return leftMargin; } - function resetValues() { } @@ -186,13 +214,28 @@ function startInterstitialPage() { if (timer === null) { + print("----------> starting <----------"); updateOverlays(Window.isPhysicsEnabled()); + startAudio(); target = 0; currentProgress = 0.1; timer = Script.setTimeout(update, BASIC_TIMER_INTERVAL_MS); } } + function startAudio() { + sample = Audio.playSound(tune, { + localOnly: true, + position: MyAvatar.getHeadPosition(), + volume: VOLUME + }); + } + + function endAudio() { + sample.stop(); + sample = null; + } + function domainChanged(domain) { print("domain changed: " + domain); if (domain !== currentDomain) { @@ -205,11 +248,23 @@ leftMargin: domainNameLeftMargin }; - /*var hostLeftMargin = getLeftMargin(domainHostname, text); - var hostnameProperties = { - text: BY, - leftMargin: hostLeftMargin - };*/ + var url = Account.metaverseServerURL + '/api/v1/places/' + domain; + request({ + uri: url + }, function(error, data) { + if (data.status === "success") { + print("-----------> settings domain description <----------"); + var domainInfo = data.data; + var domainDescriptionText = domainInfo.place.description; + print("domainText: " + domainDescriptionText); + var leftMargin = getLeftMargin(domainDescription, domainDescriptionText); + var domainDescriptionProperties = { + text: domainDescriptionText, + leftMargin: leftMargin + }; + Overlays.editOverlay(domainDescription, domainDescriptionProperties); + } + }); var randomIndex = Math.floor(Math.random() * userTips.length); var tip = userTips[randomIndex]; @@ -220,7 +275,6 @@ }; Overlays.editOverlay(domainNameTextID, textProperties); - // Overlays.editOverlay(domainHostname, hostnameProperties); Overlays.editOverlay(domainToolTip, toolTipProperties); @@ -233,7 +287,6 @@ function clickedOnOverlay(overlayID, event) { print(overlayID + " other: " + loadingToTheSpotID); if (loadingToTheSpotID === overlayID) { - print("-------> heading to theb spot <--------"); location.handleLookupString(THE_PLACE); } } @@ -249,18 +302,70 @@ visible: !physicsEnabled }; + var domainTextProperties = { + text: domainText, + visible: !physicsEnabled + }; + // Menu.setIsOptionChecked("Show Overlays", physicsEnabled); + if (!HMD.active) { + MyAvatar.headOrientation = Quat.multiply(Quat.cancelOutRollAndPitch(MyAvatar.headOrientation), Quat.fromPitchYawRollDegrees(-3.0, 0, 0)); + } + renderViewTask.getConfig("LightingModel")["enableAmbientLight"] = physicsEnabled; renderViewTask.getConfig("LightingModel")["enableDirectionalLight"] = physicsEnabled; renderViewTask.getConfig("LightingModel")["enablePointLight"] = physicsEnabled; Overlays.editOverlay(loadingSphereID, mainSphereProperties); Overlays.editOverlay(loadingToTheSpotID, properties); Overlays.editOverlay(domainNameTextID, properties); - Overlays.editOverlay(domainHostname, properties); + Overlays.editOverlay(domainDescription, domainTextProperties); Overlays.editOverlay(domainToolTip, properties); Overlays.editOverlay(loadingBarPlacard, properties); Overlays.editOverlay(loadingBarProgress, properties); + + Camera.mode = "first person"; + } + + + function scaleInterstitialPage(sensorToWorldScale) { + var yOffset = getAnchorLocalYOffset(); + var localPosition = { + x: 0.0, + y: yOffset, + z: 5.45 + }; + + Overlays.editOverlay(anchorOverlay, { localPosition: localPosition }); + } + + var progress = 0; + function updateProgress() { + print("updateProgress"); + var thisInterval = Date.now(); + var deltaTime = (thisInterval - lastInterval); + lastInterval = thisInterval; + timeElapsed += deltaTime; + + progress += MAX_X_SIZE * (deltaTime / 1000); + print(progress); + var properties = { + localPosition: { x: -(progress / 1.98) + 2, y: -0.99, z: 0.0 }, + dimensions: { + x: progress, + y: 2.8 + } + }; + + if (progress > MAX_X_SIZE) { + progress = 0; + } + + Overlays.editOverlay(loadingBarProgress, properties); + + if (!toggle) { + Script.setTimeout(updateProgress, BASIC_TIMER_INTERVAL_MS); + } } function update() { @@ -292,7 +397,7 @@ } currentProgress = lerp(currentProgress, target, 0.2); var properties = { - localPosition: { x: -(currentProgress / 2) + 2, y: DESTINATION_CARD_Y_OFFSET - 0.99, z: 5.45 }, + localPosition: { x: -(currentProgress / 2) + 2, y: 0.99, z: 5.45 }, dimensions: { x: currentProgress, y: 2.8 @@ -301,7 +406,9 @@ Overlays.editOverlay(loadingBarProgress, properties); if (physicsEnabled && (currentProgress >= (MAX_X_SIZE - EPSILON))) { + print("----------> ending <--------"); updateOverlays(physicsEnabled); + endAudio(); timer = null; return; } @@ -311,17 +418,39 @@ Overlays.mouseReleaseOnOverlay.connect(clickedOnOverlay); location.hostChanged.connect(domainChanged); location.lookupResultsFinished.connect(function() { - print("connected: " + location.isConnected()); + print("connected: " + location.isConnected); }); + MyAvatar.sensorToWorldScaleChanged.connect(scaleInterstitialPage); + + var toggle = true; + if (DEBUG) { + tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system"); + button = tablet.addButton(BUTTON_PROPERTIES); + + button.clicked.connect(function() { + toggle = !toggle; + updateOverlays(toggle); + + if (!toggle) { + Script.setTimeout(updateProgress, BASIC_TIMER_INTERVAL_MS); + } + }); + } + function cleanup() { Overlays.deleteOverlay(loadingSphereID); Overlays.deleteOverlay(loadingToTheSpotID); Overlays.deleteOverlay(domainNameTextID); - Overlays.deleteOverlay(domainHostname); + Overlays.deleteOverlay(domainDescription); Overlays.deleteOverlay(domainToolTip); Overlays.deleteOverlay(loadingBarPlacard); Overlays.deleteOverlay(loadingBarProgress); + Overlays.deleteOverlay(anchorOverlay); + + if (DEBUG) { + tablet.removeButton(button); + } } Script.scriptEnding.connect(cleanup); From 353121be7d374ae58061ac55db8106a60b0d163c Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Thu, 9 Aug 2018 16:29:37 -0700 Subject: [PATCH 022/210] making some changes --- interface/resources/images/loadingBar_v1.png | Bin 0 -> 20323 bytes scripts/system/interstitialPage.js | 38 ++++++++++--------- 2 files changed, 21 insertions(+), 17 deletions(-) create mode 100644 interface/resources/images/loadingBar_v1.png diff --git a/interface/resources/images/loadingBar_v1.png b/interface/resources/images/loadingBar_v1.png new file mode 100644 index 0000000000000000000000000000000000000000..b5c77054c4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mj^hgI8 zzOm!|6shiPQeLM1OJOCE%~T7cSZtN4sAvP=XPtR01@tMdqi2Jo} zFDzKn=r2H%C;rhDARedRxdm}dr(O#>+a X0pQ4zmm92`e;f&>qNQA^X!iD>8RVDV literal 0 HcmV?d00001 diff --git a/scripts/system/interstitialPage.js b/scripts/system/interstitialPage.js index 76900bd77c..ae1f71d0dd 100644 --- a/scripts/system/interstitialPage.js +++ b/scripts/system/interstitialPage.js @@ -15,7 +15,7 @@ (function() { Script.include("/~/system/libraries/Xform.js"); var DEBUG = true; - var MAX_X_SIZE = 5; + var MAX_X_SIZE = 4; var EPSILON = 0.25; var isVisible = false; var STABILITY = 3.0; @@ -67,7 +67,6 @@ ignoreRayIntersection: true, drawInFront: true, grabbable: false, - parentID: MyAvatar.SELF_ID }); var anchorOverlay = Overlays.addOverlay("cube", { @@ -79,7 +78,7 @@ orientation: Quat.multiply(Quat.fromVec3Degrees({x: 0, y: 180, z: 0}), MyAvatar.orientation), solid: true, drawInFront: true, - parentID: MyAvatar.SELF_ID + parentID: loadingSphereID }); @@ -100,7 +99,6 @@ }); var domainText = ""; - var domainDescription = Overlays.addOverlay("text3d", { name: "Loading-Hostname", localPosition: { x: 0.0, y: 0.32, z: 0.0 }, @@ -150,7 +148,7 @@ var loadingBarPlacard = Overlays.addOverlay("image3d", { name: "Loading-Bar-Placard", - localPosition: { x: 0.0 , y: -0.99, z: 0.07 }, + localPosition: { x: 0.0, y: -0.99, z: 0.0 }, url: "http://hifi-content.s3.amazonaws.com/alexia/LoadingScreens/loadingBar_placard.png", alpha: 1, dimensions: { x: 4, y: 2.8}, @@ -165,10 +163,10 @@ var loadingBarProgress = Overlays.addOverlay("image3d", { name: "Loading-Bar-Progress", - localPosition: { x: 0.0 , y: -0.99, z: 0.0 }, - url: "http://hifi-content.s3.amazonaws.com/alexia/LoadingScreens/loadingBar_progress.png", + localPosition: { x: 0.0, y: -0.99, z: 0.0 }, + url: Script.resourcesPath() + "images/loadingBar_v1.png", alpha: 1, - dimensions: { x: 4, y: 2.8}, + dimensions: {x: 4, y: 2.8}, visible: isVisible, emissive: true, ignoreRayIntersection: false, @@ -187,6 +185,8 @@ var timer = null; var target = 0; + var connectionToDomainFailed = false; + function getAnchorLocalYOffset() { var loadingSpherePosition = Overlays.getProperty(loadingSphereID, "position"); @@ -219,6 +219,7 @@ startAudio(); target = 0; currentProgress = 0.1; + connectionToDomainFailed = false; timer = Script.setTimeout(update, BASIC_TIMER_INTERVAL_MS); } } @@ -313,9 +314,9 @@ MyAvatar.headOrientation = Quat.multiply(Quat.cancelOutRollAndPitch(MyAvatar.headOrientation), Quat.fromPitchYawRollDegrees(-3.0, 0, 0)); } - renderViewTask.getConfig("LightingModel")["enableAmbientLight"] = physicsEnabled; - renderViewTask.getConfig("LightingModel")["enableDirectionalLight"] = physicsEnabled; - renderViewTask.getConfig("LightingModel")["enablePointLight"] = physicsEnabled; + //renderViewTask.getConfig("LightingModel")["enableAmbientLight"] = physicsEnabled; + //renderViewTask.getConfig("LightingModel")["enableDirectionalLight"] = physicsEnabled; + //renderViewTask.getConfig("LightingModel")["enablePointLight"] = physicsEnabled; Overlays.editOverlay(loadingSphereID, mainSphereProperties); Overlays.editOverlay(loadingToTheSpotID, properties); Overlays.editOverlay(domainNameTextID, properties); @@ -350,7 +351,7 @@ progress += MAX_X_SIZE * (deltaTime / 1000); print(progress); var properties = { - localPosition: { x: -(progress / 1.98) + 2, y: -0.99, z: 0.0 }, + localPosition: { x: -(progress / 2) + 2, y: -0.99, z: 0.0 }, dimensions: { x: progress, y: 2.8 @@ -403,11 +404,11 @@ y: 2.8 } }; - + print("progress: " + currentProgress); Overlays.editOverlay(loadingBarProgress, properties); - if (physicsEnabled && (currentProgress >= (MAX_X_SIZE - EPSILON))) { + if (((physicsEnabled && (currentProgress >= (MAX_X_SIZE - EPSILON))) || connectionToDomainFailed)) { print("----------> ending <--------"); - updateOverlays(physicsEnabled); + updateOverlays((physicsEnabled || connectionToDomainFailed)); endAudio(); timer = null; return; @@ -418,7 +419,10 @@ Overlays.mouseReleaseOnOverlay.connect(clickedOnOverlay); location.hostChanged.connect(domainChanged); location.lookupResultsFinished.connect(function() { - print("connected: " + location.isConnected); + Script.setTimeout(function() { + print("location connected: " + location.isConnected); + connectionToDomainFailed = !location.isConnected; + }, 300); }); MyAvatar.sensorToWorldScaleChanged.connect(scaleInterstitialPage); @@ -433,7 +437,7 @@ updateOverlays(toggle); if (!toggle) { - Script.setTimeout(updateProgress, BASIC_TIMER_INTERVAL_MS); + //Script.setTimeout(updateProgress, BASIC_TIMER_INTERVAL_MS); } }); } From 46297c6b22aa4b1f2128ac4ef4acde155e1b4500 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Fri, 10 Aug 2018 10:20:39 -0700 Subject: [PATCH 023/210] interstitial page --- scripts/system/interstitialPage.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/scripts/system/interstitialPage.js b/scripts/system/interstitialPage.js index ae1f71d0dd..149e1e141b 100644 --- a/scripts/system/interstitialPage.js +++ b/scripts/system/interstitialPage.js @@ -67,11 +67,12 @@ ignoreRayIntersection: true, drawInFront: true, grabbable: false, + parentID: MyAvatar.SELF_ID }); var anchorOverlay = Overlays.addOverlay("cube", { dimensions: {x: 0.2, y: 0.2, z: 0.2}, - visible: true, + visible: false, grabbable: false, ignoreRayIntersection: true, localPosition: {x: 0.0, y: getAnchorLocalYOffset(), z: DEFAULT_Z_OFFSET }, @@ -314,9 +315,9 @@ MyAvatar.headOrientation = Quat.multiply(Quat.cancelOutRollAndPitch(MyAvatar.headOrientation), Quat.fromPitchYawRollDegrees(-3.0, 0, 0)); } - //renderViewTask.getConfig("LightingModel")["enableAmbientLight"] = physicsEnabled; - //renderViewTask.getConfig("LightingModel")["enableDirectionalLight"] = physicsEnabled; - //renderViewTask.getConfig("LightingModel")["enablePointLight"] = physicsEnabled; + renderViewTask.getConfig("LightingModel")["enableAmbientLight"] = physicsEnabled; + renderViewTask.getConfig("LightingModel")["enableDirectionalLight"] = physicsEnabled; + renderViewTask.getConfig("LightingModel")["enablePointLight"] = physicsEnabled; Overlays.editOverlay(loadingSphereID, mainSphereProperties); Overlays.editOverlay(loadingToTheSpotID, properties); Overlays.editOverlay(domainNameTextID, properties); @@ -350,15 +351,18 @@ progress += MAX_X_SIZE * (deltaTime / 1000); print(progress); + if (progress > MAX_X_SIZE) { + progress = 4; + } var properties = { - localPosition: { x: -(progress / 2) + 2, y: -0.99, z: 0.0 }, + localPosition: { x: 2.0 - (progress / 2), y: -0.99, z: -0.3 }, dimensions: { x: progress, y: 2.8 } }; - if (progress > MAX_X_SIZE) { + if (progress >= MAX_X_SIZE) { progress = 0; } @@ -398,7 +402,7 @@ } currentProgress = lerp(currentProgress, target, 0.2); var properties = { - localPosition: { x: -(currentProgress / 2) + 2, y: 0.99, z: 5.45 }, + localPosition: { x: 2 - (currentProgress / 2), y: -0.99, z: -0.3 }, dimensions: { x: currentProgress, y: 2.8 From 75cc1c62c05b8c9e6b52d8b4166fda533c72bbe6 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Fri, 10 Aug 2018 16:53:34 -0700 Subject: [PATCH 024/210] mostly done interstitial page --- .../resources/images/loadingBar_placard.png | Bin 0 -> 2737 bytes .../resources/images/loadingBar_progress.png | Bin 0 -> 20396 bytes interface/resources/images/loadingBar_v1.png | Bin 20323 -> 0 bytes interface/src/Application.cpp | 11 ++++-- interface/src/Application.h | 2 +- interface/src/Menu.cpp | 1 + scripts/defaultScripts.js | 3 +- scripts/system/interstitialPage.js | 37 ++++++++++-------- 8 files changed, 32 insertions(+), 22 deletions(-) create mode 100644 interface/resources/images/loadingBar_placard.png create mode 100644 interface/resources/images/loadingBar_progress.png delete mode 100644 interface/resources/images/loadingBar_v1.png diff --git a/interface/resources/images/loadingBar_placard.png b/interface/resources/images/loadingBar_placard.png new file mode 100644 index 0000000000000000000000000000000000000000..9fd4c9e71f433d71be2c220d29e30e938abc3a8c GIT binary patch literal 2737 zcm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KYQUrrfyQIvTLl}lV)mjcLD&=ib2Y> z^VR7`$?hP_T`xfIXwcWzA(Pu^>b4)Ne=`q&#tI+X&s(p}X8y@G&=mB{9)O%NH=E~E ze{swaPOU`|2_D8*X7;env*SX00Kj4WWFG;vHoqR<->D^_j0d}qRb|2-dk8U#S6!Dc zRhM{}e+dAHOZsDDKkn$!uYq^gX4>KbRMpeboNnOy4R(JX1HQ^Hz3(1fhmM7*JPRg0 zqf+<0j|k+w4Od+qfB&Ej+;zWzJ}z>ao@*!j0dGZDv)NsmW5SN?V1Nb~MRRBc0p zIc{%f?LfHoSnOx7jg}b(lmSA+Q09uAV0Gc`p{-9&R9}x;dC4u-eabS4GM&Ybx_onI z+mRblhQY@bcOS%rj;(QM#?|YG%c?o9^<^!6Q0G|0xrz1{{dc}V0h_k0Y8Nd0BDis& zq-e~vC*xq&ii&IVu_v>|$## z4d)zx(|l?qwSHQhNjp_mn2wg<3)hR*V!7uPIOD&-R18Hl?_R>p7}#uXYUnT)JkaUb zAB=Vi_Hu8|UhE^+i+c;0%W6K^X%r`w6$}+!aucYoqBhyXr?szzznJ!|?S=x}RX&FL zlEjorn++TH<>ux-*bL4*=Qz%MU6hyA rCh-3_{NLiN_rMP*e&o{V7|zDn0e-CSeh1(ji#iw<9Ko+#AGhz{XO8;| literal 0 HcmV?d00001 diff --git a/interface/resources/images/loadingBar_progress.png b/interface/resources/images/loadingBar_progress.png new file mode 100644 index 0000000000000000000000000000000000000000..2b1fb089d97f0acce5cfe62a07075328ee6316f2 GIT binary patch literal 20396 zcmb@qWl)^avMxLjB0v%x0tBBygS)#7Zi7pZ!C`Q>1b3LhT|;npOK^AB;KAMPtG&UH5ga!ZrK7eH;Q~>}K0002cefI_c02~qD z&Ks!$_S4~GG$008jH!BSnzSxZ5l&je=6 zWb}_1CU;x=e{cZ=gx&3pOst{Kxja!XS|N=;4$76p58sD-7Brz2F& zQ&HW-)7pgBlu}rTT)>^r-PYa~>TE>rZfj%b#OE$Z`A=RxJ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j&NxJet@A}oR^fXMc&^}Z6Pr0N~=F_{tLa0XDa{z literal 0 HcmV?d00001 diff --git a/interface/resources/images/loadingBar_v1.png b/interface/resources/images/loadingBar_v1.png deleted file mode 100644 index b5c77054c4b2e185da0992a2237d2eb80d9033fc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 20323 zcmb@nbyS?+vMt&WA`n7wf&>UO?(VLQ26qV1xVvj`r*U_;;O_43F2Nldr+H)VbARXT zH^zN;yz$1XzpB=%nlzaTvXzznZ(wVO|8-D?HdYL- z`nC*A^o$HvR{zrVZ@~_ZibnrKIB@XEx$6V%F#S2j_oR&%`Fg!on=f#U;YT%)}(d$tf_Y%FbQ zX<0q99$dd71r0V>hLCcHF@A+3p$wJSium;*EFk8a?>7i2COJsxTet6z5X3N4MFe3I z^c2CLgb3XB28IzCOLi3NQLXFe#}X>*?VJahuj*CpZ*Lo=$H0V(+NiS9lZEz!mp9nG z?upjs6L$C~xPM>uf7_+$E^^ZUgaE<+@Bsk$|BO)oGw}V-;J@CXe~kDa=il}py#Rnu z|GD-5yz~DziGM$n|JeUqdjB^Pm#B7L7dRacJK;^5{{R61mlCK9?YA@gi-P~D#RuN@ zmG6m5TkmOdx#~ZXDTT>98#YIY)Zl$}>^F5yhA(QXKK}QfU8Ni|t1jbWs2u!MEz+1o&3H=adIq=@2hN z_yqiKPJqi#WN)GkEt}}CJZx8;ac!))Kg~NlH_d&Y$pCG0Z>dt3(N$W(i{noxS5Vj2 z8$;-#IQE$4{}2UiMYF(V7rfDx_%xC~4eD)jwQW>ZxtvtFUQg4a$Y>L$^ zG6YDqfSqcci?}+|7+a+X02=h{VHiW{t4~) zV$fyF+lL;e%YGRA@#-EYE9D5L$q8QjqJQ6eQbn8ejCQM!rT#6;8ijgZQs(Q z=tCUWnq*n!^d|J$(b%YSf%SJWcpc;K+w(DY`T`uq_f`h9rF!Ffk3QRl~Pu^*{;6k29fi# zhKKul{jxg3UDd0@}QAo!mumAhYpGbW*j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fs~Zft;hZepRr;gB#-7hOmo#K{?}X8#M%xwTc~HH~G#WCWp>kRlRg%)nI>% z5uDir1gm1T9xRG-<~M!R#0&D9JTIwPkB2x&TF$H)R{FMp&YT-DnMdv#B%BKx+KQnDjNkArPV~#ZNF~tjjxoFYF7}Mj^hgI8 zzOm!|6shiPQeLM1OJOCE%~T7cSZtN4sAvP=XPtR01@tMdqi2Jo} zFDzKn=r2H%C;rhDARedRxdm}dr(O#>+a X0pQ4zmm92`e;f&>qNQA^X!iD>8RVDV diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index cac201f34b..12a3ebf887 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -2973,6 +2973,9 @@ void Application::initializeUi() { if (_window && _window->isFullScreen()) { setFullscreen(nullptr, true); } + + + setIsInterstitialMode(true); } @@ -3451,13 +3454,15 @@ bool Application::isServerlessMode() const { } bool Application::isInterstitialMode() const { - return _interstitialMode; + bool interstitialModeEnabled = Menu::getInstance()->isOptionChecked("Enable Interstitial"); + return interstitialModeEnabled ? _interstitialMode : false; } void Application::setIsInterstitialMode(bool interstitialMode) { - if (_interstitialMode != interstitialMode) { - qDebug() << "-------> interstitial mode changed: " << _interstitialMode << " ------------> "; + bool interstitialModeEnabled = Menu::getInstance()->isOptionChecked("Enable Interstitial"); + if (_interstitialMode != interstitialMode && interstitialModeEnabled) { _interstitialMode = interstitialMode; + qDebug() << "-------> interstitial mode changed: " << _interstitialMode << " ------------> "; emit interstitialModeChanged(_interstitialMode); } } diff --git a/interface/src/Application.h b/interface/src/Application.h index 88aea0379f..856e2d199e 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -631,7 +631,7 @@ private: QSet _keysPressed; bool _enableProcessOctreeThread; - bool _interstitialMode { true }; + bool _interstitialMode { false }; OctreePacketProcessor _octreeProcessor; EntityEditPacketSender _entityEditSender; diff --git a/interface/src/Menu.cpp b/interface/src/Menu.cpp index 130c2c0b89..9b0e8d83c1 100644 --- a/interface/src/Menu.cpp +++ b/interface/src/Menu.cpp @@ -781,6 +781,7 @@ Menu::Menu() { // Developer > Show Overlays addCheckableActionToQMenuAndActionHash(developerMenu, MenuOption::Overlays, 0, true); + addCheckableActionToQMenuAndActionHash(developerMenu, "Enable Interstitial", 0, false); #if 0 /// -------------- REMOVED FOR NOW -------------- addDisabledActionAndSeparator(navigateMenu, "History"); diff --git a/scripts/defaultScripts.js b/scripts/defaultScripts.js index 31510831c8..c333a0c8c2 100644 --- a/scripts/defaultScripts.js +++ b/scripts/defaultScripts.js @@ -34,8 +34,7 @@ var DEFAULT_SCRIPTS_COMBINED = [ "system/emote.js" ]; var DEFAULT_SCRIPTS_SEPARATE = [ - "system/controllers/controllerScripts.js", - "system/interstitialPage.js" + "system/controllers/controllerScripts.js" //"system/chat.js" ]; diff --git a/scripts/system/interstitialPage.js b/scripts/system/interstitialPage.js index 149e1e141b..87f415130f 100644 --- a/scripts/system/interstitialPage.js +++ b/scripts/system/interstitialPage.js @@ -15,8 +15,8 @@ (function() { Script.include("/~/system/libraries/Xform.js"); var DEBUG = true; - var MAX_X_SIZE = 4; - var EPSILON = 0.25; + var MAX_X_SIZE = 3.8; + var EPSILON = 0.01; var isVisible = false; var STABILITY = 3.0; var VOLUME = 0.4; @@ -149,8 +149,8 @@ var loadingBarPlacard = Overlays.addOverlay("image3d", { name: "Loading-Bar-Placard", - localPosition: { x: 0.0, y: -0.99, z: 0.0 }, - url: "http://hifi-content.s3.amazonaws.com/alexia/LoadingScreens/loadingBar_placard.png", + localPosition: { x: 0.0, y: -0.99, z: 0.3 }, + url: Script.resourcesPath() + "images/loadingBar_placard.png", alpha: 1, dimensions: { x: 4, y: 2.8}, visible: isVisible, @@ -164,10 +164,10 @@ var loadingBarProgress = Overlays.addOverlay("image3d", { name: "Loading-Bar-Progress", - localPosition: { x: 0.0, y: -0.99, z: 0.0 }, - url: Script.resourcesPath() + "images/loadingBar_v1.png", + localPosition: { x: 0.0, y: -0.90, z: 0.0 }, + url: Script.resourcesPath() + "images/loadingBar_progress.png", alpha: 1, - dimensions: {x: 4, y: 2.8}, + dimensions: {x: 3.8, y: 2.8}, visible: isVisible, emissive: true, ignoreRayIntersection: false, @@ -285,7 +285,7 @@ } } - var THE_PLACE = "hifi://TheSpot"; + var THE_PLACE = "hifi://TheSpot-dev"; function clickedOnOverlay(overlayID, event) { print(overlayID + " other: " + loadingToTheSpotID); if (loadingToTheSpotID === overlayID) { @@ -309,6 +309,11 @@ visible: !physicsEnabled }; + var loadingBarProperties = { + dimensions: { x: 0.0, y: 2.8 }, + visible: !physicsEnabled + }; + // Menu.setIsOptionChecked("Show Overlays", physicsEnabled); if (!HMD.active) { @@ -324,7 +329,7 @@ Overlays.editOverlay(domainDescription, domainTextProperties); Overlays.editOverlay(domainToolTip, properties); Overlays.editOverlay(loadingBarPlacard, properties); - Overlays.editOverlay(loadingBarProgress, properties); + Overlays.editOverlay(loadingBarProgress, loadingBarProperties); Camera.mode = "first person"; } @@ -349,13 +354,13 @@ lastInterval = thisInterval; timeElapsed += deltaTime; - progress += MAX_X_SIZE * (deltaTime / 1000); - print(progress); + progress += (deltaTime / 1000); if (progress > MAX_X_SIZE) { - progress = 4; + progress = MAX_X_SIZE; } + var properties = { - localPosition: { x: 2.0 - (progress / 2), y: -0.99, z: -0.3 }, + localPosition: { x: (1.85 - (progress / 2) - (-0.029 * (progress / MAX_X_SIZE))), y: -0.935, z: 0.0 }, dimensions: { x: progress, y: 2.8 @@ -402,7 +407,7 @@ } currentProgress = lerp(currentProgress, target, 0.2); var properties = { - localPosition: { x: 2 - (currentProgress / 2), y: -0.99, z: -0.3 }, + localPosition: { x: (1.85 - (progress / 2) - (-0.029 * (progress / MAX_X_SIZE))), y: -0.935, z: 0.0 }, dimensions: { x: currentProgress, y: 2.8 @@ -410,7 +415,7 @@ }; print("progress: " + currentProgress); Overlays.editOverlay(loadingBarProgress, properties); - if (((physicsEnabled && (currentProgress >= (MAX_X_SIZE - EPSILON))) || connectionToDomainFailed)) { + if ((physicsEnabled && (currentProgress >= (MAX_X_SIZE - EPSILON)))) { print("----------> ending <--------"); updateOverlays((physicsEnabled || connectionToDomainFailed)); endAudio(); @@ -441,7 +446,7 @@ updateOverlays(toggle); if (!toggle) { - //Script.setTimeout(updateProgress, BASIC_TIMER_INTERVAL_MS); + // Script.setTimeout(updateProgress, BASIC_TIMER_INTERVAL_MS); } }); } From 2261ad2bcbde983c607a4249477db4c7104d9dc6 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Mon, 20 Aug 2018 11:14:48 -0700 Subject: [PATCH 025/210] clean up the interstitial page --- interface/src/Application.cpp | 5 +-- scripts/system/interstitialPage.js | 58 ++++-------------------------- 2 files changed, 9 insertions(+), 54 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 12a3ebf887..89d1b24736 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -3459,10 +3459,11 @@ bool Application::isInterstitialMode() const { } void Application::setIsInterstitialMode(bool interstitialMode) { - bool interstitialModeEnabled = Menu::getInstance()->isOptionChecked("Enable Interstitial"); + auto menu = Menu::getInstance(); + bool interstitialModeEnabled = menu->isOptionChecked("Enable Interstitial"); if (_interstitialMode != interstitialMode && interstitialModeEnabled) { _interstitialMode = interstitialMode; - qDebug() << "-------> interstitial mode changed: " << _interstitialMode << " ------------> "; + menu->setIsOptionChecked(MenuOption::Overlays, !_interstitialMode); emit interstitialModeChanged(_interstitialMode); } } diff --git a/scripts/system/interstitialPage.js b/scripts/system/interstitialPage.js index 87f415130f..dde3448b11 100644 --- a/scripts/system/interstitialPage.js +++ b/scripts/system/interstitialPage.js @@ -10,11 +10,11 @@ // /* global Script, Controller, Overlays, Quat, MyAvatar, Entities, print, Vec3, AddressManager, Render, Window, Toolbars, - Camera, HMD, location, Account*/ + Camera, HMD, location, Account, Xform*/ (function() { Script.include("/~/system/libraries/Xform.js"); - var DEBUG = true; + var DEBUG = false; var MAX_X_SIZE = 3.8; var EPSILON = 0.01; var isVisible = false; @@ -24,7 +24,6 @@ var sample = null; var MAX_LEFT_MARGIN = 1.9; var INNER_CIRCLE_WIDTH = 4.7; - var DESTINATION_CARD_Y_OFFSET = 2; var DEFAULT_Z_OFFSET = 5.45; var renderViewTask = Render.getConfig("RenderMainView"); @@ -83,7 +82,7 @@ }); - var domainName = "Test"; + var domainName = ""; var domainNameTextID = Overlays.addOverlay("text3d", { name: "Loading-Destination-Card-Text", localPosition: { x: 0.0, y: 0.8, z: 0.0 }, @@ -179,9 +178,7 @@ var TARGET_UPDATE_HZ = 60; // 50hz good enough, but we're using update var BASIC_TIMER_INTERVAL_MS = 1000 / TARGET_UPDATE_HZ; - var timerset = false; var lastInterval = Date.now(); - var timeElapsed = 0; var currentDomain = ""; var timer = null; var target = 0; @@ -206,16 +203,12 @@ return leftMargin; } - function resetValues() { - } - function lerp(a, b, t) { return ((1 - t) * a + t * b); } function startInterstitialPage() { if (timer === null) { - print("----------> starting <----------"); updateOverlays(Window.isPhysicsEnabled()); startAudio(); target = 0; @@ -255,7 +248,6 @@ uri: url }, function(error, data) { if (data.status === "success") { - print("-----------> settings domain description <----------"); var domainInfo = data.data; var domainDescriptionText = domainInfo.place.description; print("domainText: " + domainDescriptionText); @@ -346,44 +338,11 @@ Overlays.editOverlay(anchorOverlay, { localPosition: localPosition }); } - var progress = 0; - function updateProgress() { - print("updateProgress"); - var thisInterval = Date.now(); - var deltaTime = (thisInterval - lastInterval); - lastInterval = thisInterval; - timeElapsed += deltaTime; - - progress += (deltaTime / 1000); - if (progress > MAX_X_SIZE) { - progress = MAX_X_SIZE; - } - - var properties = { - localPosition: { x: (1.85 - (progress / 2) - (-0.029 * (progress / MAX_X_SIZE))), y: -0.935, z: 0.0 }, - dimensions: { - x: progress, - y: 2.8 - } - }; - - if (progress >= MAX_X_SIZE) { - progress = 0; - } - - Overlays.editOverlay(loadingBarProgress, properties); - - if (!toggle) { - Script.setTimeout(updateProgress, BASIC_TIMER_INTERVAL_MS); - } - } - function update() { var physicsEnabled = Window.isPhysicsEnabled(); var thisInterval = Date.now(); var deltaTime = (thisInterval - lastInterval); lastInterval = thisInterval; - timeElapsed += deltaTime; var nearbyEntitiesReadyCount = Window.getPhysicsNearbyEntitiesReadyCount(); var stabilityCount = Window.getPhysicsNearbyEntitiesStabilityCount(); @@ -407,16 +366,15 @@ } currentProgress = lerp(currentProgress, target, 0.2); var properties = { - localPosition: { x: (1.85 - (progress / 2) - (-0.029 * (progress / MAX_X_SIZE))), y: -0.935, z: 0.0 }, + localPosition: { x: (1.85 - (currentProgress / 2) - (-0.029 * (currentProgress / MAX_X_SIZE))), y: -0.935, z: 0.0 }, dimensions: { x: currentProgress, y: 2.8 } }; - print("progress: " + currentProgress); + Overlays.editOverlay(loadingBarProgress, properties); if ((physicsEnabled && (currentProgress >= (MAX_X_SIZE - EPSILON)))) { - print("----------> ending <--------"); updateOverlays((physicsEnabled || connectionToDomainFailed)); endAudio(); timer = null; @@ -431,7 +389,7 @@ Script.setTimeout(function() { print("location connected: " + location.isConnected); connectionToDomainFailed = !location.isConnected; - }, 300); + }, 1200); }); MyAvatar.sensorToWorldScaleChanged.connect(scaleInterstitialPage); @@ -444,10 +402,6 @@ button.clicked.connect(function() { toggle = !toggle; updateOverlays(toggle); - - if (!toggle) { - // Script.setTimeout(updateProgress, BASIC_TIMER_INTERVAL_MS); - } }); } From b2fb2c7f9832c529d8c1530f5b350e80db5a31e7 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Tue, 21 Aug 2018 10:45:59 -0700 Subject: [PATCH 026/210] fix build error --- interface/src/Application.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index afad67b43e..9d5a7a01f8 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -1373,7 +1373,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo }); connect(this, &Application::activeDisplayPluginChanged, reinterpret_cast(audioScriptingInterface.data()), &scripting::Audio::onContextChanged); - connect(this, &Application::interstitialModeChanged, audioIO.data(), &AudioClient::setInterstitialStatus); + connect(this, &Application::interstitialModeChanged, audioIO, &AudioClient::setInterstitialStatus); } // Create the rendering engine. This can be slow on some machines due to lots of From 5b4eb922818917a81603b898d019fa8625506f20 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 21 Aug 2018 14:04:29 -0700 Subject: [PATCH 027/210] adding fix --- .../controllers/controllerModules/webSurfaceLaserInput.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js b/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js index ef9ff0c6ae..4077d07c38 100644 --- a/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js +++ b/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js @@ -76,7 +76,7 @@ Script.include("/~/system/libraries/controllers.js"); var objectID = intersection.objectID; if (intersection.type === Picks.INTERSECTED_OVERLAY) { if ((HMD.tabletID && objectID === HMD.tabletID) || - (HMD.tabletScreenID && objectID === HMD.tabletScreenID) || + (HMD.tabletScreenID && objectID === HMD.tabletScreenID) || (HMD.homeButtonID && objectID === HMD.homeButtonID)) { return true; } else { @@ -122,9 +122,9 @@ Script.include("/~/system/libraries/controllers.js"); var isTriggerPressed = controllerData.triggerValues[this.hand] > TRIGGER_OFF_VALUE && controllerData.triggerValues[this.otherHand] <= TRIGGER_OFF_VALUE; var allowThisModule = !otherModuleRunning || isTriggerPressed; + if (allowThisModule && this.isPointingAtTriggerable(controllerData, isTriggerPressed) && !this.isPointingAtNearGrabbableEntity(controllerData, isTriggerPressed)) { - //(controllerData.nearbyEntityProperties[this.hand] !== [])) { this.updateAllwaysOn(); if (isTriggerPressed) { this.dominantHandOverride = true; // Override dominant hand. @@ -147,7 +147,6 @@ Script.include("/~/system/libraries/controllers.js"); var laserOn = isTriggerPressed || this.parameters.handLaser.allwaysOn; if (allowThisModule && (laserOn && this.isPointingAtTriggerable(controllerData, isTriggerPressed)) && !this.isPointingAtNearGrabbableEntity(controllerData, isTriggerPressed)) { - //(controllerData.nearbyEntityProperties[this.hand] !== [])) { this.running = true; return makeRunningValues(true, [], []); } From 7360629d31b452e295ead23e38b9f46fbf231a30 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 21 Aug 2018 14:13:55 -0700 Subject: [PATCH 028/210] modifying variable naming to fit convention --- .../controllers/controllerModules/webSurfaceLaserInput.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js b/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js index 4077d07c38..de3eb26086 100644 --- a/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js +++ b/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js @@ -84,9 +84,9 @@ Script.include("/~/system/libraries/controllers.js"); return overlayType === "web3d" || triggerPressed; } } else if (intersection.type === Picks.INTERSECTED_ENTITY) { - var entityProperty = Entities.getEntityProperties(objectID); - var entityType = entityProperty.type; - var isLocked = entityProperty.locked; + var entityProperties = Entities.getEntityProperties(objectID); + var entityType = entityProperties.type; + var isLocked = entityProperties.locked; return entityType === "Web" && (!isLocked || triggerPressed); } return false; From e867ae86f441b6d14a4e6ccc521612e31f34c8d2 Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Tue, 21 Aug 2018 14:44:55 -0700 Subject: [PATCH 029/210] Split readPendingDatagrams() into two slots --- libraries/networking/src/udt/Socket.cpp | 67 ++++++++++++++++++------- libraries/networking/src/udt/Socket.h | 14 ++++++ 2 files changed, 62 insertions(+), 19 deletions(-) diff --git a/libraries/networking/src/udt/Socket.cpp b/libraries/networking/src/udt/Socket.cpp index c378987cd0..d01b937b8b 100644 --- a/libraries/networking/src/udt/Socket.cpp +++ b/libraries/networking/src/udt/Socket.cpp @@ -37,6 +37,7 @@ Socket::Socket(QObject* parent, bool shouldChangeSocketOptions) : _shouldChangeSocketOptions(shouldChangeSocketOptions) { connect(&_udpSocket, &QUdpSocket::readyRead, this, &Socket::readPendingDatagrams); + connect(this, &Socket::pendingDatagrams, this, &Socket::processPendingDatagrams); // make sure we hear about errors and state changes from the underlying socket connect(&_udpSocket, SIGNAL(error(QAbstractSocket::SocketError)), @@ -315,55 +316,80 @@ void Socket::checkForReadyReadBackup() { } void Socket::readPendingDatagrams() { + int packetsRead = 0; + int packetSizeWithHeader = -1; - while (_udpSocket.hasPendingDatagrams() && (packetSizeWithHeader = _udpSocket.pendingDatagramSize()) != -1) { - - // we're reading a packet so re-start the readyRead backup timer - _readyReadBackupTimer->start(); - // grab a time point we can mark as the receive time of this packet auto receiveTime = p_high_resolution_clock::now(); - // setup a HifiSockAddr to read into - HifiSockAddr senderSockAddr; // setup a buffer to read the packet into auto buffer = std::unique_ptr(new char[packetSizeWithHeader]); + QHostAddress senderAddress; + quint16 senderPort; + // pull the datagram auto sizeRead = _udpSocket.readDatagram(buffer.get(), packetSizeWithHeader, - senderSockAddr.getAddressPointer(), senderSockAddr.getPortPointer()); + &senderAddress, &senderPort); - // save information for this packet, in case it is the one that sticks readyRead - _lastPacketSizeRead = sizeRead; - _lastPacketSockAddr = senderSockAddr; + // we either didn't pull anything for this packet or there was an error reading (this seems to trigger + // on windows even if there's not a packet available) - if (sizeRead <= 0) { - // we either didn't pull anything for this packet or there was an error reading (this seems to trigger - // on windows even if there's not a packet available) + if (packetSizeWithHeader < 0) { continue; } + _incomingDatagrams.push({ senderAddress, senderPort, packetSizeWithHeader, + std::move(buffer), receiveTime }); + ++packetsRead; + + } + + _maxDatagramsRead = std::max(_maxDatagramsRead, packetsRead); + emit pendingDatagrams(packetsRead); +} + +void Socket::processPendingDatagrams(int) { + // setup a HifiSockAddr to read into + HifiSockAddr senderSockAddr; + + while (!_incomingDatagrams.empty()) { + auto& datagram = _incomingDatagrams.front(); + senderSockAddr.setAddress(datagram._senderAddress); + senderSockAddr.setPort(datagram._senderPort); + int datagramSize = datagram._datagramLength; + auto receiveTime = datagram._receiveTime; + auto it = _unfilteredHandlers.find(senderSockAddr); if (it != _unfilteredHandlers.end()) { // we have a registered unfiltered handler for this HifiSockAddr - call that and return if (it->second) { - auto basePacket = BasePacket::fromReceivedPacket(std::move(buffer), packetSizeWithHeader, senderSockAddr); - basePacket->setReceiveTime(receiveTime); + auto basePacket = BasePacket::fromReceivedPacket(std::move(datagram._datagram), datagramSize, + senderSockAddr); + basePacket->setReceiveTime(datagram._receiveTime); it->second(std::move(basePacket)); } + _incomingDatagrams.pop(); continue; } + // we're reading a packet so re-start the readyRead backup timer + _readyReadBackupTimer->start(); + + // save information for this packet, in case it is the one that sticks readyRead + _lastPacketSizeRead = datagramSize; + _lastPacketSockAddr = senderSockAddr; + // check if this was a control packet or a data packet - bool isControlPacket = *reinterpret_cast(buffer.get()) & CONTROL_BIT_MASK; + bool isControlPacket = *reinterpret_cast(datagram._datagram.get()) & CONTROL_BIT_MASK; if (isControlPacket) { // setup a control packet from the data we just read - auto controlPacket = ControlPacket::fromReceivedPacket(std::move(buffer), packetSizeWithHeader, senderSockAddr); + auto controlPacket = ControlPacket::fromReceivedPacket(std::move(datagram._datagram), datagramSize, senderSockAddr); controlPacket->setReceiveTime(receiveTime); // move this control packet to the matching connection, if there is one @@ -375,7 +401,7 @@ void Socket::readPendingDatagrams() { } else { // setup a Packet from the data we just read - auto packet = Packet::fromReceivedPacket(std::move(buffer), packetSizeWithHeader, senderSockAddr); + auto packet = Packet::fromReceivedPacket(std::move(datagram._datagram), datagramSize, senderSockAddr); packet->setReceiveTime(receiveTime); // save the sequence number in case this is the packet that sticks readyRead @@ -395,6 +421,7 @@ void Socket::readPendingDatagrams() { qCDebug(networking) << "Can't process packet: version" << (unsigned int)NLPacket::versionInHeader(*packet) << ", type" << NLPacket::typeInHeader(*packet); #endif + _incomingDatagrams.pop(); continue; } } @@ -410,6 +437,8 @@ void Socket::readPendingDatagrams() { } } } + + _incomingDatagrams.pop(); } } diff --git a/libraries/networking/src/udt/Socket.h b/libraries/networking/src/udt/Socket.h index 1f28592c83..d23e0425a0 100644 --- a/libraries/networking/src/udt/Socket.h +++ b/libraries/networking/src/udt/Socket.h @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -94,6 +95,7 @@ public: signals: void clientHandshakeRequestComplete(const HifiSockAddr& sockAddr); + void pendingDatagrams(int datagramCount); public slots: void cleanupConnection(HifiSockAddr sockAddr); @@ -101,6 +103,7 @@ public slots: private slots: void readPendingDatagrams(); + void processPendingDatagrams(int datagramCount); void checkForReadyReadBackup(); void handleSocketError(QAbstractSocket::SocketError socketError); @@ -144,6 +147,17 @@ private: int _lastPacketSizeRead { 0 }; SequenceNumber _lastReceivedSequenceNumber; HifiSockAddr _lastPacketSockAddr; + + struct Datagram { + QHostAddress _senderAddress; + int _senderPort; + int _datagramLength; + std::unique_ptr _datagram; + std::chrono::time_point _receiveTime; + }; + + std::queue _incomingDatagrams; + int _maxDatagramsRead { 0 }; friend UDTTest; }; From 4084973cca6d1193e681f53c9acddbc9870a0e38 Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Tue, 21 Aug 2018 16:04:08 -0700 Subject: [PATCH 030/210] Changes for linux compilation --- libraries/networking/src/udt/Socket.cpp | 2 +- libraries/networking/src/udt/Socket.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/networking/src/udt/Socket.cpp b/libraries/networking/src/udt/Socket.cpp index d01b937b8b..090beb2726 100644 --- a/libraries/networking/src/udt/Socket.cpp +++ b/libraries/networking/src/udt/Socket.cpp @@ -337,7 +337,7 @@ void Socket::readPendingDatagrams() { // we either didn't pull anything for this packet or there was an error reading (this seems to trigger // on windows even if there's not a packet available) - if (packetSizeWithHeader < 0) { + if (sizeRead < 0) { continue; } diff --git a/libraries/networking/src/udt/Socket.h b/libraries/networking/src/udt/Socket.h index d23e0425a0..078863663f 100644 --- a/libraries/networking/src/udt/Socket.h +++ b/libraries/networking/src/udt/Socket.h @@ -153,7 +153,7 @@ private: int _senderPort; int _datagramLength; std::unique_ptr _datagram; - std::chrono::time_point _receiveTime; + p_high_resolution_clock::time_point _receiveTime; }; std::queue _incomingDatagrams; From 26a30edec9f2d1c659d65b598a9bb9844c77040f Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Tue, 21 Aug 2018 18:27:21 -0700 Subject: [PATCH 031/210] trying to fix loading bar --- interface/src/Application.h | 2 ++ .../src/octree/OctreePacketProcessor.cpp | 4 ++++ interface/src/octree/OctreePacketProcessor.h | 1 + interface/src/octree/SafeLanding.cpp | 18 +++++++++++++++ interface/src/octree/SafeLanding.h | 2 ++ .../scripting/WindowScriptingInterface.cpp | 12 ++-------- .../src/scripting/WindowScriptingInterface.h | 4 +--- scripts/system/interstitialPage.js | 23 ++++++------------- 8 files changed, 37 insertions(+), 29 deletions(-) diff --git a/interface/src/Application.h b/interface/src/Application.h index 312920c4ac..db637f57e8 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -232,6 +232,8 @@ public: bool getPreferAvatarFingerOverStylus() { return false; } void setPreferAvatarFingerOverStylus(bool value); + float getDomainLoadProgress() { return _octreeProcessor.domainLoadProgress(); } + float getSettingConstrainToolbarPosition() { return _constrainToolbarPosition.get(); } void setSettingConstrainToolbarPosition(bool setting); diff --git a/interface/src/octree/OctreePacketProcessor.cpp b/interface/src/octree/OctreePacketProcessor.cpp index 4bc6817a9e..11f6bbae13 100644 --- a/interface/src/octree/OctreePacketProcessor.cpp +++ b/interface/src/octree/OctreePacketProcessor.cpp @@ -137,3 +137,7 @@ void OctreePacketProcessor::startEntitySequence() { bool OctreePacketProcessor::isLoadSequenceComplete() const { return _safeLanding->isLoadSequenceComplete(); } + +float OctreePacketProcessor::domainLoadProgress() { + return _safeLanding->loadingProgressPercentage(); +} diff --git a/interface/src/octree/OctreePacketProcessor.h b/interface/src/octree/OctreePacketProcessor.h index f9c24ddc51..fb8f0b581a 100644 --- a/interface/src/octree/OctreePacketProcessor.h +++ b/interface/src/octree/OctreePacketProcessor.h @@ -27,6 +27,7 @@ public: void startEntitySequence(); bool isLoadSequenceComplete() const; + float domainLoadProgress(); signals: void packetVersionMismatch(); diff --git a/interface/src/octree/SafeLanding.cpp b/interface/src/octree/SafeLanding.cpp index 31106457fb..8c0d51a344 100644 --- a/interface/src/octree/SafeLanding.cpp +++ b/interface/src/octree/SafeLanding.cpp @@ -53,6 +53,7 @@ void SafeLanding::startEntitySequence(QSharedPointer entityT void SafeLanding::stopEntitySequence() { Locker lock(_lock); _trackingEntities = false; + _maxTrackedEntityCount = 0; _initialStart = INVALID_SEQUENCE; _initialEnd = INVALID_SEQUENCE; _trackedEntities.clear(); @@ -75,6 +76,11 @@ void SafeLanding::addTrackedEntity(const EntityItemID& entityID) { if (hasAABox && downloadedCollisionTypes.count(modelEntity->getShapeType()) != 0) { // Only track entities with downloaded collision bodies. _trackedEntities.emplace(entityID, entity); + int currentTrackedEntityCount = _trackedEntities.size(); + if (currentTrackedEntityCount > _maxTrackedEntityCount) { + _maxTrackedEntityCount = currentTrackedEntityCount; + } + qCDebug(interfaceapp) << "Safe Landing: Tracking entity " << entity->getItemName(); } } @@ -116,6 +122,18 @@ bool SafeLanding::isLoadSequenceComplete() { return !_trackingEntities; } +float SafeLanding::loadingProgressPercentage() { + float percentage = 0; + + if (_maxTrackedEntityCount != 0) { + int trackedEntityCount = _trackedEntities.size(); + percentage = (_maxTrackedEntityCount - trackedEntityCount) / _maxTrackedEntityCount; + } + + qDebug() << "----------> percentage: " << percentage << " <--------"; + return percentage; +} + bool SafeLanding::isSequenceNumbersComplete() { if (_initialStart != INVALID_SEQUENCE) { Locker lock(_lock); diff --git a/interface/src/octree/SafeLanding.h b/interface/src/octree/SafeLanding.h index 210dfbac25..8ef88a055e 100644 --- a/interface/src/octree/SafeLanding.h +++ b/interface/src/octree/SafeLanding.h @@ -29,6 +29,7 @@ public: void setCompletionSequenceNumbers(int first, int last); void noteReceivedsequenceNumber(int sequenceNumber); bool isLoadSequenceComplete(); + float loadingProgressPercentage(); private slots: void addTrackedEntity(const EntityItemID& entityID); @@ -49,6 +50,7 @@ private: static constexpr int INVALID_SEQUENCE = -1; int _initialStart { INVALID_SEQUENCE }; int _initialEnd { INVALID_SEQUENCE }; + int _maxTrackedEntityCount { 0 }; struct SequenceLessThan { bool operator()(const int& a, const int& b) const; diff --git a/interface/src/scripting/WindowScriptingInterface.cpp b/interface/src/scripting/WindowScriptingInterface.cpp index 68be55f88a..f422a6a8fa 100644 --- a/interface/src/scripting/WindowScriptingInterface.cpp +++ b/interface/src/scripting/WindowScriptingInterface.cpp @@ -589,14 +589,6 @@ void WindowScriptingInterface::onMessageBoxSelected(int button) { } -int WindowScriptingInterface::getPhysicsNearbyEntitiesReadyCount() { - return qApp->getNearbyEntitiesReadyCount(); -} - -int WindowScriptingInterface::getPhysicsNearbyEntitiesStabilityCount() { - return qApp->getEntitiesStabilityCount(); -} - -int WindowScriptingInterface::getPhysicsNearbyEntitiesCount() { - return qApp->getNearbyEntitiesCount(); +float WindowScriptingInterface::domainLoadingProgress() { + return qApp->getDomainLoadProgress(); } diff --git a/interface/src/scripting/WindowScriptingInterface.h b/interface/src/scripting/WindowScriptingInterface.h index 7b0b6435f7..3dcd8cfeed 100644 --- a/interface/src/scripting/WindowScriptingInterface.h +++ b/interface/src/scripting/WindowScriptingInterface.h @@ -561,9 +561,7 @@ public slots: */ void closeMessageBox(int id); - int getPhysicsNearbyEntitiesReadyCount(); - int getPhysicsNearbyEntitiesStabilityCount(); - int getPhysicsNearbyEntitiesCount(); + float domainLoadingProgress(); private slots: void onWindowGeometryChanged(const QRect& geometry); diff --git a/scripts/system/interstitialPage.js b/scripts/system/interstitialPage.js index dde3448b11..76d2a8b958 100644 --- a/scripts/system/interstitialPage.js +++ b/scripts/system/interstitialPage.js @@ -344,26 +344,17 @@ var deltaTime = (thisInterval - lastInterval); lastInterval = thisInterval; - var nearbyEntitiesReadyCount = Window.getPhysicsNearbyEntitiesReadyCount(); - var stabilityCount = Window.getPhysicsNearbyEntitiesStabilityCount(); - var nearbyEntitiesCount = Window.getPhysicsNearbyEntitiesCount(); + var domainLoadingProgressPercentage = Window.domainLoadingProgress(); - var stabilityPercentage = (stabilityCount / STABILITY); - if (stabilityPercentage > 1) { - stabilityPercentage = 1; - } - - var stabilityProgress = (MAX_X_SIZE * 0.75) * stabilityPercentage; - - var entitiesLoadedPercentage = 1; - if (nearbyEntitiesCount > 0) { - entitiesLoadedPercentage = nearbyEntitiesReadyCount / nearbyEntitiesCount; - } - var entitiesLoadedProgress = (MAX_X_SIZE * 0.25) * entitiesLoadedPercentage; - var progress = stabilityProgress + entitiesLoadedProgress; + var progress = MAX_X_SIZE * domainLoadingProgressPercentage; + print(progress); if (progress >= target) { target = progress; } + + if (physicsEnabled && target < MAX_X_SIZE) { + target = MAX_X_SIZE; + } currentProgress = lerp(currentProgress, target, 0.2); var properties = { localPosition: { x: (1.85 - (currentProgress / 2) - (-0.029 * (currentProgress / MAX_X_SIZE))), y: -0.935, z: 0.0 }, From d8d940b06a26d4eeb0a800c20dfa4cbdcf69b764 Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Wed, 22 Aug 2018 10:28:32 -0700 Subject: [PATCH 032/210] Cap datagrams-at-once processed; debugging output --- libraries/networking/src/udt/Socket.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/libraries/networking/src/udt/Socket.cpp b/libraries/networking/src/udt/Socket.cpp index 090beb2726..5b64cc0716 100644 --- a/libraries/networking/src/udt/Socket.cpp +++ b/libraries/networking/src/udt/Socket.cpp @@ -319,7 +319,11 @@ void Socket::readPendingDatagrams() { int packetsRead = 0; int packetSizeWithHeader = -1; - while (_udpSocket.hasPendingDatagrams() && (packetSizeWithHeader = _udpSocket.pendingDatagramSize()) != -1) { + // Max datagrams to read before processing: + static const int MAX_DATAGRAMS_CONSECUTIVELY = 10000; + while (_udpSocket.hasPendingDatagrams() + && (packetSizeWithHeader = _udpSocket.pendingDatagramSize()) != -1 + && packetsRead <= MAX_DATAGRAMS_CONSECUTIVELY) { // grab a time point we can mark as the receive time of this packet auto receiveTime = p_high_resolution_clock::now(); @@ -336,7 +340,6 @@ void Socket::readPendingDatagrams() { // we either didn't pull anything for this packet or there was an error reading (this seems to trigger // on windows even if there's not a packet available) - if (sizeRead < 0) { continue; } @@ -347,7 +350,10 @@ void Socket::readPendingDatagrams() { } - _maxDatagramsRead = std::max(_maxDatagramsRead, packetsRead); + if (packetsRead > _maxDatagramsRead) { + _maxDatagramsRead = packetsRead; + qCDebug(networking) << "readPendingDatagrams: Datagrams read:" << packetsRead; + } emit pendingDatagrams(packetsRead); } @@ -365,7 +371,7 @@ void Socket::processPendingDatagrams(int) { auto it = _unfilteredHandlers.find(senderSockAddr); if (it != _unfilteredHandlers.end()) { - // we have a registered unfiltered handler for this HifiSockAddr - call that and return + // we have a registered unfiltered handler for this HifiSockAddr (eg. STUN packet) - call that and return if (it->second) { auto basePacket = BasePacket::fromReceivedPacket(std::move(datagram._datagram), datagramSize, senderSockAddr); @@ -407,7 +413,7 @@ void Socket::processPendingDatagrams(int) { // save the sequence number in case this is the packet that sticks readyRead _lastReceivedSequenceNumber = packet->getSequenceNumber(); - // call our verification operator to see if this packet is verified + // call our hash verification operator to see if this packet is verified if (!_packetFilterOperator || _packetFilterOperator(*packet)) { if (packet->isReliable()) { // if this was a reliable packet then signal the matching connection with the sequence number From 54236e5c59ab8f33a52b1af381b1cbd31c2fdae1 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Wed, 22 Aug 2018 10:58:55 -0700 Subject: [PATCH 033/210] fixing loading bar --- interface/src/octree/SafeLanding.cpp | 42 +++++++++++++--------------- interface/src/octree/SafeLanding.h | 2 +- 2 files changed, 21 insertions(+), 23 deletions(-) diff --git a/interface/src/octree/SafeLanding.cpp b/interface/src/octree/SafeLanding.cpp index 8c0d51a344..354a4046fa 100644 --- a/interface/src/octree/SafeLanding.cpp +++ b/interface/src/octree/SafeLanding.cpp @@ -66,23 +66,20 @@ void SafeLanding::addTrackedEntity(const EntityItemID& entityID) { EntityItemPointer entity = _entityTree->findEntityByID(entityID); if (entity && !entity->getCollisionless()) { - const auto& entityType = entity->getType(); - if (entityType == EntityTypes::Model) { - ModelEntityItem * modelEntity = std::dynamic_pointer_cast(entity).get(); - static const std::set downloadedCollisionTypes - { SHAPE_TYPE_COMPOUND, SHAPE_TYPE_SIMPLE_COMPOUND, SHAPE_TYPE_STATIC_MESH, SHAPE_TYPE_SIMPLE_HULL }; - bool hasAABox; - entity->getAABox(hasAABox); - if (hasAABox && downloadedCollisionTypes.count(modelEntity->getShapeType()) != 0) { - // Only track entities with downloaded collision bodies. - _trackedEntities.emplace(entityID, entity); - int currentTrackedEntityCount = _trackedEntities.size(); - if (currentTrackedEntityCount > _maxTrackedEntityCount) { - _maxTrackedEntityCount = currentTrackedEntityCount; - } + static const std::set downloadedCollisionTypes + { SHAPE_TYPE_COMPOUND, SHAPE_TYPE_SIMPLE_COMPOUND, SHAPE_TYPE_STATIC_MESH, SHAPE_TYPE_SIMPLE_HULL }; + bool hasAABox; + entity->getAABox(hasAABox); + if (hasAABox && downloadedCollisionTypes.count(entity->getShapeType()) != 0) { + // Only track entities with downloaded collision bodies. + _trackedEntities.emplace(entityID, entity); - qCDebug(interfaceapp) << "Safe Landing: Tracking entity " << entity->getItemName(); + float trackedEntityCount = (float)_trackedEntities.size(); + + if (trackedEntityCount > _maxTrackedEntityCount) { + _maxTrackedEntityCount = trackedEntityCount; } + qCDebug(interfaceapp) << "Safe Landing: Tracking entity " << entity->getItemName(); } } } @@ -123,15 +120,15 @@ bool SafeLanding::isLoadSequenceComplete() { } float SafeLanding::loadingProgressPercentage() { - float percentage = 0; - - if (_maxTrackedEntityCount != 0) { - int trackedEntityCount = _trackedEntities.size(); - percentage = (_maxTrackedEntityCount - trackedEntityCount) / _maxTrackedEntityCount; + Locker lock(_lock); + if (_maxTrackedEntityCount > 0) { + float trackedEntityCount = (float)_trackedEntities.size(); + qDebug() << "pocessed: " << (_maxTrackedEntityCount - trackedEntityCount) << " -> total: " << _maxTrackedEntityCount; + qDebug() << ((_maxTrackedEntityCount - trackedEntityCount) / _maxTrackedEntityCount); + return ((_maxTrackedEntityCount - trackedEntityCount) / _maxTrackedEntityCount); } - qDebug() << "----------> percentage: " << percentage << " <--------"; - return percentage; + return 0.0f; } bool SafeLanding::isSequenceNumbersComplete() { @@ -158,6 +155,7 @@ bool SafeLanding::isEntityPhysicsComplete() { auto entity = entityMapIter->second; if (!entity->shouldBePhysical() || entity->isReadyToComputeShape()) { entityMapIter = _trackedEntities.erase(entityMapIter); + qDebug() << "--> removing entity <--"; if (entityMapIter == _trackedEntities.end()) { break; } diff --git a/interface/src/octree/SafeLanding.h b/interface/src/octree/SafeLanding.h index 8ef88a055e..e1288f86ce 100644 --- a/interface/src/octree/SafeLanding.h +++ b/interface/src/octree/SafeLanding.h @@ -50,7 +50,7 @@ private: static constexpr int INVALID_SEQUENCE = -1; int _initialStart { INVALID_SEQUENCE }; int _initialEnd { INVALID_SEQUENCE }; - int _maxTrackedEntityCount { 0 }; + float _maxTrackedEntityCount { 0.0f }; struct SequenceLessThan { bool operator()(const int& a, const int& b) const; From 535fdf32cfbbb89df0775a6899e74c113ac4077e Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Wed, 22 Aug 2018 13:13:00 -0700 Subject: [PATCH 034/210] saving changes --- interface/src/octree/SafeLanding.cpp | 27 +++++++++++++++------------ interface/src/ui/OverlayConductor.cpp | 1 + scripts/system/interstitialPage.js | 20 ++++++++++++++++++++ 3 files changed, 36 insertions(+), 12 deletions(-) diff --git a/interface/src/octree/SafeLanding.cpp b/interface/src/octree/SafeLanding.cpp index 354a4046fa..c1556b908d 100644 --- a/interface/src/octree/SafeLanding.cpp +++ b/interface/src/octree/SafeLanding.cpp @@ -66,20 +66,24 @@ void SafeLanding::addTrackedEntity(const EntityItemID& entityID) { EntityItemPointer entity = _entityTree->findEntityByID(entityID); if (entity && !entity->getCollisionless()) { - static const std::set downloadedCollisionTypes - { SHAPE_TYPE_COMPOUND, SHAPE_TYPE_SIMPLE_COMPOUND, SHAPE_TYPE_STATIC_MESH, SHAPE_TYPE_SIMPLE_HULL }; - bool hasAABox; - entity->getAABox(hasAABox); - if (hasAABox && downloadedCollisionTypes.count(entity->getShapeType()) != 0) { - // Only track entities with downloaded collision bodies. - _trackedEntities.emplace(entityID, entity); + const auto& entityType = entity->getType(); + if (entityType == EntityTypes::Model) { + ModelEntityItem * modelEntity = std::dynamic_pointer_cast(entity).get(); + static const std::set downloadedCollisionTypes + { SHAPE_TYPE_COMPOUND, SHAPE_TYPE_SIMPLE_COMPOUND, SHAPE_TYPE_STATIC_MESH, SHAPE_TYPE_SIMPLE_HULL }; + bool hasAABox; + entity->getAABox(hasAABox); + if (hasAABox && downloadedCollisionTypes.count(modelEntity->getShapeType()) != 0) { + // Only track entities with downloaded collision bodies. + _trackedEntities.emplace(entityID, entity); - float trackedEntityCount = (float)_trackedEntities.size(); + float trackedEntityCount = (float)_trackedEntities.size(); - if (trackedEntityCount > _maxTrackedEntityCount) { - _maxTrackedEntityCount = trackedEntityCount; + if (trackedEntityCount > _maxTrackedEntityCount) { + _maxTrackedEntityCount = trackedEntityCount; + } + qCDebug(interfaceapp) << "Safe Landing: Tracking entity " << entity->getItemName(); } - qCDebug(interfaceapp) << "Safe Landing: Tracking entity " << entity->getItemName(); } } } @@ -155,7 +159,6 @@ bool SafeLanding::isEntityPhysicsComplete() { auto entity = entityMapIter->second; if (!entity->shouldBePhysical() || entity->isReadyToComputeShape()) { entityMapIter = _trackedEntities.erase(entityMapIter); - qDebug() << "--> removing entity <--"; if (entityMapIter == _trackedEntities.end()) { break; } diff --git a/interface/src/ui/OverlayConductor.cpp b/interface/src/ui/OverlayConductor.cpp index e27001567f..398f9cf147 100644 --- a/interface/src/ui/OverlayConductor.cpp +++ b/interface/src/ui/OverlayConductor.cpp @@ -103,6 +103,7 @@ void OverlayConductor::update(float dt) { bool targetVisible = Menu::getInstance()->isOptionChecked(MenuOption::Overlays) && !_suppressedByHead; if (targetVisible != currentVisible) { + qDebug() << "setting pinned: " << !targetVisible; offscreenUi->setPinned(!targetVisible); } if (shouldRecenter && !_suppressedByHead) { diff --git a/scripts/system/interstitialPage.js b/scripts/system/interstitialPage.js index 76d2a8b958..ddfc8b3a32 100644 --- a/scripts/system/interstitialPage.js +++ b/scripts/system/interstitialPage.js @@ -207,6 +207,18 @@ return ((1 - t) * a + t * b); } + function resetValues() { + var properties = { + localPosition: { x: 1.85, y: -0.935, z: 0.0 }, + dimensions: { + x: 0.1, + y: 2.8 + } + }; + + Overlays.editOverlay(loadingBarProgress, properties); + } + function startInterstitialPage() { if (timer === null) { updateOverlays(Window.isPhysicsEnabled()); @@ -323,6 +335,10 @@ Overlays.editOverlay(loadingBarPlacard, properties); Overlays.editOverlay(loadingBarProgress, loadingBarProperties); + if (physicsEnabled) { + resetValues(); + } + Camera.mode = "first person"; } @@ -409,6 +425,10 @@ if (DEBUG) { tablet.removeButton(button); } + + renderViewTask.getConfig("LightingModel")["enableAmbientLight"] = true; + renderViewTask.getConfig("LightingModel")["enableDirectionalLight"] = true; + renderViewTask.getConfig("LightingModel")["enablePointLight"] = true; } Script.scriptEnding.connect(cleanup); From 78458d62de4b6ee94ae1cd2673d1b1c8286584dd Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Wed, 22 Aug 2018 15:20:56 -0700 Subject: [PATCH 035/210] revert some changes and fix toolbar issue --- interface/src/Application.cpp | 3 ++- interface/src/octree/SafeLanding.cpp | 2 -- scripts/system/interstitialPage.js | 2 ++ 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 9d5a7a01f8..b437e7bd28 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -3458,7 +3458,8 @@ void Application::setIsInterstitialMode(bool interstitialMode) { bool interstitialModeEnabled = menu->isOptionChecked("Enable Interstitial"); if (_interstitialMode != interstitialMode && interstitialModeEnabled) { _interstitialMode = interstitialMode; - menu->setIsOptionChecked(MenuOption::Overlays, !_interstitialMode); + + DependencyManager::get()->setPinned(_interstitialMode); emit interstitialModeChanged(_interstitialMode); } } diff --git a/interface/src/octree/SafeLanding.cpp b/interface/src/octree/SafeLanding.cpp index c1556b908d..d8d9a1720a 100644 --- a/interface/src/octree/SafeLanding.cpp +++ b/interface/src/octree/SafeLanding.cpp @@ -127,8 +127,6 @@ float SafeLanding::loadingProgressPercentage() { Locker lock(_lock); if (_maxTrackedEntityCount > 0) { float trackedEntityCount = (float)_trackedEntities.size(); - qDebug() << "pocessed: " << (_maxTrackedEntityCount - trackedEntityCount) << " -> total: " << _maxTrackedEntityCount; - qDebug() << ((_maxTrackedEntityCount - trackedEntityCount) / _maxTrackedEntityCount); return ((_maxTrackedEntityCount - trackedEntityCount) / _maxTrackedEntityCount); } diff --git a/scripts/system/interstitialPage.js b/scripts/system/interstitialPage.js index ddfc8b3a32..3f1fc58b55 100644 --- a/scripts/system/interstitialPage.js +++ b/scripts/system/interstitialPage.js @@ -27,6 +27,7 @@ var DEFAULT_Z_OFFSET = 5.45; var renderViewTask = Render.getConfig("RenderMainView"); + var toolbar = Toolbars.getToolbar("com.highfidelity.interface.toolbar.system"); var request = Script.require('request').request; var BUTTON_PROPERTIES = { text: "Interstitial" @@ -336,6 +337,7 @@ Overlays.editOverlay(loadingBarProgress, loadingBarProperties); if (physicsEnabled) { + toolbar.writeProperty("visible", true); resetValues(); } From db8e1bdfa34610031d9dd6ca8aa86bd15fb275af Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Wed, 22 Aug 2018 16:47:18 -0700 Subject: [PATCH 036/210] compile error fix --- interface/src/Application.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index cc8736a481..6b2781417d 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -2258,8 +2258,8 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo if (_avatarOverrideUrl.isValid()) { getMyAvatar()->useFullAvatarURL(_avatarOverrideUrl); } - static const QUrl empty{}; - if (getMyAvatar()->getFullAvatarURLFromPreferences() != getMyAvatar()->cannonicalSkeletonModelURL(empty)) { + + if (getMyAvatar()->getFullAvatarURLFromPreferences() != getMyAvatar()->getSkeletonModelURL()) { getMyAvatar()->resetFullAvatarURL(); } getMyAvatar()->markIdentityDataChanged(); From bb83a2f620955a56d8ccdf30d218dc3066fe6bff Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Wed, 22 Aug 2018 16:48:10 -0700 Subject: [PATCH 037/210] interstitial script ending cleanup fixes --- scripts/system/interstitialPage.js | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/system/interstitialPage.js b/scripts/system/interstitialPage.js index 3f1fc58b55..1507c7bd9a 100644 --- a/scripts/system/interstitialPage.js +++ b/scripts/system/interstitialPage.js @@ -431,6 +431,7 @@ renderViewTask.getConfig("LightingModel")["enableAmbientLight"] = true; renderViewTask.getConfig("LightingModel")["enableDirectionalLight"] = true; renderViewTask.getConfig("LightingModel")["enablePointLight"] = true; + toolbar.writeProperty("visible", true); } Script.scriptEnding.connect(cleanup); From 3796675123214960ed569f7f83c2788a3005a942 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Fri, 24 Aug 2018 15:46:39 -0700 Subject: [PATCH 038/210] script update and visuallyReady entities --- interface/src/Application.cpp | 5 ++- .../src/octree/OctreePacketProcessor.cpp | 4 +++ interface/src/octree/OctreePacketProcessor.h | 1 + interface/src/octree/SafeLanding.cpp | 33 +++++++++++++++---- interface/src/octree/SafeLanding.h | 3 ++ .../src/RenderableModelEntityItem.cpp | 10 +++++- .../src/RenderableModelEntityItem.h | 6 +++- .../src/RenderableZoneEntityItem.cpp | 10 ++++++ libraries/entities/src/EntityItem.h | 3 ++ libraries/entities/src/ModelEntityItem.cpp | 1 + libraries/entities/src/ZoneEntityItem.cpp | 1 + scripts/system/interstitialPage.js | 19 ++++++++--- 12 files changed, 83 insertions(+), 13 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 6b2781417d..a4ced55a2d 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -5519,6 +5519,7 @@ void Application::update(float deltaTime) { return; } + if (!_physicsEnabled) { if (!domainLoadingInProgress) { PROFILE_ASYNC_BEGIN(app, "Scene Loading", ""); @@ -5528,7 +5529,9 @@ void Application::update(float deltaTime) { // we haven't yet enabled physics. we wait until we think we have all the collision information // for nearby entities before starting bullet up. quint64 now = usecTimestampNow(); - if (isServerlessMode() || _octreeProcessor.isLoadSequenceComplete()) { + bool renderReady = _octreeProcessor.isEntitiesRenderReady(); + qDebug() << "--> render ready: " << renderReady; + if (isServerlessMode() || (_octreeProcessor.isLoadSequenceComplete() && renderReady)) { // we've received a new full-scene octree stats packet, or it's been long enough to try again anyway _lastPhysicsCheckTime = now; _fullSceneCounterAtLastPhysicsCheck = _fullSceneReceivedCounter; diff --git a/interface/src/octree/OctreePacketProcessor.cpp b/interface/src/octree/OctreePacketProcessor.cpp index 11f6bbae13..e02c603415 100644 --- a/interface/src/octree/OctreePacketProcessor.cpp +++ b/interface/src/octree/OctreePacketProcessor.cpp @@ -138,6 +138,10 @@ bool OctreePacketProcessor::isLoadSequenceComplete() const { return _safeLanding->isLoadSequenceComplete(); } +bool OctreePacketProcessor::isEntitiesRenderReady() const { + return _safeLanding->entitiesRenderReady(); +} + float OctreePacketProcessor::domainLoadProgress() { return _safeLanding->loadingProgressPercentage(); } diff --git a/interface/src/octree/OctreePacketProcessor.h b/interface/src/octree/OctreePacketProcessor.h index fb8f0b581a..8e771de556 100644 --- a/interface/src/octree/OctreePacketProcessor.h +++ b/interface/src/octree/OctreePacketProcessor.h @@ -27,6 +27,7 @@ public: void startEntitySequence(); bool isLoadSequenceComplete() const; + bool isEntitiesRenderReady() const; float domainLoadProgress(); signals: diff --git a/interface/src/octree/SafeLanding.cpp b/interface/src/octree/SafeLanding.cpp index 4b8edd5934..bdaaa58fcc 100644 --- a/interface/src/octree/SafeLanding.cpp +++ b/interface/src/octree/SafeLanding.cpp @@ -36,6 +36,7 @@ void SafeLanding::startEntitySequence(QSharedPointer entityT if (entityTree) { Locker lock(_lock); _entityTree = entityTree; + _trackedEntitiesRenderStatus.clear(); _trackedEntities.clear(); _trackingEntities = true; connect(std::const_pointer_cast(_entityTree).get(), @@ -76,22 +77,24 @@ void SafeLanding::addTrackedEntity(const EntityItemID& entityID) { if (hasAABox && downloadedCollisionTypes.count(modelEntity->getShapeType()) != 0) { // Only track entities with downloaded collision bodies. _trackedEntities.emplace(entityID, entity); - - float trackedEntityCount = (float)_trackedEntities.size(); - - if (trackedEntityCount > _maxTrackedEntityCount) { - _maxTrackedEntityCount = trackedEntityCount; - } qCDebug(interfaceapp) << "Safe Landing: Tracking entity " << entity->getItemName(); } } } + + _trackedEntitiesRenderStatus.emplace(entityID, entity); + float trackedEntityCount = (float)_trackedEntitiesRenderStatus.size(); + + if (trackedEntityCount > _maxTrackedEntityCount) { + _maxTrackedEntityCount = trackedEntityCount; + } } } void SafeLanding::deleteTrackedEntity(const EntityItemID& entityID) { Locker lock(_lock); _trackedEntities.erase(entityID); + _trackedEntitiesRenderStatus.erase(entityID); } void SafeLanding::setCompletionSequenceNumbers(int first, int last) { @@ -165,6 +168,24 @@ bool SafeLanding::isEntityPhysicsComplete() { return _trackedEntities.empty(); } +bool SafeLanding::entitiesRenderReady() { + Locker lock(_lock); + + for (auto entityMapIter = _trackedEntitiesRenderStatus.begin(); entityMapIter != _trackedEntitiesRenderStatus.end(); ++entityMapIter) { + auto entity = entityMapIter->second; + bool visuallyReady = entity->isVisuallyReady(); + qDebug() << "is entityType: " << EntityTypes::getEntityTypeName(entity->getType()) << " " << visuallyReady; + if (visuallyReady) { + entityMapIter = _trackedEntitiesRenderStatus.erase(entityMapIter); + if (entityMapIter == _trackedEntitiesRenderStatus.end()) { + break; + } + } + } + qDebug() << "list size: -> " << _trackedEntitiesRenderStatus.size(); + return _trackedEntitiesRenderStatus.empty(); +} + float SafeLanding::ElevatedPriority(const EntityItem& entityItem) { return entityItem.getCollisionless() ? 0.0f : 10.0f; } diff --git a/interface/src/octree/SafeLanding.h b/interface/src/octree/SafeLanding.h index 4bede579dc..611b75ab79 100644 --- a/interface/src/octree/SafeLanding.h +++ b/interface/src/octree/SafeLanding.h @@ -18,6 +18,7 @@ #include #include "EntityItem.h" +#include "EntityDynamicInterface.h" class EntityTreeRenderer; class EntityItemID; @@ -29,6 +30,7 @@ public: void setCompletionSequenceNumbers(int first, int last); // 'last' exclusive. void noteReceivedsequenceNumber(int sequenceNumber); bool isLoadSequenceComplete(); + bool entitiesRenderReady(); float loadingProgressPercentage(); private slots: @@ -46,6 +48,7 @@ private: EntityTreePointer _entityTree; using EntityMap = std::map; EntityMap _trackedEntities; + EntityMap _trackedEntitiesRenderStatus; static constexpr int INVALID_SEQUENCE = -1; int _initialStart { INVALID_SEQUENCE }; diff --git a/libraries/entities-renderer/src/RenderableModelEntityItem.cpp b/libraries/entities-renderer/src/RenderableModelEntityItem.cpp index 34936c2c48..c3cc634236 100644 --- a/libraries/entities-renderer/src/RenderableModelEntityItem.cpp +++ b/libraries/entities-renderer/src/RenderableModelEntityItem.cpp @@ -1441,7 +1441,7 @@ 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 @@ -1457,6 +1457,14 @@ void ModelEntityRenderer::doRenderUpdateSynchronousTyped(const ScenePointer& sce } } + +void ModelEntityRenderer::doRenderUpdateAsynchronousTyped(const TypedEntityPointer& entity) { + withWriteLock([&] { + bool visuallyReady = (_prevModelLoaded && _texturesLoaded); + entity->setVisuallyReady(visuallyReady); + }); +} + void ModelEntityRenderer::setIsVisibleInSecondaryCamera(bool value) { Parent::setIsVisibleInSecondaryCamera(value); setKey(_didLastVisualGeometryRequestSucceed); diff --git a/libraries/entities-renderer/src/RenderableModelEntityItem.h b/libraries/entities-renderer/src/RenderableModelEntityItem.h index 45892fdd7f..bcf7296456 100644 --- a/libraries/entities-renderer/src/RenderableModelEntityItem.h +++ b/libraries/entities-renderer/src/RenderableModelEntityItem.h @@ -38,11 +38,13 @@ class ModelEntityWrapper : public ModelEntityItem { using Parent = ModelEntityItem; friend class render::entities::ModelEntityRenderer; +public: + bool isModelLoaded() const; + protected: ModelEntityWrapper(const EntityItemID& entityItemID) : Parent(entityItemID) {} void setModel(const ModelPointer& model); ModelPointer getModel() const; - bool isModelLoaded() const; bool _needsInitialSimulation{ true }; private: @@ -162,6 +164,8 @@ protected: virtual void doRender(RenderArgs* args) override; virtual void doRenderUpdateSynchronousTyped(const ScenePointer& scene, Transaction& transaction, const TypedEntityPointer& entity) override; + virtual void doRenderUpdateAsynchronousTyped(const TypedEntityPointer& entity) override; + render::hifi::Tag getTagMask() const override; void setIsVisibleInSecondaryCamera(bool value) override; diff --git a/libraries/entities-renderer/src/RenderableZoneEntityItem.cpp b/libraries/entities-renderer/src/RenderableZoneEntityItem.cpp index c5035431f6..598b3d1449 100644 --- a/libraries/entities-renderer/src/RenderableZoneEntityItem.cpp +++ b/libraries/entities-renderer/src/RenderableZoneEntityItem.cpp @@ -258,6 +258,16 @@ void ZoneEntityRenderer::doRenderUpdateSynchronousTyped(const ScenePointer& scen if (hazeChanged) { updateHazeFromEntity(entity); } + + bool visuallyReady = true; + uint32_t skyboxMode = entity->getSkyboxMode(); + if (skyboxMode == COMPONENT_MODE_ENABLED) { + bool skyboxLoadedOrFailed = (_skyboxTexture && (_skyboxTexture->isLoaded() || _skyboxTexture->isFailed())); + qDebug() << "------> " << skyboxLoadedOrFailed; + visuallyReady = (!_skyboxTextureURL.isEmpty() || skyboxLoadedOrFailed); + } + + entity->setVisuallyReady(visuallyReady); } void ZoneEntityRenderer::doRenderUpdateAsynchronousTyped(const TypedEntityPointer& entity) { diff --git a/libraries/entities/src/EntityItem.h b/libraries/entities/src/EntityItem.h index 47ae8de9ad..490f9b9e6b 100644 --- a/libraries/entities/src/EntityItem.h +++ b/libraries/entities/src/EntityItem.h @@ -305,6 +305,7 @@ public: void setDynamic(bool value); virtual bool shouldBePhysical() const { return false; } + bool isVisuallyReady() const { return _visuallyReady; } bool getLocked() const; void setLocked(bool value); @@ -527,6 +528,7 @@ public: void removeCloneID(const QUuid& cloneID); const QVector getCloneIDs() const; void setCloneIDs(const QVector& cloneIDs); + void setVisuallyReady(bool visuallyReady) { _visuallyReady = visuallyReady; } signals: void requestRenderUpdate(); @@ -639,6 +641,7 @@ protected: EntityTreeElementPointer _element; // set by EntityTreeElement void* _physicsInfo { nullptr }; // set by EntitySimulation bool _simulated { false }; // set by EntitySimulation + bool _visuallyReady { true }; bool addActionInternal(EntitySimulationPointer simulation, EntityDynamicPointer action); bool removeActionInternal(const QUuid& actionID, EntitySimulationPointer simulation = nullptr); diff --git a/libraries/entities/src/ModelEntityItem.cpp b/libraries/entities/src/ModelEntityItem.cpp index 5d5344c9c8..774559a628 100644 --- a/libraries/entities/src/ModelEntityItem.cpp +++ b/libraries/entities/src/ModelEntityItem.cpp @@ -40,6 +40,7 @@ ModelEntityItem::ModelEntityItem(const EntityItemID& entityItemID) : EntityItem( _type = EntityTypes::Model; _lastKnownCurrentFrame = -1; _color[0] = _color[1] = _color[2] = 0; + _visuallyReady = false; } const QString ModelEntityItem::getTextures() const { diff --git a/libraries/entities/src/ZoneEntityItem.cpp b/libraries/entities/src/ZoneEntityItem.cpp index f2550e5d3c..58d5ba79c9 100644 --- a/libraries/entities/src/ZoneEntityItem.cpp +++ b/libraries/entities/src/ZoneEntityItem.cpp @@ -42,6 +42,7 @@ ZoneEntityItem::ZoneEntityItem(const EntityItemID& entityItemID) : EntityItem(en _shapeType = DEFAULT_SHAPE_TYPE; _compoundShapeURL = DEFAULT_COMPOUND_SHAPE_URL; + _visuallyReady = false; } EntityItemProperties ZoneEntityItem::getProperties(EntityPropertyFlags desiredProperties) const { diff --git a/scripts/system/interstitialPage.js b/scripts/system/interstitialPage.js index 1507c7bd9a..a5e5e7c0a2 100644 --- a/scripts/system/interstitialPage.js +++ b/scripts/system/interstitialPage.js @@ -32,6 +32,7 @@ var BUTTON_PROPERTIES = { text: "Interstitial" }; + var tablet = null; var button = null; @@ -336,11 +337,12 @@ Overlays.editOverlay(loadingBarPlacard, properties); Overlays.editOverlay(loadingBarProgress, loadingBarProperties); - if (physicsEnabled) { + if (physicsEnabled && !HMD.active) { toolbar.writeProperty("visible", true); - resetValues(); } + resetValues(); + Camera.mode = "first person"; } @@ -356,7 +358,13 @@ Overlays.editOverlay(anchorOverlay, { localPosition: localPosition }); } + + Window.interstitialStatusChanged.connect(function(interstitialMode) { + print("------> insterstitial mode changed " + interstitialMode + " <------"); + }); + function update() { + var downloadInfo = GlobalServices.getDownloadInfo(); var physicsEnabled = Window.isPhysicsEnabled(); var thisInterval = Date.now(); var deltaTime = (thisInterval - lastInterval); @@ -365,7 +373,7 @@ var domainLoadingProgressPercentage = Window.domainLoadingProgress(); var progress = MAX_X_SIZE * domainLoadingProgressPercentage; - print(progress); + //print(progress); if (progress >= target) { target = progress; } @@ -383,6 +391,7 @@ }; Overlays.editOverlay(loadingBarProgress, properties); + print(JSON.stringify(downloadInfo)); if ((physicsEnabled && (currentProgress >= (MAX_X_SIZE - EPSILON)))) { updateOverlays((physicsEnabled || connectionToDomainFailed)); endAudio(); @@ -431,7 +440,9 @@ renderViewTask.getConfig("LightingModel")["enableAmbientLight"] = true; renderViewTask.getConfig("LightingModel")["enableDirectionalLight"] = true; renderViewTask.getConfig("LightingModel")["enablePointLight"] = true; - toolbar.writeProperty("visible", true); + if (!HMD.active) { + toolbar.writeProperty("visible", true); + } } Script.scriptEnding.connect(cleanup); From bf839ca2912b20f7a080be62c1786c4fda47a90d Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Fri, 24 Aug 2018 16:53:38 -0700 Subject: [PATCH 039/210] Handle _unfilteredHandlers first upon processing datagrams --- libraries/networking/src/udt/Socket.cpp | 41 +++++++++++++++---------- libraries/networking/src/udt/Socket.h | 4 +-- 2 files changed, 27 insertions(+), 18 deletions(-) diff --git a/libraries/networking/src/udt/Socket.cpp b/libraries/networking/src/udt/Socket.cpp index 5b64cc0716..162b045a6e 100644 --- a/libraries/networking/src/udt/Socket.cpp +++ b/libraries/networking/src/udt/Socket.cpp @@ -344,7 +344,7 @@ void Socket::readPendingDatagrams() { continue; } - _incomingDatagrams.push({ senderAddress, senderPort, packetSizeWithHeader, + _incomingDatagrams.push_back({ senderAddress, senderPort, packetSizeWithHeader, std::move(buffer), receiveTime }); ++packetsRead; @@ -361,6 +361,28 @@ void Socket::processPendingDatagrams(int) { // setup a HifiSockAddr to read into HifiSockAddr senderSockAddr; + // Process unfiltered packets first. + for (auto datagramIter = _incomingDatagrams.begin(); datagramIter != _incomingDatagrams.end(); ++datagramIter) { + senderSockAddr.setAddress(datagramIter->_senderAddress); + senderSockAddr.setPort(datagramIter->_senderPort); + auto it = _unfilteredHandlers.find(senderSockAddr); + if (it != _unfilteredHandlers.end()) { + // we have a registered unfiltered handler for this HifiSockAddr (eg. STUN packet) - call that and return + if (it->second) { + auto basePacket = BasePacket::fromReceivedPacket(std::move(datagramIter->_datagram), + datagramIter->_datagramLength, + senderSockAddr); + basePacket->setReceiveTime(datagramIter->_receiveTime); + it->second(std::move(basePacket)); + } + + datagramIter = _incomingDatagrams.erase(datagramIter); + if (datagramIter == _incomingDatagrams.end()) { + break; + } + } + } + while (!_incomingDatagrams.empty()) { auto& datagram = _incomingDatagrams.front(); senderSockAddr.setAddress(datagram._senderAddress); @@ -370,19 +392,6 @@ void Socket::processPendingDatagrams(int) { auto it = _unfilteredHandlers.find(senderSockAddr); - if (it != _unfilteredHandlers.end()) { - // we have a registered unfiltered handler for this HifiSockAddr (eg. STUN packet) - call that and return - if (it->second) { - auto basePacket = BasePacket::fromReceivedPacket(std::move(datagram._datagram), datagramSize, - senderSockAddr); - basePacket->setReceiveTime(datagram._receiveTime); - it->second(std::move(basePacket)); - } - - _incomingDatagrams.pop(); - continue; - } - // we're reading a packet so re-start the readyRead backup timer _readyReadBackupTimer->start(); @@ -427,7 +436,7 @@ void Socket::processPendingDatagrams(int) { qCDebug(networking) << "Can't process packet: version" << (unsigned int)NLPacket::versionInHeader(*packet) << ", type" << NLPacket::typeInHeader(*packet); #endif - _incomingDatagrams.pop(); + _incomingDatagrams.pop_front(); continue; } } @@ -444,7 +453,7 @@ void Socket::processPendingDatagrams(int) { } } - _incomingDatagrams.pop(); + _incomingDatagrams.pop_front(); } } diff --git a/libraries/networking/src/udt/Socket.h b/libraries/networking/src/udt/Socket.h index 078863663f..ef4a457116 100644 --- a/libraries/networking/src/udt/Socket.h +++ b/libraries/networking/src/udt/Socket.h @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include @@ -156,7 +156,7 @@ private: p_high_resolution_clock::time_point _receiveTime; }; - std::queue _incomingDatagrams; + std::list _incomingDatagrams; int _maxDatagramsRead { 0 }; friend UDTTest; From 92acaade2b736eab9c711d1f3586d90107f097e8 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Fri, 24 Aug 2018 17:13:57 -0700 Subject: [PATCH 040/210] trying to fix problems --- interface/src/octree/SafeLanding.cpp | 2 +- .../entities-renderer/src/RenderableModelEntityItem.cpp | 5 +---- libraries/entities-renderer/src/RenderableModelEntityItem.h | 2 -- libraries/entities-renderer/src/RenderableZoneEntityItem.cpp | 4 ++-- 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/interface/src/octree/SafeLanding.cpp b/interface/src/octree/SafeLanding.cpp index bdaaa58fcc..262f0b30c2 100644 --- a/interface/src/octree/SafeLanding.cpp +++ b/interface/src/octree/SafeLanding.cpp @@ -174,7 +174,7 @@ bool SafeLanding::entitiesRenderReady() { for (auto entityMapIter = _trackedEntitiesRenderStatus.begin(); entityMapIter != _trackedEntitiesRenderStatus.end(); ++entityMapIter) { auto entity = entityMapIter->second; bool visuallyReady = entity->isVisuallyReady(); - qDebug() << "is entityType: " << EntityTypes::getEntityTypeName(entity->getType()) << " " << visuallyReady; + qDebug() << "is entityType: " << EntityTypes::getEntityTypeName(entity->getType()) << " " << visuallyReady << " " << entityMapIter->first; if (visuallyReady) { entityMapIter = _trackedEntitiesRenderStatus.erase(entityMapIter); if (entityMapIter == _trackedEntitiesRenderStatus.end()) { diff --git a/libraries/entities-renderer/src/RenderableModelEntityItem.cpp b/libraries/entities-renderer/src/RenderableModelEntityItem.cpp index c3cc634236..ec46a37a1c 100644 --- a/libraries/entities-renderer/src/RenderableModelEntityItem.cpp +++ b/libraries/entities-renderer/src/RenderableModelEntityItem.cpp @@ -1455,12 +1455,9 @@ void ModelEntityRenderer::doRenderUpdateSynchronousTyped(const ScenePointer& sce } emit requestRenderUpdate(); } -} - -void ModelEntityRenderer::doRenderUpdateAsynchronousTyped(const TypedEntityPointer& entity) { withWriteLock([&] { - bool visuallyReady = (_prevModelLoaded && _texturesLoaded); + bool visuallyReady = ((_prevModelLoaded && _texturesLoaded) || model->getURL().isEmpty()); entity->setVisuallyReady(visuallyReady); }); } diff --git a/libraries/entities-renderer/src/RenderableModelEntityItem.h b/libraries/entities-renderer/src/RenderableModelEntityItem.h index bcf7296456..3540fa1127 100644 --- a/libraries/entities-renderer/src/RenderableModelEntityItem.h +++ b/libraries/entities-renderer/src/RenderableModelEntityItem.h @@ -164,8 +164,6 @@ protected: virtual void doRender(RenderArgs* args) override; virtual void doRenderUpdateSynchronousTyped(const ScenePointer& scene, Transaction& transaction, const TypedEntityPointer& entity) override; - virtual void doRenderUpdateAsynchronousTyped(const TypedEntityPointer& entity) override; - render::hifi::Tag getTagMask() const override; void setIsVisibleInSecondaryCamera(bool value) override; diff --git a/libraries/entities-renderer/src/RenderableZoneEntityItem.cpp b/libraries/entities-renderer/src/RenderableZoneEntityItem.cpp index ba561cd8b2..2f36796f84 100644 --- a/libraries/entities-renderer/src/RenderableZoneEntityItem.cpp +++ b/libraries/entities-renderer/src/RenderableZoneEntityItem.cpp @@ -293,8 +293,8 @@ void ZoneEntityRenderer::doRenderUpdateSynchronousTyped(const ScenePointer& scen uint32_t skyboxMode = entity->getSkyboxMode(); if (skyboxMode == COMPONENT_MODE_ENABLED) { bool skyboxLoadedOrFailed = (_skyboxTexture && (_skyboxTexture->isLoaded() || _skyboxTexture->isFailed())); - qDebug() << "------> " << skyboxLoadedOrFailed; - visuallyReady = (!_skyboxTextureURL.isEmpty() || skyboxLoadedOrFailed); + qDebug() << entity->getEntityItemID() << "------> " << _skyboxTexture->isFailed() << _skyboxTexture->isLoaded() << _skyboxTextureURL.isEmpty(); + visuallyReady = (_skyboxTextureURL.isEmpty() || skyboxLoadedOrFailed); } entity->setVisuallyReady(visuallyReady); From ab810f45050c0e03011cd384070968fe3b1e53ea Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Fri, 24 Aug 2018 17:33:06 -0700 Subject: [PATCH 041/210] Try reducing use of shared pointers in O(n2) code --- .../src/avatars/AvatarMixerSlave.cpp | 35 ++++++++++--------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/assignment-client/src/avatars/AvatarMixerSlave.cpp b/assignment-client/src/avatars/AvatarMixerSlave.cpp index f347ff1f10..3e9755ed39 100644 --- a/assignment-client/src/avatars/AvatarMixerSlave.cpp +++ b/assignment-client/src/avatars/AvatarMixerSlave.cpp @@ -210,6 +210,7 @@ void AvatarMixerSlave::broadcastAvatarData(const SharedNodePointer& node) { } void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) { + const Node* nodeRaw = node.data(); auto nodeList = DependencyManager::get(); @@ -220,7 +221,7 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) _stats.nodesBroadcastedTo++; - AvatarMixerClientData* nodeData = reinterpret_cast(node->getLinkedData()); + AvatarMixerClientData* nodeData = reinterpret_cast(nodeRaw->getLinkedData()); nodeData->resetInViewStats(); @@ -260,7 +261,7 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) bool PALIsOpen = nodeData->getRequestsDomainListData(); // When this is true, the AvatarMixer will send Avatar data to a client about avatars that have ignored them - bool getsAnyIgnored = PALIsOpen && node->getCanKick(); + bool getsAnyIgnored = PALIsOpen && nodeRaw->getCanKick(); if (PALIsOpen) { // Increase minimumBytesPerAvatar if the PAL is open @@ -286,8 +287,8 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) // setup list of AvatarData as well as maps to map betweeen the AvatarData and the original nodes - std::vector avatarsToSort; - std::unordered_map avatarDataToNodes; + std::vector avatarsToSort; + std::unordered_map avatarDataToNodes; std::unordered_map avatarEncodeTimes; std::for_each(_begin, _end, [&](const SharedNodePointer& otherNode) { // make sure this is an agent that we have avatar data for before considering it for inclusion @@ -295,7 +296,7 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) && otherNode->getLinkedData()) { const AvatarMixerClientData* otherNodeData = reinterpret_cast(otherNode->getLinkedData()); - AvatarSharedPointer otherAvatar = otherNodeData->getAvatarSharedPointer(); + AvatarData* otherAvatar = otherNodeData->getAvatarSharedPointer().get(); avatarsToSort.push_back(otherAvatar); avatarDataToNodes[otherAvatar] = otherNode; QUuid id = otherAvatar->getSessionUUID(); @@ -306,7 +307,7 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) class SortableAvatar: public PrioritySortUtil::Sortable { public: SortableAvatar() = delete; - SortableAvatar(const AvatarSharedPointer& avatar, uint64_t lastEncodeTime) + SortableAvatar(const AvatarData* avatar, uint64_t lastEncodeTime) : _avatar(avatar), _lastEncodeTime(lastEncodeTime) {} glm::vec3 getPosition() const override { return _avatar->getWorldPosition(); } float getRadius() const override { @@ -316,10 +317,10 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) uint64_t getTimestamp() const override { return _lastEncodeTime; } - AvatarSharedPointer getAvatar() const { return _avatar; } + const AvatarData* getAvatar() const { return _avatar; } private: - AvatarSharedPointer _avatar; + const AvatarData* _avatar; uint64_t _lastEncodeTime; }; @@ -332,8 +333,8 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) // ignore or sort const AvatarSharedPointer& thisAvatar = nodeData->getAvatarSharedPointer(); - for (const auto& avatar : avatarsToSort) { - if (avatar == thisAvatar) { + for (const auto avatar : avatarsToSort) { + if (avatar == thisAvatar.get()) { // don't echo updates to self continue; } @@ -356,14 +357,14 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) // and isn't an avatar that the viewing node has ignored // or that has ignored the viewing node if (!avatarNode->getLinkedData() - || avatarNode->getUUID() == node->getUUID() - || (node->isIgnoringNodeWithID(avatarNode->getUUID()) && !PALIsOpen) - || (avatarNode->isIgnoringNodeWithID(node->getUUID()) && !getsAnyIgnored)) { + || avatarNode->getUUID() == nodeRaw->getUUID() + || (nodeRaw->isIgnoringNodeWithID(avatarNode->getUUID()) && !PALIsOpen) + || (avatarNode->isIgnoringNodeWithID(nodeRaw->getUUID()) && !getsAnyIgnored)) { shouldIgnore = true; } else { // Check to see if the space bubble is enabled // Don't bother with these checks if the other avatar has their bubble enabled and we're gettingAnyIgnored - if (node->isIgnoreRadiusEnabled() || (avatarNode->isIgnoreRadiusEnabled() && !getsAnyIgnored)) { + if (nodeRaw->isIgnoreRadiusEnabled() || (avatarNode->isIgnoreRadiusEnabled() && !getsAnyIgnored)) { float sensorToWorldScale = avatarNodeData->getAvatarSharedPointer()->getSensorToWorldScale(); // Define the scale of the box for the current other node glm::vec3 otherNodeBoxScale = (avatarNodeData->getPosition() - avatarNodeData->getGlobalBoundingBoxCorner()) * 2.0f * sensorToWorldScale; @@ -430,7 +431,7 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) int remainingAvatars = (int)sortedAvatars.size(); auto traitsPacketList = NLPacketList::create(PacketType::BulkAvatarTraits, QByteArray(), true, true); while (!sortedAvatars.empty()) { - const auto avatarData = sortedAvatars.top().getAvatar(); + const AvatarData* avatarData = sortedAvatars.top().getAvatar(); sortedAvatars.pop(); remainingAvatars--; @@ -565,7 +566,7 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) _stats.numBytesSent += numAvatarDataBytes; // send the avatar data PacketList - nodeList->sendPacketList(std::move(avatarPacketList), *node); + nodeList->sendPacketList(std::move(avatarPacketList), *nodeRaw); // record the bytes sent for other avatar data in the AvatarMixerClientData nodeData->recordSentAvatarData(numAvatarDataBytes); @@ -575,7 +576,7 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) if (traitsPacketList->getNumPackets() >= 1) { // send the traits packet list - nodeList->sendPacketList(std::move(traitsPacketList), *node); + nodeList->sendPacketList(std::move(traitsPacketList), *nodeRaw); } // record the number of avatars held back this frame From 861d1e26a99be1f9b4839cb25f6ff2fabeac24da Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Fri, 24 Aug 2018 18:02:28 -0700 Subject: [PATCH 042/210] Remove unused variable --- libraries/networking/src/udt/Socket.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/libraries/networking/src/udt/Socket.cpp b/libraries/networking/src/udt/Socket.cpp index 162b045a6e..56b7521d7a 100644 --- a/libraries/networking/src/udt/Socket.cpp +++ b/libraries/networking/src/udt/Socket.cpp @@ -390,8 +390,6 @@ void Socket::processPendingDatagrams(int) { int datagramSize = datagram._datagramLength; auto receiveTime = datagram._receiveTime; - auto it = _unfilteredHandlers.find(senderSockAddr); - // we're reading a packet so re-start the readyRead backup timer _readyReadBackupTimer->start(); From e4293d9ad57705cfb778737c337ff8018a9a8b13 Mon Sep 17 00:00:00 2001 From: danteruiz Date: Sun, 26 Aug 2018 21:50:01 -0700 Subject: [PATCH 043/210] fixing some entity visual problems --- interface/src/Application.cpp | 1 - interface/src/octree/SafeLanding.cpp | 9 +++++--- .../src/RenderableModelEntityItem.cpp | 21 ++++++++++++------- .../src/RenderableZoneEntityItem.cpp | 7 ++++--- scripts/system/interstitialPage.js | 13 ++++-------- 5 files changed, 28 insertions(+), 23 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 092fb51a2a..37e31650a0 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -5544,7 +5544,6 @@ void Application::update(float deltaTime) { // for nearby entities before starting bullet up. quint64 now = usecTimestampNow(); bool renderReady = _octreeProcessor.isEntitiesRenderReady(); - qDebug() << "--> render ready: " << renderReady; if (isServerlessMode() || (_octreeProcessor.isLoadSequenceComplete() && renderReady)) { // we've received a new full-scene octree stats packet, or it's been long enough to try again anyway _lastPhysicsCheckTime = now; diff --git a/interface/src/octree/SafeLanding.cpp b/interface/src/octree/SafeLanding.cpp index 262f0b30c2..8d36b3fcb0 100644 --- a/interface/src/octree/SafeLanding.cpp +++ b/interface/src/octree/SafeLanding.cpp @@ -13,6 +13,7 @@ #include "EntityTreeRenderer.h" #include "ModelEntityItem.h" #include "InterfaceLogging.h" +#include "Application.h" const int SafeLanding::SEQUENCE_MODULO = std::numeric_limits::max() + 1; @@ -129,7 +130,7 @@ bool SafeLanding::isLoadSequenceComplete() { float SafeLanding::loadingProgressPercentage() { Locker lock(_lock); if (_maxTrackedEntityCount > 0) { - float trackedEntityCount = (float)_trackedEntities.size(); + float trackedEntityCount = (float)_trackedEntitiesRenderStatus.size(); return ((_maxTrackedEntityCount - trackedEntityCount) / _maxTrackedEntityCount); } @@ -170,16 +171,18 @@ bool SafeLanding::isEntityPhysicsComplete() { bool SafeLanding::entitiesRenderReady() { Locker lock(_lock); - + auto entityTree = qApp->getEntities(); for (auto entityMapIter = _trackedEntitiesRenderStatus.begin(); entityMapIter != _trackedEntitiesRenderStatus.end(); ++entityMapIter) { auto entity = entityMapIter->second; bool visuallyReady = entity->isVisuallyReady(); qDebug() << "is entityType: " << EntityTypes::getEntityTypeName(entity->getType()) << " " << visuallyReady << " " << entityMapIter->first; - if (visuallyReady) { + if (visuallyReady || !entityTree->renderableForEntityId(entityMapIter->first)) { entityMapIter = _trackedEntitiesRenderStatus.erase(entityMapIter); if (entityMapIter == _trackedEntitiesRenderStatus.end()) { break; } + } else { + entity->requestRenderUpdate(); } } qDebug() << "list size: -> " << _trackedEntitiesRenderStatus.size(); diff --git a/libraries/entities-renderer/src/RenderableModelEntityItem.cpp b/libraries/entities-renderer/src/RenderableModelEntityItem.cpp index ec46a37a1c..baa20a0583 100644 --- a/libraries/entities-renderer/src/RenderableModelEntityItem.cpp +++ b/libraries/entities-renderer/src/RenderableModelEntityItem.cpp @@ -1297,9 +1297,21 @@ void ModelEntityRenderer::doRenderUpdateSynchronousTyped(const ScenePointer& sce } }); - // Check for removal ModelPointer model; withReadLock([&] { model = _model; }); + + withWriteLock([&] { + bool visuallyReady = true; + if (_hasModel) { + if (model && _didLastVisualGeometryRequestSucceed) { + visuallyReady = (_prevModelLoaded && _texturesLoaded); + // qDebug() << visuallyReady; + } + } + entity->setVisuallyReady(visuallyReady); + }); + + // Check for removal if (!_hasModel) { if (model) { model->removeFromScene(scene, transaction); @@ -1445,7 +1457,7 @@ void ModelEntityRenderer::doRenderUpdateSynchronousTyped(const ScenePointer& sce 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())) { + } else if (_animation && (_animation->getURL().toString() != entity->getAnimationURL())) { _animation = DependencyManager::get()->getAnimation(entity->getAnimationURL()); _jointMappingCompleted = false; mapJoints(entity, model->getJointNames()); @@ -1455,11 +1467,6 @@ void ModelEntityRenderer::doRenderUpdateSynchronousTyped(const ScenePointer& sce } emit requestRenderUpdate(); } - - withWriteLock([&] { - bool visuallyReady = ((_prevModelLoaded && _texturesLoaded) || model->getURL().isEmpty()); - entity->setVisuallyReady(visuallyReady); - }); } void ModelEntityRenderer::setIsVisibleInSecondaryCamera(bool value) { diff --git a/libraries/entities-renderer/src/RenderableZoneEntityItem.cpp b/libraries/entities-renderer/src/RenderableZoneEntityItem.cpp index 2f36796f84..cf452c9cf7 100644 --- a/libraries/entities-renderer/src/RenderableZoneEntityItem.cpp +++ b/libraries/entities-renderer/src/RenderableZoneEntityItem.cpp @@ -291,11 +291,12 @@ void ZoneEntityRenderer::doRenderUpdateSynchronousTyped(const ScenePointer& scen bool visuallyReady = true; uint32_t skyboxMode = entity->getSkyboxMode(); - if (skyboxMode == COMPONENT_MODE_ENABLED) { + if (skyboxMode == COMPONENT_MODE_ENABLED && !_skyboxTextureURL.isEmpty()) { bool skyboxLoadedOrFailed = (_skyboxTexture && (_skyboxTexture->isLoaded() || _skyboxTexture->isFailed())); - qDebug() << entity->getEntityItemID() << "------> " << _skyboxTexture->isFailed() << _skyboxTexture->isLoaded() << _skyboxTextureURL.isEmpty(); - visuallyReady = (_skyboxTextureURL.isEmpty() || skyboxLoadedOrFailed); + + visuallyReady = skyboxLoadedOrFailed; } + entity->setVisuallyReady(visuallyReady); if (bloomChanged) { diff --git a/scripts/system/interstitialPage.js b/scripts/system/interstitialPage.js index a5e5e7c0a2..cf06e222c9 100644 --- a/scripts/system/interstitialPage.js +++ b/scripts/system/interstitialPage.js @@ -223,7 +223,7 @@ function startInterstitialPage() { if (timer === null) { - updateOverlays(Window.isPhysicsEnabled()); + updateOverlays(false); startAudio(); target = 0; currentProgress = 0.1; @@ -364,7 +364,6 @@ }); function update() { - var downloadInfo = GlobalServices.getDownloadInfo(); var physicsEnabled = Window.isPhysicsEnabled(); var thisInterval = Date.now(); var deltaTime = (thisInterval - lastInterval); @@ -373,14 +372,11 @@ var domainLoadingProgressPercentage = Window.domainLoadingProgress(); var progress = MAX_X_SIZE * domainLoadingProgressPercentage; - //print(progress); - if (progress >= target) { + print(progress); + //if (progress >= target) { target = progress; - } + //} - if (physicsEnabled && target < MAX_X_SIZE) { - target = MAX_X_SIZE; - } currentProgress = lerp(currentProgress, target, 0.2); var properties = { localPosition: { x: (1.85 - (currentProgress / 2) - (-0.029 * (currentProgress / MAX_X_SIZE))), y: -0.935, z: 0.0 }, @@ -391,7 +387,6 @@ }; Overlays.editOverlay(loadingBarProgress, properties); - print(JSON.stringify(downloadInfo)); if ((physicsEnabled && (currentProgress >= (MAX_X_SIZE - EPSILON)))) { updateOverlays((physicsEnabled || connectionToDomainFailed)); endAudio(); From 402ed4fb76532327066d2ea1448556d68c906e6e Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Mon, 27 Aug 2018 10:35:17 -0700 Subject: [PATCH 044/210] More shared pointer tweaks --- assignment-client/src/avatars/AvatarMixerSlave.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/assignment-client/src/avatars/AvatarMixerSlave.cpp b/assignment-client/src/avatars/AvatarMixerSlave.cpp index 3e9755ed39..367e991a04 100644 --- a/assignment-client/src/avatars/AvatarMixerSlave.cpp +++ b/assignment-client/src/avatars/AvatarMixerSlave.cpp @@ -288,7 +288,8 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) // setup list of AvatarData as well as maps to map betweeen the AvatarData and the original nodes std::vector avatarsToSort; - std::unordered_map avatarDataToNodes; + std::unordered_map avatarDataToNodes; + std::unordered_map avatarDataToNodesShared; std::unordered_map avatarEncodeTimes; std::for_each(_begin, _end, [&](const SharedNodePointer& otherNode) { // make sure this is an agent that we have avatar data for before considering it for inclusion @@ -298,7 +299,8 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) AvatarData* otherAvatar = otherNodeData->getAvatarSharedPointer().get(); avatarsToSort.push_back(otherAvatar); - avatarDataToNodes[otherAvatar] = otherNode; + avatarDataToNodes[otherAvatar] = otherNode.data(); + avatarDataToNodesShared[otherAvatar] = otherNode; QUuid id = otherAvatar->getSessionUUID(); avatarEncodeTimes[id] = nodeData->getLastOtherAvatarEncodeTime(id); } @@ -332,9 +334,9 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) AvatarData::_avatarSortCoefficientAge); // ignore or sort - const AvatarSharedPointer& thisAvatar = nodeData->getAvatarSharedPointer(); + const AvatarData* thisAvatar = nodeData->getAvatarSharedPointer().get(); for (const auto avatar : avatarsToSort) { - if (avatar == thisAvatar.get()) { + if (avatar == thisAvatar) { // don't echo updates to self continue; } @@ -380,7 +382,7 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) // Perform the collision check between the two bounding boxes if (nodeBox.touches(otherNodeBox)) { - nodeData->ignoreOther(node, avatarNode); + nodeData->ignoreOther(node, avatarDataToNodesShared[avatar]); shouldIgnore = !getsAnyIgnored; } } From e2cd695dfb9ada63d8a14664d4e75b13bf2ec978 Mon Sep 17 00:00:00 2001 From: danteruiz Date: Mon, 27 Aug 2018 11:01:29 -0700 Subject: [PATCH 045/210] PR code clean up --- interface/src/Application.h | 2 +- interface/src/avatar/MyAvatar.cpp | 1 - interface/src/octree/OctreePacketProcessor.cpp | 2 +- interface/src/octree/OctreePacketProcessor.h | 2 +- interface/src/scripting/WindowScriptingInterface.cpp | 2 +- interface/src/ui/OverlayConductor.cpp | 1 - libraries/entities-renderer/src/RenderableModelEntityItem.cpp | 1 - libraries/entities-renderer/src/RenderableModelEntityItem.h | 4 +--- 8 files changed, 5 insertions(+), 10 deletions(-) diff --git a/interface/src/Application.h b/interface/src/Application.h index a6258403a9..f3db4e718d 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -233,7 +233,7 @@ public: bool getPreferAvatarFingerOverStylus() { return false; } void setPreferAvatarFingerOverStylus(bool value); - float getDomainLoadProgress() { return _octreeProcessor.domainLoadProgress(); } + float getDomainLoadingProgress() { return _octreeProcessor.domainLoadingProgress(); } float getSettingConstrainToolbarPosition() { return _constrainToolbarPosition.get(); } void setSettingConstrainToolbarPosition(bool setting); diff --git a/interface/src/avatar/MyAvatar.cpp b/interface/src/avatar/MyAvatar.cpp index 545ca99109..923d071cc0 100755 --- a/interface/src/avatar/MyAvatar.cpp +++ b/interface/src/avatar/MyAvatar.cpp @@ -2432,7 +2432,6 @@ void MyAvatar::setHasScriptedBlendshapes(bool hasScriptedBlendshapes) { // send a forced avatarData update to make sure the script can send neutal blendshapes on unload // without having to wait for the update loop, make sure _hasScriptedBlendShapes is still true // before sending the update, or else it won't send the neutal blendshapes to the receiving clients - sendAvatarDataPacket(true); } _hasScriptedBlendShapes = hasScriptedBlendshapes; diff --git a/interface/src/octree/OctreePacketProcessor.cpp b/interface/src/octree/OctreePacketProcessor.cpp index e02c603415..e670153a77 100644 --- a/interface/src/octree/OctreePacketProcessor.cpp +++ b/interface/src/octree/OctreePacketProcessor.cpp @@ -142,6 +142,6 @@ bool OctreePacketProcessor::isEntitiesRenderReady() const { return _safeLanding->entitiesRenderReady(); } -float OctreePacketProcessor::domainLoadProgress() { +float OctreePacketProcessor::domainLoadingProgress() { return _safeLanding->loadingProgressPercentage(); } diff --git a/interface/src/octree/OctreePacketProcessor.h b/interface/src/octree/OctreePacketProcessor.h index 8e771de556..71e22bf240 100644 --- a/interface/src/octree/OctreePacketProcessor.h +++ b/interface/src/octree/OctreePacketProcessor.h @@ -28,7 +28,7 @@ public: void startEntitySequence(); bool isLoadSequenceComplete() const; bool isEntitiesRenderReady() const; - float domainLoadProgress(); + float domainLoadingProgress(); signals: void packetVersionMismatch(); diff --git a/interface/src/scripting/WindowScriptingInterface.cpp b/interface/src/scripting/WindowScriptingInterface.cpp index f422a6a8fa..b4c1563795 100644 --- a/interface/src/scripting/WindowScriptingInterface.cpp +++ b/interface/src/scripting/WindowScriptingInterface.cpp @@ -590,5 +590,5 @@ void WindowScriptingInterface::onMessageBoxSelected(int button) { float WindowScriptingInterface::domainLoadingProgress() { - return qApp->getDomainLoadProgress(); + return qApp->getDomainLoadingProgress(); } diff --git a/interface/src/ui/OverlayConductor.cpp b/interface/src/ui/OverlayConductor.cpp index 398f9cf147..e27001567f 100644 --- a/interface/src/ui/OverlayConductor.cpp +++ b/interface/src/ui/OverlayConductor.cpp @@ -103,7 +103,6 @@ void OverlayConductor::update(float dt) { bool targetVisible = Menu::getInstance()->isOptionChecked(MenuOption::Overlays) && !_suppressedByHead; if (targetVisible != currentVisible) { - qDebug() << "setting pinned: " << !targetVisible; offscreenUi->setPinned(!targetVisible); } if (shouldRecenter && !_suppressedByHead) { diff --git a/libraries/entities-renderer/src/RenderableModelEntityItem.cpp b/libraries/entities-renderer/src/RenderableModelEntityItem.cpp index baa20a0583..8be5b172ce 100644 --- a/libraries/entities-renderer/src/RenderableModelEntityItem.cpp +++ b/libraries/entities-renderer/src/RenderableModelEntityItem.cpp @@ -1305,7 +1305,6 @@ void ModelEntityRenderer::doRenderUpdateSynchronousTyped(const ScenePointer& sce if (_hasModel) { if (model && _didLastVisualGeometryRequestSucceed) { visuallyReady = (_prevModelLoaded && _texturesLoaded); - // qDebug() << visuallyReady; } } entity->setVisuallyReady(visuallyReady); diff --git a/libraries/entities-renderer/src/RenderableModelEntityItem.h b/libraries/entities-renderer/src/RenderableModelEntityItem.h index 3540fa1127..45892fdd7f 100644 --- a/libraries/entities-renderer/src/RenderableModelEntityItem.h +++ b/libraries/entities-renderer/src/RenderableModelEntityItem.h @@ -38,13 +38,11 @@ class ModelEntityWrapper : public ModelEntityItem { using Parent = ModelEntityItem; friend class render::entities::ModelEntityRenderer; -public: - bool isModelLoaded() const; - protected: ModelEntityWrapper(const EntityItemID& entityItemID) : Parent(entityItemID) {} void setModel(const ModelPointer& model); ModelPointer getModel() const; + bool isModelLoaded() const; bool _needsInitialSimulation{ true }; private: From 44f253c482a9978c378e091d811e8358a785dc88 Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Mon, 27 Aug 2018 14:54:37 -0700 Subject: [PATCH 046/210] Reduce use of shared pointers and maps --- .../src/avatars/AvatarMixerClientData.cpp | 4 +- .../src/avatars/AvatarMixerSlave.cpp | 60 ++++++++++--------- 2 files changed, 33 insertions(+), 31 deletions(-) diff --git a/assignment-client/src/avatars/AvatarMixerClientData.cpp b/assignment-client/src/avatars/AvatarMixerClientData.cpp index f524c071ec..e003fdd769 100644 --- a/assignment-client/src/avatars/AvatarMixerClientData.cpp +++ b/assignment-client/src/avatars/AvatarMixerClientData.cpp @@ -236,9 +236,7 @@ void AvatarMixerClientData::ignoreOther(SharedNodePointer self, SharedNodePointe } void AvatarMixerClientData::removeFromRadiusIgnoringSet(SharedNodePointer self, const QUuid& other) { - if (isRadiusIgnoring(other)) { - _radiusIgnoredOthers.erase(other); - } + _radiusIgnoredOthers.erase(other); } void AvatarMixerClientData::resetSentTraitData(Node::LocalID nodeLocalID) { diff --git a/assignment-client/src/avatars/AvatarMixerSlave.cpp b/assignment-client/src/avatars/AvatarMixerSlave.cpp index 367e991a04..2ba54bd6b6 100644 --- a/assignment-client/src/avatars/AvatarMixerSlave.cpp +++ b/assignment-client/src/avatars/AvatarMixerSlave.cpp @@ -287,30 +287,39 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) // setup list of AvatarData as well as maps to map betweeen the AvatarData and the original nodes - std::vector avatarsToSort; - std::unordered_map avatarDataToNodes; - std::unordered_map avatarDataToNodesShared; - std::unordered_map avatarEncodeTimes; + struct AvatarSortData { + SharedNodePointer _nodeShared; + Node* _node; + AvatarData* _avatarData; + quint64 _lastEncodeTime; + }; + std::vector avatarsToSort; + avatarsToSort.reserve(nodeList->size()); + //std::unordered_map avatarDataToNodes; + //std::unordered_map avatarDataToNodesShared; + //std::unordered_map avatarEncodeTimes; std::for_each(_begin, _end, [&](const SharedNodePointer& otherNode) { + Node* otherNodeRaw = otherNode.data(); // make sure this is an agent that we have avatar data for before considering it for inclusion - if (otherNode->getType() == NodeType::Agent - && otherNode->getLinkedData()) { - const AvatarMixerClientData* otherNodeData = reinterpret_cast(otherNode->getLinkedData()); + if (otherNodeRaw->getType() == NodeType::Agent + && otherNodeRaw->getLinkedData()) { + const AvatarMixerClientData* otherNodeData = reinterpret_cast(otherNodeRaw->getLinkedData()); + AvatarData* otherAvatar = otherNodeData->getAvatarSharedPointer().get(); - avatarsToSort.push_back(otherAvatar); - avatarDataToNodes[otherAvatar] = otherNode.data(); - avatarDataToNodesShared[otherAvatar] = otherNode; - QUuid id = otherAvatar->getSessionUUID(); - avatarEncodeTimes[id] = nodeData->getLastOtherAvatarEncodeTime(id); + //avatarsToSort.push_back(otherAvatar); + //avatarDataToNodes[otherAvatar] = otherNode.data(); + //avatarDataToNodesShared[otherAvatar] = otherNode; + auto lastEncodeTime = nodeData->getLastOtherAvatarEncodeTime(otherAvatar->getSessionUUID()); + avatarsToSort.emplace_back(AvatarSortData({ otherNode, otherNodeRaw, otherAvatar, lastEncodeTime })); } }); class SortableAvatar: public PrioritySortUtil::Sortable { public: SortableAvatar() = delete; - SortableAvatar(const AvatarData* avatar, uint64_t lastEncodeTime) - : _avatar(avatar), _lastEncodeTime(lastEncodeTime) {} + SortableAvatar(const AvatarData* avatar, const Node* avatarNode, uint64_t lastEncodeTime) + : _avatar(avatar), _node(avatarNode), _lastEncodeTime(lastEncodeTime) {} glm::vec3 getPosition() const override { return _avatar->getWorldPosition(); } float getRadius() const override { glm::vec3 nodeBoxHalfScale = (_avatar->getWorldPosition() - _avatar->getGlobalBoundingBoxCorner() * _avatar->getSensorToWorldScale()); @@ -320,9 +329,11 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) return _lastEncodeTime; } const AvatarData* getAvatar() const { return _avatar; } + const Node* getNode() const { return _node; } private: const AvatarData* _avatar; + const Node* _node; uint64_t _lastEncodeTime; }; @@ -335,8 +346,8 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) // ignore or sort const AvatarData* thisAvatar = nodeData->getAvatarSharedPointer().get(); - for (const auto avatar : avatarsToSort) { - if (avatar == thisAvatar) { + for (const auto& avatar : avatarsToSort) { + if (avatar._node == nodeRaw) { // don't echo updates to self continue; } @@ -348,7 +359,7 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) // happen if for example the avatar is connected on a desktop and sending // updates at ~30hz. So every 3 frames we skip a frame. - auto avatarNode = avatarDataToNodes[avatar]; + auto avatarNode = avatar._node; assert(avatarNode); // we can't have gotten here without the avatarData being a valid key in the map const AvatarMixerClientData* avatarNodeData = reinterpret_cast(avatarNode->getLinkedData()); @@ -358,9 +369,7 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) // make sure we have data for this avatar, that it isn't the same node, // and isn't an avatar that the viewing node has ignored // or that has ignored the viewing node - if (!avatarNode->getLinkedData() - || avatarNode->getUUID() == nodeRaw->getUUID() - || (nodeRaw->isIgnoringNodeWithID(avatarNode->getUUID()) && !PALIsOpen) + if ((nodeRaw->isIgnoringNodeWithID(avatarNode->getUUID()) && !PALIsOpen) || (avatarNode->isIgnoringNodeWithID(nodeRaw->getUUID()) && !getsAnyIgnored)) { shouldIgnore = true; } else { @@ -382,7 +391,7 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) // Perform the collision check between the two bounding boxes if (nodeBox.touches(otherNodeBox)) { - nodeData->ignoreOther(node, avatarDataToNodesShared[avatar]); + nodeData->ignoreOther(node, avatar._nodeShared); shouldIgnore = !getsAnyIgnored; } } @@ -419,12 +428,7 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) if (!shouldIgnore) { // sort this one for later - uint64_t lastEncodeTime = 0; - std::unordered_map::const_iterator itr = avatarEncodeTimes.find(avatar->getSessionUUID()); - if (itr != avatarEncodeTimes.end()) { - lastEncodeTime = itr->second; - } - sortedAvatars.push(SortableAvatar(avatar, lastEncodeTime)); + sortedAvatars.push(SortableAvatar(avatar._avatarData, avatar._node, avatar._lastEncodeTime)); } } @@ -434,10 +438,10 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) auto traitsPacketList = NLPacketList::create(PacketType::BulkAvatarTraits, QByteArray(), true, true); while (!sortedAvatars.empty()) { const AvatarData* avatarData = sortedAvatars.top().getAvatar(); + const Node* otherNode = sortedAvatars.top().getNode(); sortedAvatars.pop(); remainingAvatars--; - auto otherNode = avatarDataToNodes[avatarData]; assert(otherNode); // we can't have gotten here without the avatarData being a valid key in the map // NOTE: Here's where we determine if we are over budget and drop to bare minimum data From 027d11736446769867807294f6e842463ee4889a Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Tue, 28 Aug 2018 09:41:09 -0700 Subject: [PATCH 047/210] Remove deadlock caused by trying readlock on NodeList Also just use refs to other SharedNodes as the NodeList is locked. --- assignment-client/src/avatars/AvatarMixerSlave.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/assignment-client/src/avatars/AvatarMixerSlave.cpp b/assignment-client/src/avatars/AvatarMixerSlave.cpp index 2ba54bd6b6..50ddcec92b 100644 --- a/assignment-client/src/avatars/AvatarMixerSlave.cpp +++ b/assignment-client/src/avatars/AvatarMixerSlave.cpp @@ -288,13 +288,19 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) // setup list of AvatarData as well as maps to map betweeen the AvatarData and the original nodes struct AvatarSortData { - SharedNodePointer _nodeShared; + AvatarSortData(const SharedNodePointer& nodeShared, AvatarData* avatarData, quint64 lastEncodeTime) + : _nodeShared(nodeShared) + , _node(nodeShared.data()) + , _avatarData(avatarData) + , _lastEncodeTime(lastEncodeTime) + { } + const SharedNodePointer& _nodeShared; Node* _node; AvatarData* _avatarData; quint64 _lastEncodeTime; }; + // Temporary info about the avatars we're sending: std::vector avatarsToSort; - avatarsToSort.reserve(nodeList->size()); //std::unordered_map avatarDataToNodes; //std::unordered_map avatarDataToNodesShared; //std::unordered_map avatarEncodeTimes; @@ -311,7 +317,7 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) //avatarDataToNodes[otherAvatar] = otherNode.data(); //avatarDataToNodesShared[otherAvatar] = otherNode; auto lastEncodeTime = nodeData->getLastOtherAvatarEncodeTime(otherAvatar->getSessionUUID()); - avatarsToSort.emplace_back(AvatarSortData({ otherNode, otherNodeRaw, otherAvatar, lastEncodeTime })); + avatarsToSort.emplace_back(AvatarSortData(otherNode, otherAvatar, lastEncodeTime)); } }); @@ -345,7 +351,6 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) AvatarData::_avatarSortCoefficientAge); // ignore or sort - const AvatarData* thisAvatar = nodeData->getAvatarSharedPointer().get(); for (const auto& avatar : avatarsToSort) { if (avatar._node == nodeRaw) { // don't echo updates to self @@ -437,7 +442,6 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) int remainingAvatars = (int)sortedAvatars.size(); auto traitsPacketList = NLPacketList::create(PacketType::BulkAvatarTraits, QByteArray(), true, true); while (!sortedAvatars.empty()) { - const AvatarData* avatarData = sortedAvatars.top().getAvatar(); const Node* otherNode = sortedAvatars.top().getNode(); sortedAvatars.pop(); remainingAvatars--; From 8a9ad421e7fd69338e74236dea9a629519f35ad1 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 28 Aug 2018 15:50:14 -0700 Subject: [PATCH 048/210] adding serverless file + redirection if conn fail --- interface/CMakeLists.txt | 5 +++ interface/resources/serverless/redirect.json | 1 + interface/src/Application.cpp | 33 ++++++++++++++++++++ interface/src/Application.h | 1 + libraries/networking/src/AddressManager.cpp | 2 +- libraries/networking/src/AddressManager.h | 1 + 6 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 interface/resources/serverless/redirect.json diff --git a/interface/CMakeLists.txt b/interface/CMakeLists.txt index 990d84a774..cd058add94 100644 --- a/interface/CMakeLists.txt +++ b/interface/CMakeLists.txt @@ -341,6 +341,8 @@ else() set(INTERFACE_EXEC_DIR "$") set(RESOURCES_DEV_DIR "${INTERFACE_EXEC_DIR}/resources") + message(STATUS "${RESOURCES_DEV_DIR}") + # copy the resources files beside the executable add_custom_command(TARGET ${TARGET_NAME} POST_BUILD COMMAND "${CMAKE_COMMAND}" -E copy_if_different @@ -360,6 +362,9 @@ else() COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${PROJECT_SOURCE_DIR}/resources/serverless/tutorial.json" "${RESOURCES_DEV_DIR}/serverless/tutorial.json" + COMMAND "${CMAKE_COMMAND}" -E copy_if_different + "${PROJECT_SOURCE_DIR}/resources/serverless/redirect.json" + "${RESOURCES_DEV_DIR}/serverless/redirect.json" # copy JSDoc files beside the executable COMMAND "${CMAKE_COMMAND}" -E copy_directory "${CMAKE_SOURCE_DIR}/tools/jsdoc/out" diff --git a/interface/resources/serverless/redirect.json b/interface/resources/serverless/redirect.json new file mode 100644 index 0000000000..d97f44220a --- /dev/null +++ b/interface/resources/serverless/redirect.json @@ -0,0 +1 @@ +{"DataVersion": 0, "Entities": [{"clientOnly": true, "created": "2018-08-28T16:44:23Z", "id": "{9a50eca4-5c97-4e21-8cb9-5197bb09770e}", "lastEdited": 1535474935077402, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "materialData": "{\"materials\":{\"albedoMap\":\"file:///C:/users/wayne/development/hifi-fork/interface/resources/images/buttonBezel.png\"}}", "materialURL": "materialData", "owningAvatarID": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "parentID": "{00000000-0000-0000-0000-000000000001}", "parentMaterialName": "2", "position": {"blue": 5.94891357421875, "green": 0, "red": 0.9275937080383301, "x": -3.07240629196167, "y": -9.5, "z": 1.94891357421875}, "priority": 1, "queryAACube": {"scale": 0.5196152329444885, "x": -5.904480457305908, "y": 0.8614521026611328, "z": -2.4799537658691406}, "type": "Material", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": true, "created": "2018-08-28T16:44:23Z", "id": "{2d90745c-2fe2-4f9c-9dcf-b715f7a9d0c0}", "lastEdited": 1535474935076550, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "materialData": "{\"materials\":{\"albedoMap\":\"file:///C:/users/wayne/development/hifi-fork/interface/resources/images/buttonBezel.png\"}}", "materialURL": "materialData", "owningAvatarID": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "parentID": "{00000000-0000-0000-0000-000000000001}", "parentMaterialName": "2", "position": {"blue": 5.94891357421875, "green": 0, "red": 0.9275937080383301, "x": -3.07240629196167, "y": -9.5, "z": 1.94891357421875}, "priority": 1, "queryAACube": {"scale": 0.5196152329444885, "x": -5.904480457305908, "y": 0.8614521026611328, "z": -2.4799537658691406}, "type": "Material", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": true, "created": "2018-08-28T16:44:23Z", "id": "{dcbca0fd-e1d8-4248-b2b4-b91346224876}", "lastEdited": 1535474935077745, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "materialData": "{\"materials\":{\"emissiveMap\":\"file:///C:/users/wayne/development/hifi-fork/interface/resources/images/buttonBezel_highlight.png\"}}", "materialURL": "materialData", "owningAvatarID": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "parentID": "{00000000-0000-0000-0000-000000000001}", "parentMaterialName": "2", "position": {"blue": 5.94891357421875, "green": 0, "red": 0.927593469619751, "x": -3.072406530380249, "y": -9.5, "z": 1.94891357421875}, "queryAACube": {"scale": 0.5196152329444885, "x": -5.904480457305908, "y": 0.8614521026611328, "z": -2.479954719543457}, "type": "Material", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": true, "created": "2018-08-28T16:44:23Z", "id": "{3df15ffb-9614-4ec1-81a8-e278d1917748}", "lastEdited": 1535474935076889, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "materialData": "{\"materials\":{\"emissiveMap\":\"file:///C:/users/wayne/development/hifi-fork/interface/resources/images/buttonBezel_highlight.png\"}}", "materialURL": "materialData", "owningAvatarID": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "parentID": "{00000000-0000-0000-0000-000000000001}", "parentMaterialName": "2", "position": {"blue": 5.94891357421875, "green": 0, "red": 0.9275937080383301, "x": -3.07240629196167, "y": -9.5, "z": 1.94891357421875}, "queryAACube": {"scale": 0.5196152329444885, "x": -5.904480457305908, "y": 0.8614521026611328, "z": -2.4799537658691406}, "type": "Material", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": true, "created": "2018-08-28T16:44:23Z", "id": "{fd138f98-d436-41d2-863a-cbef6e41e1cb}", "lastEdited": 1535474935078215, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "materialData": "{\"materials\":{\"albedoMap\":\"file:///C:/users/wayne/development/hifi-fork/interface/resources/images/buttonBezel.png\"}}", "materialURL": "materialData", "owningAvatarID": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "parentID": "{00000000-0000-0000-0000-000000000001}", "parentMaterialName": "2", "position": {"blue": 5.94891357421875, "green": 0, "red": 0.9275937080383301, "x": -3.07240629196167, "y": -9.5, "z": 1.94891357421875}, "priority": 1, "queryAACube": {"scale": 0.5196152329444885, "x": -5.904480457305908, "y": 0.8614521026611328, "z": -2.4799537658691406}, "type": "Material", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": true, "created": "2018-08-28T16:44:23Z", "id": "{b2a90f9e-a5ec-4faa-a6a3-bc457516f5ee}", "lastEdited": 1535474935077505, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "materialData": "{\"materials\":{\"albedoMap\":\"file:///C:/users/wayne/development/hifi-fork/interface/resources/images/buttonBezel.png\"}}", "materialURL": "materialData", "owningAvatarID": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "parentID": "{00000000-0000-0000-0000-000000000001}", "parentMaterialName": "2", "position": {"blue": 5.94891357421875, "green": 0, "red": 0.9275937080383301, "x": -3.07240629196167, "y": -9.5, "z": 1.94891357421875}, "priority": 1, "queryAACube": {"scale": 0.5196152329444885, "x": -5.904480457305908, "y": 0.8614521026611328, "z": -2.4799537658691406}, "type": "Material", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": true, "created": "2018-08-28T16:44:23Z", "id": "{5c9ef440-f022-4d21-9f00-22827851b522}", "lastEdited": 1535474935077201, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "materialData": "{\"materials\":{\"emissiveMap\":\"file:///C:/users/wayne/development/hifi-fork/interface/resources/images/buttonBezel_highlight.png\"}}", "materialURL": "materialData", "owningAvatarID": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "parentID": "{00000000-0000-0000-0000-000000000001}", "parentMaterialName": "2", "position": {"blue": 5.948914527893066, "green": 0.16741032898426056, "red": 0.9275782108306885, "x": -3.0724217891693115, "y": -9.33258967101574, "z": 1.9489145278930664}, "queryAACube": {"scale": 0.5196152329444885, "x": -5.904473781585693, "y": 1.028862476348877, "z": -2.479969024658203}, "type": "Material", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": true, "created": "2018-08-28T16:44:23Z", "id": "{2fe2296a-d74d-4ee7-bf7d-c9665bc63237}", "lastEdited": 1535474935076656, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "materialData": "{\"materials\":{\"emissiveMap\":\"file:///C:/users/wayne/development/hifi-fork/interface/resources/images/buttonBezel_highlight.png\"}}", "materialURL": "materialData", "owningAvatarID": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "parentID": "{00000000-0000-0000-0000-000000000001}", "parentMaterialName": "2", "position": {"blue": 5.94891357421875, "green": 0, "red": 0.9275937080383301, "x": -3.07240629196167, "y": -9.5, "z": 1.94891357421875}, "queryAACube": {"scale": 0.5196152329444885, "x": -5.904480457305908, "y": 0.8614521026611328, "z": -2.4799537658691406}, "type": "Material", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": true, "created": "2018-08-28T16:44:23Z", "id": "{86f1ba10-2921-45ad-bb74-dcbe5c49bc69}", "lastEdited": 1535474935077298, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "materialData": "{\"materials\":{\"emissiveMap\":\"file:///C:/users/wayne/development/hifi-fork/interface/resources/images/buttonBezel_highlight.png\"}}", "materialURL": "materialData", "owningAvatarID": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "parentID": "{00000000-0000-0000-0000-000000000001}", "parentMaterialName": "2", "position": {"blue": 5.94891357421875, "green": 0, "red": 0.9275937080383301, "x": -3.07240629196167, "y": -9.5, "z": 1.94891357421875}, "queryAACube": {"scale": 0.5196152329444885, "x": -5.904480457305908, "y": 0.8614521026611328, "z": -2.4799537658691406}, "type": "Material", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": true, "created": "2018-08-28T16:44:23Z", "id": "{1023380c-13dd-445d-bb57-1e02574e5cb3}", "lastEdited": 1535474935076124, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "materialData": "{\"materials\":{\"emissiveMap\":\"file:///C:/users/wayne/development/hifi-fork/interface/resources/images/buttonBezel_highlight.png\"}}", "materialURL": "materialData", "owningAvatarID": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "parentID": "{00000000-0000-0000-0000-000000000001}", "parentMaterialName": "2", "position": {"blue": 5.94891357421875, "green": 0, "red": 0.9275937080383301, "x": -3.07240629196167, "y": -9.5, "z": 1.94891357421875}, "queryAACube": {"scale": 0.5196152329444885, "x": -5.904480457305908, "y": 0.8614521026611328, "z": -2.4799537658691406}, "type": "Material", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": true, "created": "2018-08-28T16:44:23Z", "id": "{d5d841b2-0cc0-4ab2-84fe-dce3d20f6b04}", "lastEdited": 1535474935077609, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "materialData": "{\"materials\":{\"emissiveMap\":\"file:///C:/users/wayne/development/hifi-fork/interface/resources/images/buttonBezel_highlight.png\"}}", "materialURL": "materialData", "owningAvatarID": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "parentID": "{00000000-0000-0000-0000-000000000001}", "parentMaterialName": "2", "position": {"blue": 5.94891357421875, "green": 0, "red": 0.927593469619751, "x": -3.072406530380249, "y": -9.5, "z": 1.94891357421875}, "queryAACube": {"scale": 0.5196152329444885, "x": -5.904480457305908, "y": 0.8614521026611328, "z": -2.479954719543457}, "type": "Material", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": true, "created": "2018-08-28T16:44:23Z", "id": "{02da6c73-bab0-4e7e-b8fc-a9c0500ac66e}", "lastEdited": 1535474935075994, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "materialData": "{\"materials\":{\"albedoMap\":\"file:///C:/users/wayne/development/hifi-fork/interface/resources/images/buttonBezel.png\"}}", "materialURL": "materialData", "owningAvatarID": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "parentID": "{00000000-0000-0000-0000-000000000001}", "parentMaterialName": "2", "position": {"blue": 5.94891357421875, "green": 0, "red": 0.9275937080383301, "x": -3.07240629196167, "y": -9.5, "z": 1.94891357421875}, "priority": 1, "queryAACube": {"scale": 0.5196152329444885, "x": -5.904480457305908, "y": 0.8614521026611328, "z": -2.4799537658691406}, "type": "Material", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": true, "created": "2018-08-28T16:44:23Z", "id": "{f1c2110e-1429-49b2-949d-6c73718b2d65}", "lastEdited": 1535474935078059, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "materialData": "{\"materials\":{\"albedoMap\":\"file:///C:/users/wayne/development/hifi-fork/interface/resources/images/buttonBezel.png\"}}", "materialURL": "materialData", "owningAvatarID": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "parentID": "{00000000-0000-0000-0000-000000000001}", "parentMaterialName": "2", "position": {"blue": 5.94891357421875, "green": 0, "red": 0.9275937080383301, "x": -3.07240629196167, "y": -9.5, "z": 1.94891357421875}, "priority": 1, "queryAACube": {"scale": 0.5196152329444885, "x": -5.904480457305908, "y": 0.8614521026611328, "z": -2.4799537658691406}, "type": "Material", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": true, "created": "2018-08-28T16:44:23Z", "id": "{1e09084f-c0d7-4bd4-a78d-290c03391579}", "lastEdited": 1535474935076234, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "materialData": "{\"materials\":{\"emissiveMap\":\"file:///C:/users/wayne/development/hifi-fork/interface/resources/images/buttonBezel_highlight.png\"}}", "materialURL": "materialData", "owningAvatarID": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "parentID": "{00000000-0000-0000-0000-000000000001}", "parentMaterialName": "2", "position": {"blue": 5.94891357421875, "green": 0, "red": 0.927593469619751, "x": -3.072406530380249, "y": -9.5, "z": 1.94891357421875}, "queryAACube": {"scale": 0.5196152329444885, "x": -5.904480457305908, "y": 0.8614521026611328, "z": -2.479954719543457}, "type": "Material", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": true, "created": "2018-08-28T16:44:23Z", "id": "{e8282a17-76a5-4cd8-9f0e-473f097c8ad1}", "lastEdited": 1535474935077902, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "materialData": "{\"materials\":{\"albedoMap\":\"file:///C:/users/wayne/development/hifi-fork/interface/resources/images/buttonBezel.png\"}}", "materialURL": "materialData", "owningAvatarID": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "parentID": "{00000000-0000-0000-0000-000000000001}", "parentMaterialName": "2", "position": {"blue": 5.94891357421875, "green": 0, "red": 0.9275937080383301, "x": -3.07240629196167, "y": -9.5, "z": 1.94891357421875}, "priority": 1, "queryAACube": {"scale": 0.5196152329444885, "x": -5.904480457305908, "y": 0.8614521026611328, "z": -2.4799537658691406}, "type": "Material", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": true, "created": "2018-08-28T16:44:23Z", "id": "{46fbad8a-5bc0-44c8-a9ca-beb38f672d2a}", "lastEdited": 1535474935076994, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "materialData": "{\"materials\":{\"albedoMap\":\"file:///C:/users/wayne/development/hifi-fork/interface/resources/images/buttonBezel.png\"}}", "materialURL": "materialData", "owningAvatarID": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "parentID": "{00000000-0000-0000-0000-000000000001}", "parentMaterialName": "2", "position": {"blue": 5.94891357421875, "green": 0, "red": 0.9275937080383301, "x": -3.07240629196167, "y": -9.5, "z": 1.94891357421875}, "priority": 1, "queryAACube": {"scale": 0.5196152329444885, "x": -5.904480457305908, "y": 0.8614521026611328, "z": -2.4799537658691406}, "type": "Material", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": true, "created": "2018-08-28T16:44:23Z", "id": "{2861b544-1c03-439a-85ad-3758ba87ca55}", "lastEdited": 1535474935076339, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "materialData": "{\"materials\":{\"emissiveMap\":\"file:///C:/users/wayne/development/hifi-fork/interface/resources/images/buttonBezel_highlight.png\"}}", "materialURL": "materialData", "owningAvatarID": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "parentID": "{00000000-0000-0000-0000-000000000001}", "parentMaterialName": "2", "position": {"blue": 5.94891357421875, "green": 0, "red": 0.9275937080383301, "x": -3.07240629196167, "y": -9.5, "z": 1.94891357421875}, "queryAACube": {"scale": 0.5196152329444885, "x": -5.904480457305908, "y": 0.8614521026611328, "z": -2.4799537658691406}, "type": "Material", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": true, "created": "2018-08-28T16:44:23Z", "id": "{59b7fc7f-0100-4115-a9f8-55d5b45da540}", "lastEdited": 1535474935077098, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "materialData": "{\"materials\":{\"albedoMap\":\"file:///C:/users/wayne/development/hifi-fork/interface/resources/images/buttonBezel.png\"}}", "materialURL": "materialData", "owningAvatarID": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "parentID": "{00000000-0000-0000-0000-000000000001}", "parentMaterialName": "2", "position": {"blue": 5.94891357421875, "green": 0, "red": 0.9275937080383301, "x": -3.07240629196167, "y": -9.5, "z": 1.94891357421875}, "priority": 1, "queryAACube": {"scale": 0.5196152329444885, "x": -5.904480457305908, "y": 0.8614521026611328, "z": -2.4799537658691406}, "type": "Material", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": true, "created": "2018-08-28T16:44:23Z", "id": "{2888e4b0-6eb1-4468-9b95-893dcb3e99a5}", "lastEdited": 1535474935076443, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "materialData": "{\"materials\":{\"emissiveMap\":\"file:///C:/users/wayne/development/hifi-fork/interface/resources/images/buttonBezel_highlight.png\"}}", "materialURL": "materialData", "owningAvatarID": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "parentID": "{00000000-0000-0000-0000-000000000001}", "parentMaterialName": "2", "position": {"blue": 5.94891357421875, "green": 0, "red": 0.9275937080383301, "x": -3.07240629196167, "y": -9.5, "z": 1.94891357421875}, "queryAACube": {"scale": 0.5196152329444885, "x": -5.904480457305908, "y": 0.8614521026611328, "z": -2.4799537658691406}, "type": "Material", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": true, "created": "2018-08-28T16:44:23Z", "id": "{36f00cad-64b0-415f-9f70-e92cd85836d8}", "lastEdited": 1535474935076783, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "materialData": "{\"materials\":{\"albedoMap\":\"file:///C:/users/wayne/development/hifi-fork/interface/resources/images/buttonBezel.png\"}}", "materialURL": "materialData", "owningAvatarID": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "parentID": "{00000000-0000-0000-0000-000000000001}", "parentMaterialName": "2", "position": {"blue": 5.94891357421875, "green": 0, "red": 0.9275937080383301, "x": -3.07240629196167, "y": -9.5, "z": 1.94891357421875}, "priority": 1, "queryAACube": {"scale": 0.5196152329444885, "x": -5.904480457305908, "y": 0.8614521026611328, "z": -2.4799537658691406}, "type": "Material", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": false, "created": "2018-08-28T16:44:23Z", "dimensions": {"blue": 14.40000057220459, "green": 14.40000057220459, "red": 14.40000057220459, "x": 14.40000057220459, "y": 14.40000057220459, "z": 14.40000057220459}, "id": "{2cefd6b6-6a00-49c3-87c8-71b9c83f96f1}", "lastEdited": 1535474935056115, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": {"blue": 2.3440732955932617, "green": 1.7684326171875, "red": 1.8812973499298096, "x": -2.1187026500701904, "y": -7.7315673828125, "z": -1.6559267044067383}, "queryAACube": {"scale": 24.9415340423584, "x": -10.589469909667969, "y": -10.7023344039917, "z": -10.126693725585938}, "rotation": {"w": 0.8697794675827026, "x": -1.52587890625e-05, "y": 0.4933699369430542, "z": -4.57763671875e-05}, "shapeType": "box", "skyboxMode": "enabled", "type": "Zone", "userData": "{\"grabbableKey\":{\"grabbable\":false}}"}, {"clientOnly": false, "color": {"blue": 0, "green": 0, "red": 0}, "created": "2018-08-28T16:44:23Z", "dimensions": {"blue": 11.117486953735352, "green": 3.580313205718994, "red": 0.20000000298023224, "x": 0.20000000298023224, "y": 3.580313205718994, "z": 11.117486953735352}, "id": "{efde7819-3a7a-4984-ac3e-28bcf69c6b1e}", "lastEdited": 1535474935053285, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": {"blue": 0, "green": 1.1583251953125, "red": 4.971565246582031, "x": 0.9715652465820312, "y": -8.3416748046875, "z": -4}, "queryAACube": {"scale": 11.681488037109375, "x": -0.8691787719726562, "y": -4.6824188232421875, "z": -5.8407440185546875}, "rotation": {"w": 0.8637980222702026, "x": -4.57763671875e-05, "y": 0.5038070678710938, "z": -1.52587890625e-05}, "shape": "Cube", "type": "Box", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": false, "color": {"blue": 0, "green": 0, "red": 0}, "created": "2018-08-28T16:44:23Z", "dimensions": {"blue": 11.117486953735352, "green": 3.580313205718994, "red": 0.20000000298023224, "x": 0.20000000298023224, "y": 3.580313205718994, "z": 11.117486953735352}, "id": "{fe8d6b12-3697-4fcd-9092-af5b7f49a7f5}", "lastEdited": 1535474947253763, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": {"blue": 5.268576622009277, "green": 1.1588134765625, "red": 6.100250244140625, "x": 2.100250244140625, "y": -8.3411865234375, "z": 1.2685766220092773}, "queryAACube": {"scale": 11.681488037109375, "x": 0.2595062255859375, "y": -4.6819305419921875, "z": -0.5721673965454102}, "rotation": {"w": 0.9662165641784668, "x": -4.57763671875e-05, "y": -0.2576791048049927, "z": 1.52587890625e-05}, "shape": "Cube", "type": "Box", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": false, "created": "2018-08-28T16:44:23Z", "dimensions": {"blue": 0.06014331430196762, "green": 2.582186460494995, "red": 2.582186698913574, "x": 2.582186698913574, "y": 2.582186460494995, "z": 0.06014331430196762}, "id": "{c8f9b1b1-3bd7-473c-8c2a-a8644a7acdd7}", "lastEdited": 1535474935054058, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "modelURL": "http://hifi-content.s3.amazonaws.com/alexia/LoadingScreens/oopsDialog.fbx", "name": "Oops Dialog", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": {"blue": 1.45927095413208, "green": 1.6763916015625, "red": 0, "x": -4, "y": -7.8236083984375, "z": -2.54072904586792}, "queryAACube": {"scale": 3.6522583961486816, "x": -1.8261291980743408, "y": -0.14973759651184082, "z": -0.36685824394226074}, "rotation": {"w": 0.8684672117233276, "x": -4.57763671875e-05, "y": 0.4957197904586792, "z": -7.62939453125e-05}, "type": "Model", "userData": "{\"grabbableKey\":{\"grabbable\":false}}"}, {"angularDamping": 0, "clientOnly": false, "color": {"blue": 0, "green": 0, "red": 255}, "created": "2018-08-28T16:44:23Z", "dimensions": {"blue": 0.20000000298023224, "green": 0.20000000298023224, "red": 0.20000000298023224, "x": 0.20000000298023224, "y": 0.20000000298023224, "z": 0.20000000298023224}, "id": "{d0b0491a-5c7d-4cd2-9ebe-492b709a702b}", "lastEdited": 1535474935052912, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "name": "Particle Rotate", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": {"blue": 3.8216662406921387, "green": 0, "red": 1.2409718036651611, "x": -2.759028196334839, "y": -9.5, "z": -0.17833375930786133}, "queryAACube": {"scale": 0.3464101552963257, "x": 1.0677666664123535, "y": -0.17320507764816284, "z": 3.648461103439331}, "rotation": {"w": 0.6444342136383057, "x": -0.08220034837722778, "y": -0.6649118661880493, "z": 0.3684900999069214}, "script": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/rotate.js", "scriptTimestamp": 1532724769253, "shape": "Cube", "type": "Box", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"angularDamping": 0, "clientOnly": false, "color": {"blue": 0, "green": 0, "red": 255}, "created": "2018-08-28T16:44:23Z", "dimensions": {"blue": 0.20000000298023224, "green": 0.20000000298023224, "red": 0.20000000298023224, "x": 0.20000000298023224, "y": 0.20000000298023224, "z": 0.20000000298023224}, "id": "{ae4a84ee-4e95-4e6b-b63d-399893a9b3f9}", "lastEdited": 1535474935052114, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "name": "Particle Rotate", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": {"blue": 1.3116319179534912, "green": 0, "red": 2.705613613128662, "x": -1.294386386871338, "y": -9.5, "z": -2.688368082046509}, "queryAACube": {"scale": 0.3464101552963257, "x": 2.5324084758758545, "y": -0.17320507764816284, "z": 1.1384267807006836}, "rotation": {"w": 0.9127794504165649, "x": 0.2575265169143677, "y": 0.15553522109985352, "z": 0.2761729955673218}, "script": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/rotate.js", "scriptTimestamp": 1532724769253, "shape": "Cube", "type": "Box", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"angularDamping": 0, "clientOnly": false, "color": {"blue": 0, "green": 0, "red": 255}, "created": "2018-08-28T16:44:23Z", "dimensions": {"blue": 0.20000000298023224, "green": 0.20000000298023224, "red": 0.20000000298023224, "x": 0.20000000298023224, "y": 0.20000000298023224, "z": 0.20000000298023224}, "id": "{c1404297-9c6a-4d2d-b91d-c844ddd391db}", "lastEdited": 1535474935051740, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "name": "Particle Rotate", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": {"blue": 3.8216662406921387, "green": 0.0772705078125, "red": 1.2409718036651611, "x": -2.759028196334839, "y": -9.4227294921875, "z": -0.17833375930786133}, "queryAACube": {"scale": 0.3464101552963257, "x": 1.0677666664123535, "y": -0.09593456983566284, "z": 3.648461103439331}, "rotation": {"w": 0.926024317741394, "x": 0.20308232307434082, "y": -0.010269343852996826, "z": 0.3179827928543091}, "script": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/rotate.js", "scriptTimestamp": 1532724769253, "shape": "Cube", "type": "Box", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": false, "created": "2018-08-28T16:44:23Z", "dimensions": {"blue": 9.030570983886719, "green": 0.0719478651881218, "red": 9.030570983886719, "x": 9.030570983886719, "y": 0.0719478651881218, "z": 9.030570983886719}, "id": "{f17920f3-1571-4c5e-b002-e328cf202037}", "lastEdited": 1535474950564649, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "modelURL": "http://hifi-content.s3.amazonaws.com/alexia/LoadingScreens/floor.fbx", "name": "Floor", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": {"blue": 4.2324604988098145, "green": 0.17547607421875, "red": 4.802988529205322, "x": 0.8029885292053223, "y": -9.32452392578125, "z": 0.23246049880981445}, "queryAACube": {"scale": 12.771358489990234, "x": -1.582690715789795, "y": -6.210203170776367, "z": -2.1532187461853027}, "rotation": {"w": 0.8648051023483276, "x": -1.52587890625e-05, "y": 0.5020675659179688, "z": -4.57763671875e-05}, "shapeType": "simple-hull", "type": "Model", "userData": "{\"grabbableKey\":{\"grabbable\":false}}"}, {"alpha": 0, "alphaFinish": 0, "alphaStart": 0.25, "clientOnly": false, "colorFinish": {"blue": 0, "green": 0, "red": 0, "x": 0, "y": 0, "z": 0}, "colorStart": {"blue": 255, "green": 255, "red": 255, "x": 255, "y": 255, "z": 255}, "created": "2018-08-28T16:44:23Z", "dimensions": {"blue": 13.24000072479248, "green": 13.24000072479248, "red": 13.24000072479248, "x": 13.24000072479248, "y": 13.24000072479248, "z": 13.24000072479248}, "emitAcceleration": {"blue": 0, "green": 0.10000000149011612, "red": 0, "x": 0, "y": 0.10000000149011612, "z": 0}, "emitDimensions": {"blue": 1, "green": 1, "red": 1, "x": 1, "y": 1, "z": 1}, "emitOrientation": {"w": 1, "x": -1.52587890625e-05, "y": -1.52587890625e-05, "z": -1.52587890625e-05}, "emitRate": 6, "emitSpeed": 0, "id": "{7561445a-4f9c-41aa-96b9-b8ce8ad686d3}", "lastEdited": 1535474935056499, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "lifespan": 10, "maxParticles": 10, "name": "Stars", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "particleRadius": 0.07000000029802322, "polarFinish": 3.1415927410125732, "position": {"blue": 1.3712034225463867, "green": 0.5220947265625, "red": 2.6281180381774902, "x": -1.3718819618225098, "y": -8.9779052734375, "z": -2.6287965774536133}, "queryAACube": {"scale": 22.932353973388672, "x": -8.838058471679688, "y": -10.944082260131836, "z": -10.09497356414795}, "radiusFinish": 0, "radiusStart": 0, "rotation": {"w": 0.9852597713470459, "x": -1.52587890625e-05, "y": -0.17106890678405762, "z": -7.62939453125e-05}, "speedSpread": 0, "spinFinish": null, "spinStart": null, "textures": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/star.png", "type": "ParticleEffect", "userData": "{\"grabbableKey\":{\"grabbable\":false}}"}, {"alpha": 0, "alphaFinish": 0, "alphaStart": 1, "clientOnly": false, "color": {"blue": 255, "green": 205, "red": 3}, "colorFinish": {"blue": 0, "green": 0, "red": 0, "x": 0, "y": 0, "z": 0}, "colorStart": {"blue": 255, "green": 204, "red": 0, "x": 0, "y": 204, "z": 255}, "created": "2018-08-28T16:44:23Z", "dimensions": {"blue": 2.5, "green": 2.5, "red": 2.5, "x": 2.5, "y": 2.5, "z": 2.5}, "emitAcceleration": {"blue": 0, "green": 0, "red": 0, "x": 0, "y": 0, "z": 0}, "emitDimensions": {"blue": 1, "green": 1, "red": 1, "x": 1, "y": 1, "z": 1}, "emitOrientation": {"w": 0.9993909597396851, "x": 0.034897372126579285, "y": -1.525880907138344e-05, "z": -1.525880907138344e-05}, "emitRate": 2, "emitSpeed": 0, "emitterShouldTrail": true, "id": "{7c59b77f-2f88-4c35-899b-3e42bd486ed6}", "lastEdited": 1535474935050547, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "lifespan": 10, "maxParticles": 40, "name": "Rays", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "particleRadius": 0.75, "polarFinish": 3.1415927410125732, "position": {"blue": 3.814434051513672, "green": 1.44122314453125, "red": 1.2319090366363525, "x": -2.7680909633636475, "y": -8.05877685546875, "z": -0.18556594848632812}, "queryAACube": {"scale": 4.330127239227295, "x": -0.9331545829772949, "y": -0.7238404750823975, "z": 1.6493704319000244}, "radiusFinish": 0.10000000149011612, "radiusStart": 0, "rotation": {"w": 0.9594720602035522, "x": -1.52587890625e-05, "y": 0.28178834915161133, "z": -4.57763671875e-05}, "speedSpread": 0, "spinFinish": null, "spinStart": null, "textures": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/stripe.png", "type": "ParticleEffect", "userData": "{\"grabbableKey\":{\"grabbable\":false}}"}, {"angularDamping": 0, "clientOnly": false, "color": {"blue": 0, "green": 0, "red": 255}, "created": "2018-08-28T16:44:23Z", "dimensions": {"blue": 0.20000000298023224, "green": 0.20000000298023224, "red": 0.20000000298023224, "x": 0.20000000298023224, "y": 0.20000000298023224, "z": 0.20000000298023224}, "id": "{55dd2b28-1c53-431b-b2ea-61155dfc6652}", "lastEdited": 1535474935055239, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "name": "Particle Rotate", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": {"blue": 1.3116319179534912, "green": 0.15618896484375, "red": 2.705613613128662, "x": -1.294386386871338, "y": -9.34381103515625, "z": -2.688368082046509}, "queryAACube": {"scale": 0.3464101552963257, "x": 2.5324084758758545, "y": -0.017016112804412842, "z": 1.1384267807006836}, "rotation": {"w": 0.46953535079956055, "x": -0.16719311475753784, "y": -0.7982757091522217, "z": 0.3380941152572632}, "script": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/rotate.js", "scriptTimestamp": 1532724769253, "shape": "Cube", "type": "Box", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"angularDamping": 0, "clientOnly": false, "color": {"blue": 0, "green": 0, "red": 255}, "created": "2018-08-28T16:44:23Z", "dimensions": {"blue": 0.20000000298023224, "green": 0.20000000298023224, "red": 0.20000000298023224, "x": 0.20000000298023224, "y": 0.20000000298023224, "z": 0.20000000298023224}, "id": "{f40563f7-01e3-4faf-ad1b-19cab7a386a1}", "lastEdited": 1535474935054426, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "name": "Particle Rotate", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": {"blue": 1.3116319179534912, "green": 0.0772705078125, "red": 2.705613613128662, "x": -1.294386386871338, "y": -9.4227294921875, "z": -2.688368082046509}, "queryAACube": {"scale": 0.3464101552963257, "x": 2.5324084758758545, "y": -0.09593456983566284, "z": 1.1384267807006836}, "rotation": {"w": -0.38777750730514526, "x": -0.37337303161621094, "y": -0.8409399390220642, "z": 0.055222392082214355}, "script": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/rotate.js", "scriptTimestamp": 1532724769253, "shape": "Cube", "type": "Box", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"alpha": 0, "alphaFinish": 0, "alphaStart": 1, "clientOnly": false, "color": {"blue": 211, "green": 227, "red": 104}, "colorFinish": {"blue": 0, "green": 0, "red": 0, "x": 0, "y": 0, "z": 0}, "colorStart": {"blue": 211, "green": 227, "red": 104, "x": 104, "y": 227, "z": 211}, "created": "2018-08-28T16:44:23Z", "dimensions": {"blue": 2.5, "green": 2.5, "red": 2.5, "x": 2.5, "y": 2.5, "z": 2.5}, "emitAcceleration": {"blue": 0, "green": 0, "red": 0, "x": 0, "y": 0, "z": 0}, "emitDimensions": {"blue": 1, "green": 1, "red": 1, "x": 1, "y": 1, "z": 1}, "emitOrientation": {"w": 0.9993909597396851, "x": 0.034897372126579285, "y": -1.525880907138344e-05, "z": -1.525880907138344e-05}, "emitRate": 2, "emitSpeed": 0, "id": "{c4a86707-2eaa-41f5-a1ad-3e6029178d75}", "lastEdited": 1535474935052538, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "lifespan": 10, "maxParticles": 40, "name": "Rays", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "particleRadius": 0.75, "polarFinish": 3.1415927410125732, "position": {"blue": 1.3553659915924072, "green": 1.44122314453125, "red": 2.572803497314453, "x": -1.4271965026855469, "y": -8.05877685546875, "z": -2.6446340084075928}, "queryAACube": {"scale": 4.330127239227295, "x": 0.40773987770080566, "y": -0.7238404750823975, "z": -0.8096976280212402}, "radiusFinish": 0.10000000149011612, "radiusStart": 0, "rotation": {"w": 0.9803768396377563, "x": -1.52587890625e-05, "y": 0.19707024097442627, "z": -7.62939453125e-05}, "speedSpread": 0, "spinFinish": null, "spinStart": null, "textures": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/stripe.png", "type": "ParticleEffect", "userData": "{\"grabbableKey\":{\"grabbable\":false}}"}, {"angularDamping": 0, "clientOnly": false, "color": {"blue": 0, "green": 0, "red": 255}, "created": "2018-08-28T16:44:23Z", "dimensions": {"blue": 0.20000000298023224, "green": 0.20000000298023224, "red": 0.20000000298023224, "x": 0.20000000298023224, "y": 0.20000000298023224, "z": 0.20000000298023224}, "id": "{65dd9c7f-815d-4b50-ba3b-24709691aed1}", "lastEdited": 1535474935056805, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "name": "Particle Rotate", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": {"blue": 3.8216662406921387, "green": 0.15618896484375, "red": 1.2409718036651611, "x": -2.759028196334839, "y": -9.34381103515625, "z": -0.17833375930786133}, "queryAACube": {"scale": 0.3464101552963257, "x": 1.0677666664123535, "y": -0.017016112804412842, "z": 3.648461103439331}, "rotation": {"w": 0.6747081279754639, "x": -0.06532388925552368, "y": -0.6342412233352661, "z": 0.37175559997558594}, "script": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/rotate.js", "scriptTimestamp": 1532724769253, "shape": "Cube", "type": "Box", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": false, "color": {"blue": 0, "green": 0, "red": 0}, "created": "2018-08-28T16:44:23Z", "dimensions": {"blue": 11.117486953735352, "green": 3.580313205718994, "red": 0.20000000298023224, "x": 0.20000000298023224, "y": 3.580313205718994, "z": 11.117486953735352}, "id": "{4e0f3381-ac88-48ab-9378-0b7818188234}", "lastEdited": 1535474935053657, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": {"blue": 6.1806135177612305, "green": 1.1588134765625, "red": 1.4755167961120605, "x": -2.5244832038879395, "y": -8.3411865234375, "z": 2.1806135177612305}, "queryAACube": {"scale": 11.681488037109375, "x": -4.365227222442627, "y": -4.6819305419921875, "z": 0.33986949920654297}, "rotation": {"w": 0.8637980222702026, "x": -4.57763671875e-05, "y": 0.5038070678710938, "z": -1.52587890625e-05}, "shape": "Cube", "type": "Box", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": false, "color": {"blue": 0, "green": 0, "red": 0}, "created": "2018-08-28T16:44:23Z", "dimensions": {"blue": 11.117486953735352, "green": 3.580313205718994, "red": 0.20000000298023224, "x": 0.20000000298023224, "y": 3.580313205718994, "z": 11.117486953735352}, "id": "{2da3a1d6-c757-4cc3-b20c-d7ec87eedd52}", "lastEdited": 1535474935050931, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": {"blue": 1.9063844680786133, "green": 1.15850830078125, "red": 0.16632509231567383, "x": -3.833674907684326, "y": -8.34149169921875, "z": -2.0936155319213867}, "queryAACube": {"scale": 11.681488037109375, "x": -5.674418926239014, "y": -4.6822357177734375, "z": -3.934359550476074}, "rotation": {"w": 0.9666743278503418, "x": -4.57763671875e-05, "y": -0.2560006380081177, "z": 1.52587890625e-05}, "shape": "Cube", "type": "Box", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"alpha": 0, "alphaFinish": 0, "alphaStart": 0.25, "clientOnly": false, "colorFinish": {"blue": 0, "green": 0, "red": 0, "x": 0, "y": 0, "z": 0}, "colorStart": {"blue": 255, "green": 255, "red": 255, "x": 255, "y": 255, "z": 255}, "created": "2018-08-28T16:44:23Z", "dimensions": {"blue": 13.24000072479248, "green": 13.24000072479248, "red": 13.24000072479248, "x": 13.24000072479248, "y": 13.24000072479248, "z": 13.24000072479248}, "emitAcceleration": {"blue": 0, "green": 0.10000000149011612, "red": 0, "x": 0, "y": 0.10000000149011612, "z": 0}, "emitDimensions": {"blue": 1, "green": 1, "red": 1, "x": 1, "y": 1, "z": 1}, "emitOrientation": {"w": 1, "x": -1.52587890625e-05, "y": -1.52587890625e-05, "z": -1.52587890625e-05}, "emitRate": 6, "emitSpeed": 0, "emitterShouldTrail": true, "id": "{7db57102-9a57-48d6-9937-bcec7892c3d9}", "lastEdited": 1535474935058139, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "lifespan": 10, "maxParticles": 10, "name": "Stars", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "particleRadius": 0.07000000029802322, "polarFinish": 3.1415927410125732, "position": {"blue": 3.78922963142395, "green": 0.5220947265625, "red": 1.1928560733795166, "x": -2.8071439266204834, "y": -8.9779052734375, "z": -0.2107703685760498}, "queryAACube": {"scale": 22.932353973388672, "x": -10.273321151733398, "y": -10.944082260131836, "z": -7.676947593688965}, "radiusFinish": 0, "radiusStart": 0, "rotation": {"w": 0.996429443359375, "x": -1.52587890625e-05, "y": -0.08442819118499756, "z": -4.57763671875e-05}, "speedSpread": 0, "spinFinish": null, "spinStart": null, "textures": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/star.png", "type": "ParticleEffect", "userData": "{\"grabbableKey\":{\"grabbable\":false}}"}, {"clientOnly": false, "created": "2018-08-28T16:44:23Z", "dimensions": {"blue": 2.1097896099090576, "green": 0.04847164824604988, "red": 1.458284616470337, "x": 1.458284616470337, "y": 0.04847164824604988, "z": 2.1097896099090576}, "id": "{434940be-0b45-4ca2-97db-91e698c20bfd}", "lastEdited": 1535474935055655, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "modelURL": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/portal2.fbx", "name": "Back", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": {"blue": 1.5835940837860107, "green": 0.2467041015625, "red": 3.0345542430877686, "x": -0.9654457569122314, "y": -9.2532958984375, "z": -2.4164059162139893}, "queryAACube": {"scale": 2.5651814937591553, "x": 1.751963496208191, "y": -1.0358866453170776, "z": 0.3010033369064331}, "rotation": {"w": 0.9084458351135254, "x": -1.52587890625e-05, "y": 0.4179598093032837, "z": -0.0001068115234375}, "type": "Model", "userData": "{\"grabbableKey\":{\"grabbable\":true}}"}, {"clientOnly": false, "created": "2018-08-28T16:44:23Z", "dimensions": {"blue": 2.1097896099090576, "green": 0.04847164824604988, "red": 1.458284616470337, "x": 1.458284616470337, "y": 0.04847164824604988, "z": 2.1097896099090576}, "id": "{5f853b12-33b9-4f40-92a8-4506047fdcd8}", "lastEdited": 1535474935051356, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "modelURL": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/portal1.fbx", "name": "Try Again", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": {"blue": 3.946338653564453, "green": 0.2467041015625, "red": 1.6013128757476807, "x": -2.3986871242523193, "y": -9.2532958984375, "z": -0.053661346435546875}, "queryAACube": {"scale": 2.5651814937591553, "x": 0.318722128868103, "y": -1.0358866453170776, "z": 2.663747787475586}, "rotation": {"w": 0.8220492601394653, "x": -1.52587890625e-05, "y": 0.5693598985671997, "z": -0.0001068115234375}, "type": "Model", "userData": "{\"grabbableKey\":{\"grabbable\":true}}"}], "Id": "{aa6032b9-9c35-4481-acd9-03b97400b83a}", "Version": 93} \ No newline at end of file diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index e290531471..7a8dd6c767 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -1193,7 +1193,11 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo getOverlays().deleteOverlay(getTabletHomeButtonID()); getOverlays().deleteOverlay(getTabletFrameID()); }); +#if defined(Q_OS_ANDROID) connect(&domainHandler, &DomainHandler::domainConnectionRefused, this, &Application::domainConnectionRefused); +#else + connect(&domainHandler, &DomainHandler::domainConnectionRefused, this, &Application::domainConnectionRedirect); +#endif // We could clear ATP assets only when changing domains, but it's possible that the domain you are connected // to has gone down and switched to a new content set, so when you reconnect the cached ATP assets will no longer be valid. @@ -2313,6 +2317,35 @@ void Application::domainConnectionRefused(const QString& reasonMessage, int reas } } +void Application::domainConnectionRedirect(const QString& reasonMessage, int reasonCodeInt, const QString& extraInfo) { + DomainHandler::ConnectionRefusedReason reasonCode = static_cast(reasonCodeInt); + auto addressManager = DependencyManager::get(); + + if (reasonCode == DomainHandler::ConnectionRefusedReason::TooManyUsers && !extraInfo.isEmpty()) { + addressManager->handleLookupString(extraInfo); + return; + } + + switch (reasonCode) { + case DomainHandler::ConnectionRefusedReason::ProtocolMismatch: + case DomainHandler::ConnectionRefusedReason::TooManyUsers: + case DomainHandler::ConnectionRefusedReason::Unknown: { + QString message = "Unable to connect to the location you are visiting.\n"; + message += reasonMessage; + //OffscreenUi::asyncWarning("", message); + addressManager->handleLookupString(REDIRECT_HIFI_ADDRESS); + getMyAvatar()->setWorldVelocity(glm::vec3(0.0f)); + // in (w, x, y, z) component-structure for the constructor + getMyAvatar()->setWorldOrientation(glm::quat(0.8775935173034668f, 0.0f, 0.4794054925441742f, 0.0f)); + break; + } + default: + // nothing to do. + break; + } +} + + QString Application::getUserAgent() { if (QThread::currentThread() != thread()) { QString userAgent; diff --git a/interface/src/Application.h b/interface/src/Application.h index ae7e686f35..5255bb7d63 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -471,6 +471,7 @@ private slots: void updateDisplayMode(); void setDisplayPlugin(DisplayPluginPointer newPlugin); void domainConnectionRefused(const QString& reasonMessage, int reason, const QString& extraInfo); + void domainConnectionRedirect(const QString& reasonMessage, int reason, const QString& extraInfo); void addAssetToWorldCheckModelSize(); diff --git a/libraries/networking/src/AddressManager.cpp b/libraries/networking/src/AddressManager.cpp index 00e552af89..0b69fda3fa 100644 --- a/libraries/networking/src/AddressManager.cpp +++ b/libraries/networking/src/AddressManager.cpp @@ -31,6 +31,7 @@ #include "udt/PacketHeaders.h" const QString DEFAULT_HIFI_ADDRESS = "file:///~/serverless/tutorial.json"; +const QString REDIRECT_HIFI_ADDRESS = "file:///~/serverless/redirect.json"; const QString ADDRESS_MANAGER_SETTINGS_GROUP = "AddressManager"; const QString SETTINGS_CURRENT_ADDRESS_KEY = "address"; @@ -709,7 +710,6 @@ bool AddressManager::handleViewpoint(const QString& viewpointString, bool should // We use _newHostLookupPath to determine if the client has already stored its last address // before moving to a new host thanks to the information in the same lookup URL. - if (definitelyPathOnly || (!pathString.isEmpty() && pathString != _newHostLookupPath) || trigger == Back || trigger == Forward) { addCurrentAddressToHistory(trigger); diff --git a/libraries/networking/src/AddressManager.h b/libraries/networking/src/AddressManager.h index 37b85a9acd..245517d8cd 100644 --- a/libraries/networking/src/AddressManager.h +++ b/libraries/networking/src/AddressManager.h @@ -23,6 +23,7 @@ #include "AccountManager.h" extern const QString DEFAULT_HIFI_ADDRESS; +extern const QString REDIRECT_HIFI_ADDRESS; const QString SANDBOX_HIFI_ADDRESS = "hifi://localhost"; const QString INDEX_PATH = "/"; From 4b7f6a346fecaf0b8b9e508254dfff805498227f Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Tue, 28 Aug 2018 16:21:47 -0700 Subject: [PATCH 049/210] Use AvatarData::getClientGlobalPosition() for position in priority queue It looks like it's the same as world position with the avatar mixer. Also use one time stamp for current time in priority queue; use std::chrono for some other timestamps in hope that it's faster. Fix priority-code logic bug. --- .../src/avatars/AvatarMixerSlave.cpp | 26 +++++++++---------- libraries/shared/src/PrioritySortUtil.h | 12 ++++++--- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/assignment-client/src/avatars/AvatarMixerSlave.cpp b/assignment-client/src/avatars/AvatarMixerSlave.cpp index 50ddcec92b..f0c291b2c2 100644 --- a/assignment-client/src/avatars/AvatarMixerSlave.cpp +++ b/assignment-client/src/avatars/AvatarMixerSlave.cpp @@ -13,6 +13,7 @@ #include #include +#include #include #include @@ -33,6 +34,8 @@ #include "AvatarMixer.h" #include "AvatarMixerClientData.h" +namespace chrono = std::chrono; + void AvatarMixerSlave::configure(ConstIter begin, ConstIter end) { _begin = begin; _end = end; @@ -301,9 +304,7 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) }; // Temporary info about the avatars we're sending: std::vector avatarsToSort; - //std::unordered_map avatarDataToNodes; - //std::unordered_map avatarDataToNodesShared; - //std::unordered_map avatarEncodeTimes; + avatarsToSort.reserve(_end - _begin); std::for_each(_begin, _end, [&](const SharedNodePointer& otherNode) { Node* otherNodeRaw = otherNode.data(); // make sure this is an agent that we have avatar data for before considering it for inclusion @@ -313,9 +314,6 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) AvatarData* otherAvatar = otherNodeData->getAvatarSharedPointer().get(); - //avatarsToSort.push_back(otherAvatar); - //avatarDataToNodes[otherAvatar] = otherNode.data(); - //avatarDataToNodesShared[otherAvatar] = otherNode; auto lastEncodeTime = nodeData->getLastOtherAvatarEncodeTime(otherAvatar->getSessionUUID()); avatarsToSort.emplace_back(AvatarSortData(otherNode, otherAvatar, lastEncodeTime)); } @@ -326,7 +324,7 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) SortableAvatar() = delete; SortableAvatar(const AvatarData* avatar, const Node* avatarNode, uint64_t lastEncodeTime) : _avatar(avatar), _node(avatarNode), _lastEncodeTime(lastEncodeTime) {} - glm::vec3 getPosition() const override { return _avatar->getWorldPosition(); } + glm::vec3 getPosition() const override { return _avatar->getClientGlobalPosition(); } float getRadius() const override { glm::vec3 nodeBoxHalfScale = (_avatar->getWorldPosition() - _avatar->getGlobalBoundingBoxCorner() * _avatar->getSensorToWorldScale()); return glm::max(nodeBoxHalfScale.x, glm::max(nodeBoxHalfScale.y, nodeBoxHalfScale.z)); @@ -452,7 +450,7 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) int minimRemainingAvatarBytes = minimumBytesPerAvatar * remainingAvatars; bool overBudget = (identityBytesSent + numAvatarDataBytes + minimRemainingAvatarBytes) > maxAvatarBytesPerFrame; - quint64 startAvatarDataPacking = usecTimestampNow(); + auto startAvatarDataPacking = chrono::high_resolution_clock::now(); ++numOtherAvatars; @@ -504,12 +502,13 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) AvatarDataPacket::HasFlags hasFlagsOut; // the result of the toByteArray bool dropFaceTracking = false; - quint64 start = usecTimestampNow(); + auto startSerialize = chrono::high_resolution_clock::now(); QByteArray bytes = otherAvatar->toByteArray(detail, lastEncodeForOther, lastSentJointsForOther, hasFlagsOut, dropFaceTracking, distanceAdjust, viewerPosition, &lastSentJointsForOther); - quint64 end = usecTimestampNow(); - _stats.toByteArrayElapsedTime += (end - start); + auto endSerialize = chrono::high_resolution_clock::now(); + _stats.toByteArrayElapsedTime += + (quint64) chrono::duration_cast(endSerialize - startSerialize).count(); static auto maxAvatarDataBytes = avatarPacketList->getMaxSegmentSize() - NUM_BYTES_RFC4122_UUID; if (bytes.size() > maxAvatarDataBytes) { @@ -558,8 +557,9 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) avatarPacketList->endSegment(); - quint64 endAvatarDataPacking = usecTimestampNow(); - _stats.avatarDataPackingElapsedTime += (endAvatarDataPacking - startAvatarDataPacking); + auto endAvatarDataPacking = chrono::high_resolution_clock::now(); + _stats.avatarDataPackingElapsedTime += + (quint64) chrono::duration_cast(endAvatarDataPacking - startAvatarDataPacking).count(); // use helper to add any changed traits to our packet list traitBytesSent += addChangedTraitsToBulkPacket(nodeData, otherNodeData, *traitsPacketList); diff --git a/libraries/shared/src/PrioritySortUtil.h b/libraries/shared/src/PrioritySortUtil.h index 34ec074d45..a2be5fadcd 100644 --- a/libraries/shared/src/PrioritySortUtil.h +++ b/libraries/shared/src/PrioritySortUtil.h @@ -87,6 +87,7 @@ namespace PrioritySortUtil { PriorityQueue(const ConicalViewFrustums& views) : _views(views) { } PriorityQueue(const ConicalViewFrustums& views, float angularWeight, float centerWeight, float ageWeight) : _views(views), _angularWeight(angularWeight), _centerWeight(centerWeight), _ageWeight(ageWeight) + , _usecCurrentTime(usecTimestampNow()) { } void setViews(const ConicalViewFrustums& views) { _views = views; } @@ -95,6 +96,7 @@ namespace PrioritySortUtil { _angularWeight = angularWeight; _centerWeight = centerWeight; _ageWeight = ageWeight; + _usecCurrentTime = usecTimestampNow(); } size_t size() const { return _queue.size(); } @@ -129,16 +131,17 @@ namespace PrioritySortUtil { glm::vec3 offset = position - view.getPosition(); float distance = glm::length(offset) + 0.001f; // add 1mm to avoid divide by zero const float MIN_RADIUS = 0.1f; // WORKAROUND for zero size objects (we still want them to sort by distance) - float radius = glm::min(thing.getRadius(), MIN_RADIUS); + float radius = glm::max(thing.getRadius(), MIN_RADIUS); + // Other item's angle from view centre: float cosineAngle = (glm::dot(offset, view.getDirection()) / distance); - float age = (float)(usecTimestampNow() - thing.getTimestamp()); + float age = (float)(_usecCurrentTime - thing.getTimestamp()); - // we modulatate "age" drift rate by the cosineAngle term to make periphrial objects sort forward + // we modulate "age" drift rate by the cosineAngle term to make peripheral objects sort forward // at a reduced rate but we don't want the "age" term to go zero or negative so we clamp it const float MIN_COSINE_ANGLE_FACTOR = 0.1f; float cosineAngleFactor = glm::max(cosineAngle, MIN_COSINE_ANGLE_FACTOR); - float priority = _angularWeight * glm::max(radius, MIN_RADIUS) / distance + float priority = _angularWeight * radius / distance + _centerWeight * cosineAngle + _ageWeight * cosineAngleFactor * age; @@ -157,6 +160,7 @@ namespace PrioritySortUtil { float _angularWeight { DEFAULT_ANGULAR_COEF }; float _centerWeight { DEFAULT_CENTER_COEF }; float _ageWeight { DEFAULT_AGE_COEF }; + quint64 _usecCurrentTime { 0 }; }; } // namespace PrioritySortUtil From 223f86108f62b6b89a53c2542f2c26a7cd3cc957 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 28 Aug 2018 17:34:48 -0700 Subject: [PATCH 050/210] adding debugging stuff --- libraries/networking/src/AddressManager.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/networking/src/AddressManager.cpp b/libraries/networking/src/AddressManager.cpp index 0b69fda3fa..732a2d7963 100644 --- a/libraries/networking/src/AddressManager.cpp +++ b/libraries/networking/src/AddressManager.cpp @@ -48,6 +48,8 @@ QString AddressManager::getProtocol() const { QUrl AddressManager::currentAddress(bool domainOnly) const { QUrl hifiURL = _domainURL; + auto urlStr = hifiURL.toString().toStdString(); + if (!domainOnly && hifiURL.scheme() == URL_SCHEME_HIFI) { hifiURL.setPath(currentPath()); } From 442644381ad20d829459fa281b7fc5c67e959db4 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 28 Aug 2018 20:16:55 -0700 Subject: [PATCH 051/210] adding other connection refused suppressions --- interface/src/ConnectionMonitor.cpp | 4 ++-- scripts/system/notifications.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/interface/src/ConnectionMonitor.cpp b/interface/src/ConnectionMonitor.cpp index 8deddbda82..7d535d9eaf 100644 --- a/interface/src/ConnectionMonitor.cpp +++ b/interface/src/ConnectionMonitor.cpp @@ -38,7 +38,7 @@ void ConnectionMonitor::init() { connect(&_timer, &QTimer::timeout, this, []() { qDebug() << "ConnectionMonitor: Showing connection failure window"; - DependencyManager::get()->setDomainConnectionFailureVisibility(true); + //DependencyManager::get()->setDomainConnectionFailureVisibility(true); }); } @@ -48,5 +48,5 @@ void ConnectionMonitor::startTimer() { void ConnectionMonitor::stopTimer() { _timer.stop(); - DependencyManager::get()->setDomainConnectionFailureVisibility(false); + //DependencyManager::get()->setDomainConnectionFailureVisibility(false); } diff --git a/scripts/system/notifications.js b/scripts/system/notifications.js index 0778e2a44b..13d500b909 100644 --- a/scripts/system/notifications.js +++ b/scripts/system/notifications.js @@ -624,7 +624,7 @@ Controller.keyReleaseEvent.connect(keyReleaseEvent); Script.update.connect(update); Script.scriptEnding.connect(scriptEnding); - Window.domainConnectionRefused.connect(onDomainConnectionRefused); + //Window.domainConnectionRefused.connect(onDomainConnectionRefused); Window.stillSnapshotTaken.connect(onSnapshotTaken); Window.snapshot360Taken.connect(onSnapshotTaken); Window.processingGifStarted.connect(processingGif); From 9711076daea27342310275d1cffd3f6e193030a5 Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Wed, 29 Aug 2018 10:49:29 -0700 Subject: [PATCH 052/210] Use a queued signal for pending datagrams --- libraries/networking/src/udt/Socket.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/networking/src/udt/Socket.cpp b/libraries/networking/src/udt/Socket.cpp index 56b7521d7a..d764b9e8b2 100644 --- a/libraries/networking/src/udt/Socket.cpp +++ b/libraries/networking/src/udt/Socket.cpp @@ -37,7 +37,7 @@ Socket::Socket(QObject* parent, bool shouldChangeSocketOptions) : _shouldChangeSocketOptions(shouldChangeSocketOptions) { connect(&_udpSocket, &QUdpSocket::readyRead, this, &Socket::readPendingDatagrams); - connect(this, &Socket::pendingDatagrams, this, &Socket::processPendingDatagrams); + connect(this, &Socket::pendingDatagrams, this, &Socket::processPendingDatagrams, Qt::QueuedConnection); // make sure we hear about errors and state changes from the underlying socket connect(&_udpSocket, SIGNAL(error(QAbstractSocket::SocketError)), From 6cdcae33496f20c6c9096648eb169e88f49ad959 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Wed, 29 Aug 2018 16:11:51 -0700 Subject: [PATCH 053/210] switching address syntax, updating redirection domain --- interface/CMakeLists.txt | 2 - .../qml/hifi/tablet/TabletAddressDialog.qml | 4 +- interface/resources/serverless/redirect.json | 1155 ++++++++++++++++- 3 files changed, 1156 insertions(+), 5 deletions(-) diff --git a/interface/CMakeLists.txt b/interface/CMakeLists.txt index cd058add94..ded77b9013 100644 --- a/interface/CMakeLists.txt +++ b/interface/CMakeLists.txt @@ -341,8 +341,6 @@ else() set(INTERFACE_EXEC_DIR "$") set(RESOURCES_DEV_DIR "${INTERFACE_EXEC_DIR}/resources") - message(STATUS "${RESOURCES_DEV_DIR}") - # copy the resources files beside the executable add_custom_command(TARGET ${TARGET_NAME} POST_BUILD COMMAND "${CMAKE_COMMAND}" -E copy_if_different diff --git a/interface/resources/qml/hifi/tablet/TabletAddressDialog.qml b/interface/resources/qml/hifi/tablet/TabletAddressDialog.qml index c9d05aea51..bec3d82c56 100644 --- a/interface/resources/qml/hifi/tablet/TabletAddressDialog.qml +++ b/interface/resources/qml/hifi/tablet/TabletAddressDialog.qml @@ -79,7 +79,7 @@ StackView { return; } location.text = targetString; - toggleOrGo(true, targetString); + toggleOrGo(targetString, true); clearAddressLineTimer.start(); } @@ -401,7 +401,7 @@ StackView { } } - function toggleOrGo(fromSuggestions, address) { + function toggleOrGo(address, fromSuggestions) { if (address !== undefined && address !== "") { addressBarDialog.loadAddress(address, fromSuggestions); clearAddressLineTimer.start(); diff --git a/interface/resources/serverless/redirect.json b/interface/resources/serverless/redirect.json index d97f44220a..9e3b29cc26 100644 --- a/interface/resources/serverless/redirect.json +++ b/interface/resources/serverless/redirect.json @@ -1 +1,1154 @@ -{"DataVersion": 0, "Entities": [{"clientOnly": true, "created": "2018-08-28T16:44:23Z", "id": "{9a50eca4-5c97-4e21-8cb9-5197bb09770e}", "lastEdited": 1535474935077402, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "materialData": "{\"materials\":{\"albedoMap\":\"file:///C:/users/wayne/development/hifi-fork/interface/resources/images/buttonBezel.png\"}}", "materialURL": "materialData", "owningAvatarID": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "parentID": "{00000000-0000-0000-0000-000000000001}", "parentMaterialName": "2", "position": {"blue": 5.94891357421875, "green": 0, "red": 0.9275937080383301, "x": -3.07240629196167, "y": -9.5, "z": 1.94891357421875}, "priority": 1, "queryAACube": {"scale": 0.5196152329444885, "x": -5.904480457305908, "y": 0.8614521026611328, "z": -2.4799537658691406}, "type": "Material", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": true, "created": "2018-08-28T16:44:23Z", "id": "{2d90745c-2fe2-4f9c-9dcf-b715f7a9d0c0}", "lastEdited": 1535474935076550, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "materialData": "{\"materials\":{\"albedoMap\":\"file:///C:/users/wayne/development/hifi-fork/interface/resources/images/buttonBezel.png\"}}", "materialURL": "materialData", "owningAvatarID": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "parentID": "{00000000-0000-0000-0000-000000000001}", "parentMaterialName": "2", "position": {"blue": 5.94891357421875, "green": 0, "red": 0.9275937080383301, "x": -3.07240629196167, "y": -9.5, "z": 1.94891357421875}, "priority": 1, "queryAACube": {"scale": 0.5196152329444885, "x": -5.904480457305908, "y": 0.8614521026611328, "z": -2.4799537658691406}, "type": "Material", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": true, "created": "2018-08-28T16:44:23Z", "id": "{dcbca0fd-e1d8-4248-b2b4-b91346224876}", "lastEdited": 1535474935077745, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "materialData": "{\"materials\":{\"emissiveMap\":\"file:///C:/users/wayne/development/hifi-fork/interface/resources/images/buttonBezel_highlight.png\"}}", "materialURL": "materialData", "owningAvatarID": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "parentID": "{00000000-0000-0000-0000-000000000001}", "parentMaterialName": "2", "position": {"blue": 5.94891357421875, "green": 0, "red": 0.927593469619751, "x": -3.072406530380249, "y": -9.5, "z": 1.94891357421875}, "queryAACube": {"scale": 0.5196152329444885, "x": -5.904480457305908, "y": 0.8614521026611328, "z": -2.479954719543457}, "type": "Material", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": true, "created": "2018-08-28T16:44:23Z", "id": "{3df15ffb-9614-4ec1-81a8-e278d1917748}", "lastEdited": 1535474935076889, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "materialData": "{\"materials\":{\"emissiveMap\":\"file:///C:/users/wayne/development/hifi-fork/interface/resources/images/buttonBezel_highlight.png\"}}", "materialURL": "materialData", "owningAvatarID": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "parentID": "{00000000-0000-0000-0000-000000000001}", "parentMaterialName": "2", "position": {"blue": 5.94891357421875, "green": 0, "red": 0.9275937080383301, "x": -3.07240629196167, "y": -9.5, "z": 1.94891357421875}, "queryAACube": {"scale": 0.5196152329444885, "x": -5.904480457305908, "y": 0.8614521026611328, "z": -2.4799537658691406}, "type": "Material", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": true, "created": "2018-08-28T16:44:23Z", "id": "{fd138f98-d436-41d2-863a-cbef6e41e1cb}", "lastEdited": 1535474935078215, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "materialData": "{\"materials\":{\"albedoMap\":\"file:///C:/users/wayne/development/hifi-fork/interface/resources/images/buttonBezel.png\"}}", "materialURL": "materialData", "owningAvatarID": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "parentID": "{00000000-0000-0000-0000-000000000001}", "parentMaterialName": "2", "position": {"blue": 5.94891357421875, "green": 0, "red": 0.9275937080383301, "x": -3.07240629196167, "y": -9.5, "z": 1.94891357421875}, "priority": 1, "queryAACube": {"scale": 0.5196152329444885, "x": -5.904480457305908, "y": 0.8614521026611328, "z": -2.4799537658691406}, "type": "Material", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": true, "created": "2018-08-28T16:44:23Z", "id": "{b2a90f9e-a5ec-4faa-a6a3-bc457516f5ee}", "lastEdited": 1535474935077505, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "materialData": "{\"materials\":{\"albedoMap\":\"file:///C:/users/wayne/development/hifi-fork/interface/resources/images/buttonBezel.png\"}}", "materialURL": "materialData", "owningAvatarID": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "parentID": "{00000000-0000-0000-0000-000000000001}", "parentMaterialName": "2", "position": {"blue": 5.94891357421875, "green": 0, "red": 0.9275937080383301, "x": -3.07240629196167, "y": -9.5, "z": 1.94891357421875}, "priority": 1, "queryAACube": {"scale": 0.5196152329444885, "x": -5.904480457305908, "y": 0.8614521026611328, "z": -2.4799537658691406}, "type": "Material", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": true, "created": "2018-08-28T16:44:23Z", "id": "{5c9ef440-f022-4d21-9f00-22827851b522}", "lastEdited": 1535474935077201, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "materialData": "{\"materials\":{\"emissiveMap\":\"file:///C:/users/wayne/development/hifi-fork/interface/resources/images/buttonBezel_highlight.png\"}}", "materialURL": "materialData", "owningAvatarID": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "parentID": "{00000000-0000-0000-0000-000000000001}", "parentMaterialName": "2", "position": {"blue": 5.948914527893066, "green": 0.16741032898426056, "red": 0.9275782108306885, "x": -3.0724217891693115, "y": -9.33258967101574, "z": 1.9489145278930664}, "queryAACube": {"scale": 0.5196152329444885, "x": -5.904473781585693, "y": 1.028862476348877, "z": -2.479969024658203}, "type": "Material", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": true, "created": "2018-08-28T16:44:23Z", "id": "{2fe2296a-d74d-4ee7-bf7d-c9665bc63237}", "lastEdited": 1535474935076656, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "materialData": "{\"materials\":{\"emissiveMap\":\"file:///C:/users/wayne/development/hifi-fork/interface/resources/images/buttonBezel_highlight.png\"}}", "materialURL": "materialData", "owningAvatarID": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "parentID": "{00000000-0000-0000-0000-000000000001}", "parentMaterialName": "2", "position": {"blue": 5.94891357421875, "green": 0, "red": 0.9275937080383301, "x": -3.07240629196167, "y": -9.5, "z": 1.94891357421875}, "queryAACube": {"scale": 0.5196152329444885, "x": -5.904480457305908, "y": 0.8614521026611328, "z": -2.4799537658691406}, "type": "Material", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": true, "created": "2018-08-28T16:44:23Z", "id": "{86f1ba10-2921-45ad-bb74-dcbe5c49bc69}", "lastEdited": 1535474935077298, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "materialData": "{\"materials\":{\"emissiveMap\":\"file:///C:/users/wayne/development/hifi-fork/interface/resources/images/buttonBezel_highlight.png\"}}", "materialURL": "materialData", "owningAvatarID": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "parentID": "{00000000-0000-0000-0000-000000000001}", "parentMaterialName": "2", "position": {"blue": 5.94891357421875, "green": 0, "red": 0.9275937080383301, "x": -3.07240629196167, "y": -9.5, "z": 1.94891357421875}, "queryAACube": {"scale": 0.5196152329444885, "x": -5.904480457305908, "y": 0.8614521026611328, "z": -2.4799537658691406}, "type": "Material", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": true, "created": "2018-08-28T16:44:23Z", "id": "{1023380c-13dd-445d-bb57-1e02574e5cb3}", "lastEdited": 1535474935076124, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "materialData": "{\"materials\":{\"emissiveMap\":\"file:///C:/users/wayne/development/hifi-fork/interface/resources/images/buttonBezel_highlight.png\"}}", "materialURL": "materialData", "owningAvatarID": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "parentID": "{00000000-0000-0000-0000-000000000001}", "parentMaterialName": "2", "position": {"blue": 5.94891357421875, "green": 0, "red": 0.9275937080383301, "x": -3.07240629196167, "y": -9.5, "z": 1.94891357421875}, "queryAACube": {"scale": 0.5196152329444885, "x": -5.904480457305908, "y": 0.8614521026611328, "z": -2.4799537658691406}, "type": "Material", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": true, "created": "2018-08-28T16:44:23Z", "id": "{d5d841b2-0cc0-4ab2-84fe-dce3d20f6b04}", "lastEdited": 1535474935077609, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "materialData": "{\"materials\":{\"emissiveMap\":\"file:///C:/users/wayne/development/hifi-fork/interface/resources/images/buttonBezel_highlight.png\"}}", "materialURL": "materialData", "owningAvatarID": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "parentID": "{00000000-0000-0000-0000-000000000001}", "parentMaterialName": "2", "position": {"blue": 5.94891357421875, "green": 0, "red": 0.927593469619751, "x": -3.072406530380249, "y": -9.5, "z": 1.94891357421875}, "queryAACube": {"scale": 0.5196152329444885, "x": -5.904480457305908, "y": 0.8614521026611328, "z": -2.479954719543457}, "type": "Material", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": true, "created": "2018-08-28T16:44:23Z", "id": "{02da6c73-bab0-4e7e-b8fc-a9c0500ac66e}", "lastEdited": 1535474935075994, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "materialData": "{\"materials\":{\"albedoMap\":\"file:///C:/users/wayne/development/hifi-fork/interface/resources/images/buttonBezel.png\"}}", "materialURL": "materialData", "owningAvatarID": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "parentID": "{00000000-0000-0000-0000-000000000001}", "parentMaterialName": "2", "position": {"blue": 5.94891357421875, "green": 0, "red": 0.9275937080383301, "x": -3.07240629196167, "y": -9.5, "z": 1.94891357421875}, "priority": 1, "queryAACube": {"scale": 0.5196152329444885, "x": -5.904480457305908, "y": 0.8614521026611328, "z": -2.4799537658691406}, "type": "Material", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": true, "created": "2018-08-28T16:44:23Z", "id": "{f1c2110e-1429-49b2-949d-6c73718b2d65}", "lastEdited": 1535474935078059, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "materialData": "{\"materials\":{\"albedoMap\":\"file:///C:/users/wayne/development/hifi-fork/interface/resources/images/buttonBezel.png\"}}", "materialURL": "materialData", "owningAvatarID": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "parentID": "{00000000-0000-0000-0000-000000000001}", "parentMaterialName": "2", "position": {"blue": 5.94891357421875, "green": 0, "red": 0.9275937080383301, "x": -3.07240629196167, "y": -9.5, "z": 1.94891357421875}, "priority": 1, "queryAACube": {"scale": 0.5196152329444885, "x": -5.904480457305908, "y": 0.8614521026611328, "z": -2.4799537658691406}, "type": "Material", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": true, "created": "2018-08-28T16:44:23Z", "id": "{1e09084f-c0d7-4bd4-a78d-290c03391579}", "lastEdited": 1535474935076234, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "materialData": "{\"materials\":{\"emissiveMap\":\"file:///C:/users/wayne/development/hifi-fork/interface/resources/images/buttonBezel_highlight.png\"}}", "materialURL": "materialData", "owningAvatarID": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "parentID": "{00000000-0000-0000-0000-000000000001}", "parentMaterialName": "2", "position": {"blue": 5.94891357421875, "green": 0, "red": 0.927593469619751, "x": -3.072406530380249, "y": -9.5, "z": 1.94891357421875}, "queryAACube": {"scale": 0.5196152329444885, "x": -5.904480457305908, "y": 0.8614521026611328, "z": -2.479954719543457}, "type": "Material", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": true, "created": "2018-08-28T16:44:23Z", "id": "{e8282a17-76a5-4cd8-9f0e-473f097c8ad1}", "lastEdited": 1535474935077902, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "materialData": "{\"materials\":{\"albedoMap\":\"file:///C:/users/wayne/development/hifi-fork/interface/resources/images/buttonBezel.png\"}}", "materialURL": "materialData", "owningAvatarID": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "parentID": "{00000000-0000-0000-0000-000000000001}", "parentMaterialName": "2", "position": {"blue": 5.94891357421875, "green": 0, "red": 0.9275937080383301, "x": -3.07240629196167, "y": -9.5, "z": 1.94891357421875}, "priority": 1, "queryAACube": {"scale": 0.5196152329444885, "x": -5.904480457305908, "y": 0.8614521026611328, "z": -2.4799537658691406}, "type": "Material", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": true, "created": "2018-08-28T16:44:23Z", "id": "{46fbad8a-5bc0-44c8-a9ca-beb38f672d2a}", "lastEdited": 1535474935076994, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "materialData": "{\"materials\":{\"albedoMap\":\"file:///C:/users/wayne/development/hifi-fork/interface/resources/images/buttonBezel.png\"}}", "materialURL": "materialData", "owningAvatarID": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "parentID": "{00000000-0000-0000-0000-000000000001}", "parentMaterialName": "2", "position": {"blue": 5.94891357421875, "green": 0, "red": 0.9275937080383301, "x": -3.07240629196167, "y": -9.5, "z": 1.94891357421875}, "priority": 1, "queryAACube": {"scale": 0.5196152329444885, "x": -5.904480457305908, "y": 0.8614521026611328, "z": -2.4799537658691406}, "type": "Material", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": true, "created": "2018-08-28T16:44:23Z", "id": "{2861b544-1c03-439a-85ad-3758ba87ca55}", "lastEdited": 1535474935076339, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "materialData": "{\"materials\":{\"emissiveMap\":\"file:///C:/users/wayne/development/hifi-fork/interface/resources/images/buttonBezel_highlight.png\"}}", "materialURL": "materialData", "owningAvatarID": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "parentID": "{00000000-0000-0000-0000-000000000001}", "parentMaterialName": "2", "position": {"blue": 5.94891357421875, "green": 0, "red": 0.9275937080383301, "x": -3.07240629196167, "y": -9.5, "z": 1.94891357421875}, "queryAACube": {"scale": 0.5196152329444885, "x": -5.904480457305908, "y": 0.8614521026611328, "z": -2.4799537658691406}, "type": "Material", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": true, "created": "2018-08-28T16:44:23Z", "id": "{59b7fc7f-0100-4115-a9f8-55d5b45da540}", "lastEdited": 1535474935077098, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "materialData": "{\"materials\":{\"albedoMap\":\"file:///C:/users/wayne/development/hifi-fork/interface/resources/images/buttonBezel.png\"}}", "materialURL": "materialData", "owningAvatarID": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "parentID": "{00000000-0000-0000-0000-000000000001}", "parentMaterialName": "2", "position": {"blue": 5.94891357421875, "green": 0, "red": 0.9275937080383301, "x": -3.07240629196167, "y": -9.5, "z": 1.94891357421875}, "priority": 1, "queryAACube": {"scale": 0.5196152329444885, "x": -5.904480457305908, "y": 0.8614521026611328, "z": -2.4799537658691406}, "type": "Material", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": true, "created": "2018-08-28T16:44:23Z", "id": "{2888e4b0-6eb1-4468-9b95-893dcb3e99a5}", "lastEdited": 1535474935076443, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "materialData": "{\"materials\":{\"emissiveMap\":\"file:///C:/users/wayne/development/hifi-fork/interface/resources/images/buttonBezel_highlight.png\"}}", "materialURL": "materialData", "owningAvatarID": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "parentID": "{00000000-0000-0000-0000-000000000001}", "parentMaterialName": "2", "position": {"blue": 5.94891357421875, "green": 0, "red": 0.9275937080383301, "x": -3.07240629196167, "y": -9.5, "z": 1.94891357421875}, "queryAACube": {"scale": 0.5196152329444885, "x": -5.904480457305908, "y": 0.8614521026611328, "z": -2.4799537658691406}, "type": "Material", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": true, "created": "2018-08-28T16:44:23Z", "id": "{36f00cad-64b0-415f-9f70-e92cd85836d8}", "lastEdited": 1535474935076783, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "materialData": "{\"materials\":{\"albedoMap\":\"file:///C:/users/wayne/development/hifi-fork/interface/resources/images/buttonBezel.png\"}}", "materialURL": "materialData", "owningAvatarID": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "parentID": "{00000000-0000-0000-0000-000000000001}", "parentMaterialName": "2", "position": {"blue": 5.94891357421875, "green": 0, "red": 0.9275937080383301, "x": -3.07240629196167, "y": -9.5, "z": 1.94891357421875}, "priority": 1, "queryAACube": {"scale": 0.5196152329444885, "x": -5.904480457305908, "y": 0.8614521026611328, "z": -2.4799537658691406}, "type": "Material", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": false, "created": "2018-08-28T16:44:23Z", "dimensions": {"blue": 14.40000057220459, "green": 14.40000057220459, "red": 14.40000057220459, "x": 14.40000057220459, "y": 14.40000057220459, "z": 14.40000057220459}, "id": "{2cefd6b6-6a00-49c3-87c8-71b9c83f96f1}", "lastEdited": 1535474935056115, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": {"blue": 2.3440732955932617, "green": 1.7684326171875, "red": 1.8812973499298096, "x": -2.1187026500701904, "y": -7.7315673828125, "z": -1.6559267044067383}, "queryAACube": {"scale": 24.9415340423584, "x": -10.589469909667969, "y": -10.7023344039917, "z": -10.126693725585938}, "rotation": {"w": 0.8697794675827026, "x": -1.52587890625e-05, "y": 0.4933699369430542, "z": -4.57763671875e-05}, "shapeType": "box", "skyboxMode": "enabled", "type": "Zone", "userData": "{\"grabbableKey\":{\"grabbable\":false}}"}, {"clientOnly": false, "color": {"blue": 0, "green": 0, "red": 0}, "created": "2018-08-28T16:44:23Z", "dimensions": {"blue": 11.117486953735352, "green": 3.580313205718994, "red": 0.20000000298023224, "x": 0.20000000298023224, "y": 3.580313205718994, "z": 11.117486953735352}, "id": "{efde7819-3a7a-4984-ac3e-28bcf69c6b1e}", "lastEdited": 1535474935053285, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": {"blue": 0, "green": 1.1583251953125, "red": 4.971565246582031, "x": 0.9715652465820312, "y": -8.3416748046875, "z": -4}, "queryAACube": {"scale": 11.681488037109375, "x": -0.8691787719726562, "y": -4.6824188232421875, "z": -5.8407440185546875}, "rotation": {"w": 0.8637980222702026, "x": -4.57763671875e-05, "y": 0.5038070678710938, "z": -1.52587890625e-05}, "shape": "Cube", "type": "Box", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": false, "color": {"blue": 0, "green": 0, "red": 0}, "created": "2018-08-28T16:44:23Z", "dimensions": {"blue": 11.117486953735352, "green": 3.580313205718994, "red": 0.20000000298023224, "x": 0.20000000298023224, "y": 3.580313205718994, "z": 11.117486953735352}, "id": "{fe8d6b12-3697-4fcd-9092-af5b7f49a7f5}", "lastEdited": 1535474947253763, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": {"blue": 5.268576622009277, "green": 1.1588134765625, "red": 6.100250244140625, "x": 2.100250244140625, "y": -8.3411865234375, "z": 1.2685766220092773}, "queryAACube": {"scale": 11.681488037109375, "x": 0.2595062255859375, "y": -4.6819305419921875, "z": -0.5721673965454102}, "rotation": {"w": 0.9662165641784668, "x": -4.57763671875e-05, "y": -0.2576791048049927, "z": 1.52587890625e-05}, "shape": "Cube", "type": "Box", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": false, "created": "2018-08-28T16:44:23Z", "dimensions": {"blue": 0.06014331430196762, "green": 2.582186460494995, "red": 2.582186698913574, "x": 2.582186698913574, "y": 2.582186460494995, "z": 0.06014331430196762}, "id": "{c8f9b1b1-3bd7-473c-8c2a-a8644a7acdd7}", "lastEdited": 1535474935054058, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "modelURL": "http://hifi-content.s3.amazonaws.com/alexia/LoadingScreens/oopsDialog.fbx", "name": "Oops Dialog", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": {"blue": 1.45927095413208, "green": 1.6763916015625, "red": 0, "x": -4, "y": -7.8236083984375, "z": -2.54072904586792}, "queryAACube": {"scale": 3.6522583961486816, "x": -1.8261291980743408, "y": -0.14973759651184082, "z": -0.36685824394226074}, "rotation": {"w": 0.8684672117233276, "x": -4.57763671875e-05, "y": 0.4957197904586792, "z": -7.62939453125e-05}, "type": "Model", "userData": "{\"grabbableKey\":{\"grabbable\":false}}"}, {"angularDamping": 0, "clientOnly": false, "color": {"blue": 0, "green": 0, "red": 255}, "created": "2018-08-28T16:44:23Z", "dimensions": {"blue": 0.20000000298023224, "green": 0.20000000298023224, "red": 0.20000000298023224, "x": 0.20000000298023224, "y": 0.20000000298023224, "z": 0.20000000298023224}, "id": "{d0b0491a-5c7d-4cd2-9ebe-492b709a702b}", "lastEdited": 1535474935052912, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "name": "Particle Rotate", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": {"blue": 3.8216662406921387, "green": 0, "red": 1.2409718036651611, "x": -2.759028196334839, "y": -9.5, "z": -0.17833375930786133}, "queryAACube": {"scale": 0.3464101552963257, "x": 1.0677666664123535, "y": -0.17320507764816284, "z": 3.648461103439331}, "rotation": {"w": 0.6444342136383057, "x": -0.08220034837722778, "y": -0.6649118661880493, "z": 0.3684900999069214}, "script": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/rotate.js", "scriptTimestamp": 1532724769253, "shape": "Cube", "type": "Box", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"angularDamping": 0, "clientOnly": false, "color": {"blue": 0, "green": 0, "red": 255}, "created": "2018-08-28T16:44:23Z", "dimensions": {"blue": 0.20000000298023224, "green": 0.20000000298023224, "red": 0.20000000298023224, "x": 0.20000000298023224, "y": 0.20000000298023224, "z": 0.20000000298023224}, "id": "{ae4a84ee-4e95-4e6b-b63d-399893a9b3f9}", "lastEdited": 1535474935052114, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "name": "Particle Rotate", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": {"blue": 1.3116319179534912, "green": 0, "red": 2.705613613128662, "x": -1.294386386871338, "y": -9.5, "z": -2.688368082046509}, "queryAACube": {"scale": 0.3464101552963257, "x": 2.5324084758758545, "y": -0.17320507764816284, "z": 1.1384267807006836}, "rotation": {"w": 0.9127794504165649, "x": 0.2575265169143677, "y": 0.15553522109985352, "z": 0.2761729955673218}, "script": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/rotate.js", "scriptTimestamp": 1532724769253, "shape": "Cube", "type": "Box", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"angularDamping": 0, "clientOnly": false, "color": {"blue": 0, "green": 0, "red": 255}, "created": "2018-08-28T16:44:23Z", "dimensions": {"blue": 0.20000000298023224, "green": 0.20000000298023224, "red": 0.20000000298023224, "x": 0.20000000298023224, "y": 0.20000000298023224, "z": 0.20000000298023224}, "id": "{c1404297-9c6a-4d2d-b91d-c844ddd391db}", "lastEdited": 1535474935051740, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "name": "Particle Rotate", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": {"blue": 3.8216662406921387, "green": 0.0772705078125, "red": 1.2409718036651611, "x": -2.759028196334839, "y": -9.4227294921875, "z": -0.17833375930786133}, "queryAACube": {"scale": 0.3464101552963257, "x": 1.0677666664123535, "y": -0.09593456983566284, "z": 3.648461103439331}, "rotation": {"w": 0.926024317741394, "x": 0.20308232307434082, "y": -0.010269343852996826, "z": 0.3179827928543091}, "script": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/rotate.js", "scriptTimestamp": 1532724769253, "shape": "Cube", "type": "Box", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": false, "created": "2018-08-28T16:44:23Z", "dimensions": {"blue": 9.030570983886719, "green": 0.0719478651881218, "red": 9.030570983886719, "x": 9.030570983886719, "y": 0.0719478651881218, "z": 9.030570983886719}, "id": "{f17920f3-1571-4c5e-b002-e328cf202037}", "lastEdited": 1535474950564649, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "modelURL": "http://hifi-content.s3.amazonaws.com/alexia/LoadingScreens/floor.fbx", "name": "Floor", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": {"blue": 4.2324604988098145, "green": 0.17547607421875, "red": 4.802988529205322, "x": 0.8029885292053223, "y": -9.32452392578125, "z": 0.23246049880981445}, "queryAACube": {"scale": 12.771358489990234, "x": -1.582690715789795, "y": -6.210203170776367, "z": -2.1532187461853027}, "rotation": {"w": 0.8648051023483276, "x": -1.52587890625e-05, "y": 0.5020675659179688, "z": -4.57763671875e-05}, "shapeType": "simple-hull", "type": "Model", "userData": "{\"grabbableKey\":{\"grabbable\":false}}"}, {"alpha": 0, "alphaFinish": 0, "alphaStart": 0.25, "clientOnly": false, "colorFinish": {"blue": 0, "green": 0, "red": 0, "x": 0, "y": 0, "z": 0}, "colorStart": {"blue": 255, "green": 255, "red": 255, "x": 255, "y": 255, "z": 255}, "created": "2018-08-28T16:44:23Z", "dimensions": {"blue": 13.24000072479248, "green": 13.24000072479248, "red": 13.24000072479248, "x": 13.24000072479248, "y": 13.24000072479248, "z": 13.24000072479248}, "emitAcceleration": {"blue": 0, "green": 0.10000000149011612, "red": 0, "x": 0, "y": 0.10000000149011612, "z": 0}, "emitDimensions": {"blue": 1, "green": 1, "red": 1, "x": 1, "y": 1, "z": 1}, "emitOrientation": {"w": 1, "x": -1.52587890625e-05, "y": -1.52587890625e-05, "z": -1.52587890625e-05}, "emitRate": 6, "emitSpeed": 0, "id": "{7561445a-4f9c-41aa-96b9-b8ce8ad686d3}", "lastEdited": 1535474935056499, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "lifespan": 10, "maxParticles": 10, "name": "Stars", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "particleRadius": 0.07000000029802322, "polarFinish": 3.1415927410125732, "position": {"blue": 1.3712034225463867, "green": 0.5220947265625, "red": 2.6281180381774902, "x": -1.3718819618225098, "y": -8.9779052734375, "z": -2.6287965774536133}, "queryAACube": {"scale": 22.932353973388672, "x": -8.838058471679688, "y": -10.944082260131836, "z": -10.09497356414795}, "radiusFinish": 0, "radiusStart": 0, "rotation": {"w": 0.9852597713470459, "x": -1.52587890625e-05, "y": -0.17106890678405762, "z": -7.62939453125e-05}, "speedSpread": 0, "spinFinish": null, "spinStart": null, "textures": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/star.png", "type": "ParticleEffect", "userData": "{\"grabbableKey\":{\"grabbable\":false}}"}, {"alpha": 0, "alphaFinish": 0, "alphaStart": 1, "clientOnly": false, "color": {"blue": 255, "green": 205, "red": 3}, "colorFinish": {"blue": 0, "green": 0, "red": 0, "x": 0, "y": 0, "z": 0}, "colorStart": {"blue": 255, "green": 204, "red": 0, "x": 0, "y": 204, "z": 255}, "created": "2018-08-28T16:44:23Z", "dimensions": {"blue": 2.5, "green": 2.5, "red": 2.5, "x": 2.5, "y": 2.5, "z": 2.5}, "emitAcceleration": {"blue": 0, "green": 0, "red": 0, "x": 0, "y": 0, "z": 0}, "emitDimensions": {"blue": 1, "green": 1, "red": 1, "x": 1, "y": 1, "z": 1}, "emitOrientation": {"w": 0.9993909597396851, "x": 0.034897372126579285, "y": -1.525880907138344e-05, "z": -1.525880907138344e-05}, "emitRate": 2, "emitSpeed": 0, "emitterShouldTrail": true, "id": "{7c59b77f-2f88-4c35-899b-3e42bd486ed6}", "lastEdited": 1535474935050547, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "lifespan": 10, "maxParticles": 40, "name": "Rays", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "particleRadius": 0.75, "polarFinish": 3.1415927410125732, "position": {"blue": 3.814434051513672, "green": 1.44122314453125, "red": 1.2319090366363525, "x": -2.7680909633636475, "y": -8.05877685546875, "z": -0.18556594848632812}, "queryAACube": {"scale": 4.330127239227295, "x": -0.9331545829772949, "y": -0.7238404750823975, "z": 1.6493704319000244}, "radiusFinish": 0.10000000149011612, "radiusStart": 0, "rotation": {"w": 0.9594720602035522, "x": -1.52587890625e-05, "y": 0.28178834915161133, "z": -4.57763671875e-05}, "speedSpread": 0, "spinFinish": null, "spinStart": null, "textures": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/stripe.png", "type": "ParticleEffect", "userData": "{\"grabbableKey\":{\"grabbable\":false}}"}, {"angularDamping": 0, "clientOnly": false, "color": {"blue": 0, "green": 0, "red": 255}, "created": "2018-08-28T16:44:23Z", "dimensions": {"blue": 0.20000000298023224, "green": 0.20000000298023224, "red": 0.20000000298023224, "x": 0.20000000298023224, "y": 0.20000000298023224, "z": 0.20000000298023224}, "id": "{55dd2b28-1c53-431b-b2ea-61155dfc6652}", "lastEdited": 1535474935055239, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "name": "Particle Rotate", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": {"blue": 1.3116319179534912, "green": 0.15618896484375, "red": 2.705613613128662, "x": -1.294386386871338, "y": -9.34381103515625, "z": -2.688368082046509}, "queryAACube": {"scale": 0.3464101552963257, "x": 2.5324084758758545, "y": -0.017016112804412842, "z": 1.1384267807006836}, "rotation": {"w": 0.46953535079956055, "x": -0.16719311475753784, "y": -0.7982757091522217, "z": 0.3380941152572632}, "script": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/rotate.js", "scriptTimestamp": 1532724769253, "shape": "Cube", "type": "Box", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"angularDamping": 0, "clientOnly": false, "color": {"blue": 0, "green": 0, "red": 255}, "created": "2018-08-28T16:44:23Z", "dimensions": {"blue": 0.20000000298023224, "green": 0.20000000298023224, "red": 0.20000000298023224, "x": 0.20000000298023224, "y": 0.20000000298023224, "z": 0.20000000298023224}, "id": "{f40563f7-01e3-4faf-ad1b-19cab7a386a1}", "lastEdited": 1535474935054426, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "name": "Particle Rotate", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": {"blue": 1.3116319179534912, "green": 0.0772705078125, "red": 2.705613613128662, "x": -1.294386386871338, "y": -9.4227294921875, "z": -2.688368082046509}, "queryAACube": {"scale": 0.3464101552963257, "x": 2.5324084758758545, "y": -0.09593456983566284, "z": 1.1384267807006836}, "rotation": {"w": -0.38777750730514526, "x": -0.37337303161621094, "y": -0.8409399390220642, "z": 0.055222392082214355}, "script": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/rotate.js", "scriptTimestamp": 1532724769253, "shape": "Cube", "type": "Box", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"alpha": 0, "alphaFinish": 0, "alphaStart": 1, "clientOnly": false, "color": {"blue": 211, "green": 227, "red": 104}, "colorFinish": {"blue": 0, "green": 0, "red": 0, "x": 0, "y": 0, "z": 0}, "colorStart": {"blue": 211, "green": 227, "red": 104, "x": 104, "y": 227, "z": 211}, "created": "2018-08-28T16:44:23Z", "dimensions": {"blue": 2.5, "green": 2.5, "red": 2.5, "x": 2.5, "y": 2.5, "z": 2.5}, "emitAcceleration": {"blue": 0, "green": 0, "red": 0, "x": 0, "y": 0, "z": 0}, "emitDimensions": {"blue": 1, "green": 1, "red": 1, "x": 1, "y": 1, "z": 1}, "emitOrientation": {"w": 0.9993909597396851, "x": 0.034897372126579285, "y": -1.525880907138344e-05, "z": -1.525880907138344e-05}, "emitRate": 2, "emitSpeed": 0, "id": "{c4a86707-2eaa-41f5-a1ad-3e6029178d75}", "lastEdited": 1535474935052538, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "lifespan": 10, "maxParticles": 40, "name": "Rays", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "particleRadius": 0.75, "polarFinish": 3.1415927410125732, "position": {"blue": 1.3553659915924072, "green": 1.44122314453125, "red": 2.572803497314453, "x": -1.4271965026855469, "y": -8.05877685546875, "z": -2.6446340084075928}, "queryAACube": {"scale": 4.330127239227295, "x": 0.40773987770080566, "y": -0.7238404750823975, "z": -0.8096976280212402}, "radiusFinish": 0.10000000149011612, "radiusStart": 0, "rotation": {"w": 0.9803768396377563, "x": -1.52587890625e-05, "y": 0.19707024097442627, "z": -7.62939453125e-05}, "speedSpread": 0, "spinFinish": null, "spinStart": null, "textures": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/stripe.png", "type": "ParticleEffect", "userData": "{\"grabbableKey\":{\"grabbable\":false}}"}, {"angularDamping": 0, "clientOnly": false, "color": {"blue": 0, "green": 0, "red": 255}, "created": "2018-08-28T16:44:23Z", "dimensions": {"blue": 0.20000000298023224, "green": 0.20000000298023224, "red": 0.20000000298023224, "x": 0.20000000298023224, "y": 0.20000000298023224, "z": 0.20000000298023224}, "id": "{65dd9c7f-815d-4b50-ba3b-24709691aed1}", "lastEdited": 1535474935056805, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "name": "Particle Rotate", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": {"blue": 3.8216662406921387, "green": 0.15618896484375, "red": 1.2409718036651611, "x": -2.759028196334839, "y": -9.34381103515625, "z": -0.17833375930786133}, "queryAACube": {"scale": 0.3464101552963257, "x": 1.0677666664123535, "y": -0.017016112804412842, "z": 3.648461103439331}, "rotation": {"w": 0.6747081279754639, "x": -0.06532388925552368, "y": -0.6342412233352661, "z": 0.37175559997558594}, "script": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/rotate.js", "scriptTimestamp": 1532724769253, "shape": "Cube", "type": "Box", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": false, "color": {"blue": 0, "green": 0, "red": 0}, "created": "2018-08-28T16:44:23Z", "dimensions": {"blue": 11.117486953735352, "green": 3.580313205718994, "red": 0.20000000298023224, "x": 0.20000000298023224, "y": 3.580313205718994, "z": 11.117486953735352}, "id": "{4e0f3381-ac88-48ab-9378-0b7818188234}", "lastEdited": 1535474935053657, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": {"blue": 6.1806135177612305, "green": 1.1588134765625, "red": 1.4755167961120605, "x": -2.5244832038879395, "y": -8.3411865234375, "z": 2.1806135177612305}, "queryAACube": {"scale": 11.681488037109375, "x": -4.365227222442627, "y": -4.6819305419921875, "z": 0.33986949920654297}, "rotation": {"w": 0.8637980222702026, "x": -4.57763671875e-05, "y": 0.5038070678710938, "z": -1.52587890625e-05}, "shape": "Cube", "type": "Box", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"clientOnly": false, "color": {"blue": 0, "green": 0, "red": 0}, "created": "2018-08-28T16:44:23Z", "dimensions": {"blue": 11.117486953735352, "green": 3.580313205718994, "red": 0.20000000298023224, "x": 0.20000000298023224, "y": 3.580313205718994, "z": 11.117486953735352}, "id": "{2da3a1d6-c757-4cc3-b20c-d7ec87eedd52}", "lastEdited": 1535474935050931, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": {"blue": 1.9063844680786133, "green": 1.15850830078125, "red": 0.16632509231567383, "x": -3.833674907684326, "y": -8.34149169921875, "z": -2.0936155319213867}, "queryAACube": {"scale": 11.681488037109375, "x": -5.674418926239014, "y": -4.6822357177734375, "z": -3.934359550476074}, "rotation": {"w": 0.9666743278503418, "x": -4.57763671875e-05, "y": -0.2560006380081177, "z": 1.52587890625e-05}, "shape": "Cube", "type": "Box", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false}, {"alpha": 0, "alphaFinish": 0, "alphaStart": 0.25, "clientOnly": false, "colorFinish": {"blue": 0, "green": 0, "red": 0, "x": 0, "y": 0, "z": 0}, "colorStart": {"blue": 255, "green": 255, "red": 255, "x": 255, "y": 255, "z": 255}, "created": "2018-08-28T16:44:23Z", "dimensions": {"blue": 13.24000072479248, "green": 13.24000072479248, "red": 13.24000072479248, "x": 13.24000072479248, "y": 13.24000072479248, "z": 13.24000072479248}, "emitAcceleration": {"blue": 0, "green": 0.10000000149011612, "red": 0, "x": 0, "y": 0.10000000149011612, "z": 0}, "emitDimensions": {"blue": 1, "green": 1, "red": 1, "x": 1, "y": 1, "z": 1}, "emitOrientation": {"w": 1, "x": -1.52587890625e-05, "y": -1.52587890625e-05, "z": -1.52587890625e-05}, "emitRate": 6, "emitSpeed": 0, "emitterShouldTrail": true, "id": "{7db57102-9a57-48d6-9937-bcec7892c3d9}", "lastEdited": 1535474935058139, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "lifespan": 10, "maxParticles": 10, "name": "Stars", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "particleRadius": 0.07000000029802322, "polarFinish": 3.1415927410125732, "position": {"blue": 3.78922963142395, "green": 0.5220947265625, "red": 1.1928560733795166, "x": -2.8071439266204834, "y": -8.9779052734375, "z": -0.2107703685760498}, "queryAACube": {"scale": 22.932353973388672, "x": -10.273321151733398, "y": -10.944082260131836, "z": -7.676947593688965}, "radiusFinish": 0, "radiusStart": 0, "rotation": {"w": 0.996429443359375, "x": -1.52587890625e-05, "y": -0.08442819118499756, "z": -4.57763671875e-05}, "speedSpread": 0, "spinFinish": null, "spinStart": null, "textures": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/star.png", "type": "ParticleEffect", "userData": "{\"grabbableKey\":{\"grabbable\":false}}"}, {"clientOnly": false, "created": "2018-08-28T16:44:23Z", "dimensions": {"blue": 2.1097896099090576, "green": 0.04847164824604988, "red": 1.458284616470337, "x": 1.458284616470337, "y": 0.04847164824604988, "z": 2.1097896099090576}, "id": "{434940be-0b45-4ca2-97db-91e698c20bfd}", "lastEdited": 1535474935055655, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "modelURL": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/portal2.fbx", "name": "Back", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": {"blue": 1.5835940837860107, "green": 0.2467041015625, "red": 3.0345542430877686, "x": -0.9654457569122314, "y": -9.2532958984375, "z": -2.4164059162139893}, "queryAACube": {"scale": 2.5651814937591553, "x": 1.751963496208191, "y": -1.0358866453170776, "z": 0.3010033369064331}, "rotation": {"w": 0.9084458351135254, "x": -1.52587890625e-05, "y": 0.4179598093032837, "z": -0.0001068115234375}, "type": "Model", "userData": "{\"grabbableKey\":{\"grabbable\":true}}"}, {"clientOnly": false, "created": "2018-08-28T16:44:23Z", "dimensions": {"blue": 2.1097896099090576, "green": 0.04847164824604988, "red": 1.458284616470337, "x": 1.458284616470337, "y": 0.04847164824604988, "z": 2.1097896099090576}, "id": "{5f853b12-33b9-4f40-92a8-4506047fdcd8}", "lastEdited": 1535474935051356, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "modelURL": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/portal1.fbx", "name": "Try Again", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": {"blue": 3.946338653564453, "green": 0.2467041015625, "red": 1.6013128757476807, "x": -2.3986871242523193, "y": -9.2532958984375, "z": -0.053661346435546875}, "queryAACube": {"scale": 2.5651814937591553, "x": 0.318722128868103, "y": -1.0358866453170776, "z": 2.663747787475586}, "rotation": {"w": 0.8220492601394653, "x": -1.52587890625e-05, "y": 0.5693598985671997, "z": -0.0001068115234375}, "type": "Model", "userData": "{\"grabbableKey\":{\"grabbable\":true}}"}], "Id": "{aa6032b9-9c35-4481-acd9-03b97400b83a}", "Version": 93} \ No newline at end of file +{ + "DataVersion": 0, + "Entities": [ + { + "clientOnly": false, + "collidesWith": "static,dynamic,kinematic,otherAvatar,", + "collisionMask": 23, + "created": "2018-08-29T22:59:44Z", + "dimensions": { + "blue": 0.26190000772476196, + "green": 0.5595999956130981, + "red": 0.5318999886512756, + "x": 0.5318999886512756, + "y": 0.5595999956130981, + "z": 0.26190000772476196 + }, + "id": "{4782f05d-ca51-41d4-9d19-21b8cad5ec2d}", + "lastEdited": 1535584079688600, + "lastEditedBy": "{f5457c14-32ca-45c2-9dde-4f5b30b3be1b}", + "name": "Try Again Box", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "position": { + "blue": 4.54052734375, + "green": 1.722428798675537, + "red": 4.593362331390381, + "x": 4.593362331390381, + "y": 1.722428798675537, + "z": 4.54052734375 + }, + "queryAACube": { + "scale": 0.8152676820755005, + "x": 4.185728549957275, + "y": 1.3147950172424316, + "z": 4.1328935623168945 + }, + "rotation": { + "w": 0.9868703484535217, + "x": -0.010178769007325172, + "y": -0.15702557563781738, + "z": 0.03642075136303902 + }, + "script": "file:///C:/Users/wayne/development/tryAgainBoxEntityScript.js", + "shape": "Cube", + "type": "Box", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}", + "visible": false + }, + { + "clientOnly": false, + "created": "2018-08-29T23:01:55Z", + "dimensions": { + "blue": 0.26190000772476196, + "green": 0.5595999956130981, + "red": 0.5318999886512756, + "x": 0.5318999886512756, + "y": 0.5595999956130981, + "z": 0.26190000772476196 + }, + "id": "{8c9287c8-3826-4f2e-944e-05d8d4715fb8}", + "lastEdited": 1535584095676575, + "lastEditedBy": "{f5457c14-32ca-45c2-9dde-4f5b30b3be1b}", + "name": "Back Box", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "position": { + "blue": 3.9590959548950195, + "green": 1.738053798675537, + "red": 5.0181121826171875, + "x": 5.0181121826171875, + "y": 1.738053798675537, + "z": 3.9590959548950195 + }, + "queryAACube": { + "scale": 0.8152676820755005, + "x": 4.610478401184082, + "y": 1.3304200172424316, + "z": 3.551462173461914 + }, + "rotation": { + "w": 0.9366722106933594, + "x": 0, + "y": -0.3502073884010315, + "z": 0 + }, + "script": "file:///C:/Users/wayne/development/backBoxEntityScript.js", + "shape": "Cube", + "type": "Box", + "userData": "{\"grabbableKey\":{\"grabbable\":true}}", + "visible": false + }, + { + "clientOnly": false, + "created": "2018-08-29T22:57:33Z", + "dimensions": { + "blue": 14.40000057220459, + "green": 14.40000057220459, + "red": 14.40000057220459, + "x": 14.40000057220459, + "y": 14.40000057220459, + "z": 14.40000057220459 + }, + "id": "{8e6bd656-d764-4724-a89d-7b4ff96abf8a}", + "lastEdited": 1535583477860044, + "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "position": { + "blue": 2.3440732955932617, + "green": 1.7684326171875, + "red": 1.8812973499298096, + "x": 1.8812973499298096, + "y": 1.7684326171875, + "z": 2.3440732955932617 + }, + "queryAACube": { + "scale": 24.9415340423584, + "x": -10.589469909667969, + "y": -10.7023344039917, + "z": -10.126693725585938 + }, + "rotation": { + "w": 0.8697794675827026, + "x": -1.52587890625e-05, + "y": 0.4933699369430542, + "z": -4.57763671875e-05 + }, + "shapeType": "box", + "skyboxMode": "enabled", + "type": "Zone", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}" + }, + { + "alpha": 0, + "alphaFinish": 0, + "alphaStart": 0.25, + "clientOnly": false, + "colorFinish": { + "blue": 0, + "green": 0, + "red": 0, + "x": 0, + "y": 0, + "z": 0 + }, + "colorStart": { + "blue": 255, + "green": 255, + "red": 255, + "x": 255, + "y": 255, + "z": 255 + }, + "created": "2018-08-29T22:57:33Z", + "dimensions": { + "blue": 13.24000072479248, + "green": 13.24000072479248, + "red": 13.24000072479248, + "x": 13.24000072479248, + "y": 13.24000072479248, + "z": 13.24000072479248 + }, + "emitAcceleration": { + "blue": 0, + "green": 0.10000000149011612, + "red": 0, + "x": 0, + "y": 0.10000000149011612, + "z": 0 + }, + "emitDimensions": { + "blue": 1, + "green": 1, + "red": 1, + "x": 1, + "y": 1, + "z": 1 + }, + "emitOrientation": { + "w": 1, + "x": -1.52587890625e-05, + "y": -1.52587890625e-05, + "z": -1.52587890625e-05 + }, + "emitRate": 6, + "emitSpeed": 0, + "id": "{b5ba3aa4-2eb9-4cfd-aec7-43635511c6b7}", + "lastEdited": 1535583477861791, + "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", + "lifespan": 10, + "maxParticles": 10, + "name": "Stars", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "particleRadius": 0.07000000029802322, + "polarFinish": 3.1415927410125732, + "position": { + "blue": 1.3712034225463867, + "green": 0.5220947265625, + "red": 2.6281180381774902, + "x": 2.6281180381774902, + "y": 0.5220947265625, + "z": 1.3712034225463867 + }, + "queryAACube": { + "scale": 22.932353973388672, + "x": -8.838058471679688, + "y": -10.944082260131836, + "z": -10.09497356414795 + }, + "radiusFinish": 0, + "radiusStart": 0, + "rotation": { + "w": 0.9852597713470459, + "x": -1.52587890625e-05, + "y": -0.17106890678405762, + "z": -7.62939453125e-05 + }, + "speedSpread": 0, + "spinFinish": null, + "spinStart": null, + "textures": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/star.png", + "type": "ParticleEffect", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}" + }, + { + "clientOnly": false, + "color": { + "blue": 0, + "green": 0, + "red": 0 + }, + "created": "2018-08-29T22:57:33Z", + "dimensions": { + "blue": 11.117486953735352, + "green": 3.580313205718994, + "red": 0.20000000298023224, + "x": 0.20000000298023224, + "y": 3.580313205718994, + "z": 11.117486953735352 + }, + "id": "{12a26c55-c411-4c4c-a124-cac9c80f9532}", + "lastEdited": 1535583681180522, + "lastEditedBy": "{f5457c14-32ca-45c2-9dde-4f5b30b3be1b}", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "position": { + "blue": 1.9063844680786133, + "green": 1.15850830078125, + "red": 0.16632509231567383, + "x": 0.16632509231567383, + "y": 1.15850830078125, + "z": 1.9063844680786133 + }, + "queryAACube": { + "scale": 11.681488037109375, + "x": -5.674418926239014, + "y": -4.6822357177734375, + "z": -3.934359550476074 + }, + "rotation": { + "w": 0.9666743278503418, + "x": -4.57763671875e-05, + "y": -0.2560006380081177, + "z": 1.52587890625e-05 + }, + "shape": "Cube", + "type": "Box", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}", + "visible": false + }, + { + "angularDamping": 0, + "clientOnly": false, + "color": { + "blue": 0, + "green": 0, + "red": 255 + }, + "created": "2018-08-29T22:57:33Z", + "dimensions": { + "blue": 0.20000000298023224, + "green": 0.20000000298023224, + "red": 0.20000000298023224, + "x": 0.20000000298023224, + "y": 0.20000000298023224, + "z": 0.20000000298023224 + }, + "id": "{e8fd2c79-1303-49e4-8e4a-823272d6558c}", + "lastEdited": 1535583477862445, + "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", + "name": "Particle Rotate", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "position": { + "blue": 1.3116319179534912, + "green": 0.0772705078125, + "red": 2.705613613128662, + "x": 2.705613613128662, + "y": 0.0772705078125, + "z": 1.3116319179534912 + }, + "queryAACube": { + "scale": 0.3464101552963257, + "x": 2.5324084758758545, + "y": -0.09593456983566284, + "z": 1.1384267807006836 + }, + "rotation": { + "w": -0.38777750730514526, + "x": -0.37337303161621094, + "y": -0.8409399390220642, + "z": 0.055222392082214355 + }, + "script": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/rotate.js", + "scriptTimestamp": 1532724769253, + "shape": "Cube", + "type": "Box", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}", + "visible": false + }, + { + "clientOnly": false, + "created": "2018-08-29T22:57:33Z", + "dimensions": { + "blue": 9.030570983886719, + "green": 0.0719478651881218, + "red": 9.030570983886719, + "x": 9.030570983886719, + "y": 0.0719478651881218, + "z": 9.030570983886719 + }, + "id": "{85b4551d-c05d-4038-b188-30ad5db9c23a}", + "lastEdited": 1535583477861514, + "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", + "modelURL": "http://hifi-content.s3.amazonaws.com/alexia/LoadingScreens/floor.fbx", + "name": "Floor", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "position": { + "blue": 4.2324604988098145, + "green": 0.17547607421875, + "red": 4.802988529205322, + "x": 4.802988529205322, + "y": 0.17547607421875, + "z": 4.2324604988098145 + }, + "queryAACube": { + "scale": 12.771358489990234, + "x": -1.582690715789795, + "y": -6.210203170776367, + "z": -2.1532187461853027 + }, + "rotation": { + "w": 0.8648051023483276, + "x": -1.52587890625e-05, + "y": 0.5020675659179688, + "z": -4.57763671875e-05 + }, + "shapeType": "simple-hull", + "type": "Model", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}" + }, + { + "clientOnly": false, + "created": "2018-08-29T22:57:33Z", + "dimensions": { + "blue": 0.06014331430196762, + "green": 2.582186460494995, + "red": 2.582186698913574, + "x": 2.582186698913574, + "y": 2.582186460494995, + "z": 0.06014331430196762 + }, + "id": "{8e4d8047-c2e2-4b2c-bfa2-c732d419d59a}", + "lastEdited": 1535583477860645, + "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", + "modelURL": "http://hifi-content.s3.amazonaws.com/alexia/LoadingScreens/oopsDialog.fbx", + "name": "Oops Dialog", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "position": { + "blue": 1.45927095413208, + "green": 1.6763916015625, + "red": 0, + "x": 0, + "y": 1.6763916015625, + "z": 1.45927095413208 + }, + "queryAACube": { + "scale": 3.6522583961486816, + "x": -1.8261291980743408, + "y": -0.14973759651184082, + "z": -0.36685824394226074 + }, + "rotation": { + "w": 0.8684672117233276, + "x": -4.57763671875e-05, + "y": 0.4957197904586792, + "z": -7.62939453125e-05 + }, + "type": "Model", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}" + }, + { + "angularDamping": 0, + "clientOnly": false, + "color": { + "blue": 0, + "green": 0, + "red": 255 + }, + "created": "2018-08-29T22:57:33Z", + "dimensions": { + "blue": 0.20000000298023224, + "green": 0.20000000298023224, + "red": 0.20000000298023224, + "x": 0.20000000298023224, + "y": 0.20000000298023224, + "z": 0.20000000298023224 + }, + "id": "{4fc1436d-00e7-43ec-83e1-f70cff544885}", + "lastEdited": 1535583477862827, + "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", + "name": "Particle Rotate", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "position": { + "blue": 3.8216662406921387, + "green": 0.15618896484375, + "red": 1.2409718036651611, + "x": 1.2409718036651611, + "y": 0.15618896484375, + "z": 3.8216662406921387 + }, + "queryAACube": { + "scale": 0.3464101552963257, + "x": 1.0677666664123535, + "y": -0.017016112804412842, + "z": 3.648461103439331 + }, + "rotation": { + "w": 0.6747081279754639, + "x": -0.06532388925552368, + "y": -0.6342412233352661, + "z": 0.37175559997558594 + }, + "script": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/rotate.js", + "scriptTimestamp": 1532724769253, + "shape": "Cube", + "type": "Box", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}", + "visible": false + }, + { + "clientOnly": false, + "color": { + "blue": 0, + "green": 0, + "red": 0 + }, + "created": "2018-08-29T22:57:33Z", + "dimensions": { + "blue": 11.117486953735352, + "green": 3.580313205718994, + "red": 0.20000000298023224, + "x": 0.20000000298023224, + "y": 3.580313205718994, + "z": 11.117486953735352 + }, + "id": "{81a7c620-88ea-4056-b148-449d963c7eb5}", + "lastEdited": 1535583477860260, + "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "position": { + "blue": 0, + "green": 1.1583251953125, + "red": 4.971565246582031, + "x": 4.971565246582031, + "y": 1.1583251953125, + "z": 0 + }, + "queryAACube": { + "scale": 11.681488037109375, + "x": -0.8691787719726562, + "y": -4.6824188232421875, + "z": -5.8407440185546875 + }, + "rotation": { + "w": 0.8637980222702026, + "x": -4.57763671875e-05, + "y": 0.5038070678710938, + "z": -1.52587890625e-05 + }, + "shape": "Cube", + "type": "Box", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}", + "visible": false + }, + { + "clientOnly": false, + "created": "2018-08-29T22:57:33Z", + "dimensions": { + "blue": 2.1097896099090576, + "green": 0.04847164824604988, + "red": 1.458284616470337, + "x": 1.458284616470337, + "y": 0.04847164824604988, + "z": 2.1097896099090576 + }, + "id": "{09436993-6042-49ff-bfec-0fd28f792251}", + "lastEdited": 1535583477863518, + "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", + "modelURL": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/portal1.fbx", + "name": "Try Again", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "position": { + "blue": 3.946338653564453, + "green": 0.2467041015625, + "red": 1.6013128757476807, + "x": 1.6013128757476807, + "y": 0.2467041015625, + "z": 3.946338653564453 + }, + "queryAACube": { + "scale": 2.5651814937591553, + "x": 0.318722128868103, + "y": -1.0358866453170776, + "z": 2.663747787475586 + }, + "rotation": { + "w": 0.8220492601394653, + "x": -1.52587890625e-05, + "y": 0.5693598985671997, + "z": -0.0001068115234375 + }, + "script": "file:///C:/Users/wayne/development/tryAgainEntityScript.js", + "shapeType": "static-mesh", + "type": "Model", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}" + }, + { + "angularDamping": 0, + "clientOnly": false, + "color": { + "blue": 0, + "green": 0, + "red": 255 + }, + "created": "2018-08-29T22:57:33Z", + "dimensions": { + "blue": 0.20000000298023224, + "green": 0.20000000298023224, + "red": 0.20000000298023224, + "x": 0.20000000298023224, + "y": 0.20000000298023224, + "z": 0.20000000298023224 + }, + "id": "{86188ae0-6b36-4753-a5c0-0ba31b8ca89a}", + "lastEdited": 1535583477861108, + "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", + "name": "Particle Rotate", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "position": { + "blue": 1.3116319179534912, + "green": 0, + "red": 2.705613613128662, + "x": 2.705613613128662, + "y": 0, + "z": 1.3116319179534912 + }, + "queryAACube": { + "scale": 0.3464101552963257, + "x": 2.5324084758758545, + "y": -0.17320507764816284, + "z": 1.1384267807006836 + }, + "rotation": { + "w": 0.9127794504165649, + "x": 0.2575265169143677, + "y": 0.15553522109985352, + "z": 0.2761729955673218 + }, + "script": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/rotate.js", + "scriptTimestamp": 1532724769253, + "shape": "Cube", + "type": "Box", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}", + "visible": false + }, + { + "angularDamping": 0, + "clientOnly": false, + "color": { + "blue": 0, + "green": 0, + "red": 255 + }, + "created": "2018-08-29T22:57:33Z", + "dimensions": { + "blue": 0.20000000298023224, + "green": 0.20000000298023224, + "red": 0.20000000298023224, + "x": 0.20000000298023224, + "y": 0.20000000298023224, + "z": 0.20000000298023224 + }, + "id": "{ffa954a9-43e4-47b1-82c9-b921ed3414b0}", + "lastEdited": 1535583477861316, + "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", + "name": "Particle Rotate", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "position": { + "blue": 3.8216662406921387, + "green": 0.0772705078125, + "red": 1.2409718036651611, + "x": 1.2409718036651611, + "y": 0.0772705078125, + "z": 3.8216662406921387 + }, + "queryAACube": { + "scale": 0.3464101552963257, + "x": 1.0677666664123535, + "y": -0.09593456983566284, + "z": 3.648461103439331 + }, + "rotation": { + "w": 0.926024317741394, + "x": 0.20308232307434082, + "y": -0.010269343852996826, + "z": 0.3179827928543091 + }, + "script": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/rotate.js", + "scriptTimestamp": 1532724769253, + "shape": "Cube", + "type": "Box", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}", + "visible": false + }, + { + "angularDamping": 0, + "clientOnly": false, + "color": { + "blue": 0, + "green": 0, + "red": 255 + }, + "created": "2018-08-29T22:57:33Z", + "dimensions": { + "blue": 0.20000000298023224, + "green": 0.20000000298023224, + "red": 0.20000000298023224, + "x": 0.20000000298023224, + "y": 0.20000000298023224, + "z": 0.20000000298023224 + }, + "id": "{e86df231-a55a-4ca7-ae68-d3271a543d10}", + "lastEdited": 1535583477860886, + "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", + "name": "Particle Rotate", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "position": { + "blue": 3.8216662406921387, + "green": 0, + "red": 1.2409718036651611, + "x": 1.2409718036651611, + "y": 0, + "z": 3.8216662406921387 + }, + "queryAACube": { + "scale": 0.3464101552963257, + "x": 1.0677666664123535, + "y": -0.17320507764816284, + "z": 3.648461103439331 + }, + "rotation": { + "w": 0.6444342136383057, + "x": -0.08220034837722778, + "y": -0.6649118661880493, + "z": 0.3684900999069214 + }, + "script": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/rotate.js", + "scriptTimestamp": 1532724769253, + "shape": "Cube", + "type": "Box", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}", + "visible": false + }, + { + "angularDamping": 0, + "clientOnly": false, + "color": { + "blue": 0, + "green": 0, + "red": 255 + }, + "created": "2018-08-29T22:57:33Z", + "dimensions": { + "blue": 0.20000000298023224, + "green": 0.20000000298023224, + "red": 0.20000000298023224, + "x": 0.20000000298023224, + "y": 0.20000000298023224, + "z": 0.20000000298023224 + }, + "id": "{252ffb06-db92-4732-9315-7ee293c24ab8}", + "lastEdited": 1535583477862267, + "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", + "name": "Particle Rotate", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "position": { + "blue": 1.3116319179534912, + "green": 0.15618896484375, + "red": 2.705613613128662, + "x": 2.705613613128662, + "y": 0.15618896484375, + "z": 1.3116319179534912 + }, + "queryAACube": { + "scale": 0.3464101552963257, + "x": 2.5324084758758545, + "y": -0.017016112804412842, + "z": 1.1384267807006836 + }, + "rotation": { + "w": 0.46953535079956055, + "x": -0.16719311475753784, + "y": -0.7982757091522217, + "z": 0.3380941152572632 + }, + "script": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/rotate.js", + "scriptTimestamp": 1532724769253, + "shape": "Cube", + "type": "Box", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}", + "visible": false + }, + { + "clientOnly": false, + "color": { + "blue": 0, + "green": 0, + "red": 0 + }, + "created": "2018-08-29T22:57:33Z", + "dimensions": { + "blue": 11.117486953735352, + "green": 3.580313205718994, + "red": 0.20000000298023224, + "x": 0.20000000298023224, + "y": 3.580313205718994, + "z": 11.117486953735352 + }, + "id": "{1c93807b-311d-48cd-af5e-b477d33b2811}", + "lastEdited": 1535583477860455, + "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "position": { + "blue": 5.268576622009277, + "green": 1.1588134765625, + "red": 6.100250244140625, + "x": 6.100250244140625, + "y": 1.1588134765625, + "z": 5.268576622009277 + }, + "queryAACube": { + "scale": 11.681488037109375, + "x": 0.2595062255859375, + "y": -4.6819305419921875, + "z": -0.5721673965454102 + }, + "rotation": { + "w": 0.9662165641784668, + "x": -4.57763671875e-05, + "y": -0.2576791048049927, + "z": 1.52587890625e-05 + }, + "shape": "Cube", + "type": "Box", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}", + "visible": false + }, + { + "alpha": 0, + "alphaFinish": 0, + "alphaStart": 1, + "clientOnly": false, + "color": { + "blue": 255, + "green": 205, + "red": 3 + }, + "colorFinish": { + "blue": 0, + "green": 0, + "red": 0, + "x": 0, + "y": 0, + "z": 0 + }, + "colorStart": { + "blue": 255, + "green": 204, + "red": 0, + "x": 0, + "y": 204, + "z": 255 + }, + "created": "2018-08-29T22:57:33Z", + "dimensions": { + "blue": 2.5, + "green": 2.5, + "red": 2.5, + "x": 2.5, + "y": 2.5, + "z": 2.5 + }, + "emitAcceleration": { + "blue": 0, + "green": 0, + "red": 0, + "x": 0, + "y": 0, + "z": 0 + }, + "emitDimensions": { + "blue": 1, + "green": 1, + "red": 1, + "x": 1, + "y": 1, + "z": 1 + }, + "emitOrientation": { + "w": 0.9993909597396851, + "x": 0.034897372126579285, + "y": -1.525880907138344e-05, + "z": -1.525880907138344e-05 + }, + "emitRate": 2, + "emitSpeed": 0, + "emitterShouldTrail": true, + "id": "{4cb534d1-5494-4aaa-aa28-ff5cee6e0b8f}", + "lastEdited": 1535583477862081, + "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", + "lifespan": 10, + "maxParticles": 40, + "name": "Rays", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "particleRadius": 0.75, + "polarFinish": 3.1415927410125732, + "position": { + "blue": 3.814434051513672, + "green": 1.44122314453125, + "red": 1.2319090366363525, + "x": 1.2319090366363525, + "y": 1.44122314453125, + "z": 3.814434051513672 + }, + "queryAACube": { + "scale": 4.330127239227295, + "x": -0.9331545829772949, + "y": -0.7238404750823975, + "z": 1.6493704319000244 + }, + "radiusFinish": 0.10000000149011612, + "radiusStart": 0, + "rotation": { + "w": 0.9594720602035522, + "x": -1.52587890625e-05, + "y": 0.28178834915161133, + "z": -4.57763671875e-05 + }, + "script": "file:///C:/Users/wayne/development/raysTryAgainEntityScript.js", + "speedSpread": 0, + "spinFinish": null, + "spinStart": null, + "textures": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/stripe.png", + "type": "ParticleEffect", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}" + }, + { + "clientOnly": false, + "color": { + "blue": 0, + "green": 0, + "red": 0 + }, + "created": "2018-08-29T22:57:33Z", + "dimensions": { + "blue": 11.117486953735352, + "green": 3.580313205718994, + "red": 0.20000000298023224, + "x": 0.20000000298023224, + "y": 3.580313205718994, + "z": 11.117486953735352 + }, + "id": "{a58a8ffe-17ee-4154-b8bb-54e2f0ca9a9d}", + "lastEdited": 1535583477862953, + "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "position": { + "blue": 6.1806135177612305, + "green": 1.1588134765625, + "red": 1.4755167961120605, + "x": 1.4755167961120605, + "y": 1.1588134765625, + "z": 6.1806135177612305 + }, + "queryAACube": { + "scale": 11.681488037109375, + "x": -4.365227222442627, + "y": -4.6819305419921875, + "z": 0.33986949920654297 + }, + "rotation": { + "w": 0.8637980222702026, + "x": -4.57763671875e-05, + "y": 0.5038070678710938, + "z": -1.52587890625e-05 + }, + "shape": "Cube", + "type": "Box", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}", + "visible": false + }, + { + "alpha": 0, + "alphaFinish": 0, + "alphaStart": 0.25, + "clientOnly": false, + "colorFinish": { + "blue": 0, + "green": 0, + "red": 0, + "x": 0, + "y": 0, + "z": 0 + }, + "colorStart": { + "blue": 255, + "green": 255, + "red": 255, + "x": 255, + "y": 255, + "z": 255 + }, + "created": "2018-08-29T22:57:33Z", + "dimensions": { + "blue": 13.24000072479248, + "green": 13.24000072479248, + "red": 13.24000072479248, + "x": 13.24000072479248, + "y": 13.24000072479248, + "z": 13.24000072479248 + }, + "emitAcceleration": { + "blue": 0, + "green": 0.10000000149011612, + "red": 0, + "x": 0, + "y": 0.10000000149011612, + "z": 0 + }, + "emitDimensions": { + "blue": 1, + "green": 1, + "red": 1, + "x": 1, + "y": 1, + "z": 1 + }, + "emitOrientation": { + "w": 1, + "x": -1.52587890625e-05, + "y": -1.52587890625e-05, + "z": -1.52587890625e-05 + }, + "emitRate": 6, + "emitSpeed": 0, + "emitterShouldTrail": true, + "id": "{b6c56e83-f098-422d-a0e8-fd1497c62fbe}", + "lastEdited": 1535583477863251, + "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", + "lifespan": 10, + "maxParticles": 10, + "name": "Stars", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "particleRadius": 0.07000000029802322, + "polarFinish": 3.1415927410125732, + "position": { + "blue": 3.78922963142395, + "green": 0.5220947265625, + "red": 1.1928560733795166, + "x": 1.1928560733795166, + "y": 0.5220947265625, + "z": 3.78922963142395 + }, + "queryAACube": { + "scale": 22.932353973388672, + "x": -10.273321151733398, + "y": -10.944082260131836, + "z": -7.676947593688965 + }, + "radiusFinish": 0, + "radiusStart": 0, + "rotation": { + "w": 0.996429443359375, + "x": -1.52587890625e-05, + "y": -0.08442819118499756, + "z": -4.57763671875e-05 + }, + "speedSpread": 0, + "spinFinish": null, + "spinStart": null, + "textures": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/star.png", + "type": "ParticleEffect", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}" + }, + { + "alpha": 0, + "alphaFinish": 0, + "alphaStart": 1, + "clientOnly": false, + "color": { + "blue": 211, + "green": 227, + "red": 104 + }, + "colorFinish": { + "blue": 0, + "green": 0, + "red": 0, + "x": 0, + "y": 0, + "z": 0 + }, + "colorStart": { + "blue": 211, + "green": 227, + "red": 104, + "x": 104, + "y": 227, + "z": 211 + }, + "created": "2018-08-29T22:57:33Z", + "dimensions": { + "blue": 2.5, + "green": 2.5, + "red": 2.5, + "x": 2.5, + "y": 2.5, + "z": 2.5 + }, + "emitAcceleration": { + "blue": 0, + "green": 0, + "red": 0, + "x": 0, + "y": 0, + "z": 0 + }, + "emitDimensions": { + "blue": 1, + "green": 1, + "red": 1, + "x": 1, + "y": 1, + "z": 1 + }, + "emitOrientation": { + "w": 0.9993909597396851, + "x": 0.034897372126579285, + "y": -1.525880907138344e-05, + "z": -1.525880907138344e-05 + }, + "emitRate": 2, + "emitSpeed": 0, + "id": "{f87fab56-c8d8-4ff8-abf0-35a76dfccf2b}", + "lastEdited": 1535583477862685, + "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", + "lifespan": 10, + "maxParticles": 40, + "name": "Rays", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "particleRadius": 0.75, + "polarFinish": 3.1415927410125732, + "position": { + "blue": 1.3553659915924072, + "green": 1.44122314453125, + "red": 2.572803497314453, + "x": 2.572803497314453, + "y": 1.44122314453125, + "z": 1.3553659915924072 + }, + "queryAACube": { + "scale": 4.330127239227295, + "x": 0.40773987770080566, + "y": -0.7238404750823975, + "z": -0.8096976280212402 + }, + "radiusFinish": 0.10000000149011612, + "radiusStart": 0, + "rotation": { + "w": 0.9803768396377563, + "x": -1.52587890625e-05, + "y": 0.19707024097442627, + "z": -7.62939453125e-05 + }, + "script": "file:///C:/Users/wayne/development/raysBackEntityScript.js", + "speedSpread": 0, + "spinFinish": null, + "spinStart": null, + "textures": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/stripe.png", + "type": "ParticleEffect", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}" + }, + { + "clientOnly": false, + "created": "2018-08-29T22:57:33Z", + "dimensions": { + "blue": 2.1097896099090576, + "green": 0.04847164824604988, + "red": 1.458284616470337, + "x": 1.458284616470337, + "y": 0.04847164824604988, + "z": 2.1097896099090576 + }, + "id": "{1af53cfc-0cce-467a-96e0-a937f2651ce2}", + "lastEdited": 1535583477863389, + "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", + "modelURL": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/portal2.fbx", + "name": "Back", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "position": { + "blue": 1.5835940837860107, + "green": 0.2467041015625, + "red": 3.0345542430877686, + "x": 3.0345542430877686, + "y": 0.2467041015625, + "z": 1.5835940837860107 + }, + "queryAACube": { + "scale": 2.5651814937591553, + "x": 1.751963496208191, + "y": -1.0358866453170776, + "z": 0.3010033369064331 + }, + "rotation": { + "w": 0.9084458351135254, + "x": -1.52587890625e-05, + "y": 0.4179598093032837, + "z": -0.0001068115234375 + }, + "script": "file:///C:/Users/wayne/development/tryAgainEntityScript.js", + "shapeType": "static-mesh", + "type": "Model", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}" + } + ], + "Id": "{351e561a-ee5e-4e8b-87ab-d28677d3b374}", + "Version": 93 +} From a5243fbd7e5048c0a17ed28d1b712e5a713298c2 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Wed, 29 Aug 2018 16:12:50 -0700 Subject: [PATCH 054/210] commenting out notification for script --- scripts/system/notifications.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/system/notifications.js b/scripts/system/notifications.js index 0778e2a44b..13d500b909 100644 --- a/scripts/system/notifications.js +++ b/scripts/system/notifications.js @@ -624,7 +624,7 @@ Controller.keyReleaseEvent.connect(keyReleaseEvent); Script.update.connect(update); Script.scriptEnding.connect(scriptEnding); - Window.domainConnectionRefused.connect(onDomainConnectionRefused); + //Window.domainConnectionRefused.connect(onDomainConnectionRefused); Window.stillSnapshotTaken.connect(onSnapshotTaken); Window.snapshot360Taken.connect(onSnapshotTaken); Window.processingGifStarted.connect(processingGif); From eb29c9c4a298bd13ec87832800edb1a24597e748 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Wed, 29 Aug 2018 16:53:22 -0700 Subject: [PATCH 055/210] updating with default landing location --- interface/resources/serverless/redirect.json | 130 ++++++++++--------- interface/src/Application.cpp | 1 - 2 files changed, 67 insertions(+), 64 deletions(-) diff --git a/interface/resources/serverless/redirect.json b/interface/resources/serverless/redirect.json index 9e3b29cc26..71dfae4212 100644 --- a/interface/resources/serverless/redirect.json +++ b/interface/resources/serverless/redirect.json @@ -23,9 +23,9 @@ "blue": 4.54052734375, "green": 1.722428798675537, "red": 4.593362331390381, - "x": 4.593362331390381, - "y": 1.722428798675537, - "z": 4.54052734375 + "x": 0.5933623313903809, + "y": -7.777571201324463, + "z": 0.54052734375 }, "queryAACube": { "scale": 0.8152676820755005, @@ -65,9 +65,9 @@ "blue": 3.9590959548950195, "green": 1.738053798675537, "red": 5.0181121826171875, - "x": 5.0181121826171875, - "y": 1.738053798675537, - "z": 3.9590959548950195 + "x": 1.0181121826171875, + "y": -7.761946201324463, + "z": -0.04090404510498047 }, "queryAACube": { "scale": 0.8152676820755005, @@ -106,9 +106,9 @@ "blue": 2.3440732955932617, "green": 1.7684326171875, "red": 1.8812973499298096, - "x": 1.8812973499298096, - "y": 1.7684326171875, - "z": 2.3440732955932617 + "x": -2.1187026500701904, + "y": -7.7315673828125, + "z": -1.6559267044067383 }, "queryAACube": { "scale": 24.9415340423584, @@ -194,9 +194,9 @@ "blue": 1.3712034225463867, "green": 0.5220947265625, "red": 2.6281180381774902, - "x": 2.6281180381774902, - "y": 0.5220947265625, - "z": 1.3712034225463867 + "x": -1.3718819618225098, + "y": -8.9779052734375, + "z": -2.6287965774536133 }, "queryAACube": { "scale": 22.932353973388672, @@ -243,9 +243,9 @@ "blue": 1.9063844680786133, "green": 1.15850830078125, "red": 0.16632509231567383, - "x": 0.16632509231567383, - "y": 1.15850830078125, - "z": 1.9063844680786133 + "x": -3.833674907684326, + "y": -8.34149169921875, + "z": -2.0936155319213867 }, "queryAACube": { "scale": 11.681488037109375, @@ -290,9 +290,9 @@ "blue": 1.3116319179534912, "green": 0.0772705078125, "red": 2.705613613128662, - "x": 2.705613613128662, - "y": 0.0772705078125, - "z": 1.3116319179534912 + "x": -1.294386386871338, + "y": -9.4227294921875, + "z": -2.688368082046509 }, "queryAACube": { "scale": 0.3464101552963257, @@ -334,9 +334,9 @@ "blue": 4.2324604988098145, "green": 0.17547607421875, "red": 4.802988529205322, - "x": 4.802988529205322, - "y": 0.17547607421875, - "z": 4.2324604988098145 + "x": 0.8029885292053223, + "y": -9.32452392578125, + "z": 0.23246049880981445 }, "queryAACube": { "scale": 12.771358489990234, @@ -375,9 +375,9 @@ "blue": 1.45927095413208, "green": 1.6763916015625, "red": 0, - "x": 0, - "y": 1.6763916015625, - "z": 1.45927095413208 + "x": -4, + "y": -7.8236083984375, + "z": -2.54072904586792 }, "queryAACube": { "scale": 3.6522583961486816, @@ -420,9 +420,9 @@ "blue": 3.8216662406921387, "green": 0.15618896484375, "red": 1.2409718036651611, - "x": 1.2409718036651611, - "y": 0.15618896484375, - "z": 3.8216662406921387 + "x": -2.759028196334839, + "y": -9.34381103515625, + "z": -0.17833375930786133 }, "queryAACube": { "scale": 0.3464101552963257, @@ -467,9 +467,9 @@ "blue": 0, "green": 1.1583251953125, "red": 4.971565246582031, - "x": 4.971565246582031, - "y": 1.1583251953125, - "z": 0 + "x": 0.9715652465820312, + "y": -8.3416748046875, + "z": -4 }, "queryAACube": { "scale": 11.681488037109375, @@ -509,9 +509,9 @@ "blue": 3.946338653564453, "green": 0.2467041015625, "red": 1.6013128757476807, - "x": 1.6013128757476807, - "y": 0.2467041015625, - "z": 3.946338653564453 + "x": -2.3986871242523193, + "y": -9.2532958984375, + "z": -0.053661346435546875 }, "queryAACube": { "scale": 2.5651814937591553, @@ -556,9 +556,9 @@ "blue": 1.3116319179534912, "green": 0, "red": 2.705613613128662, - "x": 2.705613613128662, - "y": 0, - "z": 1.3116319179534912 + "x": -1.294386386871338, + "y": -9.5, + "z": -2.688368082046509 }, "queryAACube": { "scale": 0.3464101552963257, @@ -605,9 +605,9 @@ "blue": 3.8216662406921387, "green": 0.0772705078125, "red": 1.2409718036651611, - "x": 1.2409718036651611, - "y": 0.0772705078125, - "z": 3.8216662406921387 + "x": -2.759028196334839, + "y": -9.4227294921875, + "z": -0.17833375930786133 }, "queryAACube": { "scale": 0.3464101552963257, @@ -654,9 +654,9 @@ "blue": 3.8216662406921387, "green": 0, "red": 1.2409718036651611, - "x": 1.2409718036651611, - "y": 0, - "z": 3.8216662406921387 + "x": -2.759028196334839, + "y": -9.5, + "z": -0.17833375930786133 }, "queryAACube": { "scale": 0.3464101552963257, @@ -703,9 +703,9 @@ "blue": 1.3116319179534912, "green": 0.15618896484375, "red": 2.705613613128662, - "x": 2.705613613128662, - "y": 0.15618896484375, - "z": 1.3116319179534912 + "x": -1.294386386871338, + "y": -9.34381103515625, + "z": -2.688368082046509 }, "queryAACube": { "scale": 0.3464101552963257, @@ -750,9 +750,9 @@ "blue": 5.268576622009277, "green": 1.1588134765625, "red": 6.100250244140625, - "x": 6.100250244140625, - "y": 1.1588134765625, - "z": 5.268576622009277 + "x": 2.100250244140625, + "y": -8.3411865234375, + "z": 1.2685766220092773 }, "queryAACube": { "scale": 11.681488037109375, @@ -844,9 +844,9 @@ "blue": 3.814434051513672, "green": 1.44122314453125, "red": 1.2319090366363525, - "x": 1.2319090366363525, - "y": 1.44122314453125, - "z": 3.814434051513672 + "x": -2.7680909633636475, + "y": -8.05877685546875, + "z": -0.18556594848632812 }, "queryAACube": { "scale": 4.330127239227295, @@ -894,9 +894,9 @@ "blue": 6.1806135177612305, "green": 1.1588134765625, "red": 1.4755167961120605, - "x": 1.4755167961120605, - "y": 1.1588134765625, - "z": 6.1806135177612305 + "x": -2.5244832038879395, + "y": -8.3411865234375, + "z": 2.1806135177612305 }, "queryAACube": { "scale": 11.681488037109375, @@ -983,9 +983,9 @@ "blue": 3.78922963142395, "green": 0.5220947265625, "red": 1.1928560733795166, - "x": 1.1928560733795166, - "y": 0.5220947265625, - "z": 3.78922963142395 + "x": -2.8071439266204834, + "y": -8.9779052734375, + "z": -0.2107703685760498 }, "queryAACube": { "scale": 22.932353973388672, @@ -1080,9 +1080,9 @@ "blue": 1.3553659915924072, "green": 1.44122314453125, "red": 2.572803497314453, - "x": 2.572803497314453, - "y": 1.44122314453125, - "z": 1.3553659915924072 + "x": -1.4271965026855469, + "y": -8.05877685546875, + "z": -2.6446340084075928 }, "queryAACube": { "scale": 4.330127239227295, @@ -1127,9 +1127,9 @@ "blue": 1.5835940837860107, "green": 0.2467041015625, "red": 3.0345542430877686, - "x": 3.0345542430877686, - "y": 0.2467041015625, - "z": 1.5835940837860107 + "x": -0.9654457569122314, + "y": -9.2532958984375, + "z": -2.4164059162139893 }, "queryAACube": { "scale": 2.5651814937591553, @@ -1149,6 +1149,10 @@ "userData": "{\"grabbableKey\":{\"grabbable\":false}}" } ], + "Paths": + { + "/": "/1.46,-9,0.7/0,0.487,0,0.86663" + }, "Id": "{351e561a-ee5e-4e8b-87ab-d28677d3b374}", "Version": 93 } diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 6e15cc0dd8..348d1d5690 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -2369,7 +2369,6 @@ void Application::domainConnectionRedirect(const QString& reasonMessage, int rea addressManager->handleLookupString(REDIRECT_HIFI_ADDRESS); getMyAvatar()->setWorldVelocity(glm::vec3(0.0f)); // in (w, x, y, z) component-structure for the constructor - getMyAvatar()->setWorldOrientation(glm::quat(0.8775935173034668f, 0.0f, 0.4794054925441742f, 0.0f)); break; } default: From a186be014da18676776ae88865d3d45a9008d961 Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Wed, 29 Aug 2018 17:35:28 -0700 Subject: [PATCH 056/210] Use std::chrono for usecTimestampNow() --- libraries/shared/src/SharedUtil.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libraries/shared/src/SharedUtil.cpp b/libraries/shared/src/SharedUtil.cpp index bb22a1e753..3bef7f7e18 100644 --- a/libraries/shared/src/SharedUtil.cpp +++ b/libraries/shared/src/SharedUtil.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include @@ -132,6 +133,9 @@ static std::once_flag usecTimestampNowIsInitialized; static QElapsedTimer timestampTimer; quint64 usecTimestampNow(bool wantDebug) { + using namespace std::chrono; + return duration_cast(high_resolution_clock::now().time_since_epoch()).count(); +#if 0 std::call_once(usecTimestampNowIsInitialized, [&] { TIME_REFERENCE = QDateTime::currentMSecsSinceEpoch() * USECS_PER_MSEC; // ms to usec timestampTimer.start(); @@ -203,6 +207,7 @@ quint64 usecTimestampNow(bool wantDebug) { } return now; +#endif } float secTimestampNow() { From 7b7f369c394edd715d2e143cce321324f4d5dfff Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Wed, 29 Aug 2018 18:25:10 -0700 Subject: [PATCH 057/210] Further reductions in shared pointers, getWorldPosition(). --- .../src/avatars/AvatarMixerClientData.cpp | 4 +++ .../src/avatars/AvatarMixerClientData.h | 1 + .../src/avatars/AvatarMixerSlave.cpp | 34 +++++++++---------- 3 files changed, 21 insertions(+), 18 deletions(-) diff --git a/assignment-client/src/avatars/AvatarMixerClientData.cpp b/assignment-client/src/avatars/AvatarMixerClientData.cpp index e003fdd769..1dd4cc769b 100644 --- a/assignment-client/src/avatars/AvatarMixerClientData.cpp +++ b/assignment-client/src/avatars/AvatarMixerClientData.cpp @@ -218,6 +218,10 @@ uint16_t AvatarMixerClientData::getLastBroadcastSequenceNumber(const QUuid& node } void AvatarMixerClientData::ignoreOther(SharedNodePointer self, SharedNodePointer other) { + ignoreOther(self.data(), other.data()); +} + +void AvatarMixerClientData::ignoreOther(const Node* self, const Node* other) { if (!isRadiusIgnoring(other->getUUID())) { addToRadiusIgnoringSet(other->getUUID()); auto killPacket = NLPacket::create(PacketType::KillAvatar, NUM_BYTES_RFC4122_UUID + sizeof(KillAvatarReason), true); diff --git a/assignment-client/src/avatars/AvatarMixerClientData.h b/assignment-client/src/avatars/AvatarMixerClientData.h index a892455fe3..7d203bd771 100644 --- a/assignment-client/src/avatars/AvatarMixerClientData.h +++ b/assignment-client/src/avatars/AvatarMixerClientData.h @@ -95,6 +95,7 @@ public: void addToRadiusIgnoringSet(const QUuid& other) { _radiusIgnoredOthers.insert(other); } void removeFromRadiusIgnoringSet(SharedNodePointer self, const QUuid& other); void ignoreOther(SharedNodePointer self, SharedNodePointer other); + void ignoreOther(const Node* self, const Node* other); void readViewFrustumPacket(const QByteArray& message); diff --git a/assignment-client/src/avatars/AvatarMixerSlave.cpp b/assignment-client/src/avatars/AvatarMixerSlave.cpp index f0c291b2c2..e772fa4d08 100644 --- a/assignment-client/src/avatars/AvatarMixerSlave.cpp +++ b/assignment-client/src/avatars/AvatarMixerSlave.cpp @@ -213,7 +213,7 @@ void AvatarMixerSlave::broadcastAvatarData(const SharedNodePointer& node) { } void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) { - const Node* nodeRaw = node.data(); + const Node* destinationNode = node.data(); auto nodeList = DependencyManager::get(); @@ -224,7 +224,7 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) _stats.nodesBroadcastedTo++; - AvatarMixerClientData* nodeData = reinterpret_cast(nodeRaw->getLinkedData()); + AvatarMixerClientData* nodeData = reinterpret_cast(destinationNode->getLinkedData()); nodeData->resetInViewStats(); @@ -264,7 +264,7 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) bool PALIsOpen = nodeData->getRequestsDomainListData(); // When this is true, the AvatarMixer will send Avatar data to a client about avatars that have ignored them - bool getsAnyIgnored = PALIsOpen && nodeRaw->getCanKick(); + bool getsAnyIgnored = PALIsOpen && destinationNode->getCanKick(); if (PALIsOpen) { // Increase minimumBytesPerAvatar if the PAL is open @@ -291,14 +291,12 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) // setup list of AvatarData as well as maps to map betweeen the AvatarData and the original nodes struct AvatarSortData { - AvatarSortData(const SharedNodePointer& nodeShared, AvatarData* avatarData, quint64 lastEncodeTime) - : _nodeShared(nodeShared) - , _node(nodeShared.data()) + AvatarSortData(const Node* node, AvatarData* avatarData, quint64 lastEncodeTime) + : _node(node) , _avatarData(avatarData) , _lastEncodeTime(lastEncodeTime) { } - const SharedNodePointer& _nodeShared; - Node* _node; + const Node* _node; AvatarData* _avatarData; quint64 _lastEncodeTime; }; @@ -315,7 +313,7 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) AvatarData* otherAvatar = otherNodeData->getAvatarSharedPointer().get(); auto lastEncodeTime = nodeData->getLastOtherAvatarEncodeTime(otherAvatar->getSessionUUID()); - avatarsToSort.emplace_back(AvatarSortData(otherNode, otherAvatar, lastEncodeTime)); + avatarsToSort.emplace_back(AvatarSortData(otherNodeRaw, otherAvatar, lastEncodeTime)); } }); @@ -326,7 +324,7 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) : _avatar(avatar), _node(avatarNode), _lastEncodeTime(lastEncodeTime) {} glm::vec3 getPosition() const override { return _avatar->getClientGlobalPosition(); } float getRadius() const override { - glm::vec3 nodeBoxHalfScale = (_avatar->getWorldPosition() - _avatar->getGlobalBoundingBoxCorner() * _avatar->getSensorToWorldScale()); + glm::vec3 nodeBoxHalfScale = (_avatar->getClientGlobalPosition() - _avatar->getGlobalBoundingBoxCorner() * _avatar->getSensorToWorldScale()); return glm::max(nodeBoxHalfScale.x, glm::max(nodeBoxHalfScale.y, nodeBoxHalfScale.z)); } uint64_t getTimestamp() const override { @@ -350,7 +348,8 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) // ignore or sort for (const auto& avatar : avatarsToSort) { - if (avatar._node == nodeRaw) { + auto avatarNode = avatar._node; + if (avatarNode == destinationNode) { // don't echo updates to self continue; } @@ -362,7 +361,6 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) // happen if for example the avatar is connected on a desktop and sending // updates at ~30hz. So every 3 frames we skip a frame. - auto avatarNode = avatar._node; assert(avatarNode); // we can't have gotten here without the avatarData being a valid key in the map const AvatarMixerClientData* avatarNodeData = reinterpret_cast(avatarNode->getLinkedData()); @@ -372,13 +370,13 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) // make sure we have data for this avatar, that it isn't the same node, // and isn't an avatar that the viewing node has ignored // or that has ignored the viewing node - if ((nodeRaw->isIgnoringNodeWithID(avatarNode->getUUID()) && !PALIsOpen) - || (avatarNode->isIgnoringNodeWithID(nodeRaw->getUUID()) && !getsAnyIgnored)) { + if ((destinationNode->isIgnoringNodeWithID(avatarNode->getUUID()) && !PALIsOpen) + || (avatarNode->isIgnoringNodeWithID(destinationNode->getUUID()) && !getsAnyIgnored)) { shouldIgnore = true; } else { // Check to see if the space bubble is enabled // Don't bother with these checks if the other avatar has their bubble enabled and we're gettingAnyIgnored - if (nodeRaw->isIgnoreRadiusEnabled() || (avatarNode->isIgnoreRadiusEnabled() && !getsAnyIgnored)) { + if (destinationNode->isIgnoreRadiusEnabled() || (avatarNode->isIgnoreRadiusEnabled() && !getsAnyIgnored)) { float sensorToWorldScale = avatarNodeData->getAvatarSharedPointer()->getSensorToWorldScale(); // Define the scale of the box for the current other node glm::vec3 otherNodeBoxScale = (avatarNodeData->getPosition() - avatarNodeData->getGlobalBoundingBoxCorner()) * 2.0f * sensorToWorldScale; @@ -394,7 +392,7 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) // Perform the collision check between the two bounding boxes if (nodeBox.touches(otherNodeBox)) { - nodeData->ignoreOther(node, avatar._nodeShared); + nodeData->ignoreOther(destinationNode, avatarNode); shouldIgnore = !getsAnyIgnored; } } @@ -576,7 +574,7 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) _stats.numBytesSent += numAvatarDataBytes; // send the avatar data PacketList - nodeList->sendPacketList(std::move(avatarPacketList), *nodeRaw); + nodeList->sendPacketList(std::move(avatarPacketList), *destinationNode); // record the bytes sent for other avatar data in the AvatarMixerClientData nodeData->recordSentAvatarData(numAvatarDataBytes); @@ -586,7 +584,7 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) if (traitsPacketList->getNumPackets() >= 1) { // send the traits packet list - nodeList->sendPacketList(std::move(traitsPacketList), *nodeRaw); + nodeList->sendPacketList(std::move(traitsPacketList), *destinationNode); } // record the number of avatars held back this frame From c2ac2b9ab0f56aae0e8e283d2508cce10f0df0b3 Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Thu, 30 Aug 2018 10:59:55 -0700 Subject: [PATCH 058/210] Various tweaks; fix clang warning --- .../src/avatars/AvatarMixerClientData.cpp | 2 +- .../src/avatars/AvatarMixerClientData.h | 2 +- .../src/avatars/AvatarMixerSlave.cpp | 16 +++++++--------- libraries/shared/src/SharedUtil.cpp | 6 +++--- 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/assignment-client/src/avatars/AvatarMixerClientData.cpp b/assignment-client/src/avatars/AvatarMixerClientData.cpp index 1dd4cc769b..c54db90f5d 100644 --- a/assignment-client/src/avatars/AvatarMixerClientData.cpp +++ b/assignment-client/src/avatars/AvatarMixerClientData.cpp @@ -239,7 +239,7 @@ void AvatarMixerClientData::ignoreOther(const Node* self, const Node* other) { } } -void AvatarMixerClientData::removeFromRadiusIgnoringSet(SharedNodePointer self, const QUuid& other) { +void AvatarMixerClientData::removeFromRadiusIgnoringSet(const QUuid& other) { _radiusIgnoredOthers.erase(other); } diff --git a/assignment-client/src/avatars/AvatarMixerClientData.h b/assignment-client/src/avatars/AvatarMixerClientData.h index 7d203bd771..ee27f9bb0f 100644 --- a/assignment-client/src/avatars/AvatarMixerClientData.h +++ b/assignment-client/src/avatars/AvatarMixerClientData.h @@ -93,7 +93,7 @@ public: glm::vec3 getGlobalBoundingBoxCorner() const { return _avatar ? _avatar->getGlobalBoundingBoxCorner() : glm::vec3(0); } bool isRadiusIgnoring(const QUuid& other) const { return _radiusIgnoredOthers.find(other) != _radiusIgnoredOthers.end(); } void addToRadiusIgnoringSet(const QUuid& other) { _radiusIgnoredOthers.insert(other); } - void removeFromRadiusIgnoringSet(SharedNodePointer self, const QUuid& other); + void removeFromRadiusIgnoringSet(const QUuid& other); void ignoreOther(SharedNodePointer self, SharedNodePointer other); void ignoreOther(const Node* self, const Node* other); diff --git a/assignment-client/src/avatars/AvatarMixerSlave.cpp b/assignment-client/src/avatars/AvatarMixerSlave.cpp index e772fa4d08..34a429bea0 100644 --- a/assignment-client/src/avatars/AvatarMixerSlave.cpp +++ b/assignment-client/src/avatars/AvatarMixerSlave.cpp @@ -276,16 +276,16 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) auto avatarPacketList = NLPacketList::create(PacketType::BulkAvatarData); // Define the minimum bubble size - static const glm::vec3 minBubbleSize = avatar.getSensorToWorldScale() * glm::vec3(0.3f, 1.3f, 0.3f); + const glm::vec3 minBubbleSize = avatar.getSensorToWorldScale() * glm::vec3(0.3f, 1.3f, 0.3f); // Define the scale of the box for the current node - glm::vec3 nodeBoxScale = (nodeData->getPosition() - nodeData->getGlobalBoundingBoxCorner()) * 2.0f * avatar.getSensorToWorldScale(); + glm::vec3 nodeBoxScale = (avatar.getClientGlobalPosition() - avatar.getGlobalBoundingBoxCorner()) * 2.0f * avatar.getSensorToWorldScale(); // Set up the bounding box for the current node - AABox nodeBox(nodeData->getGlobalBoundingBoxCorner(), nodeBoxScale); + AABox nodeBox(avatar.getGlobalBoundingBoxCorner(), nodeBoxScale); // Clamp the size of the bounding box to a minimum scale if (glm::any(glm::lessThan(nodeBoxScale, minBubbleSize))) { nodeBox.setScaleStayCentered(minBubbleSize); } - // Quadruple the scale of both bounding boxes + // Quadruple the scale of first bounding box nodeBox.embiggen(4.0f); @@ -386,7 +386,7 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) if (glm::any(glm::lessThan(otherNodeBoxScale, minBubbleSize))) { otherNodeBox.setScaleStayCentered(minBubbleSize); } - // Change the scale of both bounding boxes + // Change the scale of other bounding box // (This is an arbitrary number determined empirically) otherNodeBox.embiggen(2.4f); @@ -398,7 +398,7 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) } // Not close enough to ignore if (!shouldIgnore) { - nodeData->removeFromRadiusIgnoringSet(node, avatarNode->getUUID()); + nodeData->removeFromRadiusIgnoringSet(avatarNode->getUUID()); } } @@ -439,6 +439,7 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) auto traitsPacketList = NLPacketList::create(PacketType::BulkAvatarTraits, QByteArray(), true, true); while (!sortedAvatars.empty()) { const Node* otherNode = sortedAvatars.top().getNode(); + auto lastEncodeForOther = sortedAvatars.top().getTimestamp(); sortedAvatars.pop(); remainingAvatars--; @@ -490,7 +491,6 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) } bool includeThisAvatar = true; - auto lastEncodeForOther = nodeData->getLastOtherAvatarEncodeTime(otherNode->getUUID()); QVector& lastSentJointsForOther = nodeData->getLastOtherAvatarSentJoints(otherNode->getUUID()); lastSentJointsForOther.resize(otherAvatar->getJointCount()); @@ -561,8 +561,6 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) // use helper to add any changed traits to our packet list traitBytesSent += addChangedTraitsToBulkPacket(nodeData, otherNodeData, *traitsPacketList); - - traitsPacketList->getDataSize(); } quint64 startPacketSending = usecTimestampNow(); diff --git a/libraries/shared/src/SharedUtil.cpp b/libraries/shared/src/SharedUtil.cpp index 3bef7f7e18..a36bdb061e 100644 --- a/libraries/shared/src/SharedUtil.cpp +++ b/libraries/shared/src/SharedUtil.cpp @@ -128,9 +128,9 @@ void usecTimestampNowForceClockSkew(qint64 clockSkew) { ::usecTimestampNowAdjust = clockSkew; } -static std::atomic TIME_REFERENCE { 0 }; // in usec -static std::once_flag usecTimestampNowIsInitialized; -static QElapsedTimer timestampTimer; +//static std::atomic TIME_REFERENCE { 0 }; // in usec +//static std::once_flag usecTimestampNowIsInitialized; +//static QElapsedTimer timestampTimer; quint64 usecTimestampNow(bool wantDebug) { using namespace std::chrono; From b45b0f54e4ebd58d6ebe87e67c10a1089902d8bf Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Thu, 30 Aug 2018 11:59:53 -0700 Subject: [PATCH 059/210] Move unfilteredHandlers processing back into main loop --- libraries/networking/src/udt/Socket.cpp | 36 ++++++++++--------------- 1 file changed, 14 insertions(+), 22 deletions(-) diff --git a/libraries/networking/src/udt/Socket.cpp b/libraries/networking/src/udt/Socket.cpp index d764b9e8b2..44220df8f8 100644 --- a/libraries/networking/src/udt/Socket.cpp +++ b/libraries/networking/src/udt/Socket.cpp @@ -361,28 +361,6 @@ void Socket::processPendingDatagrams(int) { // setup a HifiSockAddr to read into HifiSockAddr senderSockAddr; - // Process unfiltered packets first. - for (auto datagramIter = _incomingDatagrams.begin(); datagramIter != _incomingDatagrams.end(); ++datagramIter) { - senderSockAddr.setAddress(datagramIter->_senderAddress); - senderSockAddr.setPort(datagramIter->_senderPort); - auto it = _unfilteredHandlers.find(senderSockAddr); - if (it != _unfilteredHandlers.end()) { - // we have a registered unfiltered handler for this HifiSockAddr (eg. STUN packet) - call that and return - if (it->second) { - auto basePacket = BasePacket::fromReceivedPacket(std::move(datagramIter->_datagram), - datagramIter->_datagramLength, - senderSockAddr); - basePacket->setReceiveTime(datagramIter->_receiveTime); - it->second(std::move(basePacket)); - } - - datagramIter = _incomingDatagrams.erase(datagramIter); - if (datagramIter == _incomingDatagrams.end()) { - break; - } - } - } - while (!_incomingDatagrams.empty()) { auto& datagram = _incomingDatagrams.front(); senderSockAddr.setAddress(datagram._senderAddress); @@ -397,6 +375,20 @@ void Socket::processPendingDatagrams(int) { _lastPacketSizeRead = datagramSize; _lastPacketSockAddr = senderSockAddr; + // Process unfiltered packets first. + auto it = _unfilteredHandlers.find(senderSockAddr); + if (it != _unfilteredHandlers.end()) { + // we have a registered unfiltered handler for this HifiSockAddr (eg. STUN packet) - call that and return + if (it->second) { + auto basePacket = BasePacket::fromReceivedPacket(std::move(datagram._datagram), + datagramSize, senderSockAddr); + basePacket->setReceiveTime(receiveTime); + it->second(std::move(basePacket)); + } + _incomingDatagrams.pop_front(); + continue; + } + // check if this was a control packet or a data packet bool isControlPacket = *reinterpret_cast(datagram._datagram.get()) & CONTROL_BIT_MASK; From 93b0f151166d818fb019e4e2e48353d112738fcd Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Thu, 30 Aug 2018 13:22:17 -0700 Subject: [PATCH 060/210] addressing some feedback --- scripts/system/interstitialPage.js | 74 +++++++++++++++++------------- 1 file changed, 43 insertions(+), 31 deletions(-) diff --git a/scripts/system/interstitialPage.js b/scripts/system/interstitialPage.js index cf06e222c9..86a9e744e9 100644 --- a/scripts/system/interstitialPage.js +++ b/scripts/system/interstitialPage.js @@ -18,13 +18,13 @@ var MAX_X_SIZE = 3.8; var EPSILON = 0.01; var isVisible = false; - var STABILITY = 3.0; var VOLUME = 0.4; var tune = SoundCache.getSound("http://hifi-content.s3.amazonaws.com/alexia/LoadingScreens/crystals_and_voices.wav"); var sample = null; var MAX_LEFT_MARGIN = 1.9; var INNER_CIRCLE_WIDTH = 4.7; var DEFAULT_Z_OFFSET = 5.45; + var previousCameraMode = Camera.mode; var renderViewTask = Render.getConfig("RenderMainView"); var toolbar = Toolbars.getToolbar("com.highfidelity.interface.toolbar.system"); @@ -181,7 +181,7 @@ var TARGET_UPDATE_HZ = 60; // 50hz good enough, but we're using update var BASIC_TIMER_INTERVAL_MS = 1000 / TARGET_UPDATE_HZ; var lastInterval = Date.now(); - var currentDomain = ""; + var currentDomain = "no domain"; var timer = null; var target = 0; @@ -228,6 +228,8 @@ target = 0; currentProgress = 0.1; connectionToDomainFailed = false; + previousCameraMode = Camera.mode; + Camera.mode = "first person"; timer = Script.setTimeout(update, BASIC_TIMER_INTERVAL_MS); } } @@ -249,30 +251,42 @@ print("domain changed: " + domain); if (domain !== currentDomain) { MyAvatar.restoreAnimation(); - var name = AddressManager.placename; + var name = location.placename; domainName = name.charAt(0).toUpperCase() + name.slice(1); + var doRequest = true; + if (name.length === 0 && location.href === "file:///~/serverless/tutorial.json") { + domainName = "Serveless Domain (Tutorial)"; + doRequest = false; + } var domainNameLeftMargin = getLeftMargin(domainNameTextID, domainName); var textProperties = { text: domainName, leftMargin: domainNameLeftMargin }; - var url = Account.metaverseServerURL + '/api/v1/places/' + domain; - request({ - uri: url - }, function(error, data) { - if (data.status === "success") { - var domainInfo = data.data; - var domainDescriptionText = domainInfo.place.description; - print("domainText: " + domainDescriptionText); - var leftMargin = getLeftMargin(domainDescription, domainDescriptionText); - var domainDescriptionProperties = { - text: domainDescriptionText, - leftMargin: leftMargin - }; - Overlays.editOverlay(domainDescription, domainDescriptionProperties); - } - }); + if (doRequest) { + var url = Account.metaverseServerURL + '/api/v1/places/' + domain; + request({ + uri: url + }, function(error, data) { + if (data.status === "success") { + var domainInfo = data.data; + var domainDescriptionText = domainInfo.place.description; + print("domainText: " + domainDescriptionText); + var leftMargin = getLeftMargin(domainDescription, domainDescriptionText); + var domainDescriptionProperties = { + text: domainDescriptionText, + leftMargin: leftMargin + }; + Overlays.editOverlay(domainDescription, domainDescriptionProperties); + } + }); + } else { + var domainDescriptionProperties = { + text: "" + }; + Overlays.editOverlay(domainDescription, domainDescriptionProperties); + } var randomIndex = Math.floor(Math.random() * userTips.length); var tip = userTips[randomIndex]; @@ -320,8 +334,6 @@ visible: !physicsEnabled }; - // Menu.setIsOptionChecked("Show Overlays", physicsEnabled); - if (!HMD.active) { MyAvatar.headOrientation = Quat.multiply(Quat.cancelOutRollAndPitch(MyAvatar.headOrientation), Quat.fromPitchYawRollDegrees(-3.0, 0, 0)); } @@ -343,7 +355,9 @@ resetValues(); - Camera.mode = "first person"; + if (physicsEnabled) { + Camera.mode = previousCameraMode; + } } @@ -358,11 +372,6 @@ Overlays.editOverlay(anchorOverlay, { localPosition: localPosition }); } - - Window.interstitialStatusChanged.connect(function(interstitialMode) { - print("------> insterstitial mode changed " + interstitialMode + " <------"); - }); - function update() { var physicsEnabled = Window.isPhysicsEnabled(); var thisInterval = Date.now(); @@ -372,10 +381,13 @@ var domainLoadingProgressPercentage = Window.domainLoadingProgress(); var progress = MAX_X_SIZE * domainLoadingProgressPercentage; - print(progress); - //if (progress >= target) { + if (progress >= target) { target = progress; - //} + } + + if ((physicsEnabled && (currentProgress < MAX_X_SIZE))) { + target = MAX_X_SIZE; + } currentProgress = lerp(currentProgress, target, 0.2); var properties = { @@ -393,6 +405,7 @@ timer = null; return; } + timer = Script.setTimeout(update, BASIC_TIMER_INTERVAL_MS); } @@ -400,7 +413,6 @@ location.hostChanged.connect(domainChanged); location.lookupResultsFinished.connect(function() { Script.setTimeout(function() { - print("location connected: " + location.isConnected); connectionToDomainFailed = !location.isConnected; }, 1200); }); From 03ede9371e1a070700952e4c504c445f1a51022a Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Thu, 30 Aug 2018 14:26:39 -0700 Subject: [PATCH 061/210] cleaning code --- interface/src/octree/SafeLanding.cpp | 2 -- interface/src/scripting/WindowScriptingInterface.cpp | 3 --- interface/src/scripting/WindowScriptingInterface.h | 3 --- 3 files changed, 8 deletions(-) diff --git a/interface/src/octree/SafeLanding.cpp b/interface/src/octree/SafeLanding.cpp index 8d36b3fcb0..6b7a0f582c 100644 --- a/interface/src/octree/SafeLanding.cpp +++ b/interface/src/octree/SafeLanding.cpp @@ -175,7 +175,6 @@ bool SafeLanding::entitiesRenderReady() { for (auto entityMapIter = _trackedEntitiesRenderStatus.begin(); entityMapIter != _trackedEntitiesRenderStatus.end(); ++entityMapIter) { auto entity = entityMapIter->second; bool visuallyReady = entity->isVisuallyReady(); - qDebug() << "is entityType: " << EntityTypes::getEntityTypeName(entity->getType()) << " " << visuallyReady << " " << entityMapIter->first; if (visuallyReady || !entityTree->renderableForEntityId(entityMapIter->first)) { entityMapIter = _trackedEntitiesRenderStatus.erase(entityMapIter); if (entityMapIter == _trackedEntitiesRenderStatus.end()) { @@ -185,7 +184,6 @@ bool SafeLanding::entitiesRenderReady() { entity->requestRenderUpdate(); } } - qDebug() << "list size: -> " << _trackedEntitiesRenderStatus.size(); return _trackedEntitiesRenderStatus.empty(); } diff --git a/interface/src/scripting/WindowScriptingInterface.cpp b/interface/src/scripting/WindowScriptingInterface.cpp index b4c1563795..9e13e2affb 100644 --- a/interface/src/scripting/WindowScriptingInterface.cpp +++ b/interface/src/scripting/WindowScriptingInterface.cpp @@ -53,9 +53,6 @@ WindowScriptingInterface::WindowScriptingInterface() { }); connect(qApp->getWindow(), &MainWindow::windowGeometryChanged, this, &WindowScriptingInterface::onWindowGeometryChanged); - connect(qApp, &Application::interstitialModeChanged, [this] (bool interstitialStatus) { - emit interstitialStatusChanged(interstitialStatus); - }); } WindowScriptingInterface::~WindowScriptingInterface() { diff --git a/interface/src/scripting/WindowScriptingInterface.h b/interface/src/scripting/WindowScriptingInterface.h index 3dcd8cfeed..626d142785 100644 --- a/interface/src/scripting/WindowScriptingInterface.h +++ b/interface/src/scripting/WindowScriptingInterface.h @@ -744,9 +744,6 @@ signals: */ void geometryChanged(QRect geometry); - - void interstitialStatusChanged(bool intersititalMode); - private: QString getPreviousBrowseLocation() const; void setPreviousBrowseLocation(const QString& location); From 33db1394e6dde359fda68a131354f7a56066c42e Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Thu, 30 Aug 2018 17:12:42 -0700 Subject: [PATCH 062/210] Use system_clock in usecTimestampNow for cross-platform goodness --- libraries/shared/src/SharedUtil.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/shared/src/SharedUtil.cpp b/libraries/shared/src/SharedUtil.cpp index a36bdb061e..6c79a23c20 100644 --- a/libraries/shared/src/SharedUtil.cpp +++ b/libraries/shared/src/SharedUtil.cpp @@ -134,7 +134,8 @@ void usecTimestampNowForceClockSkew(qint64 clockSkew) { quint64 usecTimestampNow(bool wantDebug) { using namespace std::chrono; - return duration_cast(high_resolution_clock::now().time_since_epoch()).count(); + static const auto unixEpoch = system_clock::from_time_t(0); + return duration_cast(system_clock::now() - unixEpoch).count(); #if 0 std::call_once(usecTimestampNowIsInitialized, [&] { TIME_REFERENCE = QDateTime::currentMSecsSinceEpoch() * USECS_PER_MSEC; // ms to usec From 5f43f5b27626d8120b67134bca2decb3d91db58a Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Thu, 30 Aug 2018 17:40:13 -0700 Subject: [PATCH 063/210] adding different method for handling redirect --- interface/src/Application.cpp | 32 ++++----------------- interface/src/Application.h | 2 +- libraries/networking/src/AddressManager.cpp | 4 ++- libraries/networking/src/DomainHandler.cpp | 14 +++++++++ libraries/networking/src/DomainHandler.h | 6 ++++ 5 files changed, 29 insertions(+), 29 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 348d1d5690..1041ab64ca 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -1197,11 +1197,9 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo getOverlays().deleteOverlay(getTabletHomeButtonID()); getOverlays().deleteOverlay(getTabletFrameID()); }); -#if defined(Q_OS_ANDROID) connect(&domainHandler, &DomainHandler::domainConnectionRefused, this, &Application::domainConnectionRefused); -#else - connect(&domainHandler, &DomainHandler::domainConnectionRefused, this, &Application::domainConnectionRedirect); -#endif + + &domainHandler.setErrorDomainURL(QUrl(REDIRECT_HIFI_ADDRESS)); // We could clear ATP assets only when changing domains, but it's possible that the domain you are connected // to has gone down and switched to a new content set, so when you reconnect the cached ATP assets will no longer be valid. @@ -2350,31 +2348,11 @@ void Application::domainConnectionRefused(const QString& reasonMessage, int reas } } -void Application::domainConnectionRedirect(const QString& reasonMessage, int reasonCodeInt, const QString& extraInfo) { - DomainHandler::ConnectionRefusedReason reasonCode = static_cast(reasonCodeInt); +void Application::domainConnectionRedirect() { auto addressManager = DependencyManager::get(); - if (reasonCode == DomainHandler::ConnectionRefusedReason::TooManyUsers && !extraInfo.isEmpty()) { - addressManager->handleLookupString(extraInfo); - return; - } - - switch (reasonCode) { - case DomainHandler::ConnectionRefusedReason::ProtocolMismatch: - case DomainHandler::ConnectionRefusedReason::TooManyUsers: - case DomainHandler::ConnectionRefusedReason::Unknown: { - QString message = "Unable to connect to the location you are visiting.\n"; - message += reasonMessage; - //OffscreenUi::asyncWarning("", message); - addressManager->handleLookupString(REDIRECT_HIFI_ADDRESS); - getMyAvatar()->setWorldVelocity(glm::vec3(0.0f)); - // in (w, x, y, z) component-structure for the constructor - break; - } - default: - // nothing to do. - break; - } + addressManager->handleLookupString(REDIRECT_HIFI_ADDRESS); + getMyAvatar()->setWorldVelocity(glm::vec3(0.0f)); } diff --git a/interface/src/Application.h b/interface/src/Application.h index 61548f203b..e38b5a3919 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -474,7 +474,7 @@ private slots: void updateDisplayMode(); void setDisplayPlugin(DisplayPluginPointer newPlugin); void domainConnectionRefused(const QString& reasonMessage, int reason, const QString& extraInfo); - void domainConnectionRedirect(const QString& reasonMessage, int reason, const QString& extraInfo); + void domainConnectionRedirect(); void addAssetToWorldCheckModelSize(); diff --git a/libraries/networking/src/AddressManager.cpp b/libraries/networking/src/AddressManager.cpp index 732a2d7963..01db8dfd79 100644 --- a/libraries/networking/src/AddressManager.cpp +++ b/libraries/networking/src/AddressManager.cpp @@ -319,7 +319,9 @@ bool AddressManager::handleUrl(const QUrl& lookupUrl, LookupTrigger trigger) { // lookupUrl.scheme() == URL_SCHEME_HTTPS || _previousLookup.clear(); _shareablePlaceName.clear(); - setDomainInfo(lookupUrl, trigger); + if (lookupUrl.toString() != REDIRECT_HIFI_ADDRESS) { + setDomainInfo(lookupUrl, trigger); + } emit lookupResultsFinished(); QString path = DOMAIN_SPAWNING_POINT; diff --git a/libraries/networking/src/DomainHandler.cpp b/libraries/networking/src/DomainHandler.cpp index 39c8b5b1a1..827232129f 100644 --- a/libraries/networking/src/DomainHandler.cpp +++ b/libraries/networking/src/DomainHandler.cpp @@ -128,6 +128,10 @@ void DomainHandler::hardReset() { _pendingPath.clear(); } +void DomainHandler::setErrorDomainURL(const QUrl& url) { + return; +} + void DomainHandler::setSockAddr(const HifiSockAddr& sockAddr, const QString& hostname) { if (_sockAddr != sockAddr) { // we should reset on a sockAddr change @@ -451,7 +455,17 @@ void DomainHandler::processDomainServerConnectionDeniedPacket(QSharedPointer(); diff --git a/libraries/networking/src/DomainHandler.h b/libraries/networking/src/DomainHandler.h index a428110db6..473cac9133 100644 --- a/libraries/networking/src/DomainHandler.h +++ b/libraries/networking/src/DomainHandler.h @@ -50,6 +50,9 @@ public: QString getHostname() const { return _domainURL.host(); } + QUrl getErrorDomainURL(){ return _errorDomainURL; } + void setErrorDomainURL(const QUrl& url); + const QHostAddress& getIP() const { return _sockAddr.getAddress(); } void setIPToLocalhost() { _sockAddr.setAddress(QHostAddress(QHostAddress::LocalHost)); } @@ -179,6 +182,7 @@ signals: void settingsReceiveFail(); void domainConnectionRefused(QString reasonMessage, int reason, const QString& extraInfo); + void redirectToErrorDomainURL(); void limitOfSilentDomainCheckInsReached(); @@ -190,6 +194,7 @@ private: QUuid _uuid; Node::LocalID _localID; QUrl _domainURL; + QUrl _errorDomainURL; HifiSockAddr _sockAddr; QUuid _assignmentUUID; QUuid _connectionToken; @@ -198,6 +203,7 @@ private: HifiSockAddr _iceServerSockAddr; NetworkPeer _icePeer; bool _isConnected { false }; + bool _isInErrorState { false }; QJsonObject _settingsObject; QString _pendingPath; QTimer _settingsTimer; From b6d23843dde70d5970c61d025a48a35606491ac9 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Thu, 30 Aug 2018 22:32:02 -0700 Subject: [PATCH 064/210] adding fix to domain redirection URL --- interface/src/Application.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index a927853fb0..86a1421127 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -1199,7 +1199,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo }); connect(&domainHandler, &DomainHandler::domainConnectionRefused, this, &Application::domainConnectionRefused); - &domainHandler.setErrorDomainURL(QUrl(REDIRECT_HIFI_ADDRESS)); + nodeList->getDomainHandler().setErrorDomainURL(QUrl(REDIRECT_HIFI_ADDRESS)); // We could clear ATP assets only when changing domains, but it's possible that the domain you are connected // to has gone down and switched to a new content set, so when you reconnect the cached ATP assets will no longer be valid. From e1d51a6c425de1f91818bd98901665fcc64aeb8e Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Fri, 31 Aug 2018 15:06:33 -0700 Subject: [PATCH 065/210] Avatar serializing: use memcpy where possible, take copy of joint data to avoid holding lock, etc --- libraries/avatars/src/AvatarData.cpp | 145 ++++++++++----------------- 1 file changed, 51 insertions(+), 94 deletions(-) diff --git a/libraries/avatars/src/AvatarData.cpp b/libraries/avatars/src/AvatarData.cpp index 262bf2a567..ca891eb246 100644 --- a/libraries/avatars/src/AvatarData.cpp +++ b/libraries/avatars/src/AvatarData.cpp @@ -363,13 +363,13 @@ QByteArray AvatarData::toByteArray(AvatarDataDetail dataDetail, quint64 lastSent memcpy(destinationBuffer, &packetStateFlags, sizeof(packetStateFlags)); destinationBuffer += sizeof(packetStateFlags); +#define AVATAR_MEMCPY(src) \ + memcpy(destinationBuffer, &(src), sizeof(src)); \ + destinationBuffer += sizeof(src); + if (hasAvatarGlobalPosition) { auto startSection = destinationBuffer; - auto data = reinterpret_cast(destinationBuffer); - data->globalPosition[0] = _globalPosition.x; - data->globalPosition[1] = _globalPosition.y; - data->globalPosition[2] = _globalPosition.z; - destinationBuffer += sizeof(AvatarDataPacket::AvatarGlobalPosition); + AVATAR_MEMCPY(_globalPosition); int numBytes = destinationBuffer - startSection; @@ -380,17 +380,8 @@ QByteArray AvatarData::toByteArray(AvatarDataDetail dataDetail, quint64 lastSent if (hasAvatarBoundingBox) { auto startSection = destinationBuffer; - auto data = reinterpret_cast(destinationBuffer); - - data->avatarDimensions[0] = _globalBoundingBoxDimensions.x; - data->avatarDimensions[1] = _globalBoundingBoxDimensions.y; - data->avatarDimensions[2] = _globalBoundingBoxDimensions.z; - - data->boundOriginOffset[0] = _globalBoundingBoxOffset.x; - data->boundOriginOffset[1] = _globalBoundingBoxOffset.y; - data->boundOriginOffset[2] = _globalBoundingBoxOffset.z; - - destinationBuffer += sizeof(AvatarDataPacket::AvatarBoundingBox); + AVATAR_MEMCPY(_globalBoundingBoxDimensions); + AVATAR_MEMCPY(_globalBoundingBoxOffset); int numBytes = destinationBuffer - startSection; if (outboundDataRateOut) { @@ -424,13 +415,7 @@ QByteArray AvatarData::toByteArray(AvatarDataDetail dataDetail, quint64 lastSent if (hasLookAtPosition) { auto startSection = destinationBuffer; - auto data = reinterpret_cast(destinationBuffer); - auto lookAt = _headData->getLookAtPosition(); - data->lookAtPosition[0] = lookAt.x; - data->lookAtPosition[1] = lookAt.y; - data->lookAtPosition[2] = lookAt.z; - destinationBuffer += sizeof(AvatarDataPacket::LookAtPosition); - + AVATAR_MEMCPY(_headData->getLookAtPosition()); int numBytes = destinationBuffer - startSection; if (outboundDataRateOut) { outboundDataRateOut->lookAtPositionRate.increment(numBytes); @@ -531,12 +516,7 @@ QByteArray AvatarData::toByteArray(AvatarDataDetail dataDetail, quint64 lastSent if (hasAvatarLocalPosition) { auto startSection = destinationBuffer; - auto data = reinterpret_cast(destinationBuffer); - auto localPosition = getLocalPosition(); - data->localPosition[0] = localPosition.x; - data->localPosition[1] = localPosition.y; - data->localPosition[2] = localPosition.z; - destinationBuffer += sizeof(AvatarDataPacket::AvatarLocalPosition); + AVATAR_MEMCPY(getLocalPosition()); int numBytes = destinationBuffer - startSection; if (outboundDataRateOut) { @@ -572,14 +552,17 @@ QByteArray AvatarData::toByteArray(AvatarDataDetail dataDetail, quint64 lastSent auto startSection = destinationBuffer; QReadLocker readLock(&_jointDataLock); + const QVector jointData(_jointData); + readLock.unlock(); // Unlock quickly. + // joint rotation data - int numJoints = _jointData.size(); + int numJoints = jointData.size(); *destinationBuffer++ = (uint8_t)numJoints; unsigned char* validityPosition = destinationBuffer; unsigned char validity = 0; int validityBit = 0; - int numValidityBytes = (int)std::ceil(numJoints / (float)BITS_IN_BYTE); + int numValidityBytes = (numJoints + BITS_IN_BYTE - 1) / BITS_IN_BYTE; #ifdef WANT_DEBUG int rotationSentCount = 0; @@ -595,24 +578,19 @@ QByteArray AvatarData::toByteArray(AvatarDataDetail dataDetail, quint64 lastSent localSentJointDataOut.resize(numJoints); // Make sure the destination is resized before using it } - float minRotationDOT = !distanceAdjust ? AVATAR_MIN_ROTATION_DOT : getDistanceBasedMinRotationDOT(viewerPosition); + float minRotationDOT = (distanceAdjust && cullSmallChanges) ? getDistanceBasedMinRotationDOT(viewerPosition) : AVATAR_MIN_ROTATION_DOT; - for (int i = 0; i < _jointData.size(); i++) { - const JointData& data = _jointData[i]; + for (int i = 0; i < jointData.size(); i++) { + const JointData& data = jointData[i]; const JointData& last = lastSentJointData[i]; if (!data.rotationIsDefaultPose) { bool mustSend = sendAll || last.rotationIsDefaultPose; if (mustSend || last.rotation != data.rotation) { - bool largeEnoughRotation = true; - if (cullSmallChanges) { - // The dot product for smaller rotations is a smaller number. - // So if the dot() is less than the value, then the rotation is a larger angle of rotation - largeEnoughRotation = fabsf(glm::dot(last.rotation, data.rotation)) < minRotationDOT; - } - - if (mustSend || !cullSmallChanges || largeEnoughRotation) { + // The dot product for larger rotations is a lower number. + // So if the dot() is less than the value, then the rotation is a larger angle of rotation + if (!cullSmallChanges || fabsf(glm::dot(last.rotation, data.rotation)) < minRotationDOT) { validity |= (1 << validityBit); #ifdef WANT_DEBUG rotationSentCount++; @@ -647,17 +625,17 @@ QByteArray AvatarData::toByteArray(AvatarDataDetail dataDetail, quint64 lastSent destinationBuffer += numValidityBytes; // Move pointer past the validity bytes - float minTranslation = !distanceAdjust ? AVATAR_MIN_TRANSLATION : getDistanceBasedMinTranslationDistance(viewerPosition); + float minTranslation = (distanceAdjust && cullSmallChanges) ? getDistanceBasedMinTranslationDistance(viewerPosition) : AVATAR_MIN_ROTATION_DOT; float maxTranslationDimension = 0.0; - for (int i = 0; i < _jointData.size(); i++) { - const JointData& data = _jointData[i]; + for (int i = 0; i < jointData.size(); i++) { + const JointData& data = jointData[i]; const JointData& last = lastSentJointData[i]; if (!data.translationIsDefaultPose) { bool mustSend = sendAll || last.translationIsDefaultPose; if (mustSend || last.translation != data.translation) { - if (mustSend || !cullSmallChanges || glm::distance(data.translation, lastSentJointData[i].translation) > minTranslation) { + if (!cullSmallChanges || glm::distance(data.translation, lastSentJointData[i].translation) > minTranslation) { validity |= (1 << validityBit); #ifdef WANT_DEBUG translationSentCount++; @@ -707,34 +685,12 @@ QByteArray AvatarData::toByteArray(AvatarDataDetail dataDetail, quint64 lastSent glm::vec3 mouseFarGrabPosition = extractTranslation(mouseFarGrabMatrix); glm::quat mouseFarGrabRotation = extractRotation(mouseFarGrabMatrix); - data->leftFarGrabPosition[0] = leftFarGrabPosition.x; - data->leftFarGrabPosition[1] = leftFarGrabPosition.y; - data->leftFarGrabPosition[2] = leftFarGrabPosition.z; - - data->leftFarGrabRotation[0] = leftFarGrabRotation.w; - data->leftFarGrabRotation[1] = leftFarGrabRotation.x; - data->leftFarGrabRotation[2] = leftFarGrabRotation.y; - data->leftFarGrabRotation[3] = leftFarGrabRotation.z; - - data->rightFarGrabPosition[0] = rightFarGrabPosition.x; - data->rightFarGrabPosition[1] = rightFarGrabPosition.y; - data->rightFarGrabPosition[2] = rightFarGrabPosition.z; - - data->rightFarGrabRotation[0] = rightFarGrabRotation.w; - data->rightFarGrabRotation[1] = rightFarGrabRotation.x; - data->rightFarGrabRotation[2] = rightFarGrabRotation.y; - data->rightFarGrabRotation[3] = rightFarGrabRotation.z; - - data->mouseFarGrabPosition[0] = mouseFarGrabPosition.x; - data->mouseFarGrabPosition[1] = mouseFarGrabPosition.y; - data->mouseFarGrabPosition[2] = mouseFarGrabPosition.z; - - data->mouseFarGrabRotation[0] = mouseFarGrabRotation.w; - data->mouseFarGrabRotation[1] = mouseFarGrabRotation.x; - data->mouseFarGrabRotation[2] = mouseFarGrabRotation.y; - data->mouseFarGrabRotation[3] = mouseFarGrabRotation.z; - - destinationBuffer += sizeof(AvatarDataPacket::FarGrabJoints); + AVATAR_MEMCPY(leftFarGrabPosition); + AVATAR_MEMCPY(leftFarGrabRotation); + AVATAR_MEMCPY(rightFarGrabPosition); + AVATAR_MEMCPY(rightFarGrabRotation); + AVATAR_MEMCPY(mouseFarGrabPosition); + AVATAR_MEMCPY(mouseFarGrabRotation); int numBytes = destinationBuffer - startSection; @@ -764,8 +720,8 @@ QByteArray AvatarData::toByteArray(AvatarDataDetail dataDetail, quint64 lastSent if (sentJointDataOut) { // Mark default poses in lastSentJointData, so when they become non-default we send them. - for (int i = 0; i < _jointData.size(); i++) { - const JointData& data = _jointData[i]; + for (int i = 0; i < jointData.size(); i++) { + const JointData& data = jointData[i]; JointData& local = localSentJointDataOut[i]; if (data.rotationIsDefaultPose) { local.rotationIsDefaultPose = true; @@ -778,30 +734,31 @@ QByteArray AvatarData::toByteArray(AvatarDataDetail dataDetail, quint64 lastSent // Push new sent joint data to sentJointDataOut sentJointDataOut->swap(localSentJointDataOut); } - } - if (hasJointDefaultPoseFlags) { - auto startSection = destinationBuffer; - QReadLocker readLock(&_jointDataLock); + // Always true, currently: + if (hasJointDefaultPoseFlags) { + auto startSection = destinationBuffer; - // write numJoints - int numJoints = _jointData.size(); - *destinationBuffer++ = (uint8_t)numJoints; + // write numJoints + int numJoints = jointData.size(); + *destinationBuffer++ = (uint8_t)numJoints; - // write rotationIsDefaultPose bits - destinationBuffer += writeBitVector(destinationBuffer, numJoints, [&](int i) { - return _jointData[i].rotationIsDefaultPose; - }); + // write rotationIsDefaultPose bits + destinationBuffer += writeBitVector(destinationBuffer, numJoints, [&](int i) { + return jointData[i].rotationIsDefaultPose; + }); - // write translationIsDefaultPose bits - destinationBuffer += writeBitVector(destinationBuffer, numJoints, [&](int i) { - return _jointData[i].translationIsDefaultPose; - }); + // write translationIsDefaultPose bits + destinationBuffer += writeBitVector(destinationBuffer, numJoints, [&](int i) { + return jointData[i].translationIsDefaultPose; + }); - if (outboundDataRateOut) { - size_t numBytes = destinationBuffer - startSection; - outboundDataRateOut->jointDefaultPoseFlagsRate.increment(numBytes); + if (outboundDataRateOut) { + size_t numBytes = destinationBuffer - startSection; + outboundDataRateOut->jointDefaultPoseFlagsRate.increment(numBytes); + } } + } int avatarDataSize = destinationBuffer - startPosition; From 2da533857475223df5f2e2c4159a01588ba8c406 Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Fri, 31 Aug 2018 15:24:51 -0700 Subject: [PATCH 066/210] Fix couple of gcc issues --- libraries/avatars/src/AvatarData.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/avatars/src/AvatarData.cpp b/libraries/avatars/src/AvatarData.cpp index ca891eb246..4363607e71 100644 --- a/libraries/avatars/src/AvatarData.cpp +++ b/libraries/avatars/src/AvatarData.cpp @@ -516,7 +516,8 @@ QByteArray AvatarData::toByteArray(AvatarDataDetail dataDetail, quint64 lastSent if (hasAvatarLocalPosition) { auto startSection = destinationBuffer; - AVATAR_MEMCPY(getLocalPosition()); + const auto localPosition = getLocalPosition(); + AVATAR_MEMCPY(localPosition); int numBytes = destinationBuffer - startSection; if (outboundDataRateOut) { @@ -677,7 +678,6 @@ QByteArray AvatarData::toByteArray(AvatarDataDetail dataDetail, quint64 lastSent if (hasGrabJoints) { // the far-grab joints may range further than 3 meters, so we can't use packFloatVec3ToSignedTwoByteFixed etc auto startSection = destinationBuffer; - auto data = reinterpret_cast(destinationBuffer); glm::vec3 leftFarGrabPosition = extractTranslation(leftFarGrabMatrix); glm::quat leftFarGrabRotation = extractRotation(leftFarGrabMatrix); glm::vec3 rightFarGrabPosition = extractTranslation(rightFarGrabMatrix); From 5a0de0f103cda82906cd1d47aa38b190b9d3c470 Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Fri, 31 Aug 2018 16:45:39 -0700 Subject: [PATCH 067/210] Small fixes for joint logic --- libraries/avatars/src/AvatarData.cpp | 50 +++++++++++++--------------- 1 file changed, 23 insertions(+), 27 deletions(-) diff --git a/libraries/avatars/src/AvatarData.cpp b/libraries/avatars/src/AvatarData.cpp index 4363607e71..c7a506a782 100644 --- a/libraries/avatars/src/AvatarData.cpp +++ b/libraries/avatars/src/AvatarData.cpp @@ -586,22 +586,19 @@ QByteArray AvatarData::toByteArray(AvatarDataDetail dataDetail, quint64 lastSent const JointData& last = lastSentJointData[i]; if (!data.rotationIsDefaultPose) { - bool mustSend = sendAll || last.rotationIsDefaultPose; - if (mustSend || last.rotation != data.rotation) { - - // The dot product for larger rotations is a lower number. - // So if the dot() is less than the value, then the rotation is a larger angle of rotation - if (!cullSmallChanges || fabsf(glm::dot(last.rotation, data.rotation)) < minRotationDOT) { - validity |= (1 << validityBit); + // The dot product for larger rotations is a lower number. + // So if the dot() is less than the value, then the rotation is a larger angle of rotation + if (sendAll || last.rotationIsDefaultPose || (!cullSmallChanges && last.rotation != data.rotation) + || (cullSmallChanges && glm::dot(last.rotation, data.rotation) < minRotationDOT) ) { + validity |= (1 << validityBit); #ifdef WANT_DEBUG - rotationSentCount++; + rotationSentCount++; #endif - destinationBuffer += packOrientationQuatToSixBytes(destinationBuffer, data.rotation); + destinationBuffer += packOrientationQuatToSixBytes(destinationBuffer, data.rotation); - if (sentJointDataOut) { - localSentJointDataOut[i].rotation = data.rotation; - localSentJointDataOut[i].rotationIsDefaultPose = false; - } + if (sentJointDataOut) { + localSentJointDataOut[i].rotation = data.rotation; + localSentJointDataOut[i].rotationIsDefaultPose = false; } } } @@ -634,24 +631,23 @@ QByteArray AvatarData::toByteArray(AvatarDataDetail dataDetail, quint64 lastSent const JointData& last = lastSentJointData[i]; if (!data.translationIsDefaultPose) { - bool mustSend = sendAll || last.translationIsDefaultPose; - if (mustSend || last.translation != data.translation) { - if (!cullSmallChanges || glm::distance(data.translation, lastSentJointData[i].translation) > minTranslation) { - validity |= (1 << validityBit); + if (sendAll || last.translationIsDefaultPose || (!cullSmallChanges && last.translation != data.translation) + || (cullSmallChanges && glm::distance(data.translation, lastSentJointData[i].translation) > minTranslation)) { + + validity |= (1 << validityBit); #ifdef WANT_DEBUG - translationSentCount++; + translationSentCount++; #endif - maxTranslationDimension = glm::max(fabsf(data.translation.x), maxTranslationDimension); - maxTranslationDimension = glm::max(fabsf(data.translation.y), maxTranslationDimension); - maxTranslationDimension = glm::max(fabsf(data.translation.z), maxTranslationDimension); + maxTranslationDimension = glm::max(fabsf(data.translation.x), maxTranslationDimension); + maxTranslationDimension = glm::max(fabsf(data.translation.y), maxTranslationDimension); + maxTranslationDimension = glm::max(fabsf(data.translation.z), maxTranslationDimension); - destinationBuffer += - packFloatVec3ToSignedTwoByteFixed(destinationBuffer, data.translation, TRANSLATION_COMPRESSION_RADIX); + destinationBuffer += + packFloatVec3ToSignedTwoByteFixed(destinationBuffer, data.translation, TRANSLATION_COMPRESSION_RADIX); - if (sentJointDataOut) { - localSentJointDataOut[i].translation = data.translation; - localSentJointDataOut[i].translationIsDefaultPose = false; - } + if (sentJointDataOut) { + localSentJointDataOut[i].translation = data.translation; + localSentJointDataOut[i].translationIsDefaultPose = false; } } } From cf5f81ab95da956565f1d6035f1e38cec12bc48d Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Fri, 31 Aug 2018 17:04:23 -0700 Subject: [PATCH 068/210] Don't memcpy quaternions as we don't use same component order on wire! --- libraries/avatars/src/AvatarData.cpp | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/libraries/avatars/src/AvatarData.cpp b/libraries/avatars/src/AvatarData.cpp index c7a506a782..d60a1a1310 100644 --- a/libraries/avatars/src/AvatarData.cpp +++ b/libraries/avatars/src/AvatarData.cpp @@ -666,6 +666,7 @@ QByteArray AvatarData::toByteArray(AvatarDataDetail dataDetail, quint64 lastSent destinationBuffer += packOrientationQuatToSixBytes(destinationBuffer, controllerLeftHandTransform.getRotation()); destinationBuffer += packFloatVec3ToSignedTwoByteFixed(destinationBuffer, controllerLeftHandTransform.getTranslation(), TRANSLATION_COMPRESSION_RADIX); + Transform controllerRightHandTransform = Transform(getControllerRightHandMatrix()); destinationBuffer += packOrientationQuatToSixBytes(destinationBuffer, controllerRightHandTransform.getRotation()); destinationBuffer += packFloatVec3ToSignedTwoByteFixed(destinationBuffer, controllerRightHandTransform.getTranslation(), @@ -674,6 +675,7 @@ QByteArray AvatarData::toByteArray(AvatarDataDetail dataDetail, quint64 lastSent if (hasGrabJoints) { // the far-grab joints may range further than 3 meters, so we can't use packFloatVec3ToSignedTwoByteFixed etc auto startSection = destinationBuffer; + auto data = reinterpret_cast(destinationBuffer); glm::vec3 leftFarGrabPosition = extractTranslation(leftFarGrabMatrix); glm::quat leftFarGrabRotation = extractRotation(leftFarGrabMatrix); glm::vec3 rightFarGrabPosition = extractTranslation(rightFarGrabMatrix); @@ -682,11 +684,25 @@ QByteArray AvatarData::toByteArray(AvatarDataDetail dataDetail, quint64 lastSent glm::quat mouseFarGrabRotation = extractRotation(mouseFarGrabMatrix); AVATAR_MEMCPY(leftFarGrabPosition); - AVATAR_MEMCPY(leftFarGrabRotation); + data->leftFarGrabRotation[0] = leftFarGrabRotation.w; + data->leftFarGrabRotation[1] = leftFarGrabRotation.x; + data->leftFarGrabRotation[2] = leftFarGrabRotation.y; + data->leftFarGrabRotation[3] = leftFarGrabRotation.z; + destinationBuffer += sizeof(data->leftFarGrabPosition); + AVATAR_MEMCPY(rightFarGrabPosition); - AVATAR_MEMCPY(rightFarGrabRotation); + data->rightFarGrabRotation[0] = rightFarGrabRotation.w; + data->rightFarGrabRotation[1] = rightFarGrabRotation.x; + data->rightFarGrabRotation[2] = rightFarGrabRotation.y; + data->rightFarGrabRotation[3] = rightFarGrabRotation.z; + destinationBuffer += sizeof(data->rightFarGrabRotation); + AVATAR_MEMCPY(mouseFarGrabPosition); - AVATAR_MEMCPY(mouseFarGrabRotation); + data->mouseFarGrabRotation[0] = mouseFarGrabRotation.w; + data->mouseFarGrabRotation[1] = mouseFarGrabRotation.x; + data->mouseFarGrabRotation[2] = mouseFarGrabRotation.y; + data->mouseFarGrabRotation[3] = mouseFarGrabRotation.z; + destinationBuffer += sizeof(data->mouseFarGrabRotation); int numBytes = destinationBuffer - startSection; From 11a563cb386290c254040e4a5a0f1a79326af3e2 Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Fri, 31 Aug 2018 17:40:57 -0700 Subject: [PATCH 069/210] Don't use temp vector for outgoing joint status - doesn't seem to be necessary --- libraries/avatars/src/AvatarData.cpp | 34 ++++++++-------------------- 1 file changed, 9 insertions(+), 25 deletions(-) diff --git a/libraries/avatars/src/AvatarData.cpp b/libraries/avatars/src/AvatarData.cpp index d60a1a1310..ed1a8e5742 100644 --- a/libraries/avatars/src/AvatarData.cpp +++ b/libraries/avatars/src/AvatarData.cpp @@ -573,10 +573,8 @@ QByteArray AvatarData::toByteArray(AvatarDataDetail dataDetail, quint64 lastSent destinationBuffer += numValidityBytes; // Move pointer past the validity bytes // sentJointDataOut and lastSentJointData might be the same vector - // build sentJointDataOut locally and then swap it at the end. - QVector localSentJointDataOut; if (sentJointDataOut) { - localSentJointDataOut.resize(numJoints); // Make sure the destination is resized before using it + sentJointDataOut->resize(numJoints); // Make sure the destination is resized before using it } float minRotationDOT = (distanceAdjust && cullSmallChanges) ? getDistanceBasedMinRotationDOT(viewerPosition) : AVATAR_MIN_ROTATION_DOT; @@ -597,11 +595,13 @@ QByteArray AvatarData::toByteArray(AvatarDataDetail dataDetail, quint64 lastSent destinationBuffer += packOrientationQuatToSixBytes(destinationBuffer, data.rotation); if (sentJointDataOut) { - localSentJointDataOut[i].rotation = data.rotation; - localSentJointDataOut[i].rotationIsDefaultPose = false; + (*sentJointDataOut)[i].rotation = data.rotation; } } } + + (*sentJointDataOut)[i].rotationIsDefaultPose = data.rotationIsDefaultPose; + if (++validityBit == BITS_IN_BYTE) { *validityPosition++ = validity; validityBit = validity = 0; @@ -646,11 +646,13 @@ QByteArray AvatarData::toByteArray(AvatarDataDetail dataDetail, quint64 lastSent packFloatVec3ToSignedTwoByteFixed(destinationBuffer, data.translation, TRANSLATION_COMPRESSION_RADIX); if (sentJointDataOut) { - localSentJointDataOut[i].translation = data.translation; - localSentJointDataOut[i].translationIsDefaultPose = false; + (*sentJointDataOut)[i].translation = data.translation; } } } + + (*sentJointDataOut)[i].translationIsDefaultPose = data.translationIsDefaultPose; + if (++validityBit == BITS_IN_BYTE) { *validityPosition++ = validity; validityBit = validity = 0; @@ -729,24 +731,6 @@ QByteArray AvatarData::toByteArray(AvatarDataDetail dataDetail, quint64 lastSent outboundDataRateOut->jointDataRate.increment(numBytes); } - if (sentJointDataOut) { - - // Mark default poses in lastSentJointData, so when they become non-default we send them. - for (int i = 0; i < jointData.size(); i++) { - const JointData& data = jointData[i]; - JointData& local = localSentJointDataOut[i]; - if (data.rotationIsDefaultPose) { - local.rotationIsDefaultPose = true; - } - if (data.translationIsDefaultPose) { - local.translationIsDefaultPose = true; - } - } - - // Push new sent joint data to sentJointDataOut - sentJointDataOut->swap(localSentJointDataOut); - } - // Always true, currently: if (hasJointDefaultPoseFlags) { auto startSection = destinationBuffer; From c95cb97b9bbf29e69971a8fb3faa8dcd89f5295d Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Fri, 31 Aug 2018 19:29:48 -0700 Subject: [PATCH 070/210] adding working version with networking signals --- interface/resources/serverless/redirect.json | 1609 +++++++++--------- interface/src/Application.cpp | 31 +- interface/src/Application.h | 4 +- libraries/networking/src/AddressManager.cpp | 44 +- libraries/networking/src/AddressManager.h | 12 +- libraries/networking/src/DomainHandler.cpp | 21 +- libraries/networking/src/DomainHandler.h | 4 +- 7 files changed, 891 insertions(+), 834 deletions(-) diff --git a/interface/resources/serverless/redirect.json b/interface/resources/serverless/redirect.json index 71dfae4212..fd81b6d433 100644 --- a/interface/resources/serverless/redirect.json +++ b/interface/resources/serverless/redirect.json @@ -5,91 +5,91 @@ "clientOnly": false, "collidesWith": "static,dynamic,kinematic,otherAvatar,", "collisionMask": 23, - "created": "2018-08-29T22:59:44Z", + "created": "2018-08-31T21:40:18Z", "dimensions": { - "blue": 0.26190000772476196, - "green": 0.5595999956130981, - "red": 0.5318999886512756, - "x": 0.5318999886512756, - "y": 0.5595999956130981, - "z": 0.26190000772476196 + "blue": 0.8231174349784851, + "green": 1.8264780044555664, + "red": 1.2112245559692383, + "x": 1.2112245559692383, + "y": 1.8264780044555664, + "z": 0.8231174349784851 }, - "id": "{4782f05d-ca51-41d4-9d19-21b8cad5ec2d}", - "lastEdited": 1535584079688600, - "lastEditedBy": "{f5457c14-32ca-45c2-9dde-4f5b30b3be1b}", - "name": "Try Again Box", + "id": "{1a8bf6e0-6f03-4761-9aba-1f624fae1236}", + "lastEdited": 1535751992686833, + "lastEditedBy": "{ace8f357-ad94-49e1-b4d0-39c4d5a936f3}", + "name": "Try Again Zone", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": { - "blue": 4.54052734375, - "green": 1.722428798675537, - "red": 4.593362331390381, - "x": 0.5933623313903809, - "y": -7.777571201324463, - "z": 0.54052734375 + "blue": 4.442525863647461, + "green": 1.9289360046386719, + "red": 2.600449562072754, + "x": -1.399550437927246, + "y": -7.571063995361328, + "z": 0.44252586364746094 }, "queryAACube": { - "scale": 0.8152676820755005, - "x": 4.185728549957275, - "y": 1.3147950172424316, - "z": 4.1328935623168945 + "scale": 2.3410699367523193, + "x": 1.4299145936965942, + "y": 0.7584010362625122, + "z": 3.2719907760620117 }, "rotation": { - "w": 0.9868703484535217, - "x": -0.010178769007325172, - "y": -0.15702557563781738, - "z": 0.03642075136303902 - }, - "script": "file:///C:/Users/wayne/development/tryAgainBoxEntityScript.js", - "shape": "Cube", - "type": "Box", - "userData": "{\"grabbableKey\":{\"grabbable\":false}}", - "visible": false - }, - { - "clientOnly": false, - "created": "2018-08-29T23:01:55Z", - "dimensions": { - "blue": 0.26190000772476196, - "green": 0.5595999956130981, - "red": 0.5318999886512756, - "x": 0.5318999886512756, - "y": 0.5595999956130981, - "z": 0.26190000772476196 - }, - "id": "{8c9287c8-3826-4f2e-944e-05d8d4715fb8}", - "lastEdited": 1535584095676575, - "lastEditedBy": "{f5457c14-32ca-45c2-9dde-4f5b30b3be1b}", - "name": "Back Box", - "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", - "position": { - "blue": 3.9590959548950195, - "green": 1.738053798675537, - "red": 5.0181121826171875, - "x": 1.0181121826171875, - "y": -7.761946201324463, - "z": -0.04090404510498047 - }, - "queryAACube": { - "scale": 0.8152676820755005, - "x": 4.610478401184082, - "y": 1.3304200172424316, - "z": 3.551462173461914 - }, - "rotation": { - "w": 0.9366722106933594, + "w": 0.9743700623512268, "x": 0, - "y": -0.3502073884010315, + "y": -0.22495104372501373, "z": 0 }, - "script": "file:///C:/Users/wayne/development/backBoxEntityScript.js", - "shape": "Cube", - "type": "Box", - "userData": "{\"grabbableKey\":{\"grabbable\":true}}", - "visible": false + "script": "file:///C:/Users/wayne/development/zoneTryAgainEntityScript.js", + "shapeType": "box", + "type": "Zone", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}" }, { "clientOnly": false, - "created": "2018-08-29T22:57:33Z", + "collidesWith": "static,dynamic,kinematic,otherAvatar,", + "collisionMask": 23, + "created": "2018-08-31T21:44:40Z", + "dimensions": { + "blue": 0.7544999718666077, + "green": 1.8265000581741333, + "red": 1.0555000305175781, + "x": 1.0555000305175781, + "y": 1.8265000581741333, + "z": 0.7544999718666077 + }, + "id": "{eb439982-948a-4393-8e8c-fdd833e6d9a7}", + "lastEdited": 1535752005525769, + "lastEditedBy": "{ace8f357-ad94-49e1-b4d0-39c4d5a936f3}", + "name": "Back Zone", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "position": { + "blue": 2.538674831390381, + "green": 1.8022732734680176, + "red": 3.5101304054260254, + "x": -0.4898695945739746, + "y": -7.697726726531982, + "z": -1.4613251686096191 + }, + "queryAACube": { + "scale": 2.2404136657714844, + "x": 2.389923572540283, + "y": 0.6820664405822754, + "z": 1.4184679985046387 + }, + "rotation": { + "w": 0.9304176568984985, + "x": 0, + "y": -0.36650121212005615, + "z": 0 + }, + "script": "file:///C:/Users/wayne/development/zoneBackEntityScript.js", + "shapeType": "box", + "type": "Zone", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}" + }, + { + "clientOnly": false, + "created": "2018-08-31T21:35:56Z", "dimensions": { "blue": 14.40000057220459, "green": 14.40000057220459, @@ -98,9 +98,9 @@ "y": 14.40000057220459, "z": 14.40000057220459 }, - "id": "{8e6bd656-d764-4724-a89d-7b4ff96abf8a}", - "lastEdited": 1535583477860044, - "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", + "id": "{dbae0b3a-a7ff-4eb1-9177-fd1f20b3cec8}", + "lastEdited": 1535751789461074, + "lastEditedBy": "{ace8f357-ad94-49e1-b4d0-39c4d5a936f3}", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": { "blue": 2.3440732955932617, @@ -127,6 +127,239 @@ "type": "Zone", "userData": "{\"grabbableKey\":{\"grabbable\":false}}" }, + { + "clientOnly": false, + "color": { + "blue": 0, + "green": 0, + "red": 0 + }, + "created": "2018-08-31T21:35:56Z", + "dimensions": { + "blue": 11.117486953735352, + "green": 3.580313205718994, + "red": 0.20000000298023224, + "x": 0.20000000298023224, + "y": 3.580313205718994, + "z": 11.117486953735352 + }, + "id": "{c92b026b-e13c-448a-903c-2773f9fdc2e8}", + "lastEdited": 1535751961512543, + "lastEditedBy": "{ace8f357-ad94-49e1-b4d0-39c4d5a936f3}", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "position": { + "blue": 1.9063844680786133, + "green": 1.15850830078125, + "red": 0.16632509231567383, + "x": -3.833674907684326, + "y": -8.34149169921875, + "z": -2.0936155319213867 + }, + "queryAACube": { + "scale": 11.681488037109375, + "x": -5.674418926239014, + "y": -4.6822357177734375, + "z": -3.934359550476074 + }, + "rotation": { + "w": 0.9666743278503418, + "x": -4.57763671875e-05, + "y": -0.2560006380081177, + "z": 1.52587890625e-05 + }, + "shape": "Cube", + "type": "Box", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}", + "visible": false + }, + { + "clientOnly": false, + "color": { + "blue": 0, + "green": 0, + "red": 0 + }, + "created": "2018-08-31T21:35:56Z", + "dimensions": { + "blue": 11.117486953735352, + "green": 3.580313205718994, + "red": 0.20000000298023224, + "x": 0.20000000298023224, + "y": 3.580313205718994, + "z": 11.117486953735352 + }, + "id": "{cd72debb-75a6-420d-b39f-b903fb069798}", + "lastEdited": 1535751362199714, + "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "position": { + "blue": 6.1806135177612305, + "green": 1.1588134765625, + "red": 1.4755167961120605, + "x": -2.5244832038879395, + "y": -8.3411865234375, + "z": 2.1806135177612305 + }, + "queryAACube": { + "scale": 11.681488037109375, + "x": -4.365227222442627, + "y": -4.6819305419921875, + "z": 0.33986949920654297 + }, + "rotation": { + "w": 0.8637980222702026, + "x": -4.57763671875e-05, + "y": 0.5038070678710938, + "z": -1.52587890625e-05 + }, + "shape": "Cube", + "type": "Box", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}", + "visible": false + }, + { + "clientOnly": false, + "color": { + "blue": 0, + "green": 0, + "red": 0 + }, + "created": "2018-08-31T21:35:56Z", + "dimensions": { + "blue": 11.117486953735352, + "green": 3.580313205718994, + "red": 0.20000000298023224, + "x": 0.20000000298023224, + "y": 3.580313205718994, + "z": 11.117486953735352 + }, + "id": "{abe300d5-32b8-4d0c-bf82-e78005b79b70}", + "lastEdited": 1535751362199153, + "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "position": { + "blue": 5.268576622009277, + "green": 1.1588134765625, + "red": 6.100250244140625, + "x": 2.100250244140625, + "y": -8.3411865234375, + "z": 1.2685766220092773 + }, + "queryAACube": { + "scale": 11.681488037109375, + "x": 0.2595062255859375, + "y": -4.6819305419921875, + "z": -0.5721673965454102 + }, + "rotation": { + "w": 0.9662165641784668, + "x": -4.57763671875e-05, + "y": -0.2576791048049927, + "z": 1.52587890625e-05 + }, + "shape": "Cube", + "type": "Box", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}", + "visible": false + }, + { + "angularDamping": 0, + "clientOnly": false, + "color": { + "blue": 0, + "green": 0, + "red": 255 + }, + "created": "2018-08-31T21:35:56Z", + "dimensions": { + "blue": 0.20000000298023224, + "green": 0.20000000298023224, + "red": 0.20000000298023224, + "x": 0.20000000298023224, + "y": 0.20000000298023224, + "z": 0.20000000298023224 + }, + "id": "{66757fda-b7ad-4858-83ab-724b01710cc2}", + "lastEdited": 1535751362198937, + "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", + "name": "Particle Rotate", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "position": { + "blue": 1.3116319179534912, + "green": 0.15618896484375, + "red": 2.705613613128662, + "x": -1.294386386871338, + "y": -9.34381103515625, + "z": -2.688368082046509 + }, + "queryAACube": { + "scale": 0.3464101552963257, + "x": 2.5324084758758545, + "y": -0.017016112804412842, + "z": 1.1384267807006836 + }, + "rotation": { + "w": 0.46953535079956055, + "x": -0.16719311475753784, + "y": -0.7982757091522217, + "z": 0.3380941152572632 + }, + "script": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/rotate.js", + "scriptTimestamp": 1532724769253, + "shape": "Cube", + "type": "Box", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}", + "visible": false + }, + { + "angularDamping": 0, + "clientOnly": false, + "color": { + "blue": 0, + "green": 0, + "red": 255 + }, + "created": "2018-08-31T21:35:56Z", + "dimensions": { + "blue": 0.20000000298023224, + "green": 0.20000000298023224, + "red": 0.20000000298023224, + "x": 0.20000000298023224, + "y": 0.20000000298023224, + "z": 0.20000000298023224 + }, + "id": "{24eda146-92f8-4e43-b084-fb555626427b}", + "lastEdited": 1535751362198263, + "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", + "name": "Particle Rotate", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "position": { + "blue": 1.3116319179534912, + "green": 0, + "red": 2.705613613128662, + "x": -1.294386386871338, + "y": -9.5, + "z": -2.688368082046509 + }, + "queryAACube": { + "scale": 0.3464101552963257, + "x": 2.5324084758758545, + "y": -0.17320507764816284, + "z": 1.1384267807006836 + }, + "rotation": { + "w": 0.9127794504165649, + "x": 0.2575265169143677, + "y": 0.15553522109985352, + "z": 0.2761729955673218 + }, + "script": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/rotate.js", + "scriptTimestamp": 1532724769253, + "shape": "Cube", + "type": "Box", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}", + "visible": false + }, { "alpha": 0, "alphaFinish": 0, @@ -148,7 +381,7 @@ "y": 255, "z": 255 }, - "created": "2018-08-29T22:57:33Z", + "created": "2018-08-31T21:35:56Z", "dimensions": { "blue": 13.24000072479248, "green": 13.24000072479248, @@ -181,8 +414,419 @@ }, "emitRate": 6, "emitSpeed": 0, - "id": "{b5ba3aa4-2eb9-4cfd-aec7-43635511c6b7}", - "lastEdited": 1535583477861791, + "emitterShouldTrail": true, + "id": "{b9a46e3e-f982-4a46-b38d-2a38e5cc5fbc}", + "lastEdited": 1535751362199964, + "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", + "lifespan": 10, + "maxParticles": 10, + "name": "Stars", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "particleRadius": 0.07000000029802322, + "polarFinish": 3.1415927410125732, + "position": { + "blue": 3.78922963142395, + "green": 0.5220947265625, + "red": 1.1928560733795166, + "x": -2.8071439266204834, + "y": -8.9779052734375, + "z": -0.2107703685760498 + }, + "queryAACube": { + "scale": 22.932353973388672, + "x": -10.273321151733398, + "y": -10.944082260131836, + "z": -7.676947593688965 + }, + "radiusFinish": 0, + "radiusStart": 0, + "rotation": { + "w": 0.996429443359375, + "x": -1.52587890625e-05, + "y": -0.08442819118499756, + "z": -4.57763671875e-05 + }, + "speedSpread": 0, + "spinFinish": null, + "spinStart": null, + "textures": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/star.png", + "type": "ParticleEffect", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}" + }, + { + "clientOnly": false, + "color": { + "blue": 0, + "green": 0, + "red": 0 + }, + "created": "2018-08-31T21:35:56Z", + "dimensions": { + "blue": 11.117486953735352, + "green": 3.580313205718994, + "red": 0.20000000298023224, + "x": 0.20000000298023224, + "y": 3.580313205718994, + "z": 11.117486953735352 + }, + "id": "{e6897ca3-1c22-429f-a1b6-173ff47397a7}", + "lastEdited": 1535751362197848, + "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "position": { + "blue": 0, + "green": 1.1583251953125, + "red": 4.971565246582031, + "x": 0.9715652465820312, + "y": -8.3416748046875, + "z": -4 + }, + "queryAACube": { + "scale": 11.681488037109375, + "x": -0.8691787719726562, + "y": -4.6824188232421875, + "z": -5.8407440185546875 + }, + "rotation": { + "w": 0.8637980222702026, + "x": -4.57763671875e-05, + "y": 0.5038070678710938, + "z": -1.52587890625e-05 + }, + "shape": "Cube", + "type": "Box", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}", + "visible": false + }, + { + "angularDamping": 0, + "clientOnly": false, + "color": { + "blue": 0, + "green": 0, + "red": 255 + }, + "created": "2018-08-31T21:35:56Z", + "dimensions": { + "blue": 0.20000000298023224, + "green": 0.20000000298023224, + "red": 0.20000000298023224, + "x": 0.20000000298023224, + "y": 0.20000000298023224, + "z": 0.20000000298023224 + }, + "id": "{16ca16ab-eee3-41b1-b583-159245aa2010}", + "lastEdited": 1535751362197055, + "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", + "name": "Particle Rotate", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "position": { + "blue": 1.3116319179534912, + "green": 0.0772705078125, + "red": 2.705613613128662, + "x": -1.294386386871338, + "y": -9.4227294921875, + "z": -2.688368082046509 + }, + "queryAACube": { + "scale": 0.3464101552963257, + "x": 2.5324084758758545, + "y": -0.09593456983566284, + "z": 1.1384267807006836 + }, + "rotation": { + "w": -0.38777750730514526, + "x": -0.37337303161621094, + "y": -0.8409399390220642, + "z": 0.055222392082214355 + }, + "script": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/rotate.js", + "scriptTimestamp": 1532724769253, + "shape": "Cube", + "type": "Box", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}", + "visible": false + }, + { + "clientOnly": false, + "created": "2018-08-31T21:35:56Z", + "dimensions": { + "blue": 2.1097896099090576, + "green": 0.04847164824604988, + "red": 1.458284616470337, + "x": 1.458284616470337, + "y": 0.04847164824604988, + "z": 2.1097896099090576 + }, + "id": "{482ae172-c411-41fb-9a41-4215eef25478}", + "lastEdited": 1535751754378548, + "lastEditedBy": "{ace8f357-ad94-49e1-b4d0-39c4d5a936f3}", + "modelURL": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/portal2.fbx", + "name": "Back", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "position": { + "blue": 1.5835940837860107, + "green": 0.2467041015625, + "red": 3.0345542430877686, + "x": -0.9654457569122314, + "y": -9.2532958984375, + "z": -2.4164059162139893 + }, + "queryAACube": { + "scale": 2.5651814937591553, + "x": 1.751963496208191, + "y": -1.0358866453170776, + "z": 0.3010033369064331 + }, + "rotation": { + "w": 0.9084458351135254, + "x": -1.52587890625e-05, + "y": 0.4179598093032837, + "z": -0.0001068115234375 + }, + "script": "file:///C:/Users/wayne/development/backEntityScript.js", + "scriptTimestamp": 1535751754379, + "shapeType": "static-mesh", + "type": "Model", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}" + }, + { + "clientOnly": false, + "created": "2018-08-31T21:35:56Z", + "dimensions": { + "blue": 9.030570983886719, + "green": 0.0719478651881218, + "red": 9.030570983886719, + "x": 9.030570983886719, + "y": 0.0719478651881218, + "z": 9.030570983886719 + }, + "id": "{33440bf8-f9ce-4d52-9b29-1b321e226982}", + "lastEdited": 1535751362197214, + "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", + "modelURL": "http://hifi-content.s3.amazonaws.com/alexia/LoadingScreens/floor.fbx", + "name": "Floor", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "position": { + "blue": 4.2324604988098145, + "green": 0.17547607421875, + "red": 4.802988529205322, + "x": 0.8029885292053223, + "y": -9.32452392578125, + "z": 0.23246049880981445 + }, + "queryAACube": { + "scale": 12.771358489990234, + "x": -1.582690715789795, + "y": -6.210203170776367, + "z": -2.1532187461853027 + }, + "rotation": { + "w": 0.8648051023483276, + "x": -1.52587890625e-05, + "y": 0.5020675659179688, + "z": -4.57763671875e-05 + }, + "shapeType": "simple-hull", + "type": "Model", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}" + }, + { + "angularDamping": 0, + "clientOnly": false, + "color": { + "blue": 0, + "green": 0, + "red": 255 + }, + "created": "2018-08-31T21:35:56Z", + "dimensions": { + "blue": 0.20000000298023224, + "green": 0.20000000298023224, + "red": 0.20000000298023224, + "x": 0.20000000298023224, + "y": 0.20000000298023224, + "z": 0.20000000298023224 + }, + "id": "{7639140e-cd6f-4f86-97f7-00a19f50253e}", + "lastEdited": 1535751362198721, + "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", + "name": "Particle Rotate", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "position": { + "blue": 3.8216662406921387, + "green": 0, + "red": 1.2409718036651611, + "x": -2.759028196334839, + "y": -9.5, + "z": -0.17833375930786133 + }, + "queryAACube": { + "scale": 0.3464101552963257, + "x": 1.0677666664123535, + "y": -0.17320507764816284, + "z": 3.648461103439331 + }, + "rotation": { + "w": 0.6444342136383057, + "x": -0.08220034837722778, + "y": -0.6649118661880493, + "z": 0.3684900999069214 + }, + "script": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/rotate.js", + "scriptTimestamp": 1532724769253, + "shape": "Cube", + "type": "Box", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}", + "visible": false + }, + { + "clientOnly": false, + "created": "2018-08-31T21:35:56Z", + "dimensions": { + "blue": 2.1097896099090576, + "green": 0.04847164824604988, + "red": 1.458284616470337, + "x": 1.458284616470337, + "y": 0.04847164824604988, + "z": 2.1097896099090576 + }, + "id": "{7755bf99-b026-490d-a682-edadd3f65701}", + "lastEdited": 1535751900322535, + "lastEditedBy": "{ace8f357-ad94-49e1-b4d0-39c4d5a936f3}", + "modelURL": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/portal1.fbx", + "name": "Try Again", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "position": { + "blue": 3.946338653564453, + "green": 0.2467041015625, + "red": 1.6013128757476807, + "x": -2.3986871242523193, + "y": -9.2532958984375, + "z": -0.053661346435546875 + }, + "queryAACube": { + "scale": 2.5651814937591553, + "x": 0.318722128868103, + "y": -1.0358866453170776, + "z": 2.663747787475586 + }, + "rotation": { + "w": 0.8220492601394653, + "x": -1.52587890625e-05, + "y": 0.5693598985671997, + "z": -0.0001068115234375 + }, + "script": "file:///C:/Users/wayne/development/tryAgainEntityScript.js", + "shapeType": "static-mesh", + "type": "Model", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}" + }, + { + "angularDamping": 0, + "clientOnly": false, + "color": { + "blue": 0, + "green": 0, + "red": 255 + }, + "created": "2018-08-31T21:35:56Z", + "dimensions": { + "blue": 0.20000000298023224, + "green": 0.20000000298023224, + "red": 0.20000000298023224, + "x": 0.20000000298023224, + "y": 0.20000000298023224, + "z": 0.20000000298023224 + }, + "id": "{81207b9c-e3f2-4ee1-bb81-0e14f37e4687}", + "lastEdited": 1535751362197613, + "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", + "name": "Particle Rotate", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "position": { + "blue": 3.8216662406921387, + "green": 0.15618896484375, + "red": 1.2409718036651611, + "x": -2.759028196334839, + "y": -9.34381103515625, + "z": -0.17833375930786133 + }, + "queryAACube": { + "scale": 0.3464101552963257, + "x": 1.0677666664123535, + "y": -0.017016112804412842, + "z": 3.648461103439331 + }, + "rotation": { + "w": 0.6747081279754639, + "x": -0.06532388925552368, + "y": -0.6342412233352661, + "z": 0.37175559997558594 + }, + "script": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/rotate.js", + "scriptTimestamp": 1532724769253, + "shape": "Cube", + "type": "Box", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}", + "visible": false + }, + { + "alpha": 0, + "alphaFinish": 0, + "alphaStart": 0.25, + "clientOnly": false, + "colorFinish": { + "blue": 0, + "green": 0, + "red": 0, + "x": 0, + "y": 0, + "z": 0 + }, + "colorStart": { + "blue": 255, + "green": 255, + "red": 255, + "x": 255, + "y": 255, + "z": 255 + }, + "created": "2018-08-31T21:35:56Z", + "dimensions": { + "blue": 13.24000072479248, + "green": 13.24000072479248, + "red": 13.24000072479248, + "x": 13.24000072479248, + "y": 13.24000072479248, + "z": 13.24000072479248 + }, + "emitAcceleration": { + "blue": 0, + "green": 0.10000000149011612, + "red": 0, + "x": 0, + "y": 0.10000000149011612, + "z": 0 + }, + "emitDimensions": { + "blue": 1, + "green": 1, + "red": 1, + "x": 1, + "y": 1, + "z": 1 + }, + "emitOrientation": { + "w": 1, + "x": -1.52587890625e-05, + "y": -1.52587890625e-05, + "z": -1.52587890625e-05 + }, + "emitRate": 6, + "emitSpeed": 0, + "id": "{b8f11bf5-410e-4e35-b4c3-91c86c01351d}", + "lastEdited": 1535751362196710, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "lifespan": 10, "maxParticles": 10, @@ -219,558 +863,6 @@ "type": "ParticleEffect", "userData": "{\"grabbableKey\":{\"grabbable\":false}}" }, - { - "clientOnly": false, - "color": { - "blue": 0, - "green": 0, - "red": 0 - }, - "created": "2018-08-29T22:57:33Z", - "dimensions": { - "blue": 11.117486953735352, - "green": 3.580313205718994, - "red": 0.20000000298023224, - "x": 0.20000000298023224, - "y": 3.580313205718994, - "z": 11.117486953735352 - }, - "id": "{12a26c55-c411-4c4c-a124-cac9c80f9532}", - "lastEdited": 1535583681180522, - "lastEditedBy": "{f5457c14-32ca-45c2-9dde-4f5b30b3be1b}", - "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", - "position": { - "blue": 1.9063844680786133, - "green": 1.15850830078125, - "red": 0.16632509231567383, - "x": -3.833674907684326, - "y": -8.34149169921875, - "z": -2.0936155319213867 - }, - "queryAACube": { - "scale": 11.681488037109375, - "x": -5.674418926239014, - "y": -4.6822357177734375, - "z": -3.934359550476074 - }, - "rotation": { - "w": 0.9666743278503418, - "x": -4.57763671875e-05, - "y": -0.2560006380081177, - "z": 1.52587890625e-05 - }, - "shape": "Cube", - "type": "Box", - "userData": "{\"grabbableKey\":{\"grabbable\":false}}", - "visible": false - }, - { - "angularDamping": 0, - "clientOnly": false, - "color": { - "blue": 0, - "green": 0, - "red": 255 - }, - "created": "2018-08-29T22:57:33Z", - "dimensions": { - "blue": 0.20000000298023224, - "green": 0.20000000298023224, - "red": 0.20000000298023224, - "x": 0.20000000298023224, - "y": 0.20000000298023224, - "z": 0.20000000298023224 - }, - "id": "{e8fd2c79-1303-49e4-8e4a-823272d6558c}", - "lastEdited": 1535583477862445, - "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", - "name": "Particle Rotate", - "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", - "position": { - "blue": 1.3116319179534912, - "green": 0.0772705078125, - "red": 2.705613613128662, - "x": -1.294386386871338, - "y": -9.4227294921875, - "z": -2.688368082046509 - }, - "queryAACube": { - "scale": 0.3464101552963257, - "x": 2.5324084758758545, - "y": -0.09593456983566284, - "z": 1.1384267807006836 - }, - "rotation": { - "w": -0.38777750730514526, - "x": -0.37337303161621094, - "y": -0.8409399390220642, - "z": 0.055222392082214355 - }, - "script": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/rotate.js", - "scriptTimestamp": 1532724769253, - "shape": "Cube", - "type": "Box", - "userData": "{\"grabbableKey\":{\"grabbable\":false}}", - "visible": false - }, - { - "clientOnly": false, - "created": "2018-08-29T22:57:33Z", - "dimensions": { - "blue": 9.030570983886719, - "green": 0.0719478651881218, - "red": 9.030570983886719, - "x": 9.030570983886719, - "y": 0.0719478651881218, - "z": 9.030570983886719 - }, - "id": "{85b4551d-c05d-4038-b188-30ad5db9c23a}", - "lastEdited": 1535583477861514, - "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", - "modelURL": "http://hifi-content.s3.amazonaws.com/alexia/LoadingScreens/floor.fbx", - "name": "Floor", - "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", - "position": { - "blue": 4.2324604988098145, - "green": 0.17547607421875, - "red": 4.802988529205322, - "x": 0.8029885292053223, - "y": -9.32452392578125, - "z": 0.23246049880981445 - }, - "queryAACube": { - "scale": 12.771358489990234, - "x": -1.582690715789795, - "y": -6.210203170776367, - "z": -2.1532187461853027 - }, - "rotation": { - "w": 0.8648051023483276, - "x": -1.52587890625e-05, - "y": 0.5020675659179688, - "z": -4.57763671875e-05 - }, - "shapeType": "simple-hull", - "type": "Model", - "userData": "{\"grabbableKey\":{\"grabbable\":false}}" - }, - { - "clientOnly": false, - "created": "2018-08-29T22:57:33Z", - "dimensions": { - "blue": 0.06014331430196762, - "green": 2.582186460494995, - "red": 2.582186698913574, - "x": 2.582186698913574, - "y": 2.582186460494995, - "z": 0.06014331430196762 - }, - "id": "{8e4d8047-c2e2-4b2c-bfa2-c732d419d59a}", - "lastEdited": 1535583477860645, - "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", - "modelURL": "http://hifi-content.s3.amazonaws.com/alexia/LoadingScreens/oopsDialog.fbx", - "name": "Oops Dialog", - "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", - "position": { - "blue": 1.45927095413208, - "green": 1.6763916015625, - "red": 0, - "x": -4, - "y": -7.8236083984375, - "z": -2.54072904586792 - }, - "queryAACube": { - "scale": 3.6522583961486816, - "x": -1.8261291980743408, - "y": -0.14973759651184082, - "z": -0.36685824394226074 - }, - "rotation": { - "w": 0.8684672117233276, - "x": -4.57763671875e-05, - "y": 0.4957197904586792, - "z": -7.62939453125e-05 - }, - "type": "Model", - "userData": "{\"grabbableKey\":{\"grabbable\":false}}" - }, - { - "angularDamping": 0, - "clientOnly": false, - "color": { - "blue": 0, - "green": 0, - "red": 255 - }, - "created": "2018-08-29T22:57:33Z", - "dimensions": { - "blue": 0.20000000298023224, - "green": 0.20000000298023224, - "red": 0.20000000298023224, - "x": 0.20000000298023224, - "y": 0.20000000298023224, - "z": 0.20000000298023224 - }, - "id": "{4fc1436d-00e7-43ec-83e1-f70cff544885}", - "lastEdited": 1535583477862827, - "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", - "name": "Particle Rotate", - "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", - "position": { - "blue": 3.8216662406921387, - "green": 0.15618896484375, - "red": 1.2409718036651611, - "x": -2.759028196334839, - "y": -9.34381103515625, - "z": -0.17833375930786133 - }, - "queryAACube": { - "scale": 0.3464101552963257, - "x": 1.0677666664123535, - "y": -0.017016112804412842, - "z": 3.648461103439331 - }, - "rotation": { - "w": 0.6747081279754639, - "x": -0.06532388925552368, - "y": -0.6342412233352661, - "z": 0.37175559997558594 - }, - "script": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/rotate.js", - "scriptTimestamp": 1532724769253, - "shape": "Cube", - "type": "Box", - "userData": "{\"grabbableKey\":{\"grabbable\":false}}", - "visible": false - }, - { - "clientOnly": false, - "color": { - "blue": 0, - "green": 0, - "red": 0 - }, - "created": "2018-08-29T22:57:33Z", - "dimensions": { - "blue": 11.117486953735352, - "green": 3.580313205718994, - "red": 0.20000000298023224, - "x": 0.20000000298023224, - "y": 3.580313205718994, - "z": 11.117486953735352 - }, - "id": "{81a7c620-88ea-4056-b148-449d963c7eb5}", - "lastEdited": 1535583477860260, - "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", - "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", - "position": { - "blue": 0, - "green": 1.1583251953125, - "red": 4.971565246582031, - "x": 0.9715652465820312, - "y": -8.3416748046875, - "z": -4 - }, - "queryAACube": { - "scale": 11.681488037109375, - "x": -0.8691787719726562, - "y": -4.6824188232421875, - "z": -5.8407440185546875 - }, - "rotation": { - "w": 0.8637980222702026, - "x": -4.57763671875e-05, - "y": 0.5038070678710938, - "z": -1.52587890625e-05 - }, - "shape": "Cube", - "type": "Box", - "userData": "{\"grabbableKey\":{\"grabbable\":false}}", - "visible": false - }, - { - "clientOnly": false, - "created": "2018-08-29T22:57:33Z", - "dimensions": { - "blue": 2.1097896099090576, - "green": 0.04847164824604988, - "red": 1.458284616470337, - "x": 1.458284616470337, - "y": 0.04847164824604988, - "z": 2.1097896099090576 - }, - "id": "{09436993-6042-49ff-bfec-0fd28f792251}", - "lastEdited": 1535583477863518, - "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", - "modelURL": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/portal1.fbx", - "name": "Try Again", - "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", - "position": { - "blue": 3.946338653564453, - "green": 0.2467041015625, - "red": 1.6013128757476807, - "x": -2.3986871242523193, - "y": -9.2532958984375, - "z": -0.053661346435546875 - }, - "queryAACube": { - "scale": 2.5651814937591553, - "x": 0.318722128868103, - "y": -1.0358866453170776, - "z": 2.663747787475586 - }, - "rotation": { - "w": 0.8220492601394653, - "x": -1.52587890625e-05, - "y": 0.5693598985671997, - "z": -0.0001068115234375 - }, - "script": "file:///C:/Users/wayne/development/tryAgainEntityScript.js", - "shapeType": "static-mesh", - "type": "Model", - "userData": "{\"grabbableKey\":{\"grabbable\":false}}" - }, - { - "angularDamping": 0, - "clientOnly": false, - "color": { - "blue": 0, - "green": 0, - "red": 255 - }, - "created": "2018-08-29T22:57:33Z", - "dimensions": { - "blue": 0.20000000298023224, - "green": 0.20000000298023224, - "red": 0.20000000298023224, - "x": 0.20000000298023224, - "y": 0.20000000298023224, - "z": 0.20000000298023224 - }, - "id": "{86188ae0-6b36-4753-a5c0-0ba31b8ca89a}", - "lastEdited": 1535583477861108, - "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", - "name": "Particle Rotate", - "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", - "position": { - "blue": 1.3116319179534912, - "green": 0, - "red": 2.705613613128662, - "x": -1.294386386871338, - "y": -9.5, - "z": -2.688368082046509 - }, - "queryAACube": { - "scale": 0.3464101552963257, - "x": 2.5324084758758545, - "y": -0.17320507764816284, - "z": 1.1384267807006836 - }, - "rotation": { - "w": 0.9127794504165649, - "x": 0.2575265169143677, - "y": 0.15553522109985352, - "z": 0.2761729955673218 - }, - "script": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/rotate.js", - "scriptTimestamp": 1532724769253, - "shape": "Cube", - "type": "Box", - "userData": "{\"grabbableKey\":{\"grabbable\":false}}", - "visible": false - }, - { - "angularDamping": 0, - "clientOnly": false, - "color": { - "blue": 0, - "green": 0, - "red": 255 - }, - "created": "2018-08-29T22:57:33Z", - "dimensions": { - "blue": 0.20000000298023224, - "green": 0.20000000298023224, - "red": 0.20000000298023224, - "x": 0.20000000298023224, - "y": 0.20000000298023224, - "z": 0.20000000298023224 - }, - "id": "{ffa954a9-43e4-47b1-82c9-b921ed3414b0}", - "lastEdited": 1535583477861316, - "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", - "name": "Particle Rotate", - "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", - "position": { - "blue": 3.8216662406921387, - "green": 0.0772705078125, - "red": 1.2409718036651611, - "x": -2.759028196334839, - "y": -9.4227294921875, - "z": -0.17833375930786133 - }, - "queryAACube": { - "scale": 0.3464101552963257, - "x": 1.0677666664123535, - "y": -0.09593456983566284, - "z": 3.648461103439331 - }, - "rotation": { - "w": 0.926024317741394, - "x": 0.20308232307434082, - "y": -0.010269343852996826, - "z": 0.3179827928543091 - }, - "script": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/rotate.js", - "scriptTimestamp": 1532724769253, - "shape": "Cube", - "type": "Box", - "userData": "{\"grabbableKey\":{\"grabbable\":false}}", - "visible": false - }, - { - "angularDamping": 0, - "clientOnly": false, - "color": { - "blue": 0, - "green": 0, - "red": 255 - }, - "created": "2018-08-29T22:57:33Z", - "dimensions": { - "blue": 0.20000000298023224, - "green": 0.20000000298023224, - "red": 0.20000000298023224, - "x": 0.20000000298023224, - "y": 0.20000000298023224, - "z": 0.20000000298023224 - }, - "id": "{e86df231-a55a-4ca7-ae68-d3271a543d10}", - "lastEdited": 1535583477860886, - "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", - "name": "Particle Rotate", - "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", - "position": { - "blue": 3.8216662406921387, - "green": 0, - "red": 1.2409718036651611, - "x": -2.759028196334839, - "y": -9.5, - "z": -0.17833375930786133 - }, - "queryAACube": { - "scale": 0.3464101552963257, - "x": 1.0677666664123535, - "y": -0.17320507764816284, - "z": 3.648461103439331 - }, - "rotation": { - "w": 0.6444342136383057, - "x": -0.08220034837722778, - "y": -0.6649118661880493, - "z": 0.3684900999069214 - }, - "script": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/rotate.js", - "scriptTimestamp": 1532724769253, - "shape": "Cube", - "type": "Box", - "userData": "{\"grabbableKey\":{\"grabbable\":false}}", - "visible": false - }, - { - "angularDamping": 0, - "clientOnly": false, - "color": { - "blue": 0, - "green": 0, - "red": 255 - }, - "created": "2018-08-29T22:57:33Z", - "dimensions": { - "blue": 0.20000000298023224, - "green": 0.20000000298023224, - "red": 0.20000000298023224, - "x": 0.20000000298023224, - "y": 0.20000000298023224, - "z": 0.20000000298023224 - }, - "id": "{252ffb06-db92-4732-9315-7ee293c24ab8}", - "lastEdited": 1535583477862267, - "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", - "name": "Particle Rotate", - "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", - "position": { - "blue": 1.3116319179534912, - "green": 0.15618896484375, - "red": 2.705613613128662, - "x": -1.294386386871338, - "y": -9.34381103515625, - "z": -2.688368082046509 - }, - "queryAACube": { - "scale": 0.3464101552963257, - "x": 2.5324084758758545, - "y": -0.017016112804412842, - "z": 1.1384267807006836 - }, - "rotation": { - "w": 0.46953535079956055, - "x": -0.16719311475753784, - "y": -0.7982757091522217, - "z": 0.3380941152572632 - }, - "script": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/rotate.js", - "scriptTimestamp": 1532724769253, - "shape": "Cube", - "type": "Box", - "userData": "{\"grabbableKey\":{\"grabbable\":false}}", - "visible": false - }, - { - "clientOnly": false, - "color": { - "blue": 0, - "green": 0, - "red": 0 - }, - "created": "2018-08-29T22:57:33Z", - "dimensions": { - "blue": 11.117486953735352, - "green": 3.580313205718994, - "red": 0.20000000298023224, - "x": 0.20000000298023224, - "y": 3.580313205718994, - "z": 11.117486953735352 - }, - "id": "{1c93807b-311d-48cd-af5e-b477d33b2811}", - "lastEdited": 1535583477860455, - "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", - "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", - "position": { - "blue": 5.268576622009277, - "green": 1.1588134765625, - "red": 6.100250244140625, - "x": 2.100250244140625, - "y": -8.3411865234375, - "z": 1.2685766220092773 - }, - "queryAACube": { - "scale": 11.681488037109375, - "x": 0.2595062255859375, - "y": -4.6819305419921875, - "z": -0.5721673965454102 - }, - "rotation": { - "w": 0.9662165641784668, - "x": -4.57763671875e-05, - "y": -0.2576791048049927, - "z": 1.52587890625e-05 - }, - "shape": "Cube", - "type": "Box", - "userData": "{\"grabbableKey\":{\"grabbable\":false}}", - "visible": false - }, { "alpha": 0, "alphaFinish": 0, @@ -797,7 +889,7 @@ "y": 204, "z": 255 }, - "created": "2018-08-29T22:57:33Z", + "created": "2018-08-31T21:35:56Z", "dimensions": { "blue": 2.5, "green": 2.5, @@ -831,8 +923,8 @@ "emitRate": 2, "emitSpeed": 0, "emitterShouldTrail": true, - "id": "{4cb534d1-5494-4aaa-aa28-ff5cee6e0b8f}", - "lastEdited": 1535583477862081, + "id": "{4e72df75-67d7-4ce2-bdea-e78adae8904a}", + "lastEdited": 1535751362199482, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "lifespan": 10, "maxParticles": 40, @@ -870,144 +962,6 @@ "type": "ParticleEffect", "userData": "{\"grabbableKey\":{\"grabbable\":false}}" }, - { - "clientOnly": false, - "color": { - "blue": 0, - "green": 0, - "red": 0 - }, - "created": "2018-08-29T22:57:33Z", - "dimensions": { - "blue": 11.117486953735352, - "green": 3.580313205718994, - "red": 0.20000000298023224, - "x": 0.20000000298023224, - "y": 3.580313205718994, - "z": 11.117486953735352 - }, - "id": "{a58a8ffe-17ee-4154-b8bb-54e2f0ca9a9d}", - "lastEdited": 1535583477862953, - "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", - "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", - "position": { - "blue": 6.1806135177612305, - "green": 1.1588134765625, - "red": 1.4755167961120605, - "x": -2.5244832038879395, - "y": -8.3411865234375, - "z": 2.1806135177612305 - }, - "queryAACube": { - "scale": 11.681488037109375, - "x": -4.365227222442627, - "y": -4.6819305419921875, - "z": 0.33986949920654297 - }, - "rotation": { - "w": 0.8637980222702026, - "x": -4.57763671875e-05, - "y": 0.5038070678710938, - "z": -1.52587890625e-05 - }, - "shape": "Cube", - "type": "Box", - "userData": "{\"grabbableKey\":{\"grabbable\":false}}", - "visible": false - }, - { - "alpha": 0, - "alphaFinish": 0, - "alphaStart": 0.25, - "clientOnly": false, - "colorFinish": { - "blue": 0, - "green": 0, - "red": 0, - "x": 0, - "y": 0, - "z": 0 - }, - "colorStart": { - "blue": 255, - "green": 255, - "red": 255, - "x": 255, - "y": 255, - "z": 255 - }, - "created": "2018-08-29T22:57:33Z", - "dimensions": { - "blue": 13.24000072479248, - "green": 13.24000072479248, - "red": 13.24000072479248, - "x": 13.24000072479248, - "y": 13.24000072479248, - "z": 13.24000072479248 - }, - "emitAcceleration": { - "blue": 0, - "green": 0.10000000149011612, - "red": 0, - "x": 0, - "y": 0.10000000149011612, - "z": 0 - }, - "emitDimensions": { - "blue": 1, - "green": 1, - "red": 1, - "x": 1, - "y": 1, - "z": 1 - }, - "emitOrientation": { - "w": 1, - "x": -1.52587890625e-05, - "y": -1.52587890625e-05, - "z": -1.52587890625e-05 - }, - "emitRate": 6, - "emitSpeed": 0, - "emitterShouldTrail": true, - "id": "{b6c56e83-f098-422d-a0e8-fd1497c62fbe}", - "lastEdited": 1535583477863251, - "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", - "lifespan": 10, - "maxParticles": 10, - "name": "Stars", - "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", - "particleRadius": 0.07000000029802322, - "polarFinish": 3.1415927410125732, - "position": { - "blue": 3.78922963142395, - "green": 0.5220947265625, - "red": 1.1928560733795166, - "x": -2.8071439266204834, - "y": -8.9779052734375, - "z": -0.2107703685760498 - }, - "queryAACube": { - "scale": 22.932353973388672, - "x": -10.273321151733398, - "y": -10.944082260131836, - "z": -7.676947593688965 - }, - "radiusFinish": 0, - "radiusStart": 0, - "rotation": { - "w": 0.996429443359375, - "x": -1.52587890625e-05, - "y": -0.08442819118499756, - "z": -4.57763671875e-05 - }, - "speedSpread": 0, - "spinFinish": null, - "spinStart": null, - "textures": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/star.png", - "type": "ParticleEffect", - "userData": "{\"grabbableKey\":{\"grabbable\":false}}" - }, { "alpha": 0, "alphaFinish": 0, @@ -1034,7 +988,7 @@ "y": 227, "z": 211 }, - "created": "2018-08-29T22:57:33Z", + "created": "2018-08-31T21:35:56Z", "dimensions": { "blue": 2.5, "green": 2.5, @@ -1067,8 +1021,8 @@ }, "emitRate": 2, "emitSpeed": 0, - "id": "{f87fab56-c8d8-4ff8-abf0-35a76dfccf2b}", - "lastEdited": 1535583477862685, + "id": "{3482eecd-0acc-4fb9-bd67-b160fa7c14d7}", + "lastEdited": 1535751362200185, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", "lifespan": 10, "maxParticles": 40, @@ -1108,51 +1062,94 @@ }, { "clientOnly": false, - "created": "2018-08-29T22:57:33Z", + "created": "2018-08-31T21:35:56Z", "dimensions": { - "blue": 2.1097896099090576, - "green": 0.04847164824604988, - "red": 1.458284616470337, - "x": 1.458284616470337, - "y": 0.04847164824604988, - "z": 2.1097896099090576 + "blue": 0.06014331430196762, + "green": 2.582186460494995, + "red": 2.582186698913574, + "x": 2.582186698913574, + "y": 2.582186460494995, + "z": 0.06014331430196762 }, - "id": "{1af53cfc-0cce-467a-96e0-a937f2651ce2}", - "lastEdited": 1535583477863389, + "id": "{729e9f39-5750-42a4-97a8-0fc79b300a32}", + "lastEdited": 1535751362197365, "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", - "modelURL": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/portal2.fbx", - "name": "Back", + "modelURL": "http://hifi-content.s3.amazonaws.com/alexia/LoadingScreens/oopsDialog.fbx", + "name": "Oops Dialog", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": { - "blue": 1.5835940837860107, - "green": 0.2467041015625, - "red": 3.0345542430877686, - "x": -0.9654457569122314, - "y": -9.2532958984375, - "z": -2.4164059162139893 + "blue": 1.45927095413208, + "green": 1.6763916015625, + "red": 0, + "x": -4, + "y": -7.8236083984375, + "z": -2.54072904586792 }, "queryAACube": { - "scale": 2.5651814937591553, - "x": 1.751963496208191, - "y": -1.0358866453170776, - "z": 0.3010033369064331 + "scale": 3.6522583961486816, + "x": -1.8261291980743408, + "y": -0.14973759651184082, + "z": -0.36685824394226074 }, "rotation": { - "w": 0.9084458351135254, - "x": -1.52587890625e-05, - "y": 0.4179598093032837, - "z": -0.0001068115234375 + "w": 0.8684672117233276, + "x": -4.57763671875e-05, + "y": 0.4957197904586792, + "z": -7.62939453125e-05 }, - "script": "file:///C:/Users/wayne/development/tryAgainEntityScript.js", - "shapeType": "static-mesh", "type": "Model", "userData": "{\"grabbableKey\":{\"grabbable\":false}}" + }, + { + "angularDamping": 0, + "clientOnly": false, + "color": { + "blue": 0, + "green": 0, + "red": 255 + }, + "created": "2018-08-31T21:35:56Z", + "dimensions": { + "blue": 0.20000000298023224, + "green": 0.20000000298023224, + "red": 0.20000000298023224, + "x": 0.20000000298023224, + "y": 0.20000000298023224, + "z": 0.20000000298023224 + }, + "id": "{bd032130-bbd7-4c0b-9b98-ab9c9362be9b}", + "lastEdited": 1535751362198499, + "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", + "name": "Particle Rotate", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "position": { + "blue": 3.8216662406921387, + "green": 0.0772705078125, + "red": 1.2409718036651611, + "x": -2.759028196334839, + "y": -9.4227294921875, + "z": -0.17833375930786133 + }, + "queryAACube": { + "scale": 0.3464101552963257, + "x": 1.0677666664123535, + "y": -0.09593456983566284, + "z": 3.648461103439331 + }, + "rotation": { + "w": 0.926024317741394, + "x": 0.20308232307434082, + "y": -0.010269343852996826, + "z": 0.3179827928543091 + }, + "script": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/rotate.js", + "scriptTimestamp": 1532724769253, + "shape": "Cube", + "type": "Box", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}", + "visible": false } ], - "Paths": - { - "/": "/1.46,-9,0.7/0,0.487,0,0.86663" - }, - "Id": "{351e561a-ee5e-4e8b-87ab-d28677d3b374}", + "Id": "{99bc5288-05fd-4d80-a406-a44c948f7066}", "Version": 93 -} +} \ No newline at end of file diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 86a1421127..e50473bf29 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -1185,6 +1185,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo const DomainHandler& domainHandler = nodeList->getDomainHandler(); connect(&domainHandler, SIGNAL(domainURLChanged(QUrl)), SLOT(domainURLChanged(QUrl))); + connect(&domainHandler, SIGNAL(redirectToErrorDomainURL(QUrl)), SLOT(goToErrorDomainURL(QUrl))); connect(&domainHandler, &DomainHandler::domainURLChanged, [](QUrl domainURL){ setCrashAnnotation("domain", domainURL.toString().toStdString()); }); @@ -2251,6 +2252,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo connect(this, &QCoreApplication::aboutToQuit, this, &Application::addAssetToWorldMessageClose); connect(&domainHandler, &DomainHandler::domainURLChanged, this, &Application::addAssetToWorldMessageClose); + connect(&domainHandler, &DomainHandler::redirectToErrorDomainURL, this, &Application::addAssetToWorldMessageClose); updateSystemTabletMode(); @@ -2343,14 +2345,6 @@ void Application::domainConnectionRefused(const QString& reasonMessage, int reas } } -void Application::domainConnectionRedirect() { - auto addressManager = DependencyManager::get(); - - addressManager->handleLookupString(REDIRECT_HIFI_ADDRESS); - getMyAvatar()->setWorldVelocity(glm::vec3(0.0f)); -} - - QString Application::getUserAgent() { if (QThread::currentThread() != thread()) { QString userAgent; @@ -3481,7 +3475,7 @@ void Application::setIsServerlessMode(bool serverlessDomain) { } } -void Application::loadServerlessDomain(QUrl domainURL) { +void Application::loadServerlessDomain(QUrl domainURL, bool errorDomain) { if (QThread::currentThread() != thread()) { QMetaObject::invokeMethod(this, "loadServerlessDomain", Q_ARG(QUrl, domainURL)); return; @@ -3515,8 +3509,11 @@ void Application::loadServerlessDomain(QUrl domainURL) { } std::map namedPaths = tmpTree->getNamedPaths(); - nodeList->getDomainHandler().connectedToServerless(namedPaths); - + if (errorDomain) { + nodeList->getDomainHandler().loadedErrorDomain(namedPaths); + } else { + nodeList->getDomainHandler().connectedToServerless(namedPaths); + } _fullSceneReceivedCounter++; } @@ -6381,6 +6378,7 @@ void Application::clearDomainAvatars() { void Application::domainURLChanged(QUrl domainURL) { // disable physics until we have enough information about our new location to not cause craziness. resetPhysicsReadyInformation(); + auto urlStr = domainURL.toString().toStdString(); setIsServerlessMode(domainURL.scheme() != URL_SCHEME_HIFI); if (isServerlessMode()) { loadServerlessDomain(domainURL); @@ -6388,6 +6386,17 @@ void Application::domainURLChanged(QUrl domainURL) { updateWindowTitle(); } +void Application::goToErrorDomainURL(QUrl errorDomainURL) { + // disable physics until we have enough information about our new location to not cause craziness. + resetPhysicsReadyInformation(); + auto urlStr = errorDomainURL.toString().toStdString(); + setIsServerlessMode(errorDomainURL.scheme() != URL_SCHEME_HIFI); + if (isServerlessMode()) { + loadServerlessDomain(errorDomainURL, true); + } + updateWindowTitle(); +} + void Application::resettingDomain() { _notifiedPacketVersionMismatchThisDomain = false; diff --git a/interface/src/Application.h b/interface/src/Application.h index e38b5a3919..7fe88e9b6a 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -426,7 +426,7 @@ public slots: void setPreferredCursor(const QString& cursor); void setIsServerlessMode(bool serverlessDomain); - void loadServerlessDomain(QUrl domainURL); + void loadServerlessDomain(QUrl domainURL, bool errorDomain = false); void updateVerboseLogging(); @@ -465,6 +465,7 @@ private slots: void setSessionUUID(const QUuid& sessionUUID) const; void domainURLChanged(QUrl domainURL); + void goToErrorDomainURL(QUrl errorDomainURL); void updateWindowTitle() const; void nodeAdded(SharedNodePointer node) const; void nodeActivated(SharedNodePointer node); @@ -474,7 +475,6 @@ private slots: void updateDisplayMode(); void setDisplayPlugin(DisplayPluginPointer newPlugin); void domainConnectionRefused(const QString& reasonMessage, int reason, const QString& extraInfo); - void domainConnectionRedirect(); void addAssetToWorldCheckModelSize(); diff --git a/libraries/networking/src/AddressManager.cpp b/libraries/networking/src/AddressManager.cpp index 01db8dfd79..62cd79a609 100644 --- a/libraries/networking/src/AddressManager.cpp +++ b/libraries/networking/src/AddressManager.cpp @@ -114,6 +114,9 @@ QUrl AddressManager::currentFacingPublicAddress() const { return shareableAddress; } +QUrl AddressManager::lastAddress() const { + return _lastVisitedURL; +} void AddressManager::loadSettings(const QString& lookupString) { #if defined(USE_GLES) && defined(Q_OS_WIN) @@ -151,6 +154,12 @@ void AddressManager::goForward() { } } +void AddressManager::goToLastAddress() { + // this should always return something as long as the URL isn't empty. + auto urlStr = _lastVisitedURL.toString().toStdString(); + handleUrl(_lastVisitedURL, LookupTrigger::AttemptedRefresh); +} + void AddressManager::storeCurrentAddress() { auto url = currentAddress(); @@ -250,9 +259,12 @@ bool AddressManager::handleUrl(const QUrl& lookupUrl, LookupTrigger trigger) { UserActivityLogger::getInstance().wentTo(trigger, URL_TYPE_USER, lookupUrl.toString()); + // save the last visited domain URL. + _lastVisitedURL = lookupUrl; + // in case we're failing to connect to where we thought this user was // store their username as previous lookup so we can refresh their location via API - _previousLookup = lookupUrl; + _previousAPILookup = lookupUrl; } else { // we're assuming this is either a network address or global place name // check if it is a network address first @@ -262,8 +274,11 @@ bool AddressManager::handleUrl(const QUrl& lookupUrl, LookupTrigger trigger) { UserActivityLogger::getInstance().wentTo(trigger, URL_TYPE_NETWORK_ADDRESS, lookupUrl.toString()); + // save the last visited domain URL. + _lastVisitedURL = lookupUrl; + // a network address lookup clears the previous lookup since we don't expect to re-attempt it - _previousLookup.clear(); + _previousAPILookup.clear(); // If the host changed then we have already saved to history if (hostChanged) { @@ -281,8 +296,11 @@ bool AddressManager::handleUrl(const QUrl& lookupUrl, LookupTrigger trigger) { } else if (handleDomainID(lookupUrl.host())){ UserActivityLogger::getInstance().wentTo(trigger, URL_TYPE_DOMAIN_ID, lookupUrl.toString()); + // save the last visited domain URL. + _lastVisitedURL = lookupUrl; + // store this domain ID as the previous lookup in case we're failing to connect and want to refresh API info - _previousLookup = lookupUrl; + _previousAPILookup = lookupUrl; // no place name - this is probably a domain ID // try to look up the domain ID on the metaverse API @@ -290,8 +308,11 @@ bool AddressManager::handleUrl(const QUrl& lookupUrl, LookupTrigger trigger) { } else { UserActivityLogger::getInstance().wentTo(trigger, URL_TYPE_PLACE, lookupUrl.toString()); + // save the last visited domain URL. + _lastVisitedURL = lookupUrl; + // store this place name as the previous lookup in case we fail to connect and want to refresh API info - _previousLookup = lookupUrl; + _previousAPILookup = lookupUrl; // wasn't an address - lookup the place name // we may have a path that defines a relative viewpoint - pass that through the lookup so we can go to it after @@ -305,7 +326,7 @@ bool AddressManager::handleUrl(const QUrl& lookupUrl, LookupTrigger trigger) { qCDebug(networking) << "Going to relative path" << lookupUrl.path(); // a path lookup clears the previous lookup since we don't expect to re-attempt it - _previousLookup.clear(); + _previousAPILookup.clear(); // if this is a relative path then handle it as a relative viewpoint handlePath(lookupUrl.path(), trigger, true); @@ -317,7 +338,10 @@ bool AddressManager::handleUrl(const QUrl& lookupUrl, LookupTrigger trigger) { // be loaded over http(s) // lookupUrl.scheme() == URL_SCHEME_HTTP || // lookupUrl.scheme() == URL_SCHEME_HTTPS || - _previousLookup.clear(); + // TODO once a file can return a connection refusal if there were to be some kind of load error, we'd + // need to store the previous domain tried in _lastVisitedURL. For now , do not store it. + + _previousAPILookup.clear(); _shareablePlaceName.clear(); if (lookupUrl.toString() != REDIRECT_HIFI_ADDRESS) { setDomainInfo(lookupUrl, trigger); @@ -386,7 +410,7 @@ void AddressManager::handleAPIResponse(QNetworkReply* requestReply) { QJsonObject dataObject = responseObject["data"].toObject(); // Lookup succeeded, don't keep re-trying it (especially on server restarts) - _previousLookup.clear(); + _previousAPILookup.clear(); if (!dataObject.isEmpty()) { goToAddressFromObject(dataObject.toVariantMap(), requestReply); @@ -552,7 +576,7 @@ void AddressManager::handleAPIError(QNetworkReply* errorReply) { if (errorReply->error() == QNetworkReply::ContentNotFoundError) { // if this is a lookup that has no result, don't keep re-trying it - _previousLookup.clear(); + _previousAPILookup.clear(); emit lookupResultIsNotFound(); } @@ -847,8 +871,8 @@ void AddressManager::goToUser(const QString& username, bool shouldMatchOrientati void AddressManager::refreshPreviousLookup() { // if we have a non-empty previous lookup, fire it again now (but don't re-store it in the history) - if (!_previousLookup.isEmpty()) { - handleUrl(_previousLookup, LookupTrigger::AttemptedRefresh); + if (!_previousAPILookup.isEmpty()) { + handleUrl(_previousAPILookup, LookupTrigger::AttemptedRefresh); } else { handleUrl(currentAddress(), LookupTrigger::AttemptedRefresh); } diff --git a/libraries/networking/src/AddressManager.h b/libraries/networking/src/AddressManager.h index 245517d8cd..fab2bdd6cb 100644 --- a/libraries/networking/src/AddressManager.h +++ b/libraries/networking/src/AddressManager.h @@ -145,6 +145,7 @@ public: UserInput, Back, Forward, + //Retry, StartupFromSettings, DomainPathResponse, Internal, @@ -165,6 +166,8 @@ public: QString currentPath(bool withOrientation = true) const; QString currentFacingPath() const; + QUrl lastAddress() const; + const QUuid& getRootPlaceID() const { return _rootPlaceID; } QString getPlaceName() const; QString getDomainID() const; @@ -246,6 +249,12 @@ public slots: */ void goToUser(const QString& username, bool shouldMatchOrientation = true); + /**jsdoc + * Go to the last address tried. This will be the last URL tried from location.handleLookupString + * @function location.goToLastAddress + */ + void goToLastAddress(); + /**jsdoc * Refresh the current address, e.g., after connecting to a domain in order to position the user to the desired location. * @function location.refreshPreviousLookup @@ -447,6 +456,7 @@ private: void addCurrentAddressToHistory(LookupTrigger trigger); QUrl _domainURL; + QUrl _lastVisitedURL; QUuid _rootPlaceID; PositionGetter _positionGetter; @@ -460,7 +470,7 @@ private: QString _newHostLookupPath; - QUrl _previousLookup; + QUrl _previousAPILookup; }; #endif // hifi_AddressManager_h diff --git a/libraries/networking/src/DomainHandler.cpp b/libraries/networking/src/DomainHandler.cpp index 827232129f..0febe1e155 100644 --- a/libraries/networking/src/DomainHandler.cpp +++ b/libraries/networking/src/DomainHandler.cpp @@ -99,6 +99,7 @@ void DomainHandler::softReset() { clearSettings(); + _isInErrorState = false; _connectionDenialsSinceKeypairRegen = 0; _checkInPacketsSinceLastReply = 0; @@ -129,6 +130,7 @@ void DomainHandler::hardReset() { } void DomainHandler::setErrorDomainURL(const QUrl& url) { + _errorDomainURL = url; return; } @@ -175,7 +177,8 @@ void DomainHandler::setURLAndID(QUrl domainURL, QUuid domainID) { domainPort = DEFAULT_DOMAIN_SERVER_PORT; } - if (_domainURL != domainURL || _sockAddr.getPort() != domainPort) { + // if it's in the error state, reset and try again. + if ((_domainURL != domainURL || _sockAddr.getPort() != domainPort) || _isInErrorState) { // re-set the domain info so that auth information is reloaded hardReset(); @@ -210,7 +213,8 @@ void DomainHandler::setURLAndID(QUrl domainURL, QUuid domainID) { void DomainHandler::setIceServerHostnameAndID(const QString& iceServerHostname, const QUuid& id) { - if (_iceServerSockAddr.getAddress().toString() != iceServerHostname || id != _pendingDomainID) { + // if it's in the error state, reset and try again. + if ((_iceServerSockAddr.getAddress().toString() != iceServerHostname || id != _pendingDomainID) || _isInErrorState) { // re-set the domain info to connect to new domain hardReset(); @@ -320,6 +324,17 @@ void DomainHandler::connectedToServerless(std::map namedPaths) setIsConnected(true); } +void DomainHandler::loadedErrorDomain(std::map namedPaths) { + auto lookup = namedPaths.find("/"); + QString viewpoint; + if (lookup != namedPaths.end()) { + viewpoint = lookup->second; + } else { + viewpoint = DOMAIN_SPAWNING_POINT; + } + DependencyManager::get()->goToViewpointForPath(viewpoint, QString()); +} + void DomainHandler::requestDomainSettings() { qCDebug(networking) << "Requesting settings from domain server"; @@ -461,7 +476,7 @@ void DomainHandler::processDomainServerConnectionDeniedPacket(QSharedPointer namedPaths); + void DomainHandler::loadedErrorDomain(std::map namedPaths); + QString getViewPointFromNamedPath(QString namedPath); bool hasSettings() const { return !_settingsObject.isEmpty(); } @@ -182,7 +184,7 @@ signals: void settingsReceiveFail(); void domainConnectionRefused(QString reasonMessage, int reason, const QString& extraInfo); - void redirectToErrorDomainURL(); + void redirectToErrorDomainURL(QUrl errorDomaunURL); void limitOfSilentDomainCheckInsReached(); From 058115b79142c4b591c89cf9a9c6f64f0fcf0986 Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Tue, 4 Sep 2018 10:38:18 -0700 Subject: [PATCH 071/210] Add guard for sentJointDataOut --- libraries/avatars/src/AvatarData.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libraries/avatars/src/AvatarData.cpp b/libraries/avatars/src/AvatarData.cpp index f2f4e2fd7d..3e822fd17a 100644 --- a/libraries/avatars/src/AvatarData.cpp +++ b/libraries/avatars/src/AvatarData.cpp @@ -600,7 +600,9 @@ QByteArray AvatarData::toByteArray(AvatarDataDetail dataDetail, quint64 lastSent } } - (*sentJointDataOut)[i].rotationIsDefaultPose = data.rotationIsDefaultPose; + if (sentJointDataOut) { + (*sentJointDataOut)[i].rotationIsDefaultPose = data.rotationIsDefaultPose; + } if (++validityBit == BITS_IN_BYTE) { *validityPosition++ = validity; @@ -651,7 +653,9 @@ QByteArray AvatarData::toByteArray(AvatarDataDetail dataDetail, quint64 lastSent } } - (*sentJointDataOut)[i].translationIsDefaultPose = data.translationIsDefaultPose; + if (sentJointDataOut) { + (*sentJointDataOut)[i].translationIsDefaultPose = data.translationIsDefaultPose; + } if (++validityBit == BITS_IN_BYTE) { *validityPosition++ = validity; From a7abebd7aac88535d4753def06fc6f88c929a533 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 4 Sep 2018 11:11:34 -0700 Subject: [PATCH 072/210] adding redirect json to post build in Mac --- interface/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/interface/CMakeLists.txt b/interface/CMakeLists.txt index ded77b9013..cc9fe8ef4c 100644 --- a/interface/CMakeLists.txt +++ b/interface/CMakeLists.txt @@ -332,6 +332,10 @@ if (APPLE) COMMAND "${CMAKE_COMMAND}" -E copy_directory "${PROJECT_SOURCE_DIR}/resources/fonts" "${RESOURCES_DEV_DIR}/fonts" + # add redirect json to macOS builds. + COMMAND "${CMAKE_COMMAND}" -E copy_if_different + "${PROJECT_SOURCE_DIR}/resources/serverless/redirect.json" + "${RESOURCES_DEV_DIR}/serverless/redirect.json" ) # call the fixup_interface macro to add required bundling commands for installation From 22a8164401080f8d55cc3f6ae70eedc2f35a14f6 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 4 Sep 2018 13:53:03 -0700 Subject: [PATCH 073/210] adding back refusal notifications + domain bounds/floor --- interface/resources/serverless/redirect.json | 1591 +++++++++--------- scripts/system/notifications.js | 2 +- 2 files changed, 833 insertions(+), 760 deletions(-) diff --git a/interface/resources/serverless/redirect.json b/interface/resources/serverless/redirect.json index fd81b6d433..72c4abc16b 100644 --- a/interface/resources/serverless/redirect.json +++ b/interface/resources/serverless/redirect.json @@ -1,37 +1,42 @@ { "DataVersion": 0, + "Paths": + { + "/": "/4,1.4,4/0,0.49544,0,0.868645" + }, "Entities": [ { "clientOnly": false, "collidesWith": "static,dynamic,kinematic,otherAvatar,", "collisionMask": 23, - "created": "2018-08-31T21:40:18Z", + "created": "2018-09-04T20:35:23Z", "dimensions": { - "blue": 0.8231174349784851, - "green": 1.8264780044555664, - "red": 1.2112245559692383, - "x": 1.2112245559692383, - "y": 1.8264780044555664, - "z": 0.8231174349784851 + "blue": 0.8660923838615417, + "green": 1.921838402748108, + "red": 1.2744625806808472, + "x": 1.2744625806808472, + "y": 1.921838402748108, + "z": 0.8660923838615417 }, - "id": "{1a8bf6e0-6f03-4761-9aba-1f624fae1236}", - "lastEdited": 1535751992686833, - "lastEditedBy": "{ace8f357-ad94-49e1-b4d0-39c4d5a936f3}", + "id": "{3889145e-9db2-46dc-9765-9ba7594457dc}", + "lastEdited": 1536093329670067, + "lastEditedBy": "{b5bba536-25e5-4b12-a1be-5c7cd196a06a}", + "locked": true, "name": "Try Again Zone", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": { - "blue": 4.442525863647461, + "blue": 4.524896621704102, "green": 1.9289360046386719, - "red": 2.600449562072754, - "x": -1.399550437927246, - "y": -7.571063995361328, - "z": 0.44252586364746094 + "red": 2.893861770629883, + "x": 2.893861770629883, + "y": 1.9289360046386719, + "z": 4.524896621704102 }, "queryAACube": { - "scale": 2.3410699367523193, - "x": 1.4299145936965942, - "y": 0.7584010362625122, - "z": 3.2719907760620117 + "scale": 2.4632973670959473, + "x": 1.6622130870819092, + "y": 0.6972873210906982, + "z": 3.293247938156128 }, "rotation": { "w": 0.9743700623512268, @@ -39,7 +44,7 @@ "y": -0.22495104372501373, "z": 0 }, - "script": "file:///C:/Users/wayne/development/zoneTryAgainEntityScript.js", + "script": "https://raw.githubusercontent.com/wayne-chen/hifi/404DomainRedirect/scripts/redirect/zoneTryAgainEntityScript.js", "shapeType": "box", "type": "Zone", "userData": "{\"grabbableKey\":{\"grabbable\":false}}" @@ -48,33 +53,34 @@ "clientOnly": false, "collidesWith": "static,dynamic,kinematic,otherAvatar,", "collisionMask": 23, - "created": "2018-08-31T21:44:40Z", + "created": "2018-09-04T20:35:23Z", "dimensions": { - "blue": 0.7544999718666077, - "green": 1.8265000581741333, - "red": 1.0555000305175781, - "x": 1.0555000305175781, - "y": 1.8265000581741333, - "z": 0.7544999718666077 + "blue": 1.159199833869934, + "green": 2.8062009811401367, + "red": 1.6216505765914917, + "x": 1.6216505765914917, + "y": 2.8062009811401367, + "z": 1.159199833869934 }, - "id": "{eb439982-948a-4393-8e8c-fdd833e6d9a7}", - "lastEdited": 1535752005525769, - "lastEditedBy": "{ace8f357-ad94-49e1-b4d0-39c4d5a936f3}", + "id": "{8facc8e1-bc17-4460-8a9c-868b07c1b387}", + "lastEdited": 1536093329669913, + "lastEditedBy": "{b5bba536-25e5-4b12-a1be-5c7cd196a06a}", + "locked": true, "name": "Back Zone", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": { - "blue": 2.538674831390381, + "blue": 1.8632707595825195, "green": 1.8022732734680176, - "red": 3.5101304054260254, - "x": -0.4898695945739746, - "y": -7.697726726531982, - "z": -1.4613251686096191 + "red": 3.3276727199554443, + "x": 3.3276727199554443, + "y": 1.8022732734680176, + "z": 1.8632707595825195 }, "queryAACube": { - "scale": 2.2404136657714844, - "x": 2.389923572540283, - "y": 0.6820664405822754, - "z": 1.4184679985046387 + "scale": 3.4421300888061523, + "x": 1.6066076755523682, + "y": 0.0812082290649414, + "z": 0.14220571517944336 }, "rotation": { "w": 0.9304176568984985, @@ -82,186 +88,11 @@ "y": -0.36650121212005615, "z": 0 }, - "script": "file:///C:/Users/wayne/development/zoneBackEntityScript.js", + "script": "https://raw.githubusercontent.com/wayne-chen/hifi/404DomainRedirect/scripts/redirect/zoneBackEntityScript.js", "shapeType": "box", "type": "Zone", "userData": "{\"grabbableKey\":{\"grabbable\":false}}" }, - { - "clientOnly": false, - "created": "2018-08-31T21:35:56Z", - "dimensions": { - "blue": 14.40000057220459, - "green": 14.40000057220459, - "red": 14.40000057220459, - "x": 14.40000057220459, - "y": 14.40000057220459, - "z": 14.40000057220459 - }, - "id": "{dbae0b3a-a7ff-4eb1-9177-fd1f20b3cec8}", - "lastEdited": 1535751789461074, - "lastEditedBy": "{ace8f357-ad94-49e1-b4d0-39c4d5a936f3}", - "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", - "position": { - "blue": 2.3440732955932617, - "green": 1.7684326171875, - "red": 1.8812973499298096, - "x": -2.1187026500701904, - "y": -7.7315673828125, - "z": -1.6559267044067383 - }, - "queryAACube": { - "scale": 24.9415340423584, - "x": -10.589469909667969, - "y": -10.7023344039917, - "z": -10.126693725585938 - }, - "rotation": { - "w": 0.8697794675827026, - "x": -1.52587890625e-05, - "y": 0.4933699369430542, - "z": -4.57763671875e-05 - }, - "shapeType": "box", - "skyboxMode": "enabled", - "type": "Zone", - "userData": "{\"grabbableKey\":{\"grabbable\":false}}" - }, - { - "clientOnly": false, - "color": { - "blue": 0, - "green": 0, - "red": 0 - }, - "created": "2018-08-31T21:35:56Z", - "dimensions": { - "blue": 11.117486953735352, - "green": 3.580313205718994, - "red": 0.20000000298023224, - "x": 0.20000000298023224, - "y": 3.580313205718994, - "z": 11.117486953735352 - }, - "id": "{c92b026b-e13c-448a-903c-2773f9fdc2e8}", - "lastEdited": 1535751961512543, - "lastEditedBy": "{ace8f357-ad94-49e1-b4d0-39c4d5a936f3}", - "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", - "position": { - "blue": 1.9063844680786133, - "green": 1.15850830078125, - "red": 0.16632509231567383, - "x": -3.833674907684326, - "y": -8.34149169921875, - "z": -2.0936155319213867 - }, - "queryAACube": { - "scale": 11.681488037109375, - "x": -5.674418926239014, - "y": -4.6822357177734375, - "z": -3.934359550476074 - }, - "rotation": { - "w": 0.9666743278503418, - "x": -4.57763671875e-05, - "y": -0.2560006380081177, - "z": 1.52587890625e-05 - }, - "shape": "Cube", - "type": "Box", - "userData": "{\"grabbableKey\":{\"grabbable\":false}}", - "visible": false - }, - { - "clientOnly": false, - "color": { - "blue": 0, - "green": 0, - "red": 0 - }, - "created": "2018-08-31T21:35:56Z", - "dimensions": { - "blue": 11.117486953735352, - "green": 3.580313205718994, - "red": 0.20000000298023224, - "x": 0.20000000298023224, - "y": 3.580313205718994, - "z": 11.117486953735352 - }, - "id": "{cd72debb-75a6-420d-b39f-b903fb069798}", - "lastEdited": 1535751362199714, - "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", - "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", - "position": { - "blue": 6.1806135177612305, - "green": 1.1588134765625, - "red": 1.4755167961120605, - "x": -2.5244832038879395, - "y": -8.3411865234375, - "z": 2.1806135177612305 - }, - "queryAACube": { - "scale": 11.681488037109375, - "x": -4.365227222442627, - "y": -4.6819305419921875, - "z": 0.33986949920654297 - }, - "rotation": { - "w": 0.8637980222702026, - "x": -4.57763671875e-05, - "y": 0.5038070678710938, - "z": -1.52587890625e-05 - }, - "shape": "Cube", - "type": "Box", - "userData": "{\"grabbableKey\":{\"grabbable\":false}}", - "visible": false - }, - { - "clientOnly": false, - "color": { - "blue": 0, - "green": 0, - "red": 0 - }, - "created": "2018-08-31T21:35:56Z", - "dimensions": { - "blue": 11.117486953735352, - "green": 3.580313205718994, - "red": 0.20000000298023224, - "x": 0.20000000298023224, - "y": 3.580313205718994, - "z": 11.117486953735352 - }, - "id": "{abe300d5-32b8-4d0c-bf82-e78005b79b70}", - "lastEdited": 1535751362199153, - "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", - "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", - "position": { - "blue": 5.268576622009277, - "green": 1.1588134765625, - "red": 6.100250244140625, - "x": 2.100250244140625, - "y": -8.3411865234375, - "z": 1.2685766220092773 - }, - "queryAACube": { - "scale": 11.681488037109375, - "x": 0.2595062255859375, - "y": -4.6819305419921875, - "z": -0.5721673965454102 - }, - "rotation": { - "w": 0.9662165641784668, - "x": -4.57763671875e-05, - "y": -0.2576791048049927, - "z": 1.52587890625e-05 - }, - "shape": "Cube", - "type": "Box", - "userData": "{\"grabbableKey\":{\"grabbable\":false}}", - "visible": false - }, { "angularDamping": 0, "clientOnly": false, @@ -270,7 +101,7 @@ "green": 0, "red": 255 }, - "created": "2018-08-31T21:35:56Z", + "created": "2018-09-04T20:35:23Z", "dimensions": { "blue": 0.20000000298023224, "green": 0.20000000298023224, @@ -279,18 +110,19 @@ "y": 0.20000000298023224, "z": 0.20000000298023224 }, - "id": "{66757fda-b7ad-4858-83ab-724b01710cc2}", - "lastEdited": 1535751362198937, - "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", + "id": "{ed4142db-f3c9-441b-9091-cd1755b6aeb1}", + "lastEdited": 1536093329672493, + "lastEditedBy": "{b5bba536-25e5-4b12-a1be-5c7cd196a06a}", + "locked": true, "name": "Particle Rotate", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": { "blue": 1.3116319179534912, "green": 0.15618896484375, "red": 2.705613613128662, - "x": -1.294386386871338, - "y": -9.34381103515625, - "z": -2.688368082046509 + "x": 2.705613613128662, + "y": 0.15618896484375, + "z": 1.3116319179534912 }, "queryAACube": { "scale": 0.3464101552963257, @@ -311,148 +143,6 @@ "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false }, - { - "angularDamping": 0, - "clientOnly": false, - "color": { - "blue": 0, - "green": 0, - "red": 255 - }, - "created": "2018-08-31T21:35:56Z", - "dimensions": { - "blue": 0.20000000298023224, - "green": 0.20000000298023224, - "red": 0.20000000298023224, - "x": 0.20000000298023224, - "y": 0.20000000298023224, - "z": 0.20000000298023224 - }, - "id": "{24eda146-92f8-4e43-b084-fb555626427b}", - "lastEdited": 1535751362198263, - "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", - "name": "Particle Rotate", - "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", - "position": { - "blue": 1.3116319179534912, - "green": 0, - "red": 2.705613613128662, - "x": -1.294386386871338, - "y": -9.5, - "z": -2.688368082046509 - }, - "queryAACube": { - "scale": 0.3464101552963257, - "x": 2.5324084758758545, - "y": -0.17320507764816284, - "z": 1.1384267807006836 - }, - "rotation": { - "w": 0.9127794504165649, - "x": 0.2575265169143677, - "y": 0.15553522109985352, - "z": 0.2761729955673218 - }, - "script": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/rotate.js", - "scriptTimestamp": 1532724769253, - "shape": "Cube", - "type": "Box", - "userData": "{\"grabbableKey\":{\"grabbable\":false}}", - "visible": false - }, - { - "alpha": 0, - "alphaFinish": 0, - "alphaStart": 0.25, - "clientOnly": false, - "colorFinish": { - "blue": 0, - "green": 0, - "red": 0, - "x": 0, - "y": 0, - "z": 0 - }, - "colorStart": { - "blue": 255, - "green": 255, - "red": 255, - "x": 255, - "y": 255, - "z": 255 - }, - "created": "2018-08-31T21:35:56Z", - "dimensions": { - "blue": 13.24000072479248, - "green": 13.24000072479248, - "red": 13.24000072479248, - "x": 13.24000072479248, - "y": 13.24000072479248, - "z": 13.24000072479248 - }, - "emitAcceleration": { - "blue": 0, - "green": 0.10000000149011612, - "red": 0, - "x": 0, - "y": 0.10000000149011612, - "z": 0 - }, - "emitDimensions": { - "blue": 1, - "green": 1, - "red": 1, - "x": 1, - "y": 1, - "z": 1 - }, - "emitOrientation": { - "w": 1, - "x": -1.52587890625e-05, - "y": -1.52587890625e-05, - "z": -1.52587890625e-05 - }, - "emitRate": 6, - "emitSpeed": 0, - "emitterShouldTrail": true, - "id": "{b9a46e3e-f982-4a46-b38d-2a38e5cc5fbc}", - "lastEdited": 1535751362199964, - "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", - "lifespan": 10, - "maxParticles": 10, - "name": "Stars", - "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", - "particleRadius": 0.07000000029802322, - "polarFinish": 3.1415927410125732, - "position": { - "blue": 3.78922963142395, - "green": 0.5220947265625, - "red": 1.1928560733795166, - "x": -2.8071439266204834, - "y": -8.9779052734375, - "z": -0.2107703685760498 - }, - "queryAACube": { - "scale": 22.932353973388672, - "x": -10.273321151733398, - "y": -10.944082260131836, - "z": -7.676947593688965 - }, - "radiusFinish": 0, - "radiusStart": 0, - "rotation": { - "w": 0.996429443359375, - "x": -1.52587890625e-05, - "y": -0.08442819118499756, - "z": -4.57763671875e-05 - }, - "speedSpread": 0, - "spinFinish": null, - "spinStart": null, - "textures": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/star.png", - "type": "ParticleEffect", - "userData": "{\"grabbableKey\":{\"grabbable\":false}}" - }, { "clientOnly": false, "color": { @@ -460,7 +150,7 @@ "green": 0, "red": 0 }, - "created": "2018-08-31T21:35:56Z", + "created": "2018-09-04T20:35:23Z", "dimensions": { "blue": 11.117486953735352, "green": 3.580313205718994, @@ -469,17 +159,18 @@ "y": 3.580313205718994, "z": 11.117486953735352 }, - "id": "{e6897ca3-1c22-429f-a1b6-173ff47397a7}", - "lastEdited": 1535751362197848, - "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", + "id": "{d49f29ca-72b6-473d-917c-f7bf7d66f219}", + "lastEdited": 1536093329670344, + "lastEditedBy": "{b5bba536-25e5-4b12-a1be-5c7cd196a06a}", + "locked": true, "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": { "blue": 0, "green": 1.1583251953125, "red": 4.971565246582031, - "x": 0.9715652465820312, - "y": -8.3416748046875, - "z": -4 + "x": 4.971565246582031, + "y": 1.1583251953125, + "z": 0 }, "queryAACube": { "scale": 11.681488037109375, @@ -498,6 +189,47 @@ "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false }, + { + "clientOnly": false, + "created": "2018-09-04T20:35:23Z", + "dimensions": { + "blue": 0.06014331430196762, + "green": 2.582186460494995, + "red": 2.582186698913574, + "x": 2.582186698913574, + "y": 2.582186460494995, + "z": 0.06014331430196762 + }, + "id": "{6ccf519b-4e0b-4c23-a51b-305d0a64ab06}", + "lastEdited": 1536093329671943, + "lastEditedBy": "{b5bba536-25e5-4b12-a1be-5c7cd196a06a}", + "locked": true, + "modelURL": "http://hifi-content.s3.amazonaws.com/alexia/LoadingScreens/oopsDialog.fbx", + "name": "Oops Dialog", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "position": { + "blue": 1.45927095413208, + "green": 1.6763916015625, + "red": 0, + "x": 0, + "y": 1.6763916015625, + "z": 1.45927095413208 + }, + "queryAACube": { + "scale": 3.6522583961486816, + "x": -1.8261291980743408, + "y": -0.14973759651184082, + "z": -0.36685824394226074 + }, + "rotation": { + "w": 0.8684672117233276, + "x": -4.57763671875e-05, + "y": 0.4957197904586792, + "z": -7.62939453125e-05 + }, + "type": "Model", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}" + }, { "angularDamping": 0, "clientOnly": false, @@ -506,7 +238,7 @@ "green": 0, "red": 255 }, - "created": "2018-08-31T21:35:56Z", + "created": "2018-09-04T20:35:23Z", "dimensions": { "blue": 0.20000000298023224, "green": 0.20000000298023224, @@ -515,18 +247,19 @@ "y": 0.20000000298023224, "z": 0.20000000298023224 }, - "id": "{16ca16ab-eee3-41b1-b583-159245aa2010}", - "lastEdited": 1535751362197055, - "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", + "id": "{625c95a4-1592-4996-bd48-7aa3fdbe6aee}", + "lastEdited": 1536093329671797, + "lastEditedBy": "{b5bba536-25e5-4b12-a1be-5c7cd196a06a}", + "locked": true, "name": "Particle Rotate", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": { "blue": 1.3116319179534912, "green": 0.0772705078125, "red": 2.705613613128662, - "x": -1.294386386871338, - "y": -9.4227294921875, - "z": -2.688368082046509 + "x": 2.705613613128662, + "y": 0.0772705078125, + "z": 1.3116319179534912 }, "queryAACube": { "scale": 0.3464101552963257, @@ -549,7 +282,53 @@ }, { "clientOnly": false, - "created": "2018-08-31T21:35:56Z", + "color": { + "blue": 0, + "green": 0, + "red": 255 + }, + "created": "2018-09-04T20:35:23Z", + "dimensions": { + "blue": 8.645400047302246, + "green": 0.20000000298023224, + "red": 20.025121688842773, + "x": 20.025121688842773, + "y": 0.20000000298023224, + "z": 8.645400047302246 + }, + "id": "{d356bb44-7888-476a-821e-961ae7d9330e}", + "lastEdited": 1536093329671479, + "lastEditedBy": "{b5bba536-25e5-4b12-a1be-5c7cd196a06a}", + "locked": true, + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "position": { + "blue": 4.846520900726318, + "green": 3.0651936531066895, + "red": 5.746071815490723, + "x": 5.746071815490723, + "y": 3.0651936531066895, + "z": 4.846520900726318 + }, + "queryAACube": { + "scale": 21.812576293945312, + "x": -5.160216331481934, + "y": -7.841094493865967, + "z": -6.059767246246338 + }, + "rotation": { + "w": 0.970295786857605, + "x": 0, + "y": -0.24192190170288086, + "z": 0 + }, + "shape": "Cube", + "type": "Box", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}", + "visible": false + }, + { + "clientOnly": false, + "created": "2018-09-04T20:35:23Z", "dimensions": { "blue": 2.1097896099090576, "green": 0.04847164824604988, @@ -558,9 +337,10 @@ "y": 0.04847164824604988, "z": 2.1097896099090576 }, - "id": "{482ae172-c411-41fb-9a41-4215eef25478}", - "lastEdited": 1535751754378548, - "lastEditedBy": "{ace8f357-ad94-49e1-b4d0-39c4d5a936f3}", + "id": "{737f1b31-0342-4764-89fb-2ef7ddf83983}", + "lastEdited": 1536093329672351, + "lastEditedBy": "{b5bba536-25e5-4b12-a1be-5c7cd196a06a}", + "locked": true, "modelURL": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/portal2.fbx", "name": "Back", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", @@ -568,9 +348,9 @@ "blue": 1.5835940837860107, "green": 0.2467041015625, "red": 3.0345542430877686, - "x": -0.9654457569122314, - "y": -9.2532958984375, - "z": -2.4164059162139893 + "x": 3.0345542430877686, + "y": 0.2467041015625, + "z": 1.5835940837860107 }, "queryAACube": { "scale": 2.5651814937591553, @@ -584,97 +364,53 @@ "y": 0.4179598093032837, "z": -0.0001068115234375 }, - "script": "file:///C:/Users/wayne/development/backEntityScript.js", + "script": "https://raw.githubusercontent.com/wayne-chen/hifi/404DomainRedirect/scripts/redirect/backEntityScript.js", "scriptTimestamp": 1535751754379, "shapeType": "static-mesh", "type": "Model", "userData": "{\"grabbableKey\":{\"grabbable\":false}}" }, { - "clientOnly": false, - "created": "2018-08-31T21:35:56Z", - "dimensions": { - "blue": 9.030570983886719, - "green": 0.0719478651881218, - "red": 9.030570983886719, - "x": 9.030570983886719, - "y": 0.0719478651881218, - "z": 9.030570983886719 - }, - "id": "{33440bf8-f9ce-4d52-9b29-1b321e226982}", - "lastEdited": 1535751362197214, - "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", - "modelURL": "http://hifi-content.s3.amazonaws.com/alexia/LoadingScreens/floor.fbx", - "name": "Floor", - "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", - "position": { - "blue": 4.2324604988098145, - "green": 0.17547607421875, - "red": 4.802988529205322, - "x": 0.8029885292053223, - "y": -9.32452392578125, - "z": 0.23246049880981445 - }, - "queryAACube": { - "scale": 12.771358489990234, - "x": -1.582690715789795, - "y": -6.210203170776367, - "z": -2.1532187461853027 - }, - "rotation": { - "w": 0.8648051023483276, - "x": -1.52587890625e-05, - "y": 0.5020675659179688, - "z": -4.57763671875e-05 - }, - "shapeType": "simple-hull", - "type": "Model", - "userData": "{\"grabbableKey\":{\"grabbable\":false}}" - }, - { - "angularDamping": 0, "clientOnly": false, "color": { "blue": 0, "green": 0, - "red": 255 + "red": 0 }, - "created": "2018-08-31T21:35:56Z", + "created": "2018-09-04T20:35:23Z", "dimensions": { - "blue": 0.20000000298023224, - "green": 0.20000000298023224, + "blue": 11.117486953735352, + "green": 3.580313205718994, "red": 0.20000000298023224, "x": 0.20000000298023224, - "y": 0.20000000298023224, - "z": 0.20000000298023224 + "y": 3.580313205718994, + "z": 11.117486953735352 }, - "id": "{7639140e-cd6f-4f86-97f7-00a19f50253e}", - "lastEdited": 1535751362198721, - "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", - "name": "Particle Rotate", + "id": "{87f734c8-37bb-4ac0-b300-5028f7fe6f9d}", + "lastEdited": 1536093329670472, + "lastEditedBy": "{b5bba536-25e5-4b12-a1be-5c7cd196a06a}", + "locked": true, "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": { - "blue": 3.8216662406921387, - "green": 0, - "red": 1.2409718036651611, - "x": -2.759028196334839, - "y": -9.5, - "z": -0.17833375930786133 + "blue": 2.662257671356201, + "green": 1.1585893630981445, + "red": 1.493349552154541, + "x": 1.493349552154541, + "y": 1.1585893630981445, + "z": 2.662257671356201 }, "queryAACube": { - "scale": 0.3464101552963257, - "x": 1.0677666664123535, - "y": -0.17320507764816284, - "z": 3.648461103439331 + "scale": 11.681488037109375, + "x": -4.3473944664001465, + "y": -4.682154655456543, + "z": -3.1784863471984863 }, "rotation": { - "w": 0.6444342136383057, - "x": -0.08220034837722778, - "y": -0.6649118661880493, - "z": 0.3684900999069214 + "w": 0.9666743278503418, + "x": -4.57763671875e-05, + "y": -0.2560006380081177, + "z": 1.52587890625e-05 }, - "script": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/rotate.js", - "scriptTimestamp": 1532724769253, "shape": "Cube", "type": "Box", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", @@ -682,7 +418,7 @@ }, { "clientOnly": false, - "created": "2018-08-31T21:35:56Z", + "created": "2018-09-04T20:35:23Z", "dimensions": { "blue": 2.1097896099090576, "green": 0.04847164824604988, @@ -691,9 +427,10 @@ "y": 0.04847164824604988, "z": 2.1097896099090576 }, - "id": "{7755bf99-b026-490d-a682-edadd3f65701}", - "lastEdited": 1535751900322535, - "lastEditedBy": "{ace8f357-ad94-49e1-b4d0-39c4d5a936f3}", + "id": "{9584bb57-b543-4d2b-af98-f3de618eef19}", + "lastEdited": 1536093329672070, + "lastEditedBy": "{b5bba536-25e5-4b12-a1be-5c7cd196a06a}", + "locked": true, "modelURL": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/portal1.fbx", "name": "Try Again", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", @@ -701,9 +438,9 @@ "blue": 3.946338653564453, "green": 0.2467041015625, "red": 1.6013128757476807, - "x": -2.3986871242523193, - "y": -9.2532958984375, - "z": -0.053661346435546875 + "x": 1.6013128757476807, + "y": 0.2467041015625, + "z": 3.946338653564453 }, "queryAACube": { "scale": 2.5651814937591553, @@ -717,251 +454,11 @@ "y": 0.5693598985671997, "z": -0.0001068115234375 }, - "script": "file:///C:/Users/wayne/development/tryAgainEntityScript.js", + "script": "https://raw.githubusercontent.com/wayne-chen/hifi/404DomainRedirect/scripts/redirect/tryAgainEntityScript.js", "shapeType": "static-mesh", "type": "Model", "userData": "{\"grabbableKey\":{\"grabbable\":false}}" }, - { - "angularDamping": 0, - "clientOnly": false, - "color": { - "blue": 0, - "green": 0, - "red": 255 - }, - "created": "2018-08-31T21:35:56Z", - "dimensions": { - "blue": 0.20000000298023224, - "green": 0.20000000298023224, - "red": 0.20000000298023224, - "x": 0.20000000298023224, - "y": 0.20000000298023224, - "z": 0.20000000298023224 - }, - "id": "{81207b9c-e3f2-4ee1-bb81-0e14f37e4687}", - "lastEdited": 1535751362197613, - "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", - "name": "Particle Rotate", - "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", - "position": { - "blue": 3.8216662406921387, - "green": 0.15618896484375, - "red": 1.2409718036651611, - "x": -2.759028196334839, - "y": -9.34381103515625, - "z": -0.17833375930786133 - }, - "queryAACube": { - "scale": 0.3464101552963257, - "x": 1.0677666664123535, - "y": -0.017016112804412842, - "z": 3.648461103439331 - }, - "rotation": { - "w": 0.6747081279754639, - "x": -0.06532388925552368, - "y": -0.6342412233352661, - "z": 0.37175559997558594 - }, - "script": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/rotate.js", - "scriptTimestamp": 1532724769253, - "shape": "Cube", - "type": "Box", - "userData": "{\"grabbableKey\":{\"grabbable\":false}}", - "visible": false - }, - { - "alpha": 0, - "alphaFinish": 0, - "alphaStart": 0.25, - "clientOnly": false, - "colorFinish": { - "blue": 0, - "green": 0, - "red": 0, - "x": 0, - "y": 0, - "z": 0 - }, - "colorStart": { - "blue": 255, - "green": 255, - "red": 255, - "x": 255, - "y": 255, - "z": 255 - }, - "created": "2018-08-31T21:35:56Z", - "dimensions": { - "blue": 13.24000072479248, - "green": 13.24000072479248, - "red": 13.24000072479248, - "x": 13.24000072479248, - "y": 13.24000072479248, - "z": 13.24000072479248 - }, - "emitAcceleration": { - "blue": 0, - "green": 0.10000000149011612, - "red": 0, - "x": 0, - "y": 0.10000000149011612, - "z": 0 - }, - "emitDimensions": { - "blue": 1, - "green": 1, - "red": 1, - "x": 1, - "y": 1, - "z": 1 - }, - "emitOrientation": { - "w": 1, - "x": -1.52587890625e-05, - "y": -1.52587890625e-05, - "z": -1.52587890625e-05 - }, - "emitRate": 6, - "emitSpeed": 0, - "id": "{b8f11bf5-410e-4e35-b4c3-91c86c01351d}", - "lastEdited": 1535751362196710, - "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", - "lifespan": 10, - "maxParticles": 10, - "name": "Stars", - "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", - "particleRadius": 0.07000000029802322, - "polarFinish": 3.1415927410125732, - "position": { - "blue": 1.3712034225463867, - "green": 0.5220947265625, - "red": 2.6281180381774902, - "x": -1.3718819618225098, - "y": -8.9779052734375, - "z": -2.6287965774536133 - }, - "queryAACube": { - "scale": 22.932353973388672, - "x": -8.838058471679688, - "y": -10.944082260131836, - "z": -10.09497356414795 - }, - "radiusFinish": 0, - "radiusStart": 0, - "rotation": { - "w": 0.9852597713470459, - "x": -1.52587890625e-05, - "y": -0.17106890678405762, - "z": -7.62939453125e-05 - }, - "speedSpread": 0, - "spinFinish": null, - "spinStart": null, - "textures": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/star.png", - "type": "ParticleEffect", - "userData": "{\"grabbableKey\":{\"grabbable\":false}}" - }, - { - "alpha": 0, - "alphaFinish": 0, - "alphaStart": 1, - "clientOnly": false, - "color": { - "blue": 255, - "green": 205, - "red": 3 - }, - "colorFinish": { - "blue": 0, - "green": 0, - "red": 0, - "x": 0, - "y": 0, - "z": 0 - }, - "colorStart": { - "blue": 255, - "green": 204, - "red": 0, - "x": 0, - "y": 204, - "z": 255 - }, - "created": "2018-08-31T21:35:56Z", - "dimensions": { - "blue": 2.5, - "green": 2.5, - "red": 2.5, - "x": 2.5, - "y": 2.5, - "z": 2.5 - }, - "emitAcceleration": { - "blue": 0, - "green": 0, - "red": 0, - "x": 0, - "y": 0, - "z": 0 - }, - "emitDimensions": { - "blue": 1, - "green": 1, - "red": 1, - "x": 1, - "y": 1, - "z": 1 - }, - "emitOrientation": { - "w": 0.9993909597396851, - "x": 0.034897372126579285, - "y": -1.525880907138344e-05, - "z": -1.525880907138344e-05 - }, - "emitRate": 2, - "emitSpeed": 0, - "emitterShouldTrail": true, - "id": "{4e72df75-67d7-4ce2-bdea-e78adae8904a}", - "lastEdited": 1535751362199482, - "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", - "lifespan": 10, - "maxParticles": 40, - "name": "Rays", - "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", - "particleRadius": 0.75, - "polarFinish": 3.1415927410125732, - "position": { - "blue": 3.814434051513672, - "green": 1.44122314453125, - "red": 1.2319090366363525, - "x": -2.7680909633636475, - "y": -8.05877685546875, - "z": -0.18556594848632812 - }, - "queryAACube": { - "scale": 4.330127239227295, - "x": -0.9331545829772949, - "y": -0.7238404750823975, - "z": 1.6493704319000244 - }, - "radiusFinish": 0.10000000149011612, - "radiusStart": 0, - "rotation": { - "w": 0.9594720602035522, - "x": -1.52587890625e-05, - "y": 0.28178834915161133, - "z": -4.57763671875e-05 - }, - "script": "file:///C:/Users/wayne/development/raysTryAgainEntityScript.js", - "speedSpread": 0, - "spinFinish": null, - "spinStart": null, - "textures": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/stripe.png", - "type": "ParticleEffect", - "userData": "{\"grabbableKey\":{\"grabbable\":false}}" - }, { "alpha": 0, "alphaFinish": 0, @@ -988,7 +485,7 @@ "y": 227, "z": 211 }, - "created": "2018-08-31T21:35:56Z", + "created": "2018-09-04T20:35:23Z", "dimensions": { "blue": 2.5, "green": 2.5, @@ -1021,10 +518,11 @@ }, "emitRate": 2, "emitSpeed": 0, - "id": "{3482eecd-0acc-4fb9-bd67-b160fa7c14d7}", - "lastEdited": 1535751362200185, - "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", + "id": "{4b942dd2-dcfa-4959-8758-073c56d6a380}", + "lastEdited": 1536093329670643, + "lastEditedBy": "{b5bba536-25e5-4b12-a1be-5c7cd196a06a}", "lifespan": 10, + "locked": true, "maxParticles": 40, "name": "Rays", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", @@ -1034,9 +532,9 @@ "blue": 1.3553659915924072, "green": 1.44122314453125, "red": 2.572803497314453, - "x": -1.4271965026855469, - "y": -8.05877685546875, - "z": -2.6446340084075928 + "x": 2.572803497314453, + "y": 1.44122314453125, + "z": 1.3553659915924072 }, "queryAACube": { "scale": 4.330127239227295, @@ -1052,7 +550,6 @@ "y": 0.19707024097442627, "z": -7.62939453125e-05 }, - "script": "file:///C:/Users/wayne/development/raysBackEntityScript.js", "speedSpread": 0, "spinFinish": null, "spinStart": null, @@ -1060,46 +557,6 @@ "type": "ParticleEffect", "userData": "{\"grabbableKey\":{\"grabbable\":false}}" }, - { - "clientOnly": false, - "created": "2018-08-31T21:35:56Z", - "dimensions": { - "blue": 0.06014331430196762, - "green": 2.582186460494995, - "red": 2.582186698913574, - "x": 2.582186698913574, - "y": 2.582186460494995, - "z": 0.06014331430196762 - }, - "id": "{729e9f39-5750-42a4-97a8-0fc79b300a32}", - "lastEdited": 1535751362197365, - "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", - "modelURL": "http://hifi-content.s3.amazonaws.com/alexia/LoadingScreens/oopsDialog.fbx", - "name": "Oops Dialog", - "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", - "position": { - "blue": 1.45927095413208, - "green": 1.6763916015625, - "red": 0, - "x": -4, - "y": -7.8236083984375, - "z": -2.54072904586792 - }, - "queryAACube": { - "scale": 3.6522583961486816, - "x": -1.8261291980743408, - "y": -0.14973759651184082, - "z": -0.36685824394226074 - }, - "rotation": { - "w": 0.8684672117233276, - "x": -4.57763671875e-05, - "y": 0.4957197904586792, - "z": -7.62939453125e-05 - }, - "type": "Model", - "userData": "{\"grabbableKey\":{\"grabbable\":false}}" - }, { "angularDamping": 0, "clientOnly": false, @@ -1108,7 +565,7 @@ "green": 0, "red": 255 }, - "created": "2018-08-31T21:35:56Z", + "created": "2018-09-04T20:35:23Z", "dimensions": { "blue": 0.20000000298023224, "green": 0.20000000298023224, @@ -1117,18 +574,163 @@ "y": 0.20000000298023224, "z": 0.20000000298023224 }, - "id": "{bd032130-bbd7-4c0b-9b98-ab9c9362be9b}", - "lastEdited": 1535751362198499, - "lastEditedBy": "{8cc0d68c-b354-4c5f-992d-56b89e8072c5}", + "id": "{3b13d766-763a-4d44-99d8-42c7b9d7139e}", + "lastEdited": 1536093329671361, + "lastEditedBy": "{b5bba536-25e5-4b12-a1be-5c7cd196a06a}", + "locked": true, + "name": "Particle Rotate", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "position": { + "blue": 3.8216662406921387, + "green": 0, + "red": 1.2409718036651611, + "x": 1.2409718036651611, + "y": 0, + "z": 3.8216662406921387 + }, + "queryAACube": { + "scale": 0.3464101552963257, + "x": 1.0677666664123535, + "y": -0.17320507764816284, + "z": 3.648461103439331 + }, + "rotation": { + "w": 0.6444342136383057, + "x": -0.08220034837722778, + "y": -0.6649118661880493, + "z": 0.3684900999069214 + }, + "script": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/rotate.js", + "scriptTimestamp": 1532724769253, + "shape": "Cube", + "type": "Box", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}", + "visible": false + }, + { + "alpha": 0, + "alphaFinish": 0, + "alphaStart": 0.25, + "clientOnly": false, + "colorFinish": { + "blue": 0, + "green": 0, + "red": 0, + "x": 0, + "y": 0, + "z": 0 + }, + "colorStart": { + "blue": 255, + "green": 255, + "red": 255, + "x": 255, + "y": 255, + "z": 255 + }, + "created": "2018-09-04T20:35:23Z", + "dimensions": { + "blue": 13.24000072479248, + "green": 13.24000072479248, + "red": 13.24000072479248, + "x": 13.24000072479248, + "y": 13.24000072479248, + "z": 13.24000072479248 + }, + "emitAcceleration": { + "blue": 0, + "green": 0.10000000149011612, + "red": 0, + "x": 0, + "y": 0.10000000149011612, + "z": 0 + }, + "emitDimensions": { + "blue": 1, + "green": 1, + "red": 1, + "x": 1, + "y": 1, + "z": 1 + }, + "emitOrientation": { + "w": 1, + "x": -1.52587890625e-05, + "y": -1.52587890625e-05, + "z": -1.52587890625e-05 + }, + "emitRate": 6, + "emitSpeed": 0, + "emitterShouldTrail": true, + "id": "{e36388d2-7209-4f26-974b-54d314e106a5}", + "lastEdited": 1536093329671654, + "lastEditedBy": "{b5bba536-25e5-4b12-a1be-5c7cd196a06a}", + "lifespan": 10, + "locked": true, + "maxParticles": 10, + "name": "Stars", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "particleRadius": 0.07000000029802322, + "polarFinish": 3.1415927410125732, + "position": { + "blue": 3.78922963142395, + "green": 0.5220947265625, + "red": 1.1928560733795166, + "x": 1.1928560733795166, + "y": 0.5220947265625, + "z": 3.78922963142395 + }, + "queryAACube": { + "scale": 22.932353973388672, + "x": -10.273321151733398, + "y": -10.944082260131836, + "z": -7.676947593688965 + }, + "radiusFinish": 0, + "radiusStart": 0, + "rotation": { + "w": 0.996429443359375, + "x": -1.52587890625e-05, + "y": -0.08442819118499756, + "z": -4.57763671875e-05 + }, + "speedSpread": 0, + "spinFinish": null, + "spinStart": null, + "textures": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/star.png", + "type": "ParticleEffect", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}" + }, + { + "angularDamping": 0, + "clientOnly": false, + "color": { + "blue": 0, + "green": 0, + "red": 255 + }, + "created": "2018-09-04T20:35:23Z", + "dimensions": { + "blue": 0.20000000298023224, + "green": 0.20000000298023224, + "red": 0.20000000298023224, + "x": 0.20000000298023224, + "y": 0.20000000298023224, + "z": 0.20000000298023224 + }, + "id": "{1dbde8e2-c715-4c09-814e-e411803278c9}", + "lastEdited": 1536093329670778, + "lastEditedBy": "{b5bba536-25e5-4b12-a1be-5c7cd196a06a}", + "locked": true, "name": "Particle Rotate", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": { "blue": 3.8216662406921387, "green": 0.0772705078125, "red": 1.2409718036651611, - "x": -2.759028196334839, - "y": -9.4227294921875, - "z": -0.17833375930786133 + "x": 1.2409718036651611, + "y": 0.0772705078125, + "z": 3.8216662406921387 }, "queryAACube": { "scale": 0.3464101552963257, @@ -1148,8 +750,479 @@ "type": "Box", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false + }, + { + "clientOnly": false, + "color": { + "blue": 0, + "green": 0, + "red": 0 + }, + "created": "2018-09-04T20:35:23Z", + "dimensions": { + "blue": 11.117486953735352, + "green": 3.580313205718994, + "red": 0.20000000298023224, + "x": 0.20000000298023224, + "y": 3.580313205718994, + "z": 11.117486953735352 + }, + "id": "{a06f47da-06e5-4bcd-baa2-37816130f2bd}", + "lastEdited": 1536093329671244, + "lastEditedBy": "{b5bba536-25e5-4b12-a1be-5c7cd196a06a}", + "locked": true, + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "position": { + "blue": 6.1806135177612305, + "green": 1.1588134765625, + "red": 1.4755167961120605, + "x": 1.4755167961120605, + "y": 1.1588134765625, + "z": 6.1806135177612305 + }, + "queryAACube": { + "scale": 11.681488037109375, + "x": -4.365227222442627, + "y": -4.6819305419921875, + "z": 0.33986949920654297 + }, + "rotation": { + "w": 0.8637980222702026, + "x": -4.57763671875e-05, + "y": 0.5038070678710938, + "z": -1.52587890625e-05 + }, + "shape": "Cube", + "type": "Box", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}", + "visible": false + }, + { + "alpha": 0, + "alphaFinish": 0, + "alphaStart": 1, + "clientOnly": false, + "color": { + "blue": 255, + "green": 205, + "red": 3 + }, + "colorFinish": { + "blue": 0, + "green": 0, + "red": 0, + "x": 0, + "y": 0, + "z": 0 + }, + "colorStart": { + "blue": 255, + "green": 204, + "red": 0, + "x": 0, + "y": 204, + "z": 255 + }, + "created": "2018-09-04T20:35:23Z", + "dimensions": { + "blue": 2.5, + "green": 2.5, + "red": 2.5, + "x": 2.5, + "y": 2.5, + "z": 2.5 + }, + "emitAcceleration": { + "blue": 0, + "green": 0, + "red": 0, + "x": 0, + "y": 0, + "z": 0 + }, + "emitDimensions": { + "blue": 1, + "green": 1, + "red": 1, + "x": 1, + "y": 1, + "z": 1 + }, + "emitOrientation": { + "w": 0.9993909597396851, + "x": 0.034897372126579285, + "y": -1.525880907138344e-05, + "z": -1.525880907138344e-05 + }, + "emitRate": 2, + "emitSpeed": 0, + "emitterShouldTrail": true, + "id": "{0b1d2de0-39bf-4416-ac72-aae7ddbb3ff0}", + "lastEdited": 1536093329672220, + "lastEditedBy": "{b5bba536-25e5-4b12-a1be-5c7cd196a06a}", + "lifespan": 10, + "locked": true, + "maxParticles": 40, + "name": "Rays", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "particleRadius": 0.75, + "polarFinish": 3.1415927410125732, + "position": { + "blue": 3.814434051513672, + "green": 1.44122314453125, + "red": 1.2319090366363525, + "x": 1.2319090366363525, + "y": 1.44122314453125, + "z": 3.814434051513672 + }, + "queryAACube": { + "scale": 4.330127239227295, + "x": -0.9331545829772949, + "y": -0.7238404750823975, + "z": 1.6493704319000244 + }, + "radiusFinish": 0.10000000149011612, + "radiusStart": 0, + "rotation": { + "w": 0.9594720602035522, + "x": -1.52587890625e-05, + "y": 0.28178834915161133, + "z": -4.57763671875e-05 + }, + "speedSpread": 0, + "spinFinish": null, + "spinStart": null, + "textures": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/stripe.png", + "type": "ParticleEffect", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}" + }, + { + "angularDamping": 0, + "clientOnly": false, + "color": { + "blue": 0, + "green": 0, + "red": 255 + }, + "created": "2018-09-04T20:35:23Z", + "dimensions": { + "blue": 0.20000000298023224, + "green": 0.20000000298023224, + "red": 0.20000000298023224, + "x": 0.20000000298023224, + "y": 0.20000000298023224, + "z": 0.20000000298023224 + }, + "id": "{01d9478b-50ae-4f09-b67a-e62a4d133cdf}", + "lastEdited": 1536093329672981, + "lastEditedBy": "{b5bba536-25e5-4b12-a1be-5c7cd196a06a}", + "locked": true, + "name": "Particle Rotate", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "position": { + "blue": 3.8216662406921387, + "green": 0.15618896484375, + "red": 1.2409718036651611, + "x": 1.2409718036651611, + "y": 0.15618896484375, + "z": 3.8216662406921387 + }, + "queryAACube": { + "scale": 0.3464101552963257, + "x": 1.0677666664123535, + "y": -0.017016112804412842, + "z": 3.648461103439331 + }, + "rotation": { + "w": 0.6747081279754639, + "x": -0.06532388925552368, + "y": -0.6342412233352661, + "z": 0.37175559997558594 + }, + "script": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/rotate.js", + "scriptTimestamp": 1532724769253, + "shape": "Cube", + "type": "Box", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}", + "visible": false + }, + { + "clientOnly": false, + "color": { + "blue": 0, + "green": 0, + "red": 0 + }, + "created": "2018-09-04T20:35:23Z", + "dimensions": { + "blue": 6.9401350021362305, + "green": 0.04553089290857315, + "red": 7.004304885864258, + "x": 7.004304885864258, + "y": 0.04553089290857315, + "z": 6.9401350021362305 + }, + "id": "{718b3532-0c3c-4689-ac41-dca8fedffc4a}", + "lastEdited": 1536093496994604, + "lastEditedBy": "{4eecd88f-ef9b-4a83-bb9a-7f7496209c6b}", + "locked": true, + "name": "floor", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "position": { + "blue": 3.6175529956817627, + "green": 0.15221074223518372, + "red": 4.108861923217773, + "x": 4.108861923217773, + "y": 0.15221074223518372, + "z": 3.6175529956817627 + }, + "queryAACube": { + "scale": 9.860417366027832, + "x": -0.8213467597961426, + "y": -4.777997970581055, + "z": -1.3126556873321533 + }, + "rotation": { + "w": 0.8660253882408142, + "x": -1.5922749298624694e-05, + "y": 0.5, + "z": -4.572480611386709e-05 + }, + "shape": "Cube", + "type": "Box", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}" + }, + { + "clientOnly": false, + "color": { + "blue": 0, + "green": 0, + "red": 0 + }, + "created": "2018-09-04T20:35:23Z", + "dimensions": { + "blue": 11.117486953735352, + "green": 3.580313205718994, + "red": 0.20000000298023224, + "x": 0.20000000298023224, + "y": 3.580313205718994, + "z": 11.117486953735352 + }, + "id": "{44442e52-e0cf-45d3-9916-678b8aa56a22}", + "lastEdited": 1536093329672691, + "lastEditedBy": "{b5bba536-25e5-4b12-a1be-5c7cd196a06a}", + "locked": true, + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "position": { + "blue": 5.268576622009277, + "green": 1.1588134765625, + "red": 6.100250244140625, + "x": 6.100250244140625, + "y": 1.1588134765625, + "z": 5.268576622009277 + }, + "queryAACube": { + "scale": 11.681488037109375, + "x": 0.2595062255859375, + "y": -4.6819305419921875, + "z": -0.5721673965454102 + }, + "rotation": { + "w": 0.9662165641784668, + "x": -4.57763671875e-05, + "y": -0.2576791048049927, + "z": 1.52587890625e-05 + }, + "shape": "Cube", + "type": "Box", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}", + "visible": false + }, + { + "clientOnly": false, + "created": "2018-09-04T20:35:23Z", + "dimensions": { + "blue": 14.40000057220459, + "green": 14.40000057220459, + "red": 14.40000057220459, + "x": 14.40000057220459, + "y": 14.40000057220459, + "z": 14.40000057220459 + }, + "id": "{8a045310-b82f-4021-9963-0b98d317995c}", + "lastEdited": 1536093329670891, + "lastEditedBy": "{b5bba536-25e5-4b12-a1be-5c7cd196a06a}", + "locked": true, + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "position": { + "blue": 2.3440732955932617, + "green": 1.7684326171875, + "red": 1.8812973499298096, + "x": 1.8812973499298096, + "y": 1.7684326171875, + "z": 2.3440732955932617 + }, + "queryAACube": { + "scale": 24.9415340423584, + "x": -10.589469909667969, + "y": -10.7023344039917, + "z": -10.126693725585938 + }, + "rotation": { + "w": 0.8697794675827026, + "x": -1.52587890625e-05, + "y": 0.4933699369430542, + "z": -4.57763671875e-05 + }, + "shapeType": "box", + "skyboxMode": "enabled", + "type": "Zone", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}" + }, + { + "alpha": 0, + "alphaFinish": 0, + "alphaStart": 0.25, + "clientOnly": false, + "colorFinish": { + "blue": 0, + "green": 0, + "red": 0, + "x": 0, + "y": 0, + "z": 0 + }, + "colorStart": { + "blue": 255, + "green": 255, + "red": 255, + "x": 255, + "y": 255, + "z": 255 + }, + "created": "2018-09-04T20:35:23Z", + "dimensions": { + "blue": 13.24000072479248, + "green": 13.24000072479248, + "red": 13.24000072479248, + "x": 13.24000072479248, + "y": 13.24000072479248, + "z": 13.24000072479248 + }, + "emitAcceleration": { + "blue": 0, + "green": 0.10000000149011612, + "red": 0, + "x": 0, + "y": 0.10000000149011612, + "z": 0 + }, + "emitDimensions": { + "blue": 1, + "green": 1, + "red": 1, + "x": 1, + "y": 1, + "z": 1 + }, + "emitOrientation": { + "w": 1, + "x": -1.52587890625e-05, + "y": -1.52587890625e-05, + "z": -1.52587890625e-05 + }, + "emitRate": 6, + "emitSpeed": 0, + "id": "{b310070f-6af8-4c1d-9ad7-ea1070b53763}", + "lastEdited": 1536093329670211, + "lastEditedBy": "{b5bba536-25e5-4b12-a1be-5c7cd196a06a}", + "lifespan": 10, + "locked": true, + "maxParticles": 10, + "name": "Stars", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "particleRadius": 0.07000000029802322, + "polarFinish": 3.1415927410125732, + "position": { + "blue": 1.3712034225463867, + "green": 0.5220947265625, + "red": 2.6281180381774902, + "x": 2.6281180381774902, + "y": 0.5220947265625, + "z": 1.3712034225463867 + }, + "queryAACube": { + "scale": 22.932353973388672, + "x": -8.838058471679688, + "y": -10.944082260131836, + "z": -10.09497356414795 + }, + "radiusFinish": 0, + "radiusStart": 0, + "rotation": { + "w": 0.9852597713470459, + "x": -1.52587890625e-05, + "y": -0.17106890678405762, + "z": -7.62939453125e-05 + }, + "speedSpread": 0, + "spinFinish": null, + "spinStart": null, + "textures": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/star.png", + "type": "ParticleEffect", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}" + }, + { + "angularDamping": 0, + "clientOnly": false, + "color": { + "blue": 0, + "green": 0, + "red": 255 + }, + "created": "2018-09-04T20:35:23Z", + "dimensions": { + "blue": 0.20000000298023224, + "green": 0.20000000298023224, + "red": 0.20000000298023224, + "x": 0.20000000298023224, + "y": 0.20000000298023224, + "z": 0.20000000298023224 + }, + "id": "{7c24a30b-47d3-4cf6-af92-5a7959a3cb5d}", + "lastEdited": 1536093329671011, + "lastEditedBy": "{b5bba536-25e5-4b12-a1be-5c7cd196a06a}", + "locked": true, + "name": "Particle Rotate", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "position": { + "blue": 1.3116319179534912, + "green": 0, + "red": 2.705613613128662, + "x": 2.705613613128662, + "y": 0, + "z": 1.3116319179534912 + }, + "queryAACube": { + "scale": 0.3464101552963257, + "x": 2.5324084758758545, + "y": -0.17320507764816284, + "z": 1.1384267807006836 + }, + "rotation": { + "w": 0.9127794504165649, + "x": 0.2575265169143677, + "y": 0.15553522109985352, + "z": 0.2761729955673218 + }, + "script": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/rotate.js", + "scriptTimestamp": 1532724769253, + "shape": "Cube", + "type": "Box", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}", + "visible": false } ], - "Id": "{99bc5288-05fd-4d80-a406-a44c948f7066}", + "Id": "{c9a2e576-13f3-44fa-8d41-a466b33d16c6}", "Version": 93 -} \ No newline at end of file +} diff --git a/scripts/system/notifications.js b/scripts/system/notifications.js index 13d500b909..0778e2a44b 100644 --- a/scripts/system/notifications.js +++ b/scripts/system/notifications.js @@ -624,7 +624,7 @@ Controller.keyReleaseEvent.connect(keyReleaseEvent); Script.update.connect(update); Script.scriptEnding.connect(scriptEnding); - //Window.domainConnectionRefused.connect(onDomainConnectionRefused); + Window.domainConnectionRefused.connect(onDomainConnectionRefused); Window.stillSnapshotTaken.connect(onSnapshotTaken); Window.snapshot360Taken.connect(onSnapshotTaken); Window.processingGifStarted.connect(processingGif); From 002c6547ee182eb32b24e366a5c2811dd6bd9fb5 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 4 Sep 2018 14:08:13 -0700 Subject: [PATCH 074/210] entity script URL update --- interface/resources/serverless/redirect.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/interface/resources/serverless/redirect.json b/interface/resources/serverless/redirect.json index 72c4abc16b..0f58574c1e 100644 --- a/interface/resources/serverless/redirect.json +++ b/interface/resources/serverless/redirect.json @@ -44,7 +44,7 @@ "y": -0.22495104372501373, "z": 0 }, - "script": "https://raw.githubusercontent.com/wayne-chen/hifi/404DomainRedirect/scripts/redirect/zoneTryAgainEntityScript.js", + "script": "https://hifi-content.s3.amazonaws.com/wayne/404redirectionScripts/zoneTryAgainEntityScript.js", "shapeType": "box", "type": "Zone", "userData": "{\"grabbableKey\":{\"grabbable\":false}}" @@ -88,7 +88,7 @@ "y": -0.36650121212005615, "z": 0 }, - "script": "https://raw.githubusercontent.com/wayne-chen/hifi/404DomainRedirect/scripts/redirect/zoneBackEntityScript.js", + "script": "https://hifi-content.s3.amazonaws.com/wayne/404redirectionScripts/zoneBackEntityScript.js", "shapeType": "box", "type": "Zone", "userData": "{\"grabbableKey\":{\"grabbable\":false}}" @@ -364,7 +364,7 @@ "y": 0.4179598093032837, "z": -0.0001068115234375 }, - "script": "https://raw.githubusercontent.com/wayne-chen/hifi/404DomainRedirect/scripts/redirect/backEntityScript.js", + "script": "https://hifi-content.s3.amazonaws.com/wayne/404redirectionScripts/backEntityScript.js", "scriptTimestamp": 1535751754379, "shapeType": "static-mesh", "type": "Model", @@ -454,7 +454,7 @@ "y": 0.5693598985671997, "z": -0.0001068115234375 }, - "script": "https://raw.githubusercontent.com/wayne-chen/hifi/404DomainRedirect/scripts/redirect/tryAgainEntityScript.js", + "script": "https://hifi-content.s3.amazonaws.com/wayne/404redirectionScripts/tryAgainEntityScript.js", "shapeType": "static-mesh", "type": "Model", "userData": "{\"grabbableKey\":{\"grabbable\":false}}" From 9e0fa08cf12af8009328dbe1a70506099b92043f Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 4 Sep 2018 17:46:23 -0700 Subject: [PATCH 075/210] adding property to location, updating domain --- interface/resources/serverless/redirect.json | 1317 +++++++----------- interface/src/Application.cpp | 2 + libraries/networking/src/AddressManager.cpp | 4 +- libraries/networking/src/AddressManager.h | 38 +- libraries/networking/src/DomainHandler.cpp | 1 + libraries/networking/src/DomainHandler.h | 2 + 6 files changed, 545 insertions(+), 819 deletions(-) diff --git a/interface/resources/serverless/redirect.json b/interface/resources/serverless/redirect.json index 0f58574c1e..f983a7ffef 100644 --- a/interface/resources/serverless/redirect.json +++ b/interface/resources/serverless/redirect.json @@ -9,7 +9,7 @@ "clientOnly": false, "collidesWith": "static,dynamic,kinematic,otherAvatar,", "collisionMask": 23, - "created": "2018-09-04T20:35:23Z", + "created": "2018-09-05T00:40:03Z", "dimensions": { "blue": 0.8660923838615417, "green": 1.921838402748108, @@ -18,25 +18,25 @@ "y": 1.921838402748108, "z": 0.8660923838615417 }, - "id": "{3889145e-9db2-46dc-9765-9ba7594457dc}", - "lastEdited": 1536093329670067, - "lastEditedBy": "{b5bba536-25e5-4b12-a1be-5c7cd196a06a}", + "id": "{781e26c7-ecfa-44b2-b7ef-4e3278787fbc}", + "lastEdited": 1536108183362142, + "lastEditedBy": "{4656d4a8-5e61-4230-ab34-2888d7945bd6}", "locked": true, "name": "Try Again Zone", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": { - "blue": 4.524896621704102, - "green": 1.9289360046386719, - "red": 2.893861770629883, - "x": 2.893861770629883, - "y": 1.9289360046386719, - "z": 4.524896621704102 + "blue": 4.225754737854004, + "green": 1.7677892446517944, + "red": 2.778148889541626, + "x": 2.778148889541626, + "y": 1.7677892446517944, + "z": 4.225754737854004 }, "queryAACube": { "scale": 2.4632973670959473, - "x": 1.6622130870819092, - "y": 0.6972873210906982, - "z": 3.293247938156128 + "x": 1.5465002059936523, + "y": 0.5361405611038208, + "z": 2.9941060543060303 }, "rotation": { "w": 0.9743700623512268, @@ -50,244 +50,13 @@ "userData": "{\"grabbableKey\":{\"grabbable\":false}}" }, { - "clientOnly": false, - "collidesWith": "static,dynamic,kinematic,otherAvatar,", - "collisionMask": 23, - "created": "2018-09-04T20:35:23Z", - "dimensions": { - "blue": 1.159199833869934, - "green": 2.8062009811401367, - "red": 1.6216505765914917, - "x": 1.6216505765914917, - "y": 2.8062009811401367, - "z": 1.159199833869934 - }, - "id": "{8facc8e1-bc17-4460-8a9c-868b07c1b387}", - "lastEdited": 1536093329669913, - "lastEditedBy": "{b5bba536-25e5-4b12-a1be-5c7cd196a06a}", - "locked": true, - "name": "Back Zone", - "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", - "position": { - "blue": 1.8632707595825195, - "green": 1.8022732734680176, - "red": 3.3276727199554443, - "x": 3.3276727199554443, - "y": 1.8022732734680176, - "z": 1.8632707595825195 - }, - "queryAACube": { - "scale": 3.4421300888061523, - "x": 1.6066076755523682, - "y": 0.0812082290649414, - "z": 0.14220571517944336 - }, - "rotation": { - "w": 0.9304176568984985, - "x": 0, - "y": -0.36650121212005615, - "z": 0 - }, - "script": "https://hifi-content.s3.amazonaws.com/wayne/404redirectionScripts/zoneBackEntityScript.js", - "shapeType": "box", - "type": "Zone", - "userData": "{\"grabbableKey\":{\"grabbable\":false}}" - }, - { - "angularDamping": 0, "clientOnly": false, "color": { "blue": 0, "green": 0, "red": 255 }, - "created": "2018-09-04T20:35:23Z", - "dimensions": { - "blue": 0.20000000298023224, - "green": 0.20000000298023224, - "red": 0.20000000298023224, - "x": 0.20000000298023224, - "y": 0.20000000298023224, - "z": 0.20000000298023224 - }, - "id": "{ed4142db-f3c9-441b-9091-cd1755b6aeb1}", - "lastEdited": 1536093329672493, - "lastEditedBy": "{b5bba536-25e5-4b12-a1be-5c7cd196a06a}", - "locked": true, - "name": "Particle Rotate", - "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", - "position": { - "blue": 1.3116319179534912, - "green": 0.15618896484375, - "red": 2.705613613128662, - "x": 2.705613613128662, - "y": 0.15618896484375, - "z": 1.3116319179534912 - }, - "queryAACube": { - "scale": 0.3464101552963257, - "x": 2.5324084758758545, - "y": -0.017016112804412842, - "z": 1.1384267807006836 - }, - "rotation": { - "w": 0.46953535079956055, - "x": -0.16719311475753784, - "y": -0.7982757091522217, - "z": 0.3380941152572632 - }, - "script": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/rotate.js", - "scriptTimestamp": 1532724769253, - "shape": "Cube", - "type": "Box", - "userData": "{\"grabbableKey\":{\"grabbable\":false}}", - "visible": false - }, - { - "clientOnly": false, - "color": { - "blue": 0, - "green": 0, - "red": 0 - }, - "created": "2018-09-04T20:35:23Z", - "dimensions": { - "blue": 11.117486953735352, - "green": 3.580313205718994, - "red": 0.20000000298023224, - "x": 0.20000000298023224, - "y": 3.580313205718994, - "z": 11.117486953735352 - }, - "id": "{d49f29ca-72b6-473d-917c-f7bf7d66f219}", - "lastEdited": 1536093329670344, - "lastEditedBy": "{b5bba536-25e5-4b12-a1be-5c7cd196a06a}", - "locked": true, - "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", - "position": { - "blue": 0, - "green": 1.1583251953125, - "red": 4.971565246582031, - "x": 4.971565246582031, - "y": 1.1583251953125, - "z": 0 - }, - "queryAACube": { - "scale": 11.681488037109375, - "x": -0.8691787719726562, - "y": -4.6824188232421875, - "z": -5.8407440185546875 - }, - "rotation": { - "w": 0.8637980222702026, - "x": -4.57763671875e-05, - "y": 0.5038070678710938, - "z": -1.52587890625e-05 - }, - "shape": "Cube", - "type": "Box", - "userData": "{\"grabbableKey\":{\"grabbable\":false}}", - "visible": false - }, - { - "clientOnly": false, - "created": "2018-09-04T20:35:23Z", - "dimensions": { - "blue": 0.06014331430196762, - "green": 2.582186460494995, - "red": 2.582186698913574, - "x": 2.582186698913574, - "y": 2.582186460494995, - "z": 0.06014331430196762 - }, - "id": "{6ccf519b-4e0b-4c23-a51b-305d0a64ab06}", - "lastEdited": 1536093329671943, - "lastEditedBy": "{b5bba536-25e5-4b12-a1be-5c7cd196a06a}", - "locked": true, - "modelURL": "http://hifi-content.s3.amazonaws.com/alexia/LoadingScreens/oopsDialog.fbx", - "name": "Oops Dialog", - "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", - "position": { - "blue": 1.45927095413208, - "green": 1.6763916015625, - "red": 0, - "x": 0, - "y": 1.6763916015625, - "z": 1.45927095413208 - }, - "queryAACube": { - "scale": 3.6522583961486816, - "x": -1.8261291980743408, - "y": -0.14973759651184082, - "z": -0.36685824394226074 - }, - "rotation": { - "w": 0.8684672117233276, - "x": -4.57763671875e-05, - "y": 0.4957197904586792, - "z": -7.62939453125e-05 - }, - "type": "Model", - "userData": "{\"grabbableKey\":{\"grabbable\":false}}" - }, - { - "angularDamping": 0, - "clientOnly": false, - "color": { - "blue": 0, - "green": 0, - "red": 255 - }, - "created": "2018-09-04T20:35:23Z", - "dimensions": { - "blue": 0.20000000298023224, - "green": 0.20000000298023224, - "red": 0.20000000298023224, - "x": 0.20000000298023224, - "y": 0.20000000298023224, - "z": 0.20000000298023224 - }, - "id": "{625c95a4-1592-4996-bd48-7aa3fdbe6aee}", - "lastEdited": 1536093329671797, - "lastEditedBy": "{b5bba536-25e5-4b12-a1be-5c7cd196a06a}", - "locked": true, - "name": "Particle Rotate", - "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", - "position": { - "blue": 1.3116319179534912, - "green": 0.0772705078125, - "red": 2.705613613128662, - "x": 2.705613613128662, - "y": 0.0772705078125, - "z": 1.3116319179534912 - }, - "queryAACube": { - "scale": 0.3464101552963257, - "x": 2.5324084758758545, - "y": -0.09593456983566284, - "z": 1.1384267807006836 - }, - "rotation": { - "w": -0.38777750730514526, - "x": -0.37337303161621094, - "y": -0.8409399390220642, - "z": 0.055222392082214355 - }, - "script": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/rotate.js", - "scriptTimestamp": 1532724769253, - "shape": "Cube", - "type": "Box", - "userData": "{\"grabbableKey\":{\"grabbable\":false}}", - "visible": false - }, - { - "clientOnly": false, - "color": { - "blue": 0, - "green": 0, - "red": 255 - }, - "created": "2018-09-04T20:35:23Z", + "created": "2018-09-05T00:40:03Z", "dimensions": { "blue": 8.645400047302246, "green": 0.20000000298023224, @@ -296,23 +65,24 @@ "y": 0.20000000298023224, "z": 8.645400047302246 }, - "id": "{d356bb44-7888-476a-821e-961ae7d9330e}", - "lastEdited": 1536093329671479, - "lastEditedBy": "{b5bba536-25e5-4b12-a1be-5c7cd196a06a}", + "id": "{e44fb546-b34a-4966-9b11-73556f800d21}", + "lastEdited": 1536107948776951, + "lastEditedBy": "{ce82d352-3002-44ae-9b76-66492989a1db}", "locked": true, + "name": "ceiling", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": { "blue": 4.846520900726318, - "green": 3.0651936531066895, - "red": 5.746071815490723, - "x": 5.746071815490723, - "y": 3.0651936531066895, + "green": 2.912982940673828, + "red": 5.739595890045166, + "x": 5.739595890045166, + "y": 2.912982940673828, "z": 4.846520900726318 }, "queryAACube": { "scale": 21.812576293945312, - "x": -5.160216331481934, - "y": -7.841094493865967, + "x": -5.16669225692749, + "y": -7.993305206298828, "z": -6.059767246246338 }, "rotation": { @@ -328,46 +98,48 @@ }, { "clientOnly": false, - "created": "2018-09-04T20:35:23Z", - "dimensions": { - "blue": 2.1097896099090576, - "green": 0.04847164824604988, - "red": 1.458284616470337, - "x": 1.458284616470337, - "y": 0.04847164824604988, - "z": 2.1097896099090576 + "color": { + "blue": 0, + "green": 0, + "red": 0 }, - "id": "{737f1b31-0342-4764-89fb-2ef7ddf83983}", - "lastEdited": 1536093329672351, - "lastEditedBy": "{b5bba536-25e5-4b12-a1be-5c7cd196a06a}", + "created": "2018-09-05T00:40:03Z", + "dimensions": { + "blue": 6.9401350021362305, + "green": 0.04553089290857315, + "red": 7.004304885864258, + "x": 7.004304885864258, + "y": 0.04553089290857315, + "z": 6.9401350021362305 + }, + "id": "{8cd93fe5-16c0-44b7-b1e9-e7e06c4e9228}", + "lastEdited": 1536107948774796, + "lastEditedBy": "{4eecd88f-ef9b-4a83-bb9a-7f7496209c6b}", "locked": true, - "modelURL": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/portal2.fbx", - "name": "Back", + "name": "floor", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": { - "blue": 1.5835940837860107, - "green": 0.2467041015625, - "red": 3.0345542430877686, - "x": 3.0345542430877686, - "y": 0.2467041015625, - "z": 1.5835940837860107 + "blue": 3.6175529956817627, + "green": 0, + "red": 4.102385997772217, + "x": 4.102385997772217, + "y": 0, + "z": 3.6175529956817627 }, "queryAACube": { - "scale": 2.5651814937591553, - "x": 1.751963496208191, - "y": -1.0358866453170776, - "z": 0.3010033369064331 + "scale": 9.860417366027832, + "x": -0.8278226852416992, + "y": -4.930208683013916, + "z": -1.3126556873321533 }, "rotation": { - "w": 0.9084458351135254, - "x": -1.52587890625e-05, - "y": 0.4179598093032837, - "z": -0.0001068115234375 + "w": 0.8660253882408142, + "x": -1.5922749298624694e-05, + "y": 0.5, + "z": -4.572480611386709e-05 }, - "script": "https://hifi-content.s3.amazonaws.com/wayne/404redirectionScripts/backEntityScript.js", - "scriptTimestamp": 1535751754379, - "shapeType": "static-mesh", - "type": "Model", + "shape": "Cube", + "type": "Box", "userData": "{\"grabbableKey\":{\"grabbable\":false}}" }, { @@ -377,7 +149,7 @@ "green": 0, "red": 0 }, - "created": "2018-09-04T20:35:23Z", + "created": "2018-09-05T00:40:03Z", "dimensions": { "blue": 11.117486953735352, "green": 3.580313205718994, @@ -386,29 +158,77 @@ "y": 3.580313205718994, "z": 11.117486953735352 }, - "id": "{87f734c8-37bb-4ac0-b300-5028f7fe6f9d}", - "lastEdited": 1536093329670472, - "lastEditedBy": "{b5bba536-25e5-4b12-a1be-5c7cd196a06a}", + "id": "{147272dc-a344-4171-9621-efc1c2095997}", + "lastEdited": 1536107948776823, + "lastEditedBy": "{ce82d352-3002-44ae-9b76-66492989a1db}", "locked": true, + "name": "leftWall", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": { - "blue": 2.662257671356201, - "green": 1.1585893630981445, - "red": 1.493349552154541, - "x": 1.493349552154541, - "y": 1.1585893630981445, - "z": 2.662257671356201 + "blue": 6.1806135177612305, + "green": 1.0066027641296387, + "red": 1.4690406322479248, + "x": 1.4690406322479248, + "y": 1.0066027641296387, + "z": 6.1806135177612305 }, "queryAACube": { "scale": 11.681488037109375, - "x": -4.3473944664001465, - "y": -4.682154655456543, - "z": -3.1784863471984863 + "x": -4.371703147888184, + "y": -4.834141254425049, + "z": 0.33986949920654297 }, "rotation": { - "w": 0.9666743278503418, + "w": 0.8637980222702026, "x": -4.57763671875e-05, - "y": -0.2560006380081177, + "y": 0.5038070678710938, + "z": -1.52587890625e-05 + }, + "shape": "Cube", + "type": "Box", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}", + "visible": false + }, + { + "clientOnly": false, + "color": { + "blue": 0, + "green": 0, + "red": 0 + }, + "created": "2018-09-05T00:40:03Z", + "dimensions": { + "blue": 11.117486953735352, + "green": 3.580313205718994, + "red": 0.20000000298023224, + "x": 0.20000000298023224, + "y": 3.580313205718994, + "z": 11.117486953735352 + }, + "id": "{5f2b89b8-47e3-4915-a966-d46307a40f06}", + "lastEdited": 1536107948774605, + "lastEditedBy": "{ce82d352-3002-44ae-9b76-66492989a1db}", + "locked": true, + "name": "backWall", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "position": { + "blue": 5.268576622009277, + "green": 1.0066027641296387, + "red": 6.093774318695068, + "x": 6.093774318695068, + "y": 1.0066027641296387, + "z": 5.268576622009277 + }, + "queryAACube": { + "scale": 11.681488037109375, + "x": 0.25303030014038086, + "y": -4.834141254425049, + "z": -0.5721673965454102 + }, + "rotation": { + "w": 0.9662165641784668, + "x": -4.57763671875e-05, + "y": -0.2576791048049927, "z": 1.52587890625e-05 }, "shape": "Cube", @@ -418,45 +238,43 @@ }, { "clientOnly": false, - "created": "2018-09-04T20:35:23Z", + "created": "2018-09-05T00:40:03Z", "dimensions": { - "blue": 2.1097896099090576, - "green": 0.04847164824604988, - "red": 1.458284616470337, - "x": 1.458284616470337, - "y": 0.04847164824604988, - "z": 2.1097896099090576 + "blue": 14.40000057220459, + "green": 14.40000057220459, + "red": 14.40000057220459, + "x": 14.40000057220459, + "y": 14.40000057220459, + "z": 14.40000057220459 }, - "id": "{9584bb57-b543-4d2b-af98-f3de618eef19}", - "lastEdited": 1536093329672070, + "id": "{baf96345-8f68-4068-af4c-3c690035852a}", + "lastEdited": 1536107948775591, "lastEditedBy": "{b5bba536-25e5-4b12-a1be-5c7cd196a06a}", "locked": true, - "modelURL": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/portal1.fbx", - "name": "Try Again", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": { - "blue": 3.946338653564453, - "green": 0.2467041015625, - "red": 1.6013128757476807, - "x": 1.6013128757476807, - "y": 0.2467041015625, - "z": 3.946338653564453 + "blue": 2.3440732955932617, + "green": 1.6162219047546387, + "red": 1.8748211860656738, + "x": 1.8748211860656738, + "y": 1.6162219047546387, + "z": 2.3440732955932617 }, "queryAACube": { - "scale": 2.5651814937591553, - "x": 0.318722128868103, - "y": -1.0358866453170776, - "z": 2.663747787475586 + "scale": 24.9415340423584, + "x": -10.595945358276367, + "y": -10.854545593261719, + "z": -10.126693725585938 }, "rotation": { - "w": 0.8220492601394653, + "w": 0.8697794675827026, "x": -1.52587890625e-05, - "y": 0.5693598985671997, - "z": -0.0001068115234375 + "y": 0.4933699369430542, + "z": -4.57763671875e-05 }, - "script": "https://hifi-content.s3.amazonaws.com/wayne/404redirectionScripts/tryAgainEntityScript.js", - "shapeType": "static-mesh", - "type": "Model", + "shapeType": "box", + "skyboxMode": "enabled", + "type": "Zone", "userData": "{\"grabbableKey\":{\"grabbable\":false}}" }, { @@ -485,7 +303,7 @@ "y": 227, "z": 211 }, - "created": "2018-09-04T20:35:23Z", + "created": "2018-09-05T00:40:03Z", "dimensions": { "blue": 2.5, "green": 2.5, @@ -518,8 +336,8 @@ }, "emitRate": 2, "emitSpeed": 0, - "id": "{4b942dd2-dcfa-4959-8758-073c56d6a380}", - "lastEdited": 1536093329670643, + "id": "{639a51f0-8613-4e46-bc7e-fef24597df73}", + "lastEdited": 1536107948776693, "lastEditedBy": "{b5bba536-25e5-4b12-a1be-5c7cd196a06a}", "lifespan": 10, "locked": true, @@ -530,16 +348,16 @@ "polarFinish": 3.1415927410125732, "position": { "blue": 1.3553659915924072, - "green": 1.44122314453125, - "red": 2.572803497314453, - "x": 2.572803497314453, - "y": 1.44122314453125, + "green": 1.2890124320983887, + "red": 2.5663273334503174, + "x": 2.5663273334503174, + "y": 1.2890124320983887, "z": 1.3553659915924072 }, "queryAACube": { "scale": 4.330127239227295, - "x": 0.40773987770080566, - "y": -0.7238404750823975, + "x": 0.4012637138366699, + "y": -0.8760511875152588, "z": -0.8096976280212402 }, "radiusFinish": 0.10000000149011612, @@ -557,246 +375,6 @@ "type": "ParticleEffect", "userData": "{\"grabbableKey\":{\"grabbable\":false}}" }, - { - "angularDamping": 0, - "clientOnly": false, - "color": { - "blue": 0, - "green": 0, - "red": 255 - }, - "created": "2018-09-04T20:35:23Z", - "dimensions": { - "blue": 0.20000000298023224, - "green": 0.20000000298023224, - "red": 0.20000000298023224, - "x": 0.20000000298023224, - "y": 0.20000000298023224, - "z": 0.20000000298023224 - }, - "id": "{3b13d766-763a-4d44-99d8-42c7b9d7139e}", - "lastEdited": 1536093329671361, - "lastEditedBy": "{b5bba536-25e5-4b12-a1be-5c7cd196a06a}", - "locked": true, - "name": "Particle Rotate", - "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", - "position": { - "blue": 3.8216662406921387, - "green": 0, - "red": 1.2409718036651611, - "x": 1.2409718036651611, - "y": 0, - "z": 3.8216662406921387 - }, - "queryAACube": { - "scale": 0.3464101552963257, - "x": 1.0677666664123535, - "y": -0.17320507764816284, - "z": 3.648461103439331 - }, - "rotation": { - "w": 0.6444342136383057, - "x": -0.08220034837722778, - "y": -0.6649118661880493, - "z": 0.3684900999069214 - }, - "script": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/rotate.js", - "scriptTimestamp": 1532724769253, - "shape": "Cube", - "type": "Box", - "userData": "{\"grabbableKey\":{\"grabbable\":false}}", - "visible": false - }, - { - "alpha": 0, - "alphaFinish": 0, - "alphaStart": 0.25, - "clientOnly": false, - "colorFinish": { - "blue": 0, - "green": 0, - "red": 0, - "x": 0, - "y": 0, - "z": 0 - }, - "colorStart": { - "blue": 255, - "green": 255, - "red": 255, - "x": 255, - "y": 255, - "z": 255 - }, - "created": "2018-09-04T20:35:23Z", - "dimensions": { - "blue": 13.24000072479248, - "green": 13.24000072479248, - "red": 13.24000072479248, - "x": 13.24000072479248, - "y": 13.24000072479248, - "z": 13.24000072479248 - }, - "emitAcceleration": { - "blue": 0, - "green": 0.10000000149011612, - "red": 0, - "x": 0, - "y": 0.10000000149011612, - "z": 0 - }, - "emitDimensions": { - "blue": 1, - "green": 1, - "red": 1, - "x": 1, - "y": 1, - "z": 1 - }, - "emitOrientation": { - "w": 1, - "x": -1.52587890625e-05, - "y": -1.52587890625e-05, - "z": -1.52587890625e-05 - }, - "emitRate": 6, - "emitSpeed": 0, - "emitterShouldTrail": true, - "id": "{e36388d2-7209-4f26-974b-54d314e106a5}", - "lastEdited": 1536093329671654, - "lastEditedBy": "{b5bba536-25e5-4b12-a1be-5c7cd196a06a}", - "lifespan": 10, - "locked": true, - "maxParticles": 10, - "name": "Stars", - "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", - "particleRadius": 0.07000000029802322, - "polarFinish": 3.1415927410125732, - "position": { - "blue": 3.78922963142395, - "green": 0.5220947265625, - "red": 1.1928560733795166, - "x": 1.1928560733795166, - "y": 0.5220947265625, - "z": 3.78922963142395 - }, - "queryAACube": { - "scale": 22.932353973388672, - "x": -10.273321151733398, - "y": -10.944082260131836, - "z": -7.676947593688965 - }, - "radiusFinish": 0, - "radiusStart": 0, - "rotation": { - "w": 0.996429443359375, - "x": -1.52587890625e-05, - "y": -0.08442819118499756, - "z": -4.57763671875e-05 - }, - "speedSpread": 0, - "spinFinish": null, - "spinStart": null, - "textures": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/star.png", - "type": "ParticleEffect", - "userData": "{\"grabbableKey\":{\"grabbable\":false}}" - }, - { - "angularDamping": 0, - "clientOnly": false, - "color": { - "blue": 0, - "green": 0, - "red": 255 - }, - "created": "2018-09-04T20:35:23Z", - "dimensions": { - "blue": 0.20000000298023224, - "green": 0.20000000298023224, - "red": 0.20000000298023224, - "x": 0.20000000298023224, - "y": 0.20000000298023224, - "z": 0.20000000298023224 - }, - "id": "{1dbde8e2-c715-4c09-814e-e411803278c9}", - "lastEdited": 1536093329670778, - "lastEditedBy": "{b5bba536-25e5-4b12-a1be-5c7cd196a06a}", - "locked": true, - "name": "Particle Rotate", - "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", - "position": { - "blue": 3.8216662406921387, - "green": 0.0772705078125, - "red": 1.2409718036651611, - "x": 1.2409718036651611, - "y": 0.0772705078125, - "z": 3.8216662406921387 - }, - "queryAACube": { - "scale": 0.3464101552963257, - "x": 1.0677666664123535, - "y": -0.09593456983566284, - "z": 3.648461103439331 - }, - "rotation": { - "w": 0.926024317741394, - "x": 0.20308232307434082, - "y": -0.010269343852996826, - "z": 0.3179827928543091 - }, - "script": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/rotate.js", - "scriptTimestamp": 1532724769253, - "shape": "Cube", - "type": "Box", - "userData": "{\"grabbableKey\":{\"grabbable\":false}}", - "visible": false - }, - { - "clientOnly": false, - "color": { - "blue": 0, - "green": 0, - "red": 0 - }, - "created": "2018-09-04T20:35:23Z", - "dimensions": { - "blue": 11.117486953735352, - "green": 3.580313205718994, - "red": 0.20000000298023224, - "x": 0.20000000298023224, - "y": 3.580313205718994, - "z": 11.117486953735352 - }, - "id": "{a06f47da-06e5-4bcd-baa2-37816130f2bd}", - "lastEdited": 1536093329671244, - "lastEditedBy": "{b5bba536-25e5-4b12-a1be-5c7cd196a06a}", - "locked": true, - "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", - "position": { - "blue": 6.1806135177612305, - "green": 1.1588134765625, - "red": 1.4755167961120605, - "x": 1.4755167961120605, - "y": 1.1588134765625, - "z": 6.1806135177612305 - }, - "queryAACube": { - "scale": 11.681488037109375, - "x": -4.365227222442627, - "y": -4.6819305419921875, - "z": 0.33986949920654297 - }, - "rotation": { - "w": 0.8637980222702026, - "x": -4.57763671875e-05, - "y": 0.5038070678710938, - "z": -1.52587890625e-05 - }, - "shape": "Cube", - "type": "Box", - "userData": "{\"grabbableKey\":{\"grabbable\":false}}", - "visible": false - }, { "alpha": 0, "alphaFinish": 0, @@ -823,7 +401,7 @@ "y": 204, "z": 255 }, - "created": "2018-09-04T20:35:23Z", + "created": "2018-09-05T00:40:03Z", "dimensions": { "blue": 2.5, "green": 2.5, @@ -857,8 +435,8 @@ "emitRate": 2, "emitSpeed": 0, "emitterShouldTrail": true, - "id": "{0b1d2de0-39bf-4416-ac72-aae7ddbb3ff0}", - "lastEdited": 1536093329672220, + "id": "{e62ced49-fa18-4ae1-977f-abef5bc0f3ba}", + "lastEdited": 1536107948775366, "lastEditedBy": "{b5bba536-25e5-4b12-a1be-5c7cd196a06a}", "lifespan": 10, "locked": true, @@ -869,16 +447,16 @@ "polarFinish": 3.1415927410125732, "position": { "blue": 3.814434051513672, - "green": 1.44122314453125, - "red": 1.2319090366363525, - "x": 1.2319090366363525, - "y": 1.44122314453125, + "green": 1.2890124320983887, + "red": 1.2254328727722168, + "x": 1.2254328727722168, + "y": 1.2890124320983887, "z": 3.814434051513672 }, "queryAACube": { "scale": 4.330127239227295, - "x": -0.9331545829772949, - "y": -0.7238404750823975, + "x": -0.9396307468414307, + "y": -0.8760511875152588, "z": 1.6493704319000244 }, "radiusFinish": 0.10000000149011612, @@ -896,189 +474,6 @@ "type": "ParticleEffect", "userData": "{\"grabbableKey\":{\"grabbable\":false}}" }, - { - "angularDamping": 0, - "clientOnly": false, - "color": { - "blue": 0, - "green": 0, - "red": 255 - }, - "created": "2018-09-04T20:35:23Z", - "dimensions": { - "blue": 0.20000000298023224, - "green": 0.20000000298023224, - "red": 0.20000000298023224, - "x": 0.20000000298023224, - "y": 0.20000000298023224, - "z": 0.20000000298023224 - }, - "id": "{01d9478b-50ae-4f09-b67a-e62a4d133cdf}", - "lastEdited": 1536093329672981, - "lastEditedBy": "{b5bba536-25e5-4b12-a1be-5c7cd196a06a}", - "locked": true, - "name": "Particle Rotate", - "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", - "position": { - "blue": 3.8216662406921387, - "green": 0.15618896484375, - "red": 1.2409718036651611, - "x": 1.2409718036651611, - "y": 0.15618896484375, - "z": 3.8216662406921387 - }, - "queryAACube": { - "scale": 0.3464101552963257, - "x": 1.0677666664123535, - "y": -0.017016112804412842, - "z": 3.648461103439331 - }, - "rotation": { - "w": 0.6747081279754639, - "x": -0.06532388925552368, - "y": -0.6342412233352661, - "z": 0.37175559997558594 - }, - "script": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/rotate.js", - "scriptTimestamp": 1532724769253, - "shape": "Cube", - "type": "Box", - "userData": "{\"grabbableKey\":{\"grabbable\":false}}", - "visible": false - }, - { - "clientOnly": false, - "color": { - "blue": 0, - "green": 0, - "red": 0 - }, - "created": "2018-09-04T20:35:23Z", - "dimensions": { - "blue": 6.9401350021362305, - "green": 0.04553089290857315, - "red": 7.004304885864258, - "x": 7.004304885864258, - "y": 0.04553089290857315, - "z": 6.9401350021362305 - }, - "id": "{718b3532-0c3c-4689-ac41-dca8fedffc4a}", - "lastEdited": 1536093496994604, - "lastEditedBy": "{4eecd88f-ef9b-4a83-bb9a-7f7496209c6b}", - "locked": true, - "name": "floor", - "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", - "position": { - "blue": 3.6175529956817627, - "green": 0.15221074223518372, - "red": 4.108861923217773, - "x": 4.108861923217773, - "y": 0.15221074223518372, - "z": 3.6175529956817627 - }, - "queryAACube": { - "scale": 9.860417366027832, - "x": -0.8213467597961426, - "y": -4.777997970581055, - "z": -1.3126556873321533 - }, - "rotation": { - "w": 0.8660253882408142, - "x": -1.5922749298624694e-05, - "y": 0.5, - "z": -4.572480611386709e-05 - }, - "shape": "Cube", - "type": "Box", - "userData": "{\"grabbableKey\":{\"grabbable\":false}}" - }, - { - "clientOnly": false, - "color": { - "blue": 0, - "green": 0, - "red": 0 - }, - "created": "2018-09-04T20:35:23Z", - "dimensions": { - "blue": 11.117486953735352, - "green": 3.580313205718994, - "red": 0.20000000298023224, - "x": 0.20000000298023224, - "y": 3.580313205718994, - "z": 11.117486953735352 - }, - "id": "{44442e52-e0cf-45d3-9916-678b8aa56a22}", - "lastEdited": 1536093329672691, - "lastEditedBy": "{b5bba536-25e5-4b12-a1be-5c7cd196a06a}", - "locked": true, - "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", - "position": { - "blue": 5.268576622009277, - "green": 1.1588134765625, - "red": 6.100250244140625, - "x": 6.100250244140625, - "y": 1.1588134765625, - "z": 5.268576622009277 - }, - "queryAACube": { - "scale": 11.681488037109375, - "x": 0.2595062255859375, - "y": -4.6819305419921875, - "z": -0.5721673965454102 - }, - "rotation": { - "w": 0.9662165641784668, - "x": -4.57763671875e-05, - "y": -0.2576791048049927, - "z": 1.52587890625e-05 - }, - "shape": "Cube", - "type": "Box", - "userData": "{\"grabbableKey\":{\"grabbable\":false}}", - "visible": false - }, - { - "clientOnly": false, - "created": "2018-09-04T20:35:23Z", - "dimensions": { - "blue": 14.40000057220459, - "green": 14.40000057220459, - "red": 14.40000057220459, - "x": 14.40000057220459, - "y": 14.40000057220459, - "z": 14.40000057220459 - }, - "id": "{8a045310-b82f-4021-9963-0b98d317995c}", - "lastEdited": 1536093329670891, - "lastEditedBy": "{b5bba536-25e5-4b12-a1be-5c7cd196a06a}", - "locked": true, - "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", - "position": { - "blue": 2.3440732955932617, - "green": 1.7684326171875, - "red": 1.8812973499298096, - "x": 1.8812973499298096, - "y": 1.7684326171875, - "z": 2.3440732955932617 - }, - "queryAACube": { - "scale": 24.9415340423584, - "x": -10.589469909667969, - "y": -10.7023344039917, - "z": -10.126693725585938 - }, - "rotation": { - "w": 0.8697794675827026, - "x": -1.52587890625e-05, - "y": 0.4933699369430542, - "z": -4.57763671875e-05 - }, - "shapeType": "box", - "skyboxMode": "enabled", - "type": "Zone", - "userData": "{\"grabbableKey\":{\"grabbable\":false}}" - }, { "alpha": 0, "alphaFinish": 0, @@ -1100,7 +495,7 @@ "y": 255, "z": 255 }, - "created": "2018-09-04T20:35:23Z", + "created": "2018-09-05T00:40:03Z", "dimensions": { "blue": 13.24000072479248, "green": 13.24000072479248, @@ -1133,8 +528,8 @@ }, "emitRate": 6, "emitSpeed": 0, - "id": "{b310070f-6af8-4c1d-9ad7-ea1070b53763}", - "lastEdited": 1536093329670211, + "id": "{298c0571-cbd8-487b-8640-64037d6a8414}", + "lastEdited": 1536107948776382, "lastEditedBy": "{b5bba536-25e5-4b12-a1be-5c7cd196a06a}", "lifespan": 10, "locked": true, @@ -1145,16 +540,16 @@ "polarFinish": 3.1415927410125732, "position": { "blue": 1.3712034225463867, - "green": 0.5220947265625, - "red": 2.6281180381774902, - "x": 2.6281180381774902, - "y": 0.5220947265625, + "green": 0.3698839843273163, + "red": 2.6216418743133545, + "x": 2.6216418743133545, + "y": 0.3698839843273163, "z": 1.3712034225463867 }, "queryAACube": { "scale": 22.932353973388672, - "x": -8.838058471679688, - "y": -10.944082260131836, + "x": -8.844534873962402, + "y": -11.096293449401855, "z": -10.09497356414795 }, "radiusFinish": 0, @@ -1173,56 +568,368 @@ "userData": "{\"grabbableKey\":{\"grabbable\":false}}" }, { - "angularDamping": 0, + "clientOnly": false, + "created": "2018-09-05T00:40:03Z", + "dimensions": { + "blue": 2.1097896099090576, + "green": 0.04847164824604988, + "red": 1.458284616470337, + "x": 1.458284616470337, + "y": 0.04847164824604988, + "z": 2.1097896099090576 + }, + "id": "{6625dbb8-ff25-458d-a92e-644b58460604}", + "lastEdited": 1536107948776195, + "lastEditedBy": "{b5bba536-25e5-4b12-a1be-5c7cd196a06a}", + "locked": true, + "modelURL": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/portal1.fbx", + "name": "Try Again", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "position": { + "blue": 3.946338653564453, + "green": 0.09449335932731628, + "red": 1.594836711883545, + "x": 1.594836711883545, + "y": 0.09449335932731628, + "z": 3.946338653564453 + }, + "queryAACube": { + "scale": 2.5651814937591553, + "x": 0.3122459650039673, + "y": -1.188097357749939, + "z": 2.663747787475586 + }, + "rotation": { + "w": 0.8220492601394653, + "x": -1.52587890625e-05, + "y": 0.5693598985671997, + "z": -0.0001068115234375 + }, + "script": "https://hifi-content.s3.amazonaws.com/wayne/404redirectionScripts/tryAgainEntityScript.js", + "shapeType": "static-mesh", + "type": "Model", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}" + }, + { + "clientOnly": false, + "created": "2018-09-05T00:40:03Z", + "dimensions": { + "blue": 0.06014331430196762, + "green": 2.582186460494995, + "red": 2.582186698913574, + "x": 2.582186698913574, + "y": 2.582186460494995, + "z": 0.06014331430196762 + }, + "id": "{dfe92dce-f09d-4e9e-b3ed-c68ecd4d476f}", + "lastEdited": 1536108160862286, + "lastEditedBy": "{4656d4a8-5e61-4230-ab34-2888d7945bd6}", + "locked": true, + "modelURL": "http://hifi-content.s3.amazonaws.com/wayne/models/oopsDialog_protocol.fbx", + "name": "Oops Dialog", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "position": { + "blue": 1.45927095413208, + "green": 1.6763916015625, + "red": 0, + "x": 0, + "y": 1.6763916015625, + "z": 1.45927095413208 + }, + "queryAACube": { + "scale": 3.6522583961486816, + "x": -1.8261291980743408, + "y": -0.14973759651184082, + "z": -0.36685824394226074 + }, + "rotation": { + "w": 0.8684672117233276, + "x": -4.57763671875e-05, + "y": 0.4957197904586792, + "z": -7.62939453125e-05 + }, + "script": "https://hifi-content.s3.amazonaws.com/wayne/404redirectionScripts/oopsEntityScript.js", + "scriptTimestamp": 1536102551825, + "type": "Model", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}" + }, + { "clientOnly": false, "color": { "blue": 0, "green": 0, - "red": 255 + "red": 0 }, - "created": "2018-09-04T20:35:23Z", + "created": "2018-09-05T00:40:03Z", "dimensions": { - "blue": 0.20000000298023224, - "green": 0.20000000298023224, + "blue": 11.117486953735352, + "green": 3.580313205718994, "red": 0.20000000298023224, "x": 0.20000000298023224, - "y": 0.20000000298023224, - "z": 0.20000000298023224 + "y": 3.580313205718994, + "z": 11.117486953735352 }, - "id": "{7c24a30b-47d3-4cf6-af92-5a7959a3cb5d}", - "lastEdited": 1536093329671011, - "lastEditedBy": "{b5bba536-25e5-4b12-a1be-5c7cd196a06a}", + "id": "{144a8cf4-b0e8-489a-9403-d74d4dc4cb3e}", + "lastEdited": 1536107948775774, + "lastEditedBy": "{ce82d352-3002-44ae-9b76-66492989a1db}", "locked": true, - "name": "Particle Rotate", + "name": "rightWall", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": { - "blue": 1.3116319179534912, - "green": 0, - "red": 2.705613613128662, - "x": 2.705613613128662, - "y": 0, - "z": 1.3116319179534912 + "blue": 0, + "green": 1.0061144828796387, + "red": 4.965089321136475, + "x": 4.965089321136475, + "y": 1.0061144828796387, + "z": 0 }, "queryAACube": { - "scale": 0.3464101552963257, - "x": 2.5324084758758545, - "y": -0.17320507764816284, - "z": 1.1384267807006836 + "scale": 11.681488037109375, + "x": -0.8756546974182129, + "y": -4.834629535675049, + "z": -5.8407440185546875 }, "rotation": { - "w": 0.9127794504165649, - "x": 0.2575265169143677, - "y": 0.15553522109985352, - "z": 0.2761729955673218 + "w": 0.8637980222702026, + "x": -4.57763671875e-05, + "y": 0.5038070678710938, + "z": -1.52587890625e-05 }, - "script": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/rotate.js", - "scriptTimestamp": 1532724769253, "shape": "Cube", "type": "Box", "userData": "{\"grabbableKey\":{\"grabbable\":false}}", "visible": false + }, + { + "clientOnly": false, + "collidesWith": "static,dynamic,kinematic,otherAvatar,", + "collisionMask": 23, + "created": "2018-09-05T00:40:03Z", + "dimensions": { + "blue": 1.159199833869934, + "green": 2.8062009811401367, + "red": 1.6216505765914917, + "x": 1.6216505765914917, + "y": 2.8062009811401367, + "z": 1.159199833869934 + }, + "id": "{37f53408-3d0c-42a5-9891-e6c40a227349}", + "lastEdited": 1536107948775010, + "lastEditedBy": "{b5bba536-25e5-4b12-a1be-5c7cd196a06a}", + "locked": true, + "name": "Back Zone", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "position": { + "blue": 1.8632707595825195, + "green": 1.6500625610351562, + "red": 3.3211965560913086, + "x": 3.3211965560913086, + "y": 1.6500625610351562, + "z": 1.8632707595825195 + }, + "queryAACube": { + "scale": 3.4421300888061523, + "x": 1.6001315116882324, + "y": -0.07100248336791992, + "z": 0.14220571517944336 + }, + "rotation": { + "w": 0.9304176568984985, + "x": 0, + "y": -0.36650121212005615, + "z": 0 + }, + "script": "https://hifi-content.s3.amazonaws.com/wayne/404redirectionScripts/zoneBackEntityScript.js", + "shapeType": "box", + "type": "Zone", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}" + }, + { + "clientOnly": false, + "color": { + "blue": 0, + "green": 0, + "red": 0 + }, + "created": "2018-09-05T00:40:03Z", + "dimensions": { + "blue": 11.117486953735352, + "green": 3.580313205718994, + "red": 0.20000000298023224, + "x": 0.20000000298023224, + "y": 3.580313205718994, + "z": 11.117486953735352 + }, + "id": "{aa6e680c-6750-4776-95bc-ef3118cace5c}", + "lastEdited": 1536107948775945, + "lastEditedBy": "{ce82d352-3002-44ae-9b76-66492989a1db}", + "locked": true, + "name": "frontWall", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "position": { + "blue": 2.662257671356201, + "green": 1.0063786506652832, + "red": 1.4868733882904053, + "x": 1.4868733882904053, + "y": 1.0063786506652832, + "z": 2.662257671356201 + }, + "queryAACube": { + "scale": 11.681488037109375, + "x": -4.353870391845703, + "y": -4.834365367889404, + "z": -3.1784863471984863 + }, + "rotation": { + "w": 0.9666743278503418, + "x": -4.57763671875e-05, + "y": -0.2560006380081177, + "z": 1.52587890625e-05 + }, + "shape": "Cube", + "type": "Box", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}", + "visible": false + }, + { + "clientOnly": false, + "created": "2018-09-05T00:40:03Z", + "dimensions": { + "blue": 2.1097896099090576, + "green": 0.04847164824604988, + "red": 1.458284616470337, + "x": 1.458284616470337, + "y": 0.04847164824604988, + "z": 2.1097896099090576 + }, + "id": "{303631f1-04f3-42a6-b8a8-8dd4b65d1231}", + "lastEdited": 1536107948776513, + "lastEditedBy": "{b5bba536-25e5-4b12-a1be-5c7cd196a06a}", + "locked": true, + "modelURL": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/portal2.fbx", + "name": "Back", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "position": { + "blue": 1.5835940837860107, + "green": 0.09449335932731628, + "red": 3.028078079223633, + "x": 3.028078079223633, + "y": 0.09449335932731628, + "z": 1.5835940837860107 + }, + "queryAACube": { + "scale": 2.5651814937591553, + "x": 1.7454873323440552, + "y": -1.188097357749939, + "z": 0.3010033369064331 + }, + "rotation": { + "w": 0.9084458351135254, + "x": -1.52587890625e-05, + "y": 0.4179598093032837, + "z": -0.0001068115234375 + }, + "script": "https://hifi-content.s3.amazonaws.com/wayne/404redirectionScripts/backEntityScript.js", + "scriptTimestamp": 1535751754379, + "shapeType": "static-mesh", + "type": "Model", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}" + }, + { + "alpha": 0, + "alphaFinish": 0, + "alphaStart": 0.25, + "clientOnly": false, + "colorFinish": { + "blue": 0, + "green": 0, + "red": 0, + "x": 0, + "y": 0, + "z": 0 + }, + "colorStart": { + "blue": 255, + "green": 255, + "red": 255, + "x": 255, + "y": 255, + "z": 255 + }, + "created": "2018-09-05T00:40:03Z", + "dimensions": { + "blue": 13.24000072479248, + "green": 13.24000072479248, + "red": 13.24000072479248, + "x": 13.24000072479248, + "y": 13.24000072479248, + "z": 13.24000072479248 + }, + "emitAcceleration": { + "blue": 0, + "green": 0.10000000149011612, + "red": 0, + "x": 0, + "y": 0.10000000149011612, + "z": 0 + }, + "emitDimensions": { + "blue": 1, + "green": 1, + "red": 1, + "x": 1, + "y": 1, + "z": 1 + }, + "emitOrientation": { + "w": 1, + "x": -1.52587890625e-05, + "y": -1.52587890625e-05, + "z": -1.52587890625e-05 + }, + "emitRate": 6, + "emitSpeed": 0, + "emitterShouldTrail": true, + "id": "{8ded39e6-303c-48f2-be79-81b715cca9f7}", + "lastEdited": 1536107948777127, + "lastEditedBy": "{b5bba536-25e5-4b12-a1be-5c7cd196a06a}", + "lifespan": 10, + "locked": true, + "maxParticles": 10, + "name": "Stars", + "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", + "particleRadius": 0.07000000029802322, + "polarFinish": 3.1415927410125732, + "position": { + "blue": 3.78922963142395, + "green": 0.3698839843273163, + "red": 1.1863799095153809, + "x": 1.1863799095153809, + "y": 0.3698839843273163, + "z": 3.78922963142395 + }, + "queryAACube": { + "scale": 22.932353973388672, + "x": -10.279796600341797, + "y": -11.096293449401855, + "z": -7.676947593688965 + }, + "radiusFinish": 0, + "radiusStart": 0, + "rotation": { + "w": 0.996429443359375, + "x": -1.52587890625e-05, + "y": -0.08442819118499756, + "z": -4.57763671875e-05 + }, + "speedSpread": 0, + "spinFinish": null, + "spinStart": null, + "textures": "http://hifi-content.s3.amazonaws.com/alexia/Models/Portal/star.png", + "type": "ParticleEffect", + "userData": "{\"grabbableKey\":{\"grabbable\":false}}" } ], - "Id": "{c9a2e576-13f3-44fa-8d41-a466b33d16c6}", + "Id": "{18abccad-2d57-4176-9d89-24dc424916f5}", "Version": 93 } diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index e50473bf29..9405915bcf 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -1211,6 +1211,8 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo auto discoverabilityManager = DependencyManager::get(); connect(&locationUpdateTimer, &QTimer::timeout, discoverabilityManager.data(), &DiscoverabilityManager::updateLocation); + connect(&domainHandler, &DomainHandler::domainConnectionErrorChanged, DependencyManager::get().data(), + &AddressManager::setLastDomainConnectionError); connect(&locationUpdateTimer, &QTimer::timeout, DependencyManager::get().data(), &AddressManager::storeCurrentAddress); locationUpdateTimer.start(DATA_SERVER_LOCATION_CHANGE_UPDATE_MSECS); diff --git a/libraries/networking/src/AddressManager.cpp b/libraries/networking/src/AddressManager.cpp index 62cd79a609..1b258e14b1 100644 --- a/libraries/networking/src/AddressManager.cpp +++ b/libraries/networking/src/AddressManager.cpp @@ -343,9 +343,7 @@ bool AddressManager::handleUrl(const QUrl& lookupUrl, LookupTrigger trigger) { _previousAPILookup.clear(); _shareablePlaceName.clear(); - if (lookupUrl.toString() != REDIRECT_HIFI_ADDRESS) { - setDomainInfo(lookupUrl, trigger); - } + setDomainInfo(lookupUrl, trigger); emit lookupResultsFinished(); QString path = DOMAIN_SPAWNING_POINT; diff --git a/libraries/networking/src/AddressManager.h b/libraries/networking/src/AddressManager.h index fab2bdd6cb..7226e92451 100644 --- a/libraries/networking/src/AddressManager.h +++ b/libraries/networking/src/AddressManager.h @@ -56,6 +56,8 @@ const QString GET_PLACE = "/api/v1/places/%1"; * Read-only. * @property {boolean} isConnected - true if you're connected to the domain in your current href * metaverse address, otherwise false. + * @property {Window.ConnectionRefusedReason} lastDomainConnectionError - The last error saved from connecting to a domain + * unsuccessfully. * Read-only. * @property {string} pathname - The location and orientation in your current href metaverse address * (e.g., "/15,-10,26/0,0,0,1"). @@ -74,6 +76,7 @@ class AddressManager : public QObject, public Dependency { Q_PROPERTY(QUrl href READ currentShareableAddress) Q_PROPERTY(QString protocol READ getProtocol) Q_PROPERTY(QString hostname READ getHost) + Q_PROPERTY(int lastDomainConnectionError READ getLastDomainConnectionError) Q_PROPERTY(QString pathname READ currentPath) Q_PROPERTY(QString placename READ getPlaceName) Q_PROPERTY(QString domainID READ getDomainID) @@ -141,7 +144,8 @@ public: * * @typedef {number} location.LookupTrigger */ - enum LookupTrigger { + enum LookupTrigger + { UserInput, Back, Forward, @@ -184,6 +188,9 @@ public: QUrl getDomainURL() { return _domainURL; } + int getLastDomainConnectionError() { return _lastDomainConnectionError; } + void setLastDomainConnectionError(int reasonCode) { _lastDomainConnectionError = reasonCode; } + public slots: /**jsdoc * Go to a specified metaverse address. @@ -195,7 +202,7 @@ public slots: * Helps ensure that user's location history is correctly maintained. */ void handleLookupString(const QString& lookupString, bool fromSuggestions = false); - + /**jsdoc * Go to a position and orientation resulting from a lookup for a named path in the domain (set in the domain server's * settings). @@ -208,8 +215,9 @@ public slots: // functions and signals that should be exposed are moved to a scripting interface class. // // we currently expect this to be called from NodeList once handleLookupString has been called with a path - bool goToViewpointForPath(const QString& viewpointString, const QString& pathString) - { return handleViewpoint(viewpointString, false, DomainPathResponse, false, pathString); } + bool goToViewpointForPath(const QString& viewpointString, const QString& pathString) { + return handleViewpoint(viewpointString, false, DomainPathResponse, false, pathString); + } /**jsdoc * Go back to the previous location in your navigation history, if there is one. @@ -230,8 +238,10 @@ public slots: * @param {location.LookupTrigger} trigger=StartupFromSettings - The reason for the function call. Helps ensure that user's * location history is correctly maintained. */ - void goToLocalSandbox(QString path = "", LookupTrigger trigger = LookupTrigger::StartupFromSettings) { handleUrl(SANDBOX_HIFI_ADDRESS + path, trigger); } - + void goToLocalSandbox(QString path = "", LookupTrigger trigger = LookupTrigger::StartupFromSettings) { + handleUrl(SANDBOX_HIFI_ADDRESS + path, trigger); + } + /**jsdoc * Go to the default "welcome" metaverse address. * @function location.goToEntry @@ -362,7 +372,8 @@ signals: * location.locationChangeRequired.connect(onLocationChangeRequired); */ void locationChangeRequired(const glm::vec3& newPosition, - bool hasOrientationChange, const glm::quat& newOrientation, + bool hasOrientationChange, + const glm::quat& newOrientation, bool shouldFaceLocation); /**jsdoc @@ -433,7 +444,7 @@ private slots: void handleShareableNameAPIResponse(QNetworkReply* requestReply); private: - void goToAddressFromObject(const QVariantMap& addressMap, const QNetworkReply* reply); + void goToAddressFromObject(const QVariantMap& addressMap, const QNetworkReply* reply); // Set host and port, and return `true` if it was changed. bool setHost(const QString& host, LookupTrigger trigger, quint16 port = 0); @@ -445,8 +456,11 @@ private: bool handleNetworkAddress(const QString& lookupString, LookupTrigger trigger, bool& hostChanged); void handlePath(const QString& path, LookupTrigger trigger, bool wasPathOnly = false); - bool handleViewpoint(const QString& viewpointString, bool shouldFace, LookupTrigger trigger, - bool definitelyPathOnly = false, const QString& pathString = QString()); + bool handleViewpoint(const QString& viewpointString, + bool shouldFace, + LookupTrigger trigger, + bool definitelyPathOnly = false, + const QString& pathString = QString()); bool handleUsername(const QString& lookupString); bool handleDomainID(const QString& host); @@ -457,6 +471,8 @@ private: QUrl _domainURL; QUrl _lastVisitedURL; + // domain connection error from domain handler. + int _lastDomainConnectionError{ -1 }; QUuid _rootPlaceID; PositionGetter _positionGetter; @@ -473,4 +489,4 @@ private: QUrl _previousAPILookup; }; -#endif // hifi_AddressManager_h +#endif // hifi_AddressManager_h diff --git a/libraries/networking/src/DomainHandler.cpp b/libraries/networking/src/DomainHandler.cpp index 0febe1e155..75d670cd3d 100644 --- a/libraries/networking/src/DomainHandler.cpp +++ b/libraries/networking/src/DomainHandler.cpp @@ -480,6 +480,7 @@ void DomainHandler::processDomainServerConnectionDeniedPacket(QSharedPointer Date: Tue, 4 Sep 2018 18:08:34 -0700 Subject: [PATCH 076/210] Unused variable from merge --- assignment-client/src/avatars/AvatarMixerSlave.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/assignment-client/src/avatars/AvatarMixerSlave.cpp b/assignment-client/src/avatars/AvatarMixerSlave.cpp index 7d1ac25469..81ee9c18f8 100644 --- a/assignment-client/src/avatars/AvatarMixerSlave.cpp +++ b/assignment-client/src/avatars/AvatarMixerSlave.cpp @@ -440,7 +440,6 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) auto traitsPacketList = NLPacketList::create(PacketType::BulkAvatarTraits, QByteArray(), true, true); const auto& sortedAvatarVector = sortedAvatars.getSortedVector(); for (const auto& sortedAvatar : sortedAvatarVector) { - const auto& avatarData = sortedAvatar.getAvatar(); const Node* otherNode = sortedAvatar.getNode(); auto lastEncodeForOther = sortedAvatar.getTimestamp(); remainingAvatars--; From 2e17140c07e4ff12f44d56be082d73f9438e96b6 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 4 Sep 2018 18:24:01 -0700 Subject: [PATCH 077/210] fixing loadServerlessDomain function to be from 404 redirect --- interface/src/Application.cpp | 2 +- interface/src/Application.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index b4a8c43be7..91f064dfa2 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -3518,7 +3518,7 @@ void Application::setIsServerlessMode(bool serverlessDomain) { void Application::loadServerlessDomain(QUrl domainURL, bool errorDomain) { if (QThread::currentThread() != thread()) { - QMetaObject::invokeMethod(this, "loadServerlessDomain", Q_ARG(QUrl, domainURL)); + QMetaObject::invokeMethod(this, "loadServerlessDomain", Q_ARG(QUrl, domainURL), Q_ARG(bool, errorDomain)); return; } diff --git a/interface/src/Application.h b/interface/src/Application.h index 35f998a04d..c82dae3b05 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -436,7 +436,6 @@ public slots: void setIsServerlessMode(bool serverlessDomain); void loadServerlessDomain(QUrl domainURL, bool errorDomain = false); void setIsInterstitialMode(bool interstialMode); - void loadServerlessDomain(QUrl domainURL); void updateVerboseLogging(); From 1ce6c84c089e55c9c3f8118cb4b760ef4cadfbda Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 4 Sep 2018 18:24:49 -0700 Subject: [PATCH 078/210] updating metacall for loadServerlessDomain --- interface/src/Application.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 9405915bcf..1104e153df 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -3479,7 +3479,7 @@ void Application::setIsServerlessMode(bool serverlessDomain) { void Application::loadServerlessDomain(QUrl domainURL, bool errorDomain) { if (QThread::currentThread() != thread()) { - QMetaObject::invokeMethod(this, "loadServerlessDomain", Q_ARG(QUrl, domainURL)); + QMetaObject::invokeMethod(this, "loadServerlessDomain", Q_ARG(QUrl, domainURL), Q_ARG(bool, errorDomain)); return; } From 98c4d05b4ada1a76c469363769e9078054fea8ed Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 4 Sep 2018 19:54:30 -0700 Subject: [PATCH 079/210] fixing typo in domain handler --- libraries/networking/src/DomainHandler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/networking/src/DomainHandler.h b/libraries/networking/src/DomainHandler.h index 2784605961..5e9d0f14e9 100644 --- a/libraries/networking/src/DomainHandler.h +++ b/libraries/networking/src/DomainHandler.h @@ -84,7 +84,7 @@ public: void connectedToServerless(std::map namedPaths); - void DomainHandler::loadedErrorDomain(std::map namedPaths); + void loadedErrorDomain(std::map namedPaths); QString getViewPointFromNamedPath(QString namedPath); From 0be7a5ffaa92949954a0c5a2148eb9eb573bfdfd Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 4 Sep 2018 19:58:56 -0700 Subject: [PATCH 080/210] fixing typo in domain handler --- libraries/networking/src/DomainHandler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/networking/src/DomainHandler.h b/libraries/networking/src/DomainHandler.h index 2784605961..5e9d0f14e9 100644 --- a/libraries/networking/src/DomainHandler.h +++ b/libraries/networking/src/DomainHandler.h @@ -84,7 +84,7 @@ public: void connectedToServerless(std::map namedPaths); - void DomainHandler::loadedErrorDomain(std::map namedPaths); + void loadedErrorDomain(std::map namedPaths); QString getViewPointFromNamedPath(QString namedPath); From af1c473a9c62ae0039f4705d2bbfb8b3d2f754b7 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 4 Sep 2018 22:17:33 -0700 Subject: [PATCH 081/210] updating with models in meshes folder --- .../meshes/redirect/oopsDialog_auth.fbx | Bin 0 -> 32304 bytes .../meshes/redirect/oopsDialog_auth.png | Bin 0 -> 5012 bytes .../meshes/redirect/oopsDialog_protocol.fbx | Bin 0 -> 32256 bytes .../meshes/redirect/oopsDialog_protocol.png | Bin 0 -> 4899 bytes .../meshes/redirect/oopsDialog_vague.fbx | Bin 0 -> 32480 bytes .../meshes/redirect/oopsDialog_vague.png | Bin 0 -> 5139 bytes interface/resources/serverless/redirect.json | 4 +- scripts/system/oopsEntityScript.js | 41 ++++++++++++++++++ 8 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 interface/resources/meshes/redirect/oopsDialog_auth.fbx create mode 100644 interface/resources/meshes/redirect/oopsDialog_auth.png create mode 100644 interface/resources/meshes/redirect/oopsDialog_protocol.fbx create mode 100644 interface/resources/meshes/redirect/oopsDialog_protocol.png create mode 100644 interface/resources/meshes/redirect/oopsDialog_vague.fbx create mode 100644 interface/resources/meshes/redirect/oopsDialog_vague.png create mode 100644 scripts/system/oopsEntityScript.js diff --git a/interface/resources/meshes/redirect/oopsDialog_auth.fbx b/interface/resources/meshes/redirect/oopsDialog_auth.fbx new file mode 100644 index 0000000000000000000000000000000000000000..3360de993f31b3b2ba600056ed9cd08365c7a473 GIT binary patch literal 32304 zcmeHwcUV+M_x~jp(Ac7}H)8As!GekfsY(P{SpgLgm*oO0yL;Cy6hR@cMq}(Hb|glP zF(`@!JD8{#fvB+|pkhRgp#&_50?O|>_s%SraW5<;-}m>=JI^C-nfc5)XU;iu=FH69 zDU!%QiCSXrY(K-?UZ#|&BhAgJE|hC`iYjeJ87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wtO34k8uHr;K=A=D)6vaP)b1evO25NT&snI-* z+n~niCJt)I*=mhM4YB;NOYMjhF^GL|T9D?a6xacsz{u!*s1-iJh1J){MZvI7oMSbI z_`_Rf%+h?tYo(MMX{EMQEi1J}E&y{;zm-lST3}nLWu-q8l`xySt+a-wU25ID*0NF~ zR0;QtHL-D4I-Wplgq1EKAU>g$<{)T1K3KO&E5$SZph%4XaeXYCe`Td|0<=+9dH{hm z%1R&cG_Kc5dmszJ^3cypC!$uL#!4O0bpULo_#94~+P|FPxqQy0m)g@f+8;$R(Ej=b zJ2mv-xm!@nLi$B%v;bQO=NtiS!0Peq75JBe7y=1BiU@2CL|Ol@SICDaX226J&JaLY zG4V6s@UN}Z{p%H&td>X$m_hVF6hMRX2^_RKe!T*d*6{KRF{1beRLzL8XE!|$jdDq5 zM-=?u7@?A8Kh_K>`;r~fhL`uTy4$pJVPrD+-77|>>=2`=gS8HyeKl|qfC+kgYtL_@ z!_ySyUT+i3kXBb0qbAr=w5KvrFFx8SsOGTQM@O=<2@vhQ9xVutHfuoO>=pNbR2L)? zOo;Y6WE~i65K26-`D=v3FE)GZb^ z{;C;x9pzZKBg47w0^izYwtae0$B*1Y-)#f-Ed7 zhpL1Txu^v>Wwc=34*Y5qk|Es*6k~rhe>zlKmKQ%5;FB{P6{{ago4}bsw literal 0 HcmV?d00001 diff --git a/interface/resources/meshes/redirect/oopsDialog_protocol.png b/interface/resources/meshes/redirect/oopsDialog_protocol.png new file mode 100644 index 0000000000000000000000000000000000000000..63c6e00c4eaa31798af10e5d5f9165290628bc0f GIT binary patch literal 4899 zcmeI#`#;kQz`*gZoI|JM(&>VgTjit@ayJ|5L{eCUQAF0vZISzJCY5r?$jRl*B@#s} z*RW+PGG}t8uwkw-x0#J)*vy{S^Cvvd&*%O7=MVT~Tyt?y+;?Oj004@Pm+jmDU{5Ll z>;d-50RV6SGa&{502FQS6@5KCFgosbBoerACp-YD?TEgOLb@Su-$}Ul4-yIh2R=L6 zU2u;dTbbb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dQHQY03^w}L>Kh`}ew7sd>=On^88h3|{;ngMBkhSBx z6*feYLk{#KsDeTCljee$-=3g{auy{c^I$7<TJ{;NW)Kh;t=s1}SPP_-TK1WNRYGj)w$Emot}WEftCoFQ!%C>`&ZlB*{h;6se>k#3C?9&LUINrEb``2$TnDKBEZJ79zXPfepG24hQxZXC=g}qKlCBDTlG757{~(*h-I$yNk{aQE*odObV$CB;A9M9MJg^IM6b*R3=>jE5f6NRi z{gNKiwwGJr!iSF1#fg&1z)yrxGNtVzrUKGBWU&TLd|*YMo|>bs@SHh8gtyuRF{IJe z1F#9Q6wLuv*o&8D@@YPo2TsGF6HD|>%qk2-a|KERf+Eaj5O7S5eU@xE6bU!G=roQ7 zY<81MRr1RYq^G~q0R;&p%35qJybusG&hws1Bi)!!2KQHfEqFy_) G%l`rndU6E- literal 0 HcmV?d00001 diff --git a/interface/resources/meshes/redirect/oopsDialog_vague.png b/interface/resources/meshes/redirect/oopsDialog_vague.png new file mode 100644 index 0000000000000000000000000000000000000000..8a02ad2c277d5b218b45d96429b48c02f636b50d GIT binary patch literal 5139 zcmeI#`#aN(P1|fD^fOR<)G>rO3@PRXd>trx*Dml4q03RZ9|HiELKK zPbO@qO0-Q}&kfEp8BW!-zvUM|_(KkCy!RLIuYdiohNngCbgK~aojD|x#Z5Q2^Jeuj zI$rk0BMt!uZU?gC=nmHsa#d+;8J!n%<MzI$INwfK8TQ+yM3Rq#qmi$*=D|a2_%P?#@oe`rj zhVNUBx?swr#|B3vW0utWBLod`jSd?w|`9;VcKiIrc;DiFB+7>bp#1q9=R*Dgtf zD^?3DE+j@vD-JsSzwqw^pUJ{s1&YpZg%??1J(l54Z&oofnd{l#027Zx*rcF_W$v_j1|2?t81)45bm@uBszzR1F7CFTEA@Eq)MlEyWmr)nw94|XZURNt1lhuUf6u3$#TT`)+%`)uh= z_v|)gK^$19r)55CilrW!KAA`D{N3`^sDEZs19o2?M{P1oUhMobYgoFkQBrqSiaj-^ z5j(3-{v5yU`?9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4^90g1AbIBlLi~D?($el^jb6%@L0GY%xm9gLMRL{SDxy`aI<>zm@-s@PnPbl@bVlqcm3O~+bN^7h z^9z=PILM^l-4yA`aYI<3r>|u1SXpDGE+RExu-pfltLt4m27MUb-FbA5jLyl3>RRPi zt9N8?c_UUwgPj_@V!<3QN4qngL2}x}xGo|iit0ziB7DW5WdEDaU-Jl7{1WB+Kh&s26tko zht=xFw`rR5s~uKt0kX|eC&6A)X4mbMt*rkc!TLey&ljnODl`{!0~Fh$H!dzeZ#;vz z*I-9B9nT=SbIVFv*e6p-bJe_>NX2 zWfdR<>FS@HcHadjkVqs=d`_C#Y$f1%{qLlnc5Uc6_AT9{Qz&ABJR zoDP`Jc;ez_+#1f#VckA2b57h7Pv7)Ri=HbS#Ar2fr;BG;V~L89vz>4@cz-s6*dG1G zeha>46WCj>$CQgazf-(iWSkKn^V{hFoQRG z;cQN^66fTdV225BoCQ3zoX}xiEAzCp>k#uFV1|9^vm+o~mCM;*10VFFFsizZKW}`+ z;GuD&*I|eD>^U64;jyp-+{SKCRWE*h2Pbjw$`)Pdp{oqQ} z;Tuu>D6eLg?yQJOIkt5Q*f~nUDJ>&Ox|ZBa$$#zCJB_@KDx`W{KSnwUjc46dC*06x zxM*Qc_eWXJQ74{^Sg>nPNdf%($9#fNnDR8K#k?wLm!m=Q*prXot}?XPu;mD_?uL-_1G;Ow|CzFQfSjPg5OM>K&^+V z!`?=CwmxVPT>6_@8Kn{7JLcWeN-2RYEHkWKB!OU5U1dV+>ek2I2opzx+4k`(#cWxkwUdrR^>BvUHq&`Az`qc^ye;s*-rj%x>%S83#U%g&z^OxL`Co)~K>xq7 Mv$| 0) { + this.entityID = entities[0]; + } + } + var error = location.lastDomainConnectionError; + var newModel = ""; + var hostedSite = Script.resourcesPath() + "meshes/redirect"; + if (error === PROTOCOL_MISMATCH) { + newModel = "oopsDialog_protocol"; + } else if (error === NOT_AUTHORIZED) { + newModel = "oopsDialog_auth"; + } else { + newModel = "oopsDialog_vague"; + } + var props = Entities.getEntityProperties(this.entityID, ["modelURL"]); + var newModelURL = hostedSite + newModel + ".fbx"; + if(props.modelURL !== newModelURL) { + var newFileURL = newModelURL + "/" + newModel + ".png"; + var newTextures = {"file16": newFileURL, "file17": newFileURL}; + Entities.editEntity(this.entityID, {modelURL: newModelURL, originalTextures: JSON.stringify(newTextures)}); + } + }; + var ping = Script.setInterval(pingError, 5000); + + function cleanup() { + Script.clearInterval(ping); + }; + + Script.scriptEnding.connect(cleanup); +}); From 8b6c21e0bbd94f4e0b1ed66aca3188aee8d58d23 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 4 Sep 2018 22:19:12 -0700 Subject: [PATCH 082/210] updating script path TODO: will fix with s3 hosted script --- interface/resources/serverless/redirect.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/resources/serverless/redirect.json b/interface/resources/serverless/redirect.json index ec172561af..00bbe17691 100644 --- a/interface/resources/serverless/redirect.json +++ b/interface/resources/serverless/redirect.json @@ -648,7 +648,7 @@ "y": 0.4957197904586792, "z": -7.62939453125e-05 }, - "script": "https://raw.githubusercontent.com/wayne-chen/hifi/404DomainRedirect/scripts/system/oopsEntityScript.js", + "script": "https://raw.githubusercontent.com/wayne-chen/hifi/interstitalMerged/scripts/system/oopsEntityScript.js", "scriptTimestamp": 1536102551825, "type": "Model", "userData": "{\"grabbableKey\":{\"grabbable\":false}}" From afd7321e7f81a19f48b797887849cc7ebb7e9612 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 4 Sep 2018 23:16:54 -0700 Subject: [PATCH 083/210] updating redirect with proper fbx TODO: fix path when uploaded the fbx files --- interface/resources/serverless/redirect.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/resources/serverless/redirect.json b/interface/resources/serverless/redirect.json index ec172561af..17799b952d 100644 --- a/interface/resources/serverless/redirect.json +++ b/interface/resources/serverless/redirect.json @@ -625,7 +625,7 @@ "lastEdited": 1536108160862286, "lastEditedBy": "{4656d4a8-5e61-4230-ab34-2888d7945bd6}", "locked": true, - "modelURL": Script.resourcesPath() + "meshes/redirect/oopsDialog_protocol.fbx", + "modelURL": "https://raw.githubusercontent.com/wayne-chen/hifi/404DomainRedirect/interface/resources/meshes/redirect/oopsDialog_protocol.fbx", "name": "Oops Dialog", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": { From d6442b350c4da1110db0111a6d3283b593f5cc80 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 4 Sep 2018 23:18:52 -0700 Subject: [PATCH 084/210] updating redirect to the interstitial page url TODO: Fix this link to s3 bucket hosted file --- interface/resources/serverless/redirect.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/resources/serverless/redirect.json b/interface/resources/serverless/redirect.json index 511c1c410c..539e92203b 100644 --- a/interface/resources/serverless/redirect.json +++ b/interface/resources/serverless/redirect.json @@ -625,7 +625,7 @@ "lastEdited": 1536108160862286, "lastEditedBy": "{4656d4a8-5e61-4230-ab34-2888d7945bd6}", "locked": true, - "modelURL": "https://raw.githubusercontent.com/wayne-chen/hifi/404DomainRedirect/interface/resources/meshes/redirect/oopsDialog_protocol.fbx", + "modelURL": "https://raw.githubusercontent.com/wayne-chen/hifi/interstitalMerged/interface/resources/meshes/redirect/oopsDialog_protocol.fbx", "name": "Oops Dialog", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": { From f38a26a1ffd0e95aeffa229ae4fc9a08be98cfbe Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Wed, 5 Sep 2018 09:04:17 -0700 Subject: [PATCH 085/210] updating location of oops dialog script --- interface/resources/serverless/redirect.json | 4 +- scripts/system/oopsEntityScript.js | 41 -------------------- 2 files changed, 2 insertions(+), 43 deletions(-) delete mode 100644 scripts/system/oopsEntityScript.js diff --git a/interface/resources/serverless/redirect.json b/interface/resources/serverless/redirect.json index 17799b952d..1bb2aa80c7 100644 --- a/interface/resources/serverless/redirect.json +++ b/interface/resources/serverless/redirect.json @@ -625,7 +625,7 @@ "lastEdited": 1536108160862286, "lastEditedBy": "{4656d4a8-5e61-4230-ab34-2888d7945bd6}", "locked": true, - "modelURL": "https://raw.githubusercontent.com/wayne-chen/hifi/404DomainRedirect/interface/resources/meshes/redirect/oopsDialog_protocol.fbx", + "modelURL": "", "name": "Oops Dialog", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": { @@ -648,7 +648,7 @@ "y": 0.4957197904586792, "z": -7.62939453125e-05 }, - "script": "https://raw.githubusercontent.com/wayne-chen/hifi/404DomainRedirect/scripts/system/oopsEntityScript.js", + "script": "https://hifi-content.s3.amazonaws.com/wayne/404redirectionScripts/oopsEntityScript.js", "scriptTimestamp": 1536102551825, "type": "Model", "userData": "{\"grabbableKey\":{\"grabbable\":false}}" diff --git a/scripts/system/oopsEntityScript.js b/scripts/system/oopsEntityScript.js deleted file mode 100644 index bf10fbb9dd..0000000000 --- a/scripts/system/oopsEntityScript.js +++ /dev/null @@ -1,41 +0,0 @@ -(function() { - var PROTOCOL_MISMATCH = 1; - var NOT_AUTHORIZED = 3; - - this.entityID = Uuid.NULL; - this.preload = function(entityID) { - this.entityID = entityID; - }; - function pingError() { - if(this.entityID === undefined) { - var entities = Entities.findEntitiesByName("Oops Dialog", MyAvatar.position, 10); - if(entities.length > 0) { - this.entityID = entities[0]; - } - } - var error = location.lastDomainConnectionError; - var newModel = ""; - var hostedSite = Script.resourcesPath() + "meshes/redirect"; - if (error === PROTOCOL_MISMATCH) { - newModel = "oopsDialog_protocol"; - } else if (error === NOT_AUTHORIZED) { - newModel = "oopsDialog_auth"; - } else { - newModel = "oopsDialog_vague"; - } - var props = Entities.getEntityProperties(this.entityID, ["modelURL"]); - var newModelURL = hostedSite + newModel + ".fbx"; - if(props.modelURL !== newModelURL) { - var newFileURL = newModelURL + "/" + newModel + ".png"; - var newTextures = {"file16": newFileURL, "file17": newFileURL}; - Entities.editEntity(this.entityID, {modelURL: newModelURL, originalTextures: JSON.stringify(newTextures)}); - } - }; - var ping = Script.setInterval(pingError, 5000); - - function cleanup() { - Script.clearInterval(ping); - }; - - Script.scriptEnding.connect(cleanup); -}); From 179138aa106895efafdf6a26469a31061946a9a8 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Wed, 5 Sep 2018 10:36:06 -0700 Subject: [PATCH 086/210] updating serverless file to have dynamic oops --- interface/resources/serverless/redirect.json | 1 - 1 file changed, 1 deletion(-) diff --git a/interface/resources/serverless/redirect.json b/interface/resources/serverless/redirect.json index 1bb2aa80c7..48b1a7078f 100644 --- a/interface/resources/serverless/redirect.json +++ b/interface/resources/serverless/redirect.json @@ -624,7 +624,6 @@ "id": "{dfe92dce-f09d-4e9e-b3ed-c68ecd4d476f}", "lastEdited": 1536108160862286, "lastEditedBy": "{4656d4a8-5e61-4230-ab34-2888d7945bd6}", - "locked": true, "modelURL": "", "name": "Oops Dialog", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", From c6229c5c604731e3154d31455e5f5fe46b6242ff Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Wed, 5 Sep 2018 10:37:45 -0700 Subject: [PATCH 087/210] updating serverless file to have dynamic oops --- interface/resources/serverless/redirect.json | 1 - 1 file changed, 1 deletion(-) diff --git a/interface/resources/serverless/redirect.json b/interface/resources/serverless/redirect.json index 1bb2aa80c7..48b1a7078f 100644 --- a/interface/resources/serverless/redirect.json +++ b/interface/resources/serverless/redirect.json @@ -624,7 +624,6 @@ "id": "{dfe92dce-f09d-4e9e-b3ed-c68ecd4d476f}", "lastEdited": 1536108160862286, "lastEditedBy": "{4656d4a8-5e61-4230-ab34-2888d7945bd6}", - "locked": true, "modelURL": "", "name": "Oops Dialog", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", From 1bea6c9ea38f223d730f409542bb965d43858b93 Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Wed, 5 Sep 2018 10:38:12 -0700 Subject: [PATCH 088/210] if not already logged in, show login dialog at launch-time rather than connect-to-domain-time --- interface/src/Application.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 67dbcf355f..a2f5033622 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -2299,6 +2299,19 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo connect(&AndroidHelper::instance(), &AndroidHelper::enterForeground, this, &Application::enterForeground); AndroidHelper::instance().notifyLoadComplete(); #endif + + static int CHECK_LOGIN_TIMER = 3000; + QTimer* checkLoginTimer = new QTimer(this); + checkLoginTimer->setInterval(CHECK_LOGIN_TIMER); + checkLoginTimer->setSingleShot(true); + connect(checkLoginTimer, &QTimer::timeout, this, []() { + auto accountManager = DependencyManager::get(); + auto dialogsManager = DependencyManager::get(); + if (!accountManager->isLoggedIn()) { + dialogsManager->showLoginDialog(); + } + }); + checkLoginTimer->start(); } void Application::updateVerboseLogging() { From f7e84995b41961d08ac6ecdcffef170c8b6c3253 Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Wed, 5 Sep 2018 10:58:37 -0700 Subject: [PATCH 089/210] Only build the sortable vector once, now we're using vectors for the priority sort --- .../src/avatars/AvatarMixerSlave.cpp | 60 ++++++------------- 1 file changed, 18 insertions(+), 42 deletions(-) diff --git a/assignment-client/src/avatars/AvatarMixerSlave.cpp b/assignment-client/src/avatars/AvatarMixerSlave.cpp index 81ee9c18f8..a61f65ffb0 100644 --- a/assignment-client/src/avatars/AvatarMixerSlave.cpp +++ b/assignment-client/src/avatars/AvatarMixerSlave.cpp @@ -288,35 +288,6 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) // Quadruple the scale of first bounding box nodeBox.embiggen(4.0f); - - // setup list of AvatarData as well as maps to map betweeen the AvatarData and the original nodes - struct AvatarSortData { - AvatarSortData(const Node* node, AvatarData* avatarData, quint64 lastEncodeTime) - : _node(node) - , _avatarData(avatarData) - , _lastEncodeTime(lastEncodeTime) - { } - const Node* _node; - AvatarData* _avatarData; - quint64 _lastEncodeTime; - }; - // Temporary info about the avatars we're sending: - std::vector avatarsToSort; - avatarsToSort.reserve(_end - _begin); - std::for_each(_begin, _end, [&](const SharedNodePointer& otherNode) { - Node* otherNodeRaw = otherNode.data(); - // make sure this is an agent that we have avatar data for before considering it for inclusion - if (otherNodeRaw->getType() == NodeType::Agent - && otherNodeRaw->getLinkedData()) { - const AvatarMixerClientData* otherNodeData = reinterpret_cast(otherNodeRaw->getLinkedData()); - - - AvatarData* otherAvatar = otherNodeData->getAvatarSharedPointer().get(); - auto lastEncodeTime = nodeData->getLastOtherAvatarEncodeTime(otherAvatar->getSessionUUID()); - avatarsToSort.emplace_back(AvatarSortData(otherNodeRaw, otherAvatar, lastEncodeTime)); - } - }); - class SortableAvatar: public PrioritySortUtil::Sortable { public: SortableAvatar() = delete; @@ -345,16 +316,18 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) AvatarData::_avatarSortCoefficientSize, AvatarData::_avatarSortCoefficientCenter, AvatarData::_avatarSortCoefficientAge); - sortedAvatars.reserve(avatarsToSort.size()); + sortedAvatars.reserve(_end - _begin); - // ignore or sort - for (const auto& avatar : avatarsToSort) { - auto avatarNode = avatar._node; - if (avatarNode == destinationNode) { - // don't echo updates to self + for (auto listedNode = _begin; listedNode != _end; ++listedNode) { + Node* otherNodeRaw = (*listedNode).data(); + if (otherNodeRaw->getType() != NodeType::Agent + || !otherNodeRaw->getLinkedData() + || otherNodeRaw == destinationNode) { continue; } + auto avatarNode = otherNodeRaw; + bool shouldIgnore = false; // We ignore other nodes for a couple of reasons: // 1) ignore bubbles and ignore specific node @@ -364,8 +337,8 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) assert(avatarNode); // we can't have gotten here without the avatarData being a valid key in the map - const AvatarMixerClientData* avatarNodeData = reinterpret_cast(avatarNode->getLinkedData()); - assert(avatarNodeData); // we can't have gotten here without avatarNode having valid data + const AvatarMixerClientData* avatarClientNodeData = reinterpret_cast(avatarNode->getLinkedData()); + assert(avatarClientNodeData); // we can't have gotten here without avatarNode having valid data quint64 startIgnoreCalculation = usecTimestampNow(); // make sure we have data for this avatar, that it isn't the same node, @@ -378,11 +351,11 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) // Check to see if the space bubble is enabled // Don't bother with these checks if the other avatar has their bubble enabled and we're gettingAnyIgnored if (destinationNode->isIgnoreRadiusEnabled() || (avatarNode->isIgnoreRadiusEnabled() && !getsAnyIgnored)) { - float sensorToWorldScale = avatarNodeData->getAvatarSharedPointer()->getSensorToWorldScale(); + float sensorToWorldScale = avatarClientNodeData->getAvatarSharedPointer()->getSensorToWorldScale(); // Define the scale of the box for the current other node - glm::vec3 otherNodeBoxScale = (avatarNodeData->getPosition() - avatarNodeData->getGlobalBoundingBoxCorner()) * 2.0f * sensorToWorldScale; + glm::vec3 otherNodeBoxScale = (avatarClientNodeData->getPosition() - avatarClientNodeData->getGlobalBoundingBoxCorner()) * 2.0f * sensorToWorldScale; // Set up the bounding box for the current other node - AABox otherNodeBox(avatarNodeData->getGlobalBoundingBoxCorner(), otherNodeBoxScale); + AABox otherNodeBox(avatarClientNodeData->getGlobalBoundingBoxCorner(), otherNodeBoxScale); // Clamp the size of the bounding box to a minimum scale if (glm::any(glm::lessThan(otherNodeBoxScale, minBubbleSize))) { otherNodeBox.setScaleStayCentered(minBubbleSize); @@ -405,7 +378,7 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) if (!shouldIgnore) { AvatarDataSequenceNumber lastSeqToReceiver = nodeData->getLastBroadcastSequenceNumber(avatarNode->getUUID()); - AvatarDataSequenceNumber lastSeqFromSender = avatarNodeData->getLastReceivedSequenceNumber(); + AvatarDataSequenceNumber lastSeqFromSender = avatarClientNodeData->getLastReceivedSequenceNumber(); // FIXME - This code does appear to be working. But it seems brittle. // It supports determining if the frame of data for this "other" @@ -430,7 +403,10 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) if (!shouldIgnore) { // sort this one for later - sortedAvatars.push(SortableAvatar(avatar._avatarData, avatar._node, avatar._lastEncodeTime)); + const AvatarData* avatarNodeData = avatarClientNodeData->getConstAvatarData(); + auto lastEncodeTime = nodeData->getLastOtherAvatarEncodeTime(avatarNodeData->getSessionUUID()); + + sortedAvatars.push(SortableAvatar(avatarNodeData, avatarNode, lastEncodeTime)); } } From 77bb6fa4d54b0f7cccdcd6aa6b86d7fd58b963b4 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Wed, 5 Sep 2018 11:53:49 -0700 Subject: [PATCH 090/210] adding position to try again zone; updating whitespace --- interface/resources/serverless/redirect.json | 44 ++++++++++---------- libraries/networking/src/AddressManager.cpp | 4 +- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/interface/resources/serverless/redirect.json b/interface/resources/serverless/redirect.json index 48b1a7078f..64cb4d8a3f 100644 --- a/interface/resources/serverless/redirect.json +++ b/interface/resources/serverless/redirect.json @@ -9,39 +9,39 @@ "clientOnly": false, "collidesWith": "static,dynamic,kinematic,otherAvatar,", "collisionMask": 23, - "created": "2018-09-05T00:40:03Z", + "created": "2018-09-05T18:13:00Z", "dimensions": { - "blue": 0.8660923838615417, - "green": 1.921838402748108, - "red": 1.2744625806808472, - "x": 1.2744625806808472, - "y": 1.921838402748108, - "z": 0.8660923838615417 + "blue": 1.159199833869934, + "green": 2.8062009811401367, + "red": 1.6216505765914917, + "x": 1.6216505765914917, + "y": 2.8062009811401367, + "z": 1.159199833869934 }, - "id": "{781e26c7-ecfa-44b2-b7ef-4e3278787fbc}", - "lastEdited": 1536108183362142, - "lastEditedBy": "{4656d4a8-5e61-4230-ab34-2888d7945bd6}", + "id": "{d0ed60b8-9174-4c56-8e78-2c5399329ae0}", + "lastEdited": 1536171372916208, + "lastEditedBy": "{151cb20e-715a-4c80-aa0d-5b58b1c8a0c9}", "locked": true, "name": "Try Again Zone", "owningAvatarID": "{00000000-0000-0000-0000-000000000000}", "position": { - "blue": 4.225754737854004, - "green": 1.7677892446517944, - "red": 2.778148889541626, - "x": 2.778148889541626, - "y": 1.7677892446517944, - "z": 4.225754737854004 + "blue":4.015342712402344, + "green":1.649999976158142, + "red":2.00921893119812, + "x":2.00921893119812, + "y":1.649999976158142, + "z":4.015342712402344 }, "queryAACube": { - "scale": 2.4632973670959473, - "x": 1.5465002059936523, - "y": 0.5361405611038208, - "z": 2.9941060543060303 + "scale": 3.4421300888061523, + "x": 1.6001315116882324, + "y": -0.07100248336791992, + "z": 0.14220571517944336 }, "rotation": { - "w": 0.9743700623512268, + "w": 0.9914448857307434, "x": 0, - "y": -0.22495104372501373, + "y": -0.13052619993686676, "z": 0 }, "script": "https://hifi-content.s3.amazonaws.com/wayne/404redirectionScripts/zoneTryAgainEntityScript.js", diff --git a/libraries/networking/src/AddressManager.cpp b/libraries/networking/src/AddressManager.cpp index 1b258e14b1..6ebd516063 100644 --- a/libraries/networking/src/AddressManager.cpp +++ b/libraries/networking/src/AddressManager.cpp @@ -259,8 +259,8 @@ bool AddressManager::handleUrl(const QUrl& lookupUrl, LookupTrigger trigger) { UserActivityLogger::getInstance().wentTo(trigger, URL_TYPE_USER, lookupUrl.toString()); - // save the last visited domain URL. - _lastVisitedURL = lookupUrl; + // save the last visited domain URL. + _lastVisitedURL = lookupUrl; // in case we're failing to connect to where we thought this user was // store their username as previous lookup so we can refresh their location via API From dcf2e00bd7b38482fde9d69bf41d42ccfc72fd1f Mon Sep 17 00:00:00 2001 From: Alexia Mandeville Date: Wed, 5 Sep 2018 14:55:12 -0700 Subject: [PATCH 091/210] Adding placeholder text --- interface/resources/qml/LoginDialog/LinkAccountBody.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/interface/resources/qml/LoginDialog/LinkAccountBody.qml b/interface/resources/qml/LoginDialog/LinkAccountBody.qml index 4c6e5f6fce..55d157fdd8 100644 --- a/interface/resources/qml/LoginDialog/LinkAccountBody.qml +++ b/interface/resources/qml/LoginDialog/LinkAccountBody.qml @@ -124,6 +124,7 @@ Item { width: parent.width focus: true label: "Username or Email" + placeholderText: "Username or Email" activeFocusOnPress: true ShortcutText { @@ -151,8 +152,8 @@ Item { TextField { id: passwordField width: parent.width - label: "Password" + placeholderText: "Password" echoMode: showPassword.checked ? TextInput.Normal : TextInput.Password activeFocusOnPress: true From 1e697ad45f139d281012d87d4099d90b80f32625 Mon Sep 17 00:00:00 2001 From: Alexia Mandeville Date: Wed, 5 Sep 2018 16:25:18 -0700 Subject: [PATCH 092/210] Removing labels, adding flavor text, moving links --- .../qml/LoginDialog/LinkAccountBody.qml | 26 ++++++++++++++----- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/interface/resources/qml/LoginDialog/LinkAccountBody.qml b/interface/resources/qml/LoginDialog/LinkAccountBody.qml index 55d157fdd8..f6ad5385c0 100644 --- a/interface/resources/qml/LoginDialog/LinkAccountBody.qml +++ b/interface/resources/qml/LoginDialog/LinkAccountBody.qml @@ -87,6 +87,21 @@ Item { height: 48 } + FlavorText { + id: flavorTextContainer + anchors { + top: parent.top + margins: 0 + topMargin: hifi.dimensions.contentSpacing.y + } + + text: qsTr("Sign in to High Fidelity to make friends, get HFC, and buy interesting things on the Marketplace!") + wrapMode: Text.WordWrap + lineHeight: 2 + lineHeightMode: Text.ProportionalHeight + horizontalAlignment: Text.AlignHCenter + } + ShortcutText { id: mainTextContainer anchors { @@ -97,7 +112,6 @@ Item { } visible: false - text: qsTr("Username or password incorrect.") wrapMode: Text.WordWrap color: hifi.colors.redAccent @@ -123,15 +137,14 @@ Item { text: Settings.getValue("wallet/savedUsername", ""); width: parent.width focus: true - label: "Username or Email" placeholderText: "Username or Email" activeFocusOnPress: true ShortcutText { z: 10 anchors { - left: usernameField.left - top: usernameField.top + left: usernameField.right + top: usernameField.bottom leftMargin: usernameField.textFieldLabel.contentWidth + 10 topMargin: -19 } @@ -152,7 +165,6 @@ Item { TextField { id: passwordField width: parent.width - label: "Password" placeholderText: "Password" echoMode: showPassword.checked ? TextInput.Normal : TextInput.Password activeFocusOnPress: true @@ -160,8 +172,8 @@ Item { ShortcutText { z: 10 anchors { - left: passwordField.left - top: passwordField.top + left: passwordField.right + top: passwordField.bottom leftMargin: passwordField.textFieldLabel.contentWidth + 10 topMargin: -19 } From 901de120a694fef83871f48b5d07292da50dd88d Mon Sep 17 00:00:00 2001 From: Alexia Mandeville Date: Wed, 5 Sep 2018 17:20:49 -0700 Subject: [PATCH 093/210] Removing flavortext --- .../resources/qml/LoginDialog/LinkAccountBody.qml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/interface/resources/qml/LoginDialog/LinkAccountBody.qml b/interface/resources/qml/LoginDialog/LinkAccountBody.qml index f6ad5385c0..423f6cc73b 100644 --- a/interface/resources/qml/LoginDialog/LinkAccountBody.qml +++ b/interface/resources/qml/LoginDialog/LinkAccountBody.qml @@ -86,21 +86,6 @@ Item { width: 48 height: 48 } - - FlavorText { - id: flavorTextContainer - anchors { - top: parent.top - margins: 0 - topMargin: hifi.dimensions.contentSpacing.y - } - - text: qsTr("Sign in to High Fidelity to make friends, get HFC, and buy interesting things on the Marketplace!") - wrapMode: Text.WordWrap - lineHeight: 2 - lineHeightMode: Text.ProportionalHeight - horizontalAlignment: Text.AlignHCenter - } ShortcutText { id: mainTextContainer From d2650f7ede3cfafa2130d51016b30412d1c10f29 Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Wed, 5 Sep 2018 17:22:07 -0700 Subject: [PATCH 094/210] Modified priority function from Andrew --- .../src/avatars/AvatarMixerSlave.cpp | 6 +- libraries/shared/src/PrioritySortUtil.h | 64 +++---------------- 2 files changed, 11 insertions(+), 59 deletions(-) diff --git a/assignment-client/src/avatars/AvatarMixerSlave.cpp b/assignment-client/src/avatars/AvatarMixerSlave.cpp index a61f65ffb0..9e38f465d3 100644 --- a/assignment-client/src/avatars/AvatarMixerSlave.cpp +++ b/assignment-client/src/avatars/AvatarMixerSlave.cpp @@ -313,9 +313,9 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) // prepare to sort const auto& cameraViews = nodeData->getViewFrustums(); PrioritySortUtil::PriorityQueue sortedAvatars(cameraViews, - AvatarData::_avatarSortCoefficientSize, - AvatarData::_avatarSortCoefficientCenter, - AvatarData::_avatarSortCoefficientAge); + /*AvatarData::_avatarSortCoefficientSize*/ 1.0f, // Suggested weights from Andrew M. + /*AvatarData::_avatarSortCoefficientCenter*/ 0.5f, + /*AvatarData::_avatarSortCoefficientAge*/ 0.25f); sortedAvatars.reserve(_end - _begin); for (auto listedNode = _begin; listedNode != _end; ++listedNode) { diff --git a/libraries/shared/src/PrioritySortUtil.h b/libraries/shared/src/PrioritySortUtil.h index 0a9bb45d46..ac2e6a6852 100644 --- a/libraries/shared/src/PrioritySortUtil.h +++ b/libraries/shared/src/PrioritySortUtil.h @@ -16,49 +16,7 @@ #include "NumericalConstants.h" #include "shared/ConicalViewFrustum.h" -/* PrioritySortUtil is a helper for sorting 3D things relative to a ViewFrustum. To use: - -(1) Derive a class from pure-virtual PrioritySortUtil::Sortable that wraps a copy of - the Thing you want to prioritize and sort: - - class SortableWrapper: public PrioritySortUtil::Sortable { - public: - SortableWrapper(const Thing& thing) : _thing(thing) { } - glm::vec3 getPosition() const override { return _thing->getPosition(); } - float getRadius() const override { return 0.5f * _thing->getBoundingRadius(); } - uint64_t getTimestamp() const override { return _thing->getLastTime(); } - Thing getThing() const { return _thing; } - private: - Thing _thing; - }; - -(2) Make a PrioritySortUtil::PriorityQueue and add them to the queue: - - PrioritySortUtil::PriorityQueue sortedThings(viewFrustum); - std::priority_queue< PrioritySortUtil::Sortable > sortedThings; - for (thing in things) { - sortedThings.push(SortableWrapper(thing)); - } - -(3) Loop over your priority queue and do timeboxed work: - - NOTE: Be careful using references to members of instances of T from std::priority_queue. - Under the hood std::priority_queue may re-use instances of T. - For example, after a pop() or a push() the top T may have the same memory address - as the top T before the pop() or push() (but point to a swapped instance of T). - This causes a reference to member variable of T to point to a different value - when operations taken on std::priority_queue shuffle around the instances of T. - - uint64_t cutoffTime = usecTimestampNow() + TIME_BUDGET; - while (!sortedThings.empty()) { - const Thing& thing = sortedThings.top(); - // ...do work on thing... - sortedThings.pop(); - if (usecTimestampNow() > cutoffTime) { - break; - } - } -*/ +// PrioritySortUtil is a helper for sorting 3D things relative to a ViewFrustum. namespace PrioritySortUtil { @@ -84,9 +42,9 @@ namespace PrioritySortUtil { PriorityQueue() = delete; PriorityQueue(const ConicalViewFrustums& views) : _views(views) { } PriorityQueue(const ConicalViewFrustums& views, float angularWeight, float centerWeight, float ageWeight) - : _views(views), _angularWeight(angularWeight), _centerWeight(centerWeight), _ageWeight(ageWeight) - , _usecCurrentTime(usecTimestampNow()) - { } + : _views(views), _angularWeight(angularWeight), _centerWeight(centerWeight), _ageWeight(ageWeight) + , _usecCurrentTime(usecTimestampNow()) { + } void setViews(const ConicalViewFrustums& views) { _views = views; } @@ -138,14 +96,9 @@ namespace PrioritySortUtil { float cosineAngle = (glm::dot(offset, view.getDirection()) / distance); float age = (float)(_usecCurrentTime - thing.getTimestamp()); - // we modulate "age" drift rate by the cosineAngle term to make peripheral objects sort forward - // at a reduced rate but we don't want the "age" term to go zero or negative so we clamp it - const float MIN_COSINE_ANGLE_FACTOR = 0.1f; - float cosineAngleFactor = glm::max(cosineAngle, MIN_COSINE_ANGLE_FACTOR); - - float priority = _angularWeight * radius / distance - + _centerWeight * cosineAngle - + _ageWeight * cosineAngleFactor * age; + // the "age" term accumulates at the sum of all weights + float angularSize = glm::max(radius, MIN_RADIUS) / distance; + float priority = (_angularWeight * angularSize + _centerWeight * cosineAngle) * (age + 1.0f) + _ageWeight * age; // decrement priority of things outside keyhole if (distance - radius > view.getRadius()) { @@ -166,9 +119,8 @@ namespace PrioritySortUtil { }; } // namespace PrioritySortUtil -// for now we're keeping hard-coded sorted time budgets in one spot + // for now we're keeping hard-coded sorted time budgets in one spot const uint64_t MAX_UPDATE_RENDERABLES_TIME_BUDGET = 2000; // usec const uint64_t MIN_SORTED_UPDATE_RENDERABLES_TIME_BUDGET = 1000; // usec #endif // hifi_PrioritySortUtil_h - From adf0a9a4147df64c59d325be68a7834aa1cc7493 Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Wed, 5 Sep 2018 17:41:00 -0700 Subject: [PATCH 095/210] Convert priority age from microseconds to seconds --- libraries/shared/src/PrioritySortUtil.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/shared/src/PrioritySortUtil.h b/libraries/shared/src/PrioritySortUtil.h index ac2e6a6852..075de13d9d 100644 --- a/libraries/shared/src/PrioritySortUtil.h +++ b/libraries/shared/src/PrioritySortUtil.h @@ -22,7 +22,7 @@ namespace PrioritySortUtil { constexpr float DEFAULT_ANGULAR_COEF { 1.0f }; constexpr float DEFAULT_CENTER_COEF { 0.5f }; - constexpr float DEFAULT_AGE_COEF { 0.25f / (float)(USECS_PER_SECOND) }; + constexpr float DEFAULT_AGE_COEF { 0.25f }; class Sortable { public: @@ -94,7 +94,7 @@ namespace PrioritySortUtil { float radius = glm::max(thing.getRadius(), MIN_RADIUS); // Other item's angle from view centre: float cosineAngle = (glm::dot(offset, view.getDirection()) / distance); - float age = (float)(_usecCurrentTime - thing.getTimestamp()); + float age = float((_usecCurrentTime - thing.getTimestamp()) / USECS_PER_SECOND); // the "age" term accumulates at the sum of all weights float angularSize = glm::max(radius, MIN_RADIUS) / distance; From 78fa52285f25ebbd68f3318b724fe4bd8c8f726f Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Wed, 5 Sep 2018 23:48:21 -0700 Subject: [PATCH 096/210] adding show password toggle in textfield --- interface/resources/images/eyeClosed.svg | 5 +++ interface/resources/images/eyeOpen.svg | 4 +++ .../qml/LoginDialog/LinkAccountBody.qml | 36 +++++++++++++++---- 3 files changed, 38 insertions(+), 7 deletions(-) create mode 100644 interface/resources/images/eyeClosed.svg create mode 100644 interface/resources/images/eyeOpen.svg diff --git a/interface/resources/images/eyeClosed.svg b/interface/resources/images/eyeClosed.svg new file mode 100644 index 0000000000..6719471b3d --- /dev/null +++ b/interface/resources/images/eyeClosed.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/interface/resources/images/eyeOpen.svg b/interface/resources/images/eyeOpen.svg new file mode 100644 index 0000000000..ec5ceb5238 --- /dev/null +++ b/interface/resources/images/eyeOpen.svg @@ -0,0 +1,4 @@ + + + + diff --git a/interface/resources/qml/LoginDialog/LinkAccountBody.qml b/interface/resources/qml/LoginDialog/LinkAccountBody.qml index 423f6cc73b..c40dff61ee 100644 --- a/interface/resources/qml/LoginDialog/LinkAccountBody.qml +++ b/interface/resources/qml/LoginDialog/LinkAccountBody.qml @@ -86,7 +86,7 @@ Item { width: 48 height: 48 } - + ShortcutText { id: mainTextContainer anchors { @@ -142,6 +142,7 @@ Item { onLinkActivated: loginDialog.openUrl(link) } + onFocusChanged: { root.text = ""; } @@ -151,7 +152,6 @@ Item { id: passwordField width: parent.width placeholderText: "Password" - echoMode: showPassword.checked ? TextInput.Normal : TextInput.Password activeFocusOnPress: true ShortcutText { @@ -177,12 +177,34 @@ Item { root.isPassword = true; } - Keys.onReturnPressed: linkAccountBody.login() - } + Image { + id: showPasswordImage + x: parent.width - 40 + height: parent.height + width: parent.width - (parent.width - 40) + source: "../../images/eyeOpen.svg" + } - CheckBox { - id: showPassword - text: "Show password" + Rectangle { + z: 10 + x: parent.width - 40 + width: parent.width - (parent.width - 40) + height: parent.height + color: "transparent" + MouseArea { + id: passwordFieldMouseArea + anchors.fill: parent + acceptedButtons: Qt.LeftButton + property bool showPassword: false + onClicked: { + showPassword = !showPassword; + passwordField.echoMode = showPassword ? TextInput.Normal : TextInput.Password; + showPasswordImage.source = showPassword ? "../../images/eyeClosed.svg" : "../../images/eyeOpen.svg"; + } + } + } + + Keys.onReturnPressed: linkAccountBody.login() } InfoItem { From 6d055ba1360e492183d5aa692af7182a415a018c Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Wed, 5 Sep 2018 23:49:49 -0700 Subject: [PATCH 097/210] changing sign up label --- interface/resources/qml/LoginDialog/LinkAccountBody.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/resources/qml/LoginDialog/LinkAccountBody.qml b/interface/resources/qml/LoginDialog/LinkAccountBody.qml index c40dff61ee..aed34609e4 100644 --- a/interface/resources/qml/LoginDialog/LinkAccountBody.qml +++ b/interface/resources/qml/LoginDialog/LinkAccountBody.qml @@ -254,7 +254,7 @@ Item { RalewaySemiBold { size: hifi.fontSizes.inputLabel anchors.verticalCenter: parent.verticalCenter - text: qsTr("Don't have an account?") + text: qsTr("New to High Fidelity?") } Button { From 3f1eba418dd210c6435af80df009b460dcb5f185 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Thu, 6 Sep 2018 00:07:23 -0700 Subject: [PATCH 098/210] modifying location of links for user/pw --- .../qml/LoginDialog/LinkAccountBody.qml | 68 +++++++++---------- 1 file changed, 31 insertions(+), 37 deletions(-) diff --git a/interface/resources/qml/LoginDialog/LinkAccountBody.qml b/interface/resources/qml/LoginDialog/LinkAccountBody.qml index aed34609e4..caf5ce0e53 100644 --- a/interface/resources/qml/LoginDialog/LinkAccountBody.qml +++ b/interface/resources/qml/LoginDialog/LinkAccountBody.qml @@ -116,7 +116,6 @@ Item { } spacing: 2 * hifi.dimensions.contentSpacing.y - TextField { id: usernameField text: Settings.getValue("wallet/savedUsername", ""); @@ -125,28 +124,25 @@ Item { placeholderText: "Username or Email" activeFocusOnPress: true - ShortcutText { - z: 10 - anchors { - left: usernameField.right - top: usernameField.bottom - leftMargin: usernameField.textFieldLabel.contentWidth + 10 - topMargin: -19 - } - - text: "Forgot Username?" - - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignHCenter - linkColor: hifi.colors.blueAccent - - onLinkActivated: loginDialog.openUrl(link) - } - onFocusChanged: { root.text = ""; } } + ShortcutText { + z: 10 + anchors { + leftMargin: usernameField.textFieldLabel.contentWidth + 10 + topMargin: -19 + } + + text: "Forgot Username?" + + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignRight + linkColor: hifi.colors.blueAccent + + onLinkActivated: loginDialog.openUrl(link) + } TextField { id: passwordField @@ -154,24 +150,6 @@ Item { placeholderText: "Password" activeFocusOnPress: true - ShortcutText { - z: 10 - anchors { - left: passwordField.right - top: passwordField.bottom - leftMargin: passwordField.textFieldLabel.contentWidth + 10 - topMargin: -19 - } - - text: "Forgot Password?" - - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignHCenter - linkColor: hifi.colors.blueAccent - - onLinkActivated: loginDialog.openUrl(link) - } - onFocusChanged: { root.text = ""; root.isPassword = true; @@ -207,6 +185,22 @@ Item { Keys.onReturnPressed: linkAccountBody.login() } + ShortcutText { + z: 10 + anchors { + leftMargin: passwordField.textFieldLabel.contentWidth + 10 + topMargin: -19 + } + + text: "Forgot Password?" + + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter + linkColor: hifi.colors.blueAccent + + onLinkActivated: loginDialog.openUrl(link) + } + InfoItem { id: additionalInformation From ec2d89fd25bd83128f413fca0b34207e74aabde6 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Thu, 6 Sep 2018 11:16:58 -0700 Subject: [PATCH 099/210] fixing toolbar disappering --- interface/src/Application.cpp | 2 -- scripts/system/interstitialPage.js | 7 ++++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 1868d6db4b..73e2fce956 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -3497,8 +3497,6 @@ void Application::setIsInterstitialMode(bool interstitialMode) { bool interstitialModeEnabled = menu->isOptionChecked("Enable Interstitial"); if (_interstitialMode != interstitialMode && interstitialModeEnabled) { _interstitialMode = interstitialMode; - - DependencyManager::get()->setPinned(_interstitialMode); emit interstitialModeChanged(_interstitialMode); } } diff --git a/scripts/system/interstitialPage.js b/scripts/system/interstitialPage.js index 86a9e744e9..c56e16d429 100644 --- a/scripts/system/interstitialPage.js +++ b/scripts/system/interstitialPage.js @@ -307,7 +307,6 @@ var THE_PLACE = "hifi://TheSpot-dev"; function clickedOnOverlay(overlayID, event) { - print(overlayID + " other: " + loadingToTheSpotID); if (loadingToTheSpotID === overlayID) { location.handleLookupString(THE_PLACE); } @@ -349,8 +348,10 @@ Overlays.editOverlay(loadingBarPlacard, properties); Overlays.editOverlay(loadingBarProgress, loadingBarProperties); - if (physicsEnabled && !HMD.active) { - toolbar.writeProperty("visible", true); + + Menu.setIsOptionChecked("Show Overlays", physicsEnabled); + if (!HMD.active) { + toolbar.writeProperty("visible", physicsEnabled); } resetValues(); From 385027321be1f58f7ee061adcdfa34438a22bff4 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Thu, 6 Sep 2018 11:18:35 -0700 Subject: [PATCH 100/210] fixing the eye open/closed pw image --- .../qml/LoginDialog/LinkAccountBody.qml | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/interface/resources/qml/LoginDialog/LinkAccountBody.qml b/interface/resources/qml/LoginDialog/LinkAccountBody.qml index caf5ce0e53..cc682aa1ba 100644 --- a/interface/resources/qml/LoginDialog/LinkAccountBody.qml +++ b/interface/resources/qml/LoginDialog/LinkAccountBody.qml @@ -129,6 +129,7 @@ Item { } } ShortcutText { + id: forgotUsernameShortcut z: 10 anchors { leftMargin: usernameField.textFieldLabel.contentWidth + 10 @@ -149,24 +150,26 @@ Item { width: parent.width placeholderText: "Password" activeFocusOnPress: true + echoMode: TextInput.Password onFocusChanged: { root.text = ""; root.isPassword = true; } - Image { id: showPasswordImage - x: parent.width - 40 - height: parent.height - width: parent.width - (parent.width - 40) + x: parent.width - ((parent.height) * 31 / 23) + y: (parent.height - (parent.height * 16 / 23)) / 2 + width: parent.width - (parent.width - (((parent.height) * 31/23))) + height: parent.height * 16 / 23 source: "../../images/eyeOpen.svg" } Rectangle { + id: showPasswordHitbox z: 10 - x: parent.width - 40 - width: parent.width - (parent.width - 40) + x: parent.width - (parent.height * 31/16) + width: parent.width - (parent.width - (parent.height * 31/16)) height: parent.height color: "transparent" MouseArea { @@ -178,6 +181,13 @@ Item { showPassword = !showPassword; passwordField.echoMode = showPassword ? TextInput.Normal : TextInput.Password; showPasswordImage.source = showPassword ? "../../images/eyeClosed.svg" : "../../images/eyeOpen.svg"; + showPasswordImage.width = passwordField.width - (passwordField.width - (passwordField.height * 31/23)); + showPasswordImage.x = -(showPasswordImage.width - passwordField.width); + showPasswordImage.height = showPassword ? passwordField.height : passwordField.height * 16 / 23; + showPasswordImage.y = showPassword ? 0 : (passwordField.height - showPasswordImage.height) / 2; + showPasswordHitbox.width = showPasswordImage.width; + showPasswordHitbox.x = showPasswordImage.x; + } } } @@ -186,6 +196,7 @@ Item { } ShortcutText { + id: forgotPasswordShortcut z: 10 anchors { leftMargin: passwordField.textFieldLabel.contentWidth + 10 From a5038850f17af34940c3ed15fc38b335d74b8c1f Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Thu, 6 Sep 2018 11:37:35 -0700 Subject: [PATCH 101/210] right align forgot user/pw shortcuts --- interface/resources/qml/LoginDialog/LinkAccountBody.qml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/interface/resources/qml/LoginDialog/LinkAccountBody.qml b/interface/resources/qml/LoginDialog/LinkAccountBody.qml index cc682aa1ba..902466270f 100644 --- a/interface/resources/qml/LoginDialog/LinkAccountBody.qml +++ b/interface/resources/qml/LoginDialog/LinkAccountBody.qml @@ -143,6 +143,9 @@ Item { linkColor: hifi.colors.blueAccent onLinkActivated: loginDialog.openUrl(link) + Component.onCompleted: { + forgotUsernameShortcut.x = root.implicitWidth - forgotUsernameShortcut.width; + } } TextField { @@ -210,6 +213,9 @@ Item { linkColor: hifi.colors.blueAccent onLinkActivated: loginDialog.openUrl(link) + Component.onCompleted: { + forgotPasswordShortcut.x = root.implicitWidth - forgotPasswordShortcut.width; + } } InfoItem { From e1aba52c239ea552201429bff57b4d396d969307 Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Thu, 6 Sep 2018 12:09:44 -0700 Subject: [PATCH 102/210] Revert to statics for priority sort weights; update defaults from Andrew --- assignment-client/src/avatars/AvatarMixerSlave.cpp | 6 +++--- libraries/avatars/src/AvatarData.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/assignment-client/src/avatars/AvatarMixerSlave.cpp b/assignment-client/src/avatars/AvatarMixerSlave.cpp index 9e38f465d3..a61f65ffb0 100644 --- a/assignment-client/src/avatars/AvatarMixerSlave.cpp +++ b/assignment-client/src/avatars/AvatarMixerSlave.cpp @@ -313,9 +313,9 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) // prepare to sort const auto& cameraViews = nodeData->getViewFrustums(); PrioritySortUtil::PriorityQueue sortedAvatars(cameraViews, - /*AvatarData::_avatarSortCoefficientSize*/ 1.0f, // Suggested weights from Andrew M. - /*AvatarData::_avatarSortCoefficientCenter*/ 0.5f, - /*AvatarData::_avatarSortCoefficientAge*/ 0.25f); + AvatarData::_avatarSortCoefficientSize, + AvatarData::_avatarSortCoefficientCenter, + AvatarData::_avatarSortCoefficientAge); sortedAvatars.reserve(_end - _begin); for (auto listedNode = _begin; listedNode != _end; ++listedNode) { diff --git a/libraries/avatars/src/AvatarData.cpp b/libraries/avatars/src/AvatarData.cpp index 3e822fd17a..6896883f74 100644 --- a/libraries/avatars/src/AvatarData.cpp +++ b/libraries/avatars/src/AvatarData.cpp @@ -2822,8 +2822,8 @@ void RayToAvatarIntersectionResultFromScriptValue(const QScriptValue& object, Ra const float AvatarData::OUT_OF_VIEW_PENALTY = -10.0f; -float AvatarData::_avatarSortCoefficientSize { 1.0f }; -float AvatarData::_avatarSortCoefficientCenter { 0.25 }; +float AvatarData::_avatarSortCoefficientSize { 4.0f }; +float AvatarData::_avatarSortCoefficientCenter { 4.0f }; float AvatarData::_avatarSortCoefficientAge { 1.0f }; QScriptValue AvatarEntityMapToScriptValue(QScriptEngine* engine, const AvatarEntityMap& value) { From 00e10ad684f5823e571c16e9e5e4f536877341ff Mon Sep 17 00:00:00 2001 From: Alexia Mandeville Date: Thu, 6 Sep 2018 14:05:51 -0700 Subject: [PATCH 103/210] Updating sign up text, moving forgotten info links --- .../resources/qml/LoginDialog/LinkAccountBody.qml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/interface/resources/qml/LoginDialog/LinkAccountBody.qml b/interface/resources/qml/LoginDialog/LinkAccountBody.qml index 423f6cc73b..783027761a 100644 --- a/interface/resources/qml/LoginDialog/LinkAccountBody.qml +++ b/interface/resources/qml/LoginDialog/LinkAccountBody.qml @@ -128,9 +128,8 @@ Item { ShortcutText { z: 10 anchors { - left: usernameField.right - top: usernameField.bottom - leftMargin: usernameField.textFieldLabel.contentWidth + 10 + right: usernameField.right + top: usernameField.top topMargin: -19 } @@ -157,9 +156,8 @@ Item { ShortcutText { z: 10 anchors { - left: passwordField.right - top: passwordField.bottom - leftMargin: passwordField.textFieldLabel.contentWidth + 10 + right: passwordField.right + top: passwordField.top topMargin: -19 } @@ -232,7 +230,7 @@ Item { RalewaySemiBold { size: hifi.fontSizes.inputLabel anchors.verticalCenter: parent.verticalCenter - text: qsTr("Don't have an account?") + text: qsTr("New to High Fidelity?") } Button { From aabfda6eb5a90072e7c2f84c8e032ed4f4322f9c Mon Sep 17 00:00:00 2001 From: Alexia Mandeville Date: Thu, 6 Sep 2018 14:16:42 -0700 Subject: [PATCH 104/210] Adding descriptive text --- .../qml/LoginDialog/LinkAccountBody.qml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/interface/resources/qml/LoginDialog/LinkAccountBody.qml b/interface/resources/qml/LoginDialog/LinkAccountBody.qml index 783027761a..60c7a26e89 100644 --- a/interface/resources/qml/LoginDialog/LinkAccountBody.qml +++ b/interface/resources/qml/LoginDialog/LinkAccountBody.qml @@ -87,6 +87,22 @@ Item { height: 48 } + ShortcutText { + id: flavorText + anchors { + top: parent.top + left: parent.left + margins: 0 + topMargin: hifi.dimensions.contentSpacing.y + } + + text: qsTr("Sign in to High Fidelity to make friends, get HFC, and buy interesting things on the Marketplace!") + wrapMode: Text.WordWrap + lineHeight: 1 + lineHeightMode: Text.ProportionalHeight + horizontalAlignment: Text.AlignHCenter + } + ShortcutText { id: mainTextContainer anchors { From 98dafa3b67ca6e87432076c4b9c43778b31741fc Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Thu, 6 Sep 2018 14:31:49 -0700 Subject: [PATCH 105/210] fix overlayParentID --- scripts/system/interstitialPage.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/system/interstitialPage.js b/scripts/system/interstitialPage.js index c56e16d429..c95845656c 100644 --- a/scripts/system/interstitialPage.js +++ b/scripts/system/interstitialPage.js @@ -419,6 +419,10 @@ }); MyAvatar.sensorToWorldScaleChanged.connect(scaleInterstitialPage); + MyAvatar.sessionUUIDChanged.connect(function() { + var avatarSessionUUID = MyAvatar.sessionUUID; + Overlays.editOverlay(loadingSphereID, { parentID: avatarSessionUUID }); + }); var toggle = true; if (DEBUG) { From 021146e4f0d6911d9c9ca57e88719932730c002a Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Thu, 6 Sep 2018 15:33:52 -0700 Subject: [PATCH 106/210] minor tweak to default avatar-update sort coefficients --- libraries/avatars/src/AvatarData.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/avatars/src/AvatarData.cpp b/libraries/avatars/src/AvatarData.cpp index 6896883f74..13adc803dd 100644 --- a/libraries/avatars/src/AvatarData.cpp +++ b/libraries/avatars/src/AvatarData.cpp @@ -2822,7 +2822,7 @@ void RayToAvatarIntersectionResultFromScriptValue(const QScriptValue& object, Ra const float AvatarData::OUT_OF_VIEW_PENALTY = -10.0f; -float AvatarData::_avatarSortCoefficientSize { 4.0f }; +float AvatarData::_avatarSortCoefficientSize { 8.0f }; float AvatarData::_avatarSortCoefficientCenter { 4.0f }; float AvatarData::_avatarSortCoefficientAge { 1.0f }; From 229e9624e62f2afe29b55cccef4fdf2fc4d7eb7c Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Thu, 6 Sep 2018 15:34:28 -0700 Subject: [PATCH 107/210] remove bad bounding box calculations in avatar-mixer --- .../src/avatars/AvatarMixerClientData.h | 1 + .../src/avatars/AvatarMixerSlave.cpp | 43 +++++++------------ 2 files changed, 17 insertions(+), 27 deletions(-) diff --git a/assignment-client/src/avatars/AvatarMixerClientData.h b/assignment-client/src/avatars/AvatarMixerClientData.h index ee27f9bb0f..81a4a58769 100644 --- a/assignment-client/src/avatars/AvatarMixerClientData.h +++ b/assignment-client/src/avatars/AvatarMixerClientData.h @@ -45,6 +45,7 @@ public: int parseData(ReceivedMessage& message) override; AvatarData& getAvatar() { return *_avatar; } + const AvatarData& getAvatar() const { return *_avatar; } const AvatarData* getConstAvatarData() const { return _avatar.get(); } AvatarSharedPointer getAvatarSharedPointer() const { return _avatar; } diff --git a/assignment-client/src/avatars/AvatarMixerSlave.cpp b/assignment-client/src/avatars/AvatarMixerSlave.cpp index a61f65ffb0..3e83a78341 100644 --- a/assignment-client/src/avatars/AvatarMixerSlave.cpp +++ b/assignment-client/src/avatars/AvatarMixerSlave.cpp @@ -212,6 +212,15 @@ void AvatarMixerSlave::broadcastAvatarData(const SharedNodePointer& node) { _stats.jobElapsedTime += (end - start); } +AABox computeBubbleBox(const AvatarData& avatar, float bubbleExpansionFactor) { + glm::vec3 position = avatar.getClientGlobalPosition(); + glm::vec3 scale = 2.0f * (avatar.getClientGlobalPosition()- avatar.getGlobalBoundingBoxCorner()); + scale *= bubbleExpansionFactor; + const glm::vec3 MIN_BUBBLE_SCALE(0.3f, 1.3f, 0.3); + scale = glm::max(scale, MIN_BUBBLE_SCALE); + return AABox(position - 0.5f * scale, scale); +} + void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) { const Node* destinationNode = node.data(); @@ -275,18 +284,9 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) // setup a PacketList for the avatarPackets auto avatarPacketList = NLPacketList::create(PacketType::BulkAvatarData); - // Define the minimum bubble size - const glm::vec3 minBubbleSize = avatar.getSensorToWorldScale() * glm::vec3(0.3f, 1.3f, 0.3f); - // Define the scale of the box for the current node - glm::vec3 nodeBoxScale = (avatar.getClientGlobalPosition() - avatar.getGlobalBoundingBoxCorner()) * 2.0f * avatar.getSensorToWorldScale(); - // Set up the bounding box for the current node - AABox nodeBox(avatar.getGlobalBoundingBoxCorner(), nodeBoxScale); - // Clamp the size of the bounding box to a minimum scale - if (glm::any(glm::lessThan(nodeBoxScale, minBubbleSize))) { - nodeBox.setScaleStayCentered(minBubbleSize); - } - // Quadruple the scale of first bounding box - nodeBox.embiggen(4.0f); + // compute node bounding box + const float MY_AVATAR_BUBBLE_EXPANSION_FACTOR = 4.0f; // magic number determined emperically + AABox nodeBox = computeBubbleBox(avatar, MY_AVATAR_BUBBLE_EXPANSION_FACTOR ); class SortableAvatar: public PrioritySortUtil::Sortable { public: @@ -295,7 +295,7 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) : _avatar(avatar), _node(avatarNode), _lastEncodeTime(lastEncodeTime) {} glm::vec3 getPosition() const override { return _avatar->getClientGlobalPosition(); } float getRadius() const override { - glm::vec3 nodeBoxHalfScale = (_avatar->getClientGlobalPosition() - _avatar->getGlobalBoundingBoxCorner() * _avatar->getSensorToWorldScale()); + glm::vec3 nodeBoxHalfScale = _avatar->getClientGlobalPosition() - _avatar->getGlobalBoundingBoxCorner(); return glm::max(nodeBoxHalfScale.x, glm::max(nodeBoxHalfScale.y, nodeBoxHalfScale.z)); } uint64_t getTimestamp() const override { @@ -351,20 +351,9 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) // Check to see if the space bubble is enabled // Don't bother with these checks if the other avatar has their bubble enabled and we're gettingAnyIgnored if (destinationNode->isIgnoreRadiusEnabled() || (avatarNode->isIgnoreRadiusEnabled() && !getsAnyIgnored)) { - float sensorToWorldScale = avatarClientNodeData->getAvatarSharedPointer()->getSensorToWorldScale(); - // Define the scale of the box for the current other node - glm::vec3 otherNodeBoxScale = (avatarClientNodeData->getPosition() - avatarClientNodeData->getGlobalBoundingBoxCorner()) * 2.0f * sensorToWorldScale; - // Set up the bounding box for the current other node - AABox otherNodeBox(avatarClientNodeData->getGlobalBoundingBoxCorner(), otherNodeBoxScale); - // Clamp the size of the bounding box to a minimum scale - if (glm::any(glm::lessThan(otherNodeBoxScale, minBubbleSize))) { - otherNodeBox.setScaleStayCentered(minBubbleSize); - } - // Change the scale of other bounding box - // (This is an arbitrary number determined empirically) - otherNodeBox.embiggen(2.4f); - // Perform the collision check between the two bounding boxes + const float OTHER_AVATAR_BUBBLE_EXPANSION_FACTOR = 2.4f; // magic number determined empirically + AABox otherNodeBox = computeBubbleBox(avatarClientNodeData->getAvatar(), OTHER_AVATAR_BUBBLE_EXPANSION_FACTOR); if (nodeBox.touches(otherNodeBox)) { nodeData->ignoreOther(destinationNode, avatarNode); shouldIgnore = !getsAnyIgnored; @@ -445,7 +434,7 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) // determine if avatar is in view which determines how much data to send glm::vec3 otherPosition = otherAvatar->getClientGlobalPosition(); - glm::vec3 otherNodeBoxScale = (otherPosition - otherNodeData->getGlobalBoundingBoxCorner()) * 2.0f * otherAvatar->getSensorToWorldScale(); + glm::vec3 otherNodeBoxScale = otherPosition - otherNodeData->getGlobalBoundingBoxCorner(); AABox otherNodeBox(otherNodeData->getGlobalBoundingBoxCorner(), otherNodeBoxScale); bool isInView = nodeData->otherAvatarInView(otherNodeBox); From 8e5f5cc7965a8a59eab894451ec2a54d5174a568 Mon Sep 17 00:00:00 2001 From: Alexia Mandeville Date: Thu, 6 Sep 2018 16:16:43 -0700 Subject: [PATCH 108/210] Moving forgotten links --- interface/resources/qml/LoginDialog/LinkAccountBody.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/resources/qml/LoginDialog/LinkAccountBody.qml b/interface/resources/qml/LoginDialog/LinkAccountBody.qml index 60c7a26e89..d2a97874b1 100644 --- a/interface/resources/qml/LoginDialog/LinkAccountBody.qml +++ b/interface/resources/qml/LoginDialog/LinkAccountBody.qml @@ -145,7 +145,7 @@ Item { z: 10 anchors { right: usernameField.right - top: usernameField.top + top: usernameField.bottom topMargin: -19 } @@ -173,7 +173,7 @@ Item { z: 10 anchors { right: passwordField.right - top: passwordField.top + top: passwordField.bottom topMargin: -19 } From 9e0c21065e0de0d3b75e0f213959d27ca61f6013 Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Thu, 6 Sep 2018 15:47:23 -0700 Subject: [PATCH 109/210] Stop sending avatars when over bandwidth quota --- assignment-client/src/avatars/AvatarMixerSlave.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/assignment-client/src/avatars/AvatarMixerSlave.cpp b/assignment-client/src/avatars/AvatarMixerSlave.cpp index a61f65ffb0..5dd250fba7 100644 --- a/assignment-client/src/avatars/AvatarMixerSlave.cpp +++ b/assignment-client/src/avatars/AvatarMixerSlave.cpp @@ -425,6 +425,11 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) // NOTE: Here's where we determine if we are over budget and drop to bare minimum data int minimRemainingAvatarBytes = minimumBytesPerAvatar * remainingAvatars; bool overBudget = (identityBytesSent + numAvatarDataBytes + minimRemainingAvatarBytes) > maxAvatarBytesPerFrame; + if (overBudget) { + _stats.overBudgetAvatars += remainingAvatars + 1; + overBudgetAvatars += remainingAvatars + 1; + break; + } auto startAvatarDataPacking = chrono::high_resolution_clock::now(); From f59168e1c8b61a143cd0b0de8b672b36d5b00493 Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Thu, 6 Sep 2018 16:31:31 -0700 Subject: [PATCH 110/210] make sure ignoredNode is available before sending packet --- assignment-client/src/avatars/AvatarMixer.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/assignment-client/src/avatars/AvatarMixer.cpp b/assignment-client/src/avatars/AvatarMixer.cpp index edbba20dc7..561afee296 100644 --- a/assignment-client/src/avatars/AvatarMixer.cpp +++ b/assignment-client/src/avatars/AvatarMixer.cpp @@ -654,6 +654,15 @@ void AvatarMixer::handleNodeIgnoreRequestPacket(QSharedPointer if (addToIgnore) { senderNode->addIgnoredNode(ignoredUUID); + + if (ignoredNode) { + // send a reliable kill packet to remove the sending avatar for the ignored avatar + auto killPacket = NLPacket::create(PacketType::KillAvatar, + NUM_BYTES_RFC4122_UUID + sizeof(KillAvatarReason), true); + killPacket->write(senderNode->getUUID().toRfc4122()); + killPacket->writePrimitive(KillAvatarReason::AvatarDisconnected); + nodeList->sendPacket(std::move(killPacket), *ignoredNode); + } } else { senderNode->removeIgnoredNode(ignoredUUID); } From 92210f28b51403b9ff2a0783c3d9222a46638dd1 Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Thu, 6 Sep 2018 16:33:30 -0700 Subject: [PATCH 111/210] cleanup and use correct avatar bounding box --- .../src/avatars/AvatarMixerClientData.h | 1 - assignment-client/src/avatars/AvatarMixerSlave.cpp | 14 ++++++-------- libraries/avatars/src/AvatarData.h | 2 +- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/assignment-client/src/avatars/AvatarMixerClientData.h b/assignment-client/src/avatars/AvatarMixerClientData.h index 81a4a58769..64b1ea3edf 100644 --- a/assignment-client/src/avatars/AvatarMixerClientData.h +++ b/assignment-client/src/avatars/AvatarMixerClientData.h @@ -91,7 +91,6 @@ public: void loadJSONStats(QJsonObject& jsonObject) const; glm::vec3 getPosition() const { return _avatar ? _avatar->getWorldPosition() : glm::vec3(0); } - glm::vec3 getGlobalBoundingBoxCorner() const { return _avatar ? _avatar->getGlobalBoundingBoxCorner() : glm::vec3(0); } bool isRadiusIgnoring(const QUuid& other) const { return _radiusIgnoredOthers.find(other) != _radiusIgnoredOthers.end(); } void addToRadiusIgnoringSet(const QUuid& other) { _radiusIgnoredOthers.insert(other); } void removeFromRadiusIgnoringSet(const QUuid& other); diff --git a/assignment-client/src/avatars/AvatarMixerSlave.cpp b/assignment-client/src/avatars/AvatarMixerSlave.cpp index 3e83a78341..411f77459f 100644 --- a/assignment-client/src/avatars/AvatarMixerSlave.cpp +++ b/assignment-client/src/avatars/AvatarMixerSlave.cpp @@ -213,12 +213,13 @@ void AvatarMixerSlave::broadcastAvatarData(const SharedNodePointer& node) { } AABox computeBubbleBox(const AvatarData& avatar, float bubbleExpansionFactor) { - glm::vec3 position = avatar.getClientGlobalPosition(); - glm::vec3 scale = 2.0f * (avatar.getClientGlobalPosition()- avatar.getGlobalBoundingBoxCorner()); + AABox box = avatar.getGlobalBoundingBox(); + glm::vec3 scale = box.getScale(); scale *= bubbleExpansionFactor; const glm::vec3 MIN_BUBBLE_SCALE(0.3f, 1.3f, 0.3); scale = glm::max(scale, MIN_BUBBLE_SCALE); - return AABox(position - 0.5f * scale, scale); + box.setScaleStayCentered(glm::max(scale, MIN_BUBBLE_SCALE)); + return box; } void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) { @@ -295,7 +296,7 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) : _avatar(avatar), _node(avatarNode), _lastEncodeTime(lastEncodeTime) {} glm::vec3 getPosition() const override { return _avatar->getClientGlobalPosition(); } float getRadius() const override { - glm::vec3 nodeBoxHalfScale = _avatar->getClientGlobalPosition() - _avatar->getGlobalBoundingBoxCorner(); + glm::vec3 nodeBoxHalfScale = 0.5f * _avatar->getGlobalBoundingBox().getScale(); return glm::max(nodeBoxHalfScale.x, glm::max(nodeBoxHalfScale.y, nodeBoxHalfScale.z)); } uint64_t getTimestamp() const override { @@ -433,10 +434,7 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) } // determine if avatar is in view which determines how much data to send - glm::vec3 otherPosition = otherAvatar->getClientGlobalPosition(); - glm::vec3 otherNodeBoxScale = otherPosition - otherNodeData->getGlobalBoundingBoxCorner(); - AABox otherNodeBox(otherNodeData->getGlobalBoundingBoxCorner(), otherNodeBoxScale); - bool isInView = nodeData->otherAvatarInView(otherNodeBox); + bool isInView = nodeData->otherAvatarInView(otherAvatar->getGlobalBoundingBox()); // start a new segment in the PacketList for this avatar avatarPacketList->startSegment(); diff --git a/libraries/avatars/src/AvatarData.h b/libraries/avatars/src/AvatarData.h index 0474d07acd..9146340c4d 100644 --- a/libraries/avatars/src/AvatarData.h +++ b/libraries/avatars/src/AvatarData.h @@ -1095,7 +1095,7 @@ public: void fromJson(const QJsonObject& json, bool useFrameSkeleton = true); glm::vec3 getClientGlobalPosition() const { return _globalPosition; } - glm::vec3 getGlobalBoundingBoxCorner() const { return _globalPosition + _globalBoundingBoxOffset - _globalBoundingBoxDimensions; } + AABox getGlobalBoundingBox() const { return AABox(_globalPosition + _globalBoundingBoxOffset - _globalBoundingBoxDimensions, _globalBoundingBoxDimensions); } /**jsdoc * @function MyAvatar.getAvatarEntityData From ed7f993c0dc257132c860d415247215d6349d198 Mon Sep 17 00:00:00 2001 From: SamGondelman Date: Thu, 6 Sep 2018 16:55:27 -0700 Subject: [PATCH 112/210] avatar mixer and manager perf improvements and cleanup --- .../src/avatars/AvatarMixerSlave.cpp | 45 +++++++++---------- interface/src/avatar/AvatarManager.cpp | 40 ++++++++--------- libraries/avatars/src/AvatarData.cpp | 17 +++---- libraries/avatars/src/AvatarData.h | 2 - libraries/avatars/src/AvatarHashMap.cpp | 1 - libraries/shared/src/PrioritySortUtil.h | 9 ++-- 6 files changed, 50 insertions(+), 64 deletions(-) diff --git a/assignment-client/src/avatars/AvatarMixerSlave.cpp b/assignment-client/src/avatars/AvatarMixerSlave.cpp index 8afd7d73ee..705d660a2e 100644 --- a/assignment-client/src/avatars/AvatarMixerSlave.cpp +++ b/assignment-client/src/avatars/AvatarMixerSlave.cpp @@ -261,8 +261,6 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) // FIXME - find a way to not send the sessionID for every avatar int minimumBytesPerAvatar = AvatarDataPacket::AVATAR_HAS_FLAGS_SIZE + NUM_BYTES_RFC4122_UUID; - int overBudgetAvatars = 0; - // keep track of the number of other avatars held back in this frame int numAvatarsHeldBack = 0; @@ -287,7 +285,7 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) // compute node bounding box const float MY_AVATAR_BUBBLE_EXPANSION_FACTOR = 4.0f; // magic number determined emperically - AABox nodeBox = computeBubbleBox(avatar, MY_AVATAR_BUBBLE_EXPANSION_FACTOR ); + AABox nodeBox = computeBubbleBox(avatar, MY_AVATAR_BUBBLE_EXPANSION_FACTOR); class SortableAvatar: public PrioritySortUtil::Sortable { public: @@ -296,13 +294,12 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) : _avatar(avatar), _node(avatarNode), _lastEncodeTime(lastEncodeTime) {} glm::vec3 getPosition() const override { return _avatar->getClientGlobalPosition(); } float getRadius() const override { - glm::vec3 nodeBoxHalfScale = 0.5f * _avatar->getGlobalBoundingBox().getScale(); - return glm::max(nodeBoxHalfScale.x, glm::max(nodeBoxHalfScale.y, nodeBoxHalfScale.z)); + glm::vec3 nodeBoxScale = _avatar->getGlobalBoundingBox().getScale(); + return 0.5f * glm::max(nodeBoxScale.x, glm::max(nodeBoxScale.y, nodeBoxScale.z)); } uint64_t getTimestamp() const override { return _lastEncodeTime; } - const AvatarData* getAvatar() const { return _avatar; } const Node* getNode() const { return _node; } private: @@ -412,13 +409,19 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) assert(otherNode); // we can't have gotten here without the avatarData being a valid key in the map + AvatarData::AvatarDataDetail detail; + // NOTE: Here's where we determine if we are over budget and drop to bare minimum data int minimRemainingAvatarBytes = minimumBytesPerAvatar * remainingAvatars; bool overBudget = (identityBytesSent + numAvatarDataBytes + minimRemainingAvatarBytes) > maxAvatarBytesPerFrame; if (overBudget) { - _stats.overBudgetAvatars += remainingAvatars + 1; - overBudgetAvatars += remainingAvatars + 1; - break; + if (PALIsOpen) { + _stats.overBudgetAvatars++; + detail = AvatarData::PALMinimum; + } else { + _stats.overBudgetAvatars += remainingAvatars; + break; + } } auto startAvatarDataPacking = chrono::high_resolution_clock::now(); @@ -439,23 +442,13 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) } // determine if avatar is in view which determines how much data to send - bool isInView = nodeData->otherAvatarInView(otherAvatar->getGlobalBoundingBox()); + bool isInView = sortedAvatar.getPriority() > OUT_OF_VIEW_THRESHOLD; - // start a new segment in the PacketList for this avatar - avatarPacketList->startSegment(); - - AvatarData::AvatarDataDetail detail; - - if (overBudget) { - overBudgetAvatars++; - _stats.overBudgetAvatars++; - detail = PALIsOpen ? AvatarData::PALMinimum : AvatarData::NoData; - } else if (!isInView) { + if (!isInView) { detail = PALIsOpen ? AvatarData::PALMinimum : AvatarData::MinimumData; nodeData->incrementAvatarOutOfView(); - } else { - detail = distribution(generator) < AVATAR_SEND_FULL_UPDATE_RATIO - ? AvatarData::SendAllData : AvatarData::CullSmallData; + } else if (!overBudget) { + detail = distribution(generator) < AVATAR_SEND_FULL_UPDATE_RATIO ? AvatarData::SendAllData : AvatarData::CullSmallData; nodeData->incrementAvatarInView(); } @@ -503,8 +496,11 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) } if (includeThisAvatar) { + // start a new segment in the PacketList for this avatar + avatarPacketList->startSegment(); numAvatarDataBytes += avatarPacketList->write(otherNode->getUUID().toRfc4122()); numAvatarDataBytes += avatarPacketList->write(bytes); + avatarPacketList->endSegment(); if (detail != AvatarData::NoData) { _stats.numOthersIncluded++; @@ -522,14 +518,13 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) // It would be nice if we could tweak its future sort priority to put it at the back of the list. } - avatarPacketList->endSegment(); - auto endAvatarDataPacking = chrono::high_resolution_clock::now(); _stats.avatarDataPackingElapsedTime += (quint64) chrono::duration_cast(endAvatarDataPacking - startAvatarDataPacking).count(); // use helper to add any changed traits to our packet list traitBytesSent += addChangedTraitsToBulkPacket(nodeData, otherNodeData, *traitsPacketList); + remainingAvatars--; } quint64 startPacketSending = usecTimestampNow(); diff --git a/interface/src/avatar/AvatarManager.cpp b/interface/src/avatar/AvatarManager.cpp index e9486b9def..1bc22ea98c 100644 --- a/interface/src/avatar/AvatarManager.cpp +++ b/interface/src/avatar/AvatarManager.cpp @@ -166,29 +166,29 @@ float AvatarManager::getAvatarSimulationRate(const QUuid& sessionID, const QStri } void AvatarManager::updateOtherAvatars(float deltaTime) { - // lock the hash for read to check the size - QReadLocker lock(&_hashLock); - if (_avatarHash.size() < 2 && _avatarsToFade.isEmpty()) { - return; + { + // lock the hash for read to check the size + QReadLocker lock(&_hashLock); + if (_avatarHash.size() < 2 && _avatarsToFade.isEmpty()) { + return; + } } - lock.unlock(); PerformanceTimer perfTimer("otherAvatars"); class SortableAvatar: public PrioritySortUtil::Sortable { public: SortableAvatar() = delete; - SortableAvatar(const AvatarSharedPointer& avatar) : _avatar(avatar) {} + SortableAvatar(const std::shared_ptr& avatar) : _avatar(avatar) {} glm::vec3 getPosition() const override { return _avatar->getWorldPosition(); } - float getRadius() const override { return std::static_pointer_cast(_avatar)->getBoundingRadius(); } - uint64_t getTimestamp() const override { return std::static_pointer_cast(_avatar)->getLastRenderUpdateTime(); } - AvatarSharedPointer getAvatar() const { return _avatar; } + float getRadius() const override { return _avatar->getBoundingRadius(); } + uint64_t getTimestamp() const override { return _avatar->getLastRenderUpdateTime(); } + std::shared_ptr getAvatar() const { return _avatar; } private: - AvatarSharedPointer _avatar; + std::shared_ptr _avatar; }; auto avatarMap = getHashCopy(); - AvatarHash::iterator itr = avatarMap.begin(); const auto& views = qApp->getConicalViews(); PrioritySortUtil::PriorityQueue sortedAvatars(views, @@ -197,22 +197,24 @@ void AvatarManager::updateOtherAvatars(float deltaTime) { AvatarData::_avatarSortCoefficientAge); sortedAvatars.reserve(avatarMap.size() - 1); // don't include MyAvatar - // sort + // Build vector and compute priorities + auto nodeList = DependencyManager::get(); + AvatarHash::iterator itr = avatarMap.begin(); while (itr != avatarMap.end()) { const auto& avatar = std::static_pointer_cast(*itr); // DO NOT update _myAvatar! Its update has already been done earlier in the main loop. // DO NOT update or fade out uninitialized Avatars - if (avatar != _myAvatar && avatar->isInitialized()) { + if (avatar != _myAvatar && avatar->isInitialized() && !nodeList->isPersonalMutingNode(avatar->getID())) { sortedAvatars.push(SortableAvatar(avatar)); } ++itr; } + // Sort const auto& sortedAvatarVector = sortedAvatars.getSortedVector(); // process in sorted order uint64_t startTime = usecTimestampNow(); - const uint64_t UPDATE_BUDGET = 2000; // usec - uint64_t updateExpiry = startTime + UPDATE_BUDGET; + uint64_t updateExpiry = startTime + MAX_UPDATE_AVATARS_TIME_BUDGET; int numAvatarsUpdated = 0; int numAVatarsNotUpdated = 0; @@ -231,18 +233,12 @@ void AvatarManager::updateOtherAvatars(float deltaTime) { avatar->updateOrbPosition(); } - bool ignoring = DependencyManager::get()->isPersonalMutingNode(avatar->getID()); - if (ignoring) { - continue; - } - // for ALL avatars... if (_shouldRender) { avatar->ensureInScene(avatar, qApp->getMain3DScene()); } avatar->animateScaleChanges(deltaTime); - const float OUT_OF_VIEW_THRESHOLD = 0.5f * AvatarData::OUT_OF_VIEW_PENALTY; uint64_t now = usecTimestampNow(); if (now < updateExpiry) { // we're within budget @@ -263,7 +259,7 @@ void AvatarManager::updateOtherAvatars(float deltaTime) { // no time to simulate, but we take the time to count how many were tragically missed while (it != sortedAvatarVector.end()) { const SortableAvatar& newSortData = *it; - const auto newAvatar = std::static_pointer_cast(newSortData.getAvatar()); + const auto& newAvatar = newSortData.getAvatar(); bool inView = newSortData.getPriority() > OUT_OF_VIEW_THRESHOLD; // Once we reach an avatar that's not in view, all avatars after it will also be out of view if (!inView) { diff --git a/libraries/avatars/src/AvatarData.cpp b/libraries/avatars/src/AvatarData.cpp index 13adc803dd..038d08145a 100644 --- a/libraries/avatars/src/AvatarData.cpp +++ b/libraries/avatars/src/AvatarData.cpp @@ -837,7 +837,6 @@ const unsigned char* unpackFauxJoint(const unsigned char* sourceBuffer, ThreadSa // read data in packet starting at byte offset and return number of bytes parsed int AvatarData::parseDataFromBuffer(const QByteArray& buffer) { - // lazily allocate memory for HeadData in case we're not an Avatar instance lazyInitHeadData(); @@ -889,7 +888,7 @@ int AvatarData::parseDataFromBuffer(const QByteArray& buffer) { auto newValue = glm::vec3(data->globalPosition[0], data->globalPosition[1], data->globalPosition[2]) + offset; if (_globalPosition != newValue) { _globalPosition = newValue; - _globalPositionChanged = usecTimestampNow(); + _globalPositionChanged = now; } sourceBuffer += sizeof(AvatarDataPacket::AvatarGlobalPosition); int numBytesRead = sourceBuffer - startSection; @@ -913,11 +912,11 @@ int AvatarData::parseDataFromBuffer(const QByteArray& buffer) { if (_globalBoundingBoxDimensions != newDimensions) { _globalBoundingBoxDimensions = newDimensions; - _avatarBoundingBoxChanged = usecTimestampNow(); + _avatarBoundingBoxChanged = now; } if (_globalBoundingBoxOffset != newOffset) { _globalBoundingBoxOffset = newOffset; - _avatarBoundingBoxChanged = usecTimestampNow(); + _avatarBoundingBoxChanged = now; } sourceBuffer += sizeof(AvatarDataPacket::AvatarBoundingBox); @@ -1018,7 +1017,7 @@ int AvatarData::parseDataFromBuffer(const QByteArray& buffer) { glm::mat4 sensorToWorldMatrix = createMatFromScaleQuatAndPos(glm::vec3(sensorToWorldScale), sensorToWorldQuat, sensorToWorldTrans); if (_sensorToWorldMatrixCache.get() != sensorToWorldMatrix) { _sensorToWorldMatrixCache.set(sensorToWorldMatrix); - _sensorToWorldMatrixChanged = usecTimestampNow(); + _sensorToWorldMatrixChanged = now; } sourceBuffer += sizeof(AvatarDataPacket::SensorToWorldMatrix); int numBytesRead = sourceBuffer - startSection; @@ -1075,7 +1074,7 @@ int AvatarData::parseDataFromBuffer(const QByteArray& buffer) { sourceBuffer += sizeof(AvatarDataPacket::AdditionalFlags); if (somethingChanged) { - _additionalFlagsChanged = usecTimestampNow(); + _additionalFlagsChanged = now; } int numBytesRead = sourceBuffer - startSection; _additionalFlagsRate.increment(numBytesRead); @@ -1095,7 +1094,7 @@ int AvatarData::parseDataFromBuffer(const QByteArray& buffer) { if ((getParentID() != newParentID) || (getParentJointIndex() != parentInfo->parentJointIndex)) { SpatiallyNestable::setParentID(newParentID); SpatiallyNestable::setParentJointIndex(parentInfo->parentJointIndex); - _parentChanged = usecTimestampNow(); + _parentChanged = now; } int numBytesRead = sourceBuffer - startSection; @@ -1144,8 +1143,6 @@ int AvatarData::parseDataFromBuffer(const QByteArray& buffer) { int numBytesRead = sourceBuffer - startSection; _faceTrackerRate.increment(numBytesRead); _faceTrackerUpdateRate.increment(); - } else { - _headData->_blendshapeCoefficients.fill(0, _headData->_blendshapeCoefficients.size()); } if (hasJointData) { @@ -2820,8 +2817,6 @@ void RayToAvatarIntersectionResultFromScriptValue(const QScriptValue& object, Ra value.extraInfo = object.property("extraInfo").toVariant().toMap(); } -const float AvatarData::OUT_OF_VIEW_PENALTY = -10.0f; - float AvatarData::_avatarSortCoefficientSize { 8.0f }; float AvatarData::_avatarSortCoefficientCenter { 4.0f }; float AvatarData::_avatarSortCoefficientAge { 1.0f }; diff --git a/libraries/avatars/src/AvatarData.h b/libraries/avatars/src/AvatarData.h index 9146340c4d..cd6440ae5d 100644 --- a/libraries/avatars/src/AvatarData.h +++ b/libraries/avatars/src/AvatarData.h @@ -1167,8 +1167,6 @@ public: // A method intended to be overriden by MyAvatar for polling orientation for network transmission. virtual glm::quat getOrientationOutbound() const; - static const float OUT_OF_VIEW_PENALTY; - // TODO: remove this HACK once we settle on optimal sort coefficients // These coefficients exposed for fine tuning the sort priority for transfering new _jointData to the render pipeline. static float _avatarSortCoefficientSize; diff --git a/libraries/avatars/src/AvatarHashMap.cpp b/libraries/avatars/src/AvatarHashMap.cpp index c437b56f32..be2ce3d397 100644 --- a/libraries/avatars/src/AvatarHashMap.cpp +++ b/libraries/avatars/src/AvatarHashMap.cpp @@ -21,7 +21,6 @@ #include "AvatarLogging.h" #include "AvatarTraits.h" - void AvatarReplicas::addReplica(const QUuid& parentID, AvatarSharedPointer replica) { if (parentID == QUuid()) { return; diff --git a/libraries/shared/src/PrioritySortUtil.h b/libraries/shared/src/PrioritySortUtil.h index 075de13d9d..27f6b193ba 100644 --- a/libraries/shared/src/PrioritySortUtil.h +++ b/libraries/shared/src/PrioritySortUtil.h @@ -18,6 +18,9 @@ // PrioritySortUtil is a helper for sorting 3D things relative to a ViewFrustum. +const float OUT_OF_VIEW_PENALTY = -10.0f; +const float OUT_OF_VIEW_THRESHOLD = 0.5f * OUT_OF_VIEW_PENALTY; + namespace PrioritySortUtil { constexpr float DEFAULT_ANGULAR_COEF { 1.0f }; @@ -93,17 +96,16 @@ namespace PrioritySortUtil { const float MIN_RADIUS = 0.1f; // WORKAROUND for zero size objects (we still want them to sort by distance) float radius = glm::max(thing.getRadius(), MIN_RADIUS); // Other item's angle from view centre: - float cosineAngle = (glm::dot(offset, view.getDirection()) / distance); + float cosineAngle = glm::dot(offset, view.getDirection()) / distance; float age = float((_usecCurrentTime - thing.getTimestamp()) / USECS_PER_SECOND); // the "age" term accumulates at the sum of all weights - float angularSize = glm::max(radius, MIN_RADIUS) / distance; + float angularSize = radius / distance; float priority = (_angularWeight * angularSize + _centerWeight * cosineAngle) * (age + 1.0f) + _ageWeight * age; // decrement priority of things outside keyhole if (distance - radius > view.getRadius()) { if (!view.intersects(offset, distance, radius)) { - constexpr float OUT_OF_VIEW_PENALTY = -10.0f; priority += OUT_OF_VIEW_PENALTY; } } @@ -122,5 +124,6 @@ namespace PrioritySortUtil { // for now we're keeping hard-coded sorted time budgets in one spot const uint64_t MAX_UPDATE_RENDERABLES_TIME_BUDGET = 2000; // usec const uint64_t MIN_SORTED_UPDATE_RENDERABLES_TIME_BUDGET = 1000; // usec +const uint64_t MAX_UPDATE_AVATARS_TIME_BUDGET = 2000; // usec #endif // hifi_PrioritySortUtil_h From 2f9119529a67209d0adcfda189ddd6859d52a80f Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Thu, 6 Sep 2018 17:06:17 -0700 Subject: [PATCH 113/210] editing the interstitial page --- interface/src/Application.cpp | 7 ++----- interface/src/Menu.cpp | 1 - scripts/defaultScripts.js | 3 ++- scripts/system/interstitialPage.js | 30 ++++++++++++++++-------------- 4 files changed, 20 insertions(+), 21 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 73e2fce956..15416b26cb 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -3488,14 +3488,11 @@ bool Application::isServerlessMode() const { } bool Application::isInterstitialMode() const { - bool interstitialModeEnabled = Menu::getInstance()->isOptionChecked("Enable Interstitial"); - return interstitialModeEnabled ? _interstitialMode : false; + return _interstitialMode; } void Application::setIsInterstitialMode(bool interstitialMode) { - auto menu = Menu::getInstance(); - bool interstitialModeEnabled = menu->isOptionChecked("Enable Interstitial"); - if (_interstitialMode != interstitialMode && interstitialModeEnabled) { + if (_interstitialMode != interstitialMode) { _interstitialMode = interstitialMode; emit interstitialModeChanged(_interstitialMode); } diff --git a/interface/src/Menu.cpp b/interface/src/Menu.cpp index 15898a73b1..a6ba983ab5 100644 --- a/interface/src/Menu.cpp +++ b/interface/src/Menu.cpp @@ -787,7 +787,6 @@ Menu::Menu() { // Developer > Show Overlays addCheckableActionToQMenuAndActionHash(developerMenu, MenuOption::Overlays, 0, true); - addCheckableActionToQMenuAndActionHash(developerMenu, "Enable Interstitial", 0, false); #if 0 /// -------------- REMOVED FOR NOW -------------- addDisabledActionAndSeparator(navigateMenu, "History"); diff --git a/scripts/defaultScripts.js b/scripts/defaultScripts.js index c333a0c8c2..31510831c8 100644 --- a/scripts/defaultScripts.js +++ b/scripts/defaultScripts.js @@ -34,7 +34,8 @@ var DEFAULT_SCRIPTS_COMBINED = [ "system/emote.js" ]; var DEFAULT_SCRIPTS_SEPARATE = [ - "system/controllers/controllerScripts.js" + "system/controllers/controllerScripts.js", + "system/interstitialPage.js" //"system/chat.js" ]; diff --git a/scripts/system/interstitialPage.js b/scripts/system/interstitialPage.js index c95845656c..aa84fed476 100644 --- a/scripts/system/interstitialPage.js +++ b/scripts/system/interstitialPage.js @@ -14,8 +14,9 @@ (function() { Script.include("/~/system/libraries/Xform.js"); - var DEBUG = false; - var MAX_X_SIZE = 3.8; + var DEBUG = true; + var MIN_LOADING_PROGRESS = 3.6; + var TOTAL_LOADING_PROGRESS = 3.8; var EPSILON = 0.01; var isVisible = false; var VOLUME = 0.4; @@ -55,7 +56,7 @@ "Tip: Log in to make friends, visit new domains, and save avatars!" ]; - var DEFAULT_DIMENSIONS = { x: 20, y: 20, z: 20 }; + var DEFAULT_DIMENSIONS = { x: 24, y: 24, z: 24 }; var loadingSphereID = Overlays.addOverlay("model", { name: "Loading-Sphere", @@ -87,10 +88,10 @@ var domainName = ""; var domainNameTextID = Overlays.addOverlay("text3d", { name: "Loading-Destination-Card-Text", - localPosition: { x: 0.0, y: 0.8, z: 0.0 }, + localPosition: { x: 0.0, y: 0.8, z: -0.001 }, text: domainName, textAlpha: 1, - backgroundAlpha: 0, + backgroundAlpha: 1, lineHeight: 0.42, visible: isVisible, ignoreRayIntersection: true, @@ -106,9 +107,10 @@ localPosition: { x: 0.0, y: 0.32, z: 0.0 }, text: domainText, textAlpha: 1, - backgroundAlpha: 0, + backgroundAlpha: 1, lineHeight: 0.13, visible: isVisible, + backgroundAlpha: 0, ignoreRayIntersection: true, drawInFront: true, grabbable: false, @@ -123,7 +125,7 @@ localPosition: { x: 0.0 , y: -1.6, z: 0.0 }, text: toolTip, textAlpha: 1, - backgroundAlpha: 0, + backgroundAlpha: 1, lineHeight: 0.13, visible: isVisible, ignoreRayIntersection: true, @@ -248,7 +250,6 @@ } function domainChanged(domain) { - print("domain changed: " + domain); if (domain !== currentDomain) { MyAvatar.restoreAnimation(); var name = location.placename; @@ -272,7 +273,6 @@ if (data.status === "success") { var domainInfo = data.data; var domainDescriptionText = domainInfo.place.description; - print("domainText: " + domainDescriptionText); var leftMargin = getLeftMargin(domainDescription, domainDescriptionText); var domainDescriptionProperties = { text: domainDescriptionText, @@ -381,18 +381,18 @@ var domainLoadingProgressPercentage = Window.domainLoadingProgress(); - var progress = MAX_X_SIZE * domainLoadingProgressPercentage; + var progress = MIN_LOADING_PROGRESS * domainLoadingProgressPercentage; if (progress >= target) { target = progress; } - if ((physicsEnabled && (currentProgress < MAX_X_SIZE))) { - target = MAX_X_SIZE; + if ((physicsEnabled && (currentProgress < TOTAL_LOADING_PROGRESS))) { + target = TOTAL_LOADING_PROGRESS; } currentProgress = lerp(currentProgress, target, 0.2); var properties = { - localPosition: { x: (1.85 - (currentProgress / 2) - (-0.029 * (currentProgress / MAX_X_SIZE))), y: -0.935, z: 0.0 }, + localPosition: { x: (1.85 - (currentProgress / 2) - (-0.029 * (currentProgress / TOTAL_LOADING_PROGRESS))), y: -0.935, z: 0.0 }, dimensions: { x: currentProgress, y: 2.8 @@ -400,9 +400,10 @@ }; Overlays.editOverlay(loadingBarProgress, properties); - if ((physicsEnabled && (currentProgress >= (MAX_X_SIZE - EPSILON)))) { + if ((physicsEnabled && (currentProgress >= (TOTAL_LOADING_PROGRESS - EPSILON)))) { updateOverlays((physicsEnabled || connectionToDomainFailed)); endAudio(); + currentDomain = "no domain"; timer = null; return; } @@ -452,6 +453,7 @@ renderViewTask.getConfig("LightingModel")["enableAmbientLight"] = true; renderViewTask.getConfig("LightingModel")["enableDirectionalLight"] = true; renderViewTask.getConfig("LightingModel")["enablePointLight"] = true; + Menu.setIsOptionChecked("Show Overlays", physicsEnabled); if (!HMD.active) { toolbar.writeProperty("visible", true); } From e76ebf7a0b8a4207436c04d7a30aef1d14919b1b Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Thu, 6 Sep 2018 17:29:16 -0700 Subject: [PATCH 114/210] changing location of shortcuts --- .../LoginDialog/+android/LinkAccountBody.qml | 40 ++++----- .../qml/LoginDialog/LinkAccountBody.qml | 87 ++++++++++--------- 2 files changed, 66 insertions(+), 61 deletions(-) diff --git a/interface/resources/qml/LoginDialog/+android/LinkAccountBody.qml b/interface/resources/qml/LoginDialog/+android/LinkAccountBody.qml index bf7807c85d..96b638c911 100644 --- a/interface/resources/qml/LoginDialog/+android/LinkAccountBody.qml +++ b/interface/resources/qml/LoginDialog/+android/LinkAccountBody.qml @@ -117,27 +117,27 @@ Item { } spacing: hifi.dimensions.contentSpacing.y / 2 - TextField { - id: usernameField - anchors { - horizontalCenter: parent.horizontalCenter - } - width: 1080 - placeholderText: qsTr("Username or Email") + TextField { + id: usernameField + anchors { + horizontalCenter: parent.horizontalCenter } + width: 1080 + placeholderText: qsTr("Username or Email") + } - TextField { - id: passwordField - anchors { - horizontalCenter: parent.horizontalCenter - } - width: 1080 - - placeholderText: qsTr("Password") - echoMode: TextInput.Password - - Keys.onReturnPressed: linkAccountBody.login() + TextField { + id: passwordField + anchors { + horizontalCenter: parent.horizontalCenter } + width: 1080 + + placeholderText: qsTr("Password") + echoMode: TextInput.Password + + Keys.onReturnPressed: linkAccountBody.login() + } } InfoItem { @@ -176,7 +176,7 @@ Item { anchors { left: parent.left top: form.bottom - topMargin: hifi.dimensions.contentSpacing.y / 2 + topMargin: hifi.dimensions.contentSpacing.y / 2 } spacing: hifi.dimensions.contentSpacing.x @@ -201,7 +201,7 @@ Item { anchors { right: parent.right top: form.bottom - topMargin: hifi.dimensions.contentSpacing.y / 2 + topMargin: hifi.dimensions.contentSpacing.y / 2 } spacing: hifi.dimensions.contentSpacing.x onHeightChanged: d.resize(); onWidthChanged: d.resize(); diff --git a/interface/resources/qml/LoginDialog/LinkAccountBody.qml b/interface/resources/qml/LoginDialog/LinkAccountBody.qml index 902466270f..2274d88e04 100644 --- a/interface/resources/qml/LoginDialog/LinkAccountBody.qml +++ b/interface/resources/qml/LoginDialog/LinkAccountBody.qml @@ -15,13 +15,14 @@ import QtQuick.Controls.Styles 1.4 as OriginalStyles import "../controls-uit" import "../styles-uit" - Item { id: linkAccountBody clip: true height: root.pane.height width: root.pane.width property bool failAfterSignUp: false + property var locale: Qt.locale() + property string dateTimeString function login() { mainTextContainer.visible = false @@ -124,29 +125,27 @@ Item { placeholderText: "Username or Email" activeFocusOnPress: true + ShortcutText { + z: 10 + y: usernameField.height + anchors { + right: usernameField.right + topMargin: -19 + } + + text: "Forgot Username?" + + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter + linkColor: hifi.colors.blueAccent + + onLinkActivated: loginDialog.openUrl(link) + } + onFocusChanged: { root.text = ""; } } - ShortcutText { - id: forgotUsernameShortcut - z: 10 - anchors { - leftMargin: usernameField.textFieldLabel.contentWidth + 10 - topMargin: -19 - } - - text: "Forgot Username?" - - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignRight - linkColor: hifi.colors.blueAccent - - onLinkActivated: loginDialog.openUrl(link) - Component.onCompleted: { - forgotUsernameShortcut.x = root.implicitWidth - forgotUsernameShortcut.width; - } - } TextField { id: passwordField @@ -154,11 +153,30 @@ Item { placeholderText: "Password" activeFocusOnPress: true echoMode: TextInput.Password + onHeightChanged: d.resize(); onWidthChanged: d.resize(); + + ShortcutText { + id: forgotPasswordShortcut + y: passwordField.height + z: 10 + anchors { + right: passwordField.right + } + + text: "Forgot Password?" + + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter + linkColor: hifi.colors.blueAccent + + onLinkActivated: loginDialog.openUrl(link) + } onFocusChanged: { root.text = ""; root.isPassword = true; } + Image { id: showPasswordImage x: parent.width - ((parent.height) * 31 / 23) @@ -190,7 +208,6 @@ Item { showPasswordImage.y = showPassword ? 0 : (passwordField.height - showPasswordImage.height) / 2; showPasswordHitbox.width = showPasswordImage.width; showPasswordHitbox.x = showPasswordImage.x; - } } } @@ -198,26 +215,6 @@ Item { Keys.onReturnPressed: linkAccountBody.login() } - ShortcutText { - id: forgotPasswordShortcut - z: 10 - anchors { - leftMargin: passwordField.textFieldLabel.contentWidth + 10 - topMargin: -19 - } - - text: "Forgot Password?" - - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignHCenter - linkColor: hifi.colors.blueAccent - - onLinkActivated: loginDialog.openUrl(link) - Component.onCompleted: { - forgotPasswordShortcut.x = root.implicitWidth - forgotPasswordShortcut.width; - } - } - InfoItem { id: additionalInformation @@ -304,6 +301,14 @@ Item { } usernameField.forceActiveFocus(); + + var data = { + "date": new Date().toLocaleString(), + }; + print(new Date().toLocaleString()); + print(model.sessionId); + + //UserActivityLogger.logAction("login_screen_shown", ) } Connections { From 45a99a9244679da6d30ba489b6a225a0be4ad1d4 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Thu, 6 Sep 2018 17:55:10 -0700 Subject: [PATCH 115/210] fixing some bugs --- scripts/system/interstitialPage.js | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/scripts/system/interstitialPage.js b/scripts/system/interstitialPage.js index aa84fed476..1cc048ca99 100644 --- a/scripts/system/interstitialPage.js +++ b/scripts/system/interstitialPage.js @@ -14,7 +14,7 @@ (function() { Script.include("/~/system/libraries/Xform.js"); - var DEBUG = true; + var DEBUG = false; var MIN_LOADING_PROGRESS = 3.6; var TOTAL_LOADING_PROGRESS = 3.8; var EPSILON = 0.01; @@ -410,8 +410,21 @@ timer = Script.setTimeout(update, BASIC_TIMER_INTERVAL_MS); } - + var whiteColor = {red: 255, green: 255, blue: 255}; + var greyColor = {red: 125, green: 125, blue: 125}; Overlays.mouseReleaseOnOverlay.connect(clickedOnOverlay); + Overlays.hoverEnterOverlay.connect(function(overlayID, event) { + if (overlayID === loadingToTheSpotID) { + Overlays.editOverlay(loadingToTheSpotID, { color: greyColor}); + } + }); + + Overlays.hoverLeaveOverlay.connect(function(overlayID, event) { + if (overlayID === loadingToTheSpotID) { + Overlays.editOverlay(loadingToTheSpotID, { color: whiteColor}); + } + }); + location.hostChanged.connect(domainChanged); location.lookupResultsFinished.connect(function() { Script.setTimeout(function() { @@ -453,7 +466,7 @@ renderViewTask.getConfig("LightingModel")["enableAmbientLight"] = true; renderViewTask.getConfig("LightingModel")["enableDirectionalLight"] = true; renderViewTask.getConfig("LightingModel")["enablePointLight"] = true; - Menu.setIsOptionChecked("Show Overlays", physicsEnabled); + Menu.setIsOptionChecked("Show Overlays", true); if (!HMD.active) { toolbar.writeProperty("visible", true); } From 22cfad248310788459d594c874d7c5fee1bce902 Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Thu, 6 Sep 2018 18:32:37 -0700 Subject: [PATCH 116/210] Squelch (false) warning from gcc --- assignment-client/src/avatars/AvatarMixerSlave.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assignment-client/src/avatars/AvatarMixerSlave.cpp b/assignment-client/src/avatars/AvatarMixerSlave.cpp index 705d660a2e..784205a2da 100644 --- a/assignment-client/src/avatars/AvatarMixerSlave.cpp +++ b/assignment-client/src/avatars/AvatarMixerSlave.cpp @@ -409,7 +409,7 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) assert(otherNode); // we can't have gotten here without the avatarData being a valid key in the map - AvatarData::AvatarDataDetail detail; + AvatarData::AvatarDataDetail detail = AvatarData::NoData; // NOTE: Here's where we determine if we are over budget and drop to bare minimum data int minimRemainingAvatarBytes = minimumBytesPerAvatar * remainingAvatars; From 2443723a2bfc324d69e5270e062e699a299c4177 Mon Sep 17 00:00:00 2001 From: Alexia Mandeville Date: Thu, 6 Sep 2018 21:14:04 -0700 Subject: [PATCH 117/210] Removing margins, adding width attribute --- interface/resources/qml/LoginDialog/LinkAccountBody.qml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/interface/resources/qml/LoginDialog/LinkAccountBody.qml b/interface/resources/qml/LoginDialog/LinkAccountBody.qml index d2a97874b1..707c173382 100644 --- a/interface/resources/qml/LoginDialog/LinkAccountBody.qml +++ b/interface/resources/qml/LoginDialog/LinkAccountBody.qml @@ -97,6 +97,7 @@ Item { } text: qsTr("Sign in to High Fidelity to make friends, get HFC, and buy interesting things on the Marketplace!") + width: parent.width wrapMode: Text.WordWrap lineHeight: 1 lineHeightMode: Text.ProportionalHeight @@ -146,7 +147,6 @@ Item { anchors { right: usernameField.right top: usernameField.bottom - topMargin: -19 } text: "Forgot Username?" @@ -174,7 +174,6 @@ Item { anchors { right: passwordField.right top: passwordField.bottom - topMargin: -19 } text: "Forgot Password?" From 92f218ae29a24edb8ef7a56a62e83a7201998474 Mon Sep 17 00:00:00 2001 From: Alexia Mandeville Date: Thu, 6 Sep 2018 22:59:19 -0700 Subject: [PATCH 118/210] Adding margins to forgotten link text --- interface/resources/qml/LoginDialog/LinkAccountBody.qml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/interface/resources/qml/LoginDialog/LinkAccountBody.qml b/interface/resources/qml/LoginDialog/LinkAccountBody.qml index 707c173382..90437c008e 100644 --- a/interface/resources/qml/LoginDialog/LinkAccountBody.qml +++ b/interface/resources/qml/LoginDialog/LinkAccountBody.qml @@ -147,6 +147,7 @@ Item { anchors { right: usernameField.right top: usernameField.bottom + topMargin: 2 } text: "Forgot Username?" @@ -174,6 +175,7 @@ Item { anchors { right: passwordField.right top: passwordField.bottom + topMargin: 2 } text: "Forgot Password?" From 190a335c7118be684db1e86369759207e16cc29a Mon Sep 17 00:00:00 2001 From: Alexia Mandeville Date: Fri, 7 Sep 2018 00:01:00 -0700 Subject: [PATCH 119/210] Adding more margin to forgotten links --- interface/resources/qml/LoginDialog/LinkAccountBody.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/resources/qml/LoginDialog/LinkAccountBody.qml b/interface/resources/qml/LoginDialog/LinkAccountBody.qml index 90437c008e..28523617b6 100644 --- a/interface/resources/qml/LoginDialog/LinkAccountBody.qml +++ b/interface/resources/qml/LoginDialog/LinkAccountBody.qml @@ -147,7 +147,7 @@ Item { anchors { right: usernameField.right top: usernameField.bottom - topMargin: 2 + topMargin: 4 } text: "Forgot Username?" @@ -175,7 +175,7 @@ Item { anchors { right: passwordField.right top: passwordField.bottom - topMargin: 2 + topMargin: 4 } text: "Forgot Password?" From 3dc993c841566027c7409ca29b98cb35a7e08701 Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Fri, 7 Sep 2018 09:46:21 -0700 Subject: [PATCH 120/210] Fix small error in translation delta --- libraries/avatars/src/AvatarData.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/avatars/src/AvatarData.cpp b/libraries/avatars/src/AvatarData.cpp index 905569cb65..04efcb242e 100644 --- a/libraries/avatars/src/AvatarData.cpp +++ b/libraries/avatars/src/AvatarData.cpp @@ -625,7 +625,7 @@ QByteArray AvatarData::toByteArray(AvatarDataDetail dataDetail, quint64 lastSent destinationBuffer += numValidityBytes; // Move pointer past the validity bytes - float minTranslation = (distanceAdjust && cullSmallChanges) ? getDistanceBasedMinTranslationDistance(viewerPosition) : AVATAR_MIN_ROTATION_DOT; + float minTranslation = (distanceAdjust && cullSmallChanges) ? getDistanceBasedMinTranslationDistance(viewerPosition) : AVATAR_MIN_TRANSLATION; float maxTranslationDimension = 0.0; for (int i = 0; i < jointData.size(); i++) { From d9495275cc8ff0dc701486349ecfe1c82cd75b11 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Fri, 7 Sep 2018 11:22:31 -0700 Subject: [PATCH 121/210] adding cancel button and signed in checkbox --- interface/resources/qml/LoginDialog.qml | 1 + .../qml/LoginDialog/LinkAccountBody.qml | 23 ++++++++++++++----- .../resources/qml/windows/ModalFrame.qml | 18 +++++++++++++++ .../resources/qml/windows/ModalWindow.qml | 1 + 4 files changed, 37 insertions(+), 6 deletions(-) diff --git a/interface/resources/qml/LoginDialog.qml b/interface/resources/qml/LoginDialog.qml index e21e8b7354..336858502d 100644 --- a/interface/resources/qml/LoginDialog.qml +++ b/interface/resources/qml/LoginDialog.qml @@ -23,6 +23,7 @@ ModalWindow { objectName: "LoginDialog" implicitWidth: 520 implicitHeight: 320 + closeButtonVisible: true destroyOnCloseButton: true destroyOnHidden: true visible: true diff --git a/interface/resources/qml/LoginDialog/LinkAccountBody.qml b/interface/resources/qml/LoginDialog/LinkAccountBody.qml index 2274d88e04..4c9fe6ae94 100644 --- a/interface/resources/qml/LoginDialog/LinkAccountBody.qml +++ b/interface/resources/qml/LoginDialog/LinkAccountBody.qml @@ -234,6 +234,23 @@ Item { onHeightChanged: d.resize(); onWidthChanged: d.resize(); anchors.horizontalCenter: parent.horizontalCenter + CheckBox { + id: autoLogoutCheckbox; + checked: Settings.getValue("wallet/autoLogout", true); + text: "Keep me signed in" + boxSize: 20; + labelFontSize: 15; + color: hifi.colors.black; + onCheckedChanged: { + Settings.setValue("wallet/autoLogout", !checked); + if (checked) { + Settings.setValue("wallet/savedUsername", ""); + } else { + Settings.setValue("wallet/savedUsername", Account.username); + } + } + } + Button { id: linkAccountButton anchors.verticalCenter: parent.verticalCenter @@ -244,12 +261,6 @@ Item { onClicked: linkAccountBody.login() } - - Button { - anchors.verticalCenter: parent.verticalCenter - text: qsTr("Cancel") - onClicked: root.tryDestroy() - } } Row { diff --git a/interface/resources/qml/windows/ModalFrame.qml b/interface/resources/qml/windows/ModalFrame.qml index 211353b5f3..640069a0b3 100644 --- a/interface/resources/qml/windows/ModalFrame.qml +++ b/interface/resources/qml/windows/ModalFrame.qml @@ -94,5 +94,23 @@ Frame { color: hifi.colors.lightGray } } + + + GlyphButton { + id: closeButton + visible: window.closeButtonVisible + width: 30 + y: -hifi.dimensions.modalDialogTitleHeight + anchors { + top: parent.top + right: parent.right + topMargin: 10 + rightMargin: 10 + } + glyph: hifi.glyphs.close + onClicked: { + window.destroy(); + } + } } } diff --git a/interface/resources/qml/windows/ModalWindow.qml b/interface/resources/qml/windows/ModalWindow.qml index 2d56099051..75f5c2d646 100644 --- a/interface/resources/qml/windows/ModalWindow.qml +++ b/interface/resources/qml/windows/ModalWindow.qml @@ -19,6 +19,7 @@ ScrollingWindow { destroyOnHidden: true frame: ModalFrame { } + property bool closeButtonVisible: false property int colorScheme: hifi.colorSchemes.light property bool draggable: false From db96603cdabc35034aa393ed750952c854f618ce Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Fri, 7 Sep 2018 11:23:58 -0700 Subject: [PATCH 122/210] removing some unused properties --- interface/resources/qml/LoginDialog/LinkAccountBody.qml | 2 -- 1 file changed, 2 deletions(-) diff --git a/interface/resources/qml/LoginDialog/LinkAccountBody.qml b/interface/resources/qml/LoginDialog/LinkAccountBody.qml index 4c9fe6ae94..9bb40fd538 100644 --- a/interface/resources/qml/LoginDialog/LinkAccountBody.qml +++ b/interface/resources/qml/LoginDialog/LinkAccountBody.qml @@ -21,8 +21,6 @@ Item { height: root.pane.height width: root.pane.width property bool failAfterSignUp: false - property var locale: Qt.locale() - property string dateTimeString function login() { mainTextContainer.visible = false From 1a67176819d5171dba901442d07b7a76b4c2c198 Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Fri, 7 Sep 2018 11:29:30 -0700 Subject: [PATCH 123/210] Fix a dangling merge conflict --- libraries/render-utils/src/SoftAttachmentModel.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/libraries/render-utils/src/SoftAttachmentModel.cpp b/libraries/render-utils/src/SoftAttachmentModel.cpp index 9ab30c179a..93ce8f595a 100644 --- a/libraries/render-utils/src/SoftAttachmentModel.cpp +++ b/libraries/render-utils/src/SoftAttachmentModel.cpp @@ -79,7 +79,6 @@ void SoftAttachmentModel::updateClusterMatrices(bool triggerBlendshapes) { // post the blender if we're not currently waiting for one to finish auto modelBlender = DependencyManager::get(); if (triggerBlendshapes && modelBlender->shouldComputeBlendshapes() && geometry.hasBlendedMeshes() && _blendshapeCoefficients != _blendedBlendshapeCoefficients) { - if (_blendedVertexBuffersInitialized && modelBlender->shouldComputeBlendshapes() && geometry.hasBlendedMeshes() && _blendshapeCoefficients != _blendedBlendshapeCoefficients) { _blendedBlendshapeCoefficients = _blendshapeCoefficients; modelBlender->noteRequiresBlend(getThisPointer()); } From 44d36ec622dd0fee044ebecac11d6c387d4721a6 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Fri, 7 Sep 2018 11:31:29 -0700 Subject: [PATCH 124/210] wallet should save username when checked --- interface/resources/qml/LoginDialog/LinkAccountBody.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/resources/qml/LoginDialog/LinkAccountBody.qml b/interface/resources/qml/LoginDialog/LinkAccountBody.qml index 9bb40fd538..ca81a6b870 100644 --- a/interface/resources/qml/LoginDialog/LinkAccountBody.qml +++ b/interface/resources/qml/LoginDialog/LinkAccountBody.qml @@ -242,9 +242,9 @@ Item { onCheckedChanged: { Settings.setValue("wallet/autoLogout", !checked); if (checked) { - Settings.setValue("wallet/savedUsername", ""); - } else { Settings.setValue("wallet/savedUsername", Account.username); + } else { + Settings.setValue("wallet/savedUsername", ""); } } } From 39041f294281f249386a63096faaff4195659924 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Fri, 7 Sep 2018 11:36:21 -0700 Subject: [PATCH 125/210] fixing username field --- .../resources/qml/LoginDialog/LinkAccountBody.qml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/interface/resources/qml/LoginDialog/LinkAccountBody.qml b/interface/resources/qml/LoginDialog/LinkAccountBody.qml index ca81a6b870..bc0b8fb2e0 100644 --- a/interface/resources/qml/LoginDialog/LinkAccountBody.qml +++ b/interface/resources/qml/LoginDialog/LinkAccountBody.qml @@ -242,9 +242,9 @@ Item { onCheckedChanged: { Settings.setValue("wallet/autoLogout", !checked); if (checked) { - Settings.setValue("wallet/savedUsername", Account.username); - } else { Settings.setValue("wallet/savedUsername", ""); + } else { + Settings.setValue("wallet/savedUsername", Account.username); } } } @@ -310,14 +310,6 @@ Item { } usernameField.forceActiveFocus(); - - var data = { - "date": new Date().toLocaleString(), - }; - print(new Date().toLocaleString()); - print(model.sessionId); - - //UserActivityLogger.logAction("login_screen_shown", ) } Connections { From adac872a117bb76f6330c1980bde0e7b1b5a112f Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Thu, 30 Aug 2018 15:10:05 -0700 Subject: [PATCH 126/210] clear other avatars in agent on avatar mixer disconnect --- interface/src/Application.cpp | 8 -------- interface/src/Application.h | 1 - interface/src/avatar/AvatarManager.h | 2 +- libraries/avatars/src/AvatarHashMap.cpp | 15 +++++++++++++++ libraries/avatars/src/AvatarHashMap.h | 2 ++ 5 files changed, 18 insertions(+), 10 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 40edcdbd76..4c4235a670 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -1192,7 +1192,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo connect(&domainHandler, SIGNAL(resetting()), SLOT(resettingDomain())); connect(&domainHandler, SIGNAL(connectedToDomain(QUrl)), SLOT(updateWindowTitle())); connect(&domainHandler, SIGNAL(disconnectedFromDomain()), SLOT(updateWindowTitle())); - connect(&domainHandler, &DomainHandler::disconnectedFromDomain, this, &Application::clearDomainAvatars); connect(&domainHandler, &DomainHandler::disconnectedFromDomain, this, [this]() { getOverlays().deleteOverlay(getTabletScreenID()); getOverlays().deleteOverlay(getTabletHomeButtonID()); @@ -6368,10 +6367,6 @@ void Application::clearDomainOctreeDetails() { getMyAvatar()->setAvatarEntityDataChanged(true); } -void Application::clearDomainAvatars() { - DependencyManager::get()->clearOtherAvatars(); -} - void Application::domainURLChanged(QUrl domainURL) { // disable physics until we have enough information about our new location to not cause craziness. resetPhysicsReadyInformation(); @@ -6459,9 +6454,6 @@ void Application::nodeKilled(SharedNodePointer node) { } else if (node->getType() == NodeType::EntityServer) { // we lost an entity server, clear all of the domain octree details clearDomainOctreeDetails(); - } else if (node->getType() == NodeType::AvatarMixer) { - // our avatar mixer has gone away - clear the hash of avatars - DependencyManager::get()->clearOtherAvatars(); } else if (node->getType() == NodeType::AssetServer) { // asset server going away - check if we have the asset browser showing diff --git a/interface/src/Application.h b/interface/src/Application.h index aa8323cd38..f988795bc6 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -437,7 +437,6 @@ private slots: void onDesktopRootContextCreated(QQmlContext* qmlContext); void showDesktop(); void clearDomainOctreeDetails(); - void clearDomainAvatars(); void onAboutToQuit(); void onPresent(quint32 frameCount); diff --git a/interface/src/avatar/AvatarManager.h b/interface/src/avatar/AvatarManager.h index bcdfc064bd..7e1e1f4ff1 100644 --- a/interface/src/avatar/AvatarManager.h +++ b/interface/src/avatar/AvatarManager.h @@ -93,7 +93,7 @@ public: void postUpdate(float deltaTime, const render::ScenePointer& scene); - void clearOtherAvatars(); + void clearOtherAvatars() override; void deleteAllAvatars(); void getObjectsToRemoveFromPhysics(VectorOfMotionStates& motionStates); diff --git a/libraries/avatars/src/AvatarHashMap.cpp b/libraries/avatars/src/AvatarHashMap.cpp index c1246866dc..0c5ca06989 100644 --- a/libraries/avatars/src/AvatarHashMap.cpp +++ b/libraries/avatars/src/AvatarHashMap.cpp @@ -112,6 +112,12 @@ AvatarHashMap::AvatarHashMap() { packetReceiver.registerListener(PacketType::BulkAvatarTraits, this, "processBulkAvatarTraits"); connect(nodeList.data(), &NodeList::uuidChanged, this, &AvatarHashMap::sessionUUIDChanged); + + connect(nodeList.data(), &NodeList::nodeKilled, this, [this](SharedNodePointer killedNode){ + if (killedNode->getType() == NodeType::AvatarMixer) { + clearOtherAvatars(); + } + }); } QVector AvatarHashMap::getAvatarIdentifiers() { @@ -427,3 +433,12 @@ void AvatarHashMap::sessionUUIDChanged(const QUuid& sessionUUID, const QUuid& ol emit avatarSessionChangedEvent(sessionUUID, oldUUID); } +void AvatarHashMap::clearOtherAvatars() { + QWriteLocker locker(&_hashLock); + + AvatarHash::iterator avatarIterator = _avatarHash.begin(); + while (avatarIterator != _avatarHash.end()) { + handleRemovedAvatar(*avatarIterator); + avatarIterator = _avatarHash.erase(avatarIterator); + } +} diff --git a/libraries/avatars/src/AvatarHashMap.h b/libraries/avatars/src/AvatarHashMap.h index 0f847b2a61..70d7f8c04d 100644 --- a/libraries/avatars/src/AvatarHashMap.h +++ b/libraries/avatars/src/AvatarHashMap.h @@ -101,6 +101,8 @@ public: void setReplicaCount(int count); int getReplicaCount() { return _replicas.getReplicaCount(); }; + virtual void clearOtherAvatars(); + signals: /**jsdoc From c2fe2b60b3ee8e04b2b122f903de1b05591185f0 Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Fri, 7 Sep 2018 15:49:47 -0700 Subject: [PATCH 127/210] Use std::vector for ignored avatars since the list will be small --- .../src/avatars/AvatarMixerClientData.cpp | 16 +++++++++++++++- .../src/avatars/AvatarMixerClientData.h | 8 ++++---- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/assignment-client/src/avatars/AvatarMixerClientData.cpp b/assignment-client/src/avatars/AvatarMixerClientData.cpp index c54db90f5d..6c01e6e02b 100644 --- a/assignment-client/src/avatars/AvatarMixerClientData.cpp +++ b/assignment-client/src/avatars/AvatarMixerClientData.cpp @@ -11,6 +11,7 @@ #include "AvatarMixerClientData.h" +#include #include #include @@ -239,8 +240,21 @@ void AvatarMixerClientData::ignoreOther(const Node* self, const Node* other) { } } +bool AvatarMixerClientData::isRadiusIgnoring(const QUuid& other) const { + return std::find(_radiusIgnoredOthers.cbegin(), _radiusIgnoredOthers.cend(), other) != _radiusIgnoredOthers.cend(); +} + +void AvatarMixerClientData::addToRadiusIgnoringSet(const QUuid& other) { + if (!isRadiusIgnoring(other)) { + _radiusIgnoredOthers.push_back(other); + } +} + void AvatarMixerClientData::removeFromRadiusIgnoringSet(const QUuid& other) { - _radiusIgnoredOthers.erase(other); + auto ignoredOtherIter = std::find(_radiusIgnoredOthers.cbegin(), _radiusIgnoredOthers.cend(), other); + if (ignoredOtherIter != _radiusIgnoredOthers.cend()) { + _radiusIgnoredOthers.erase(ignoredOtherIter); + } } void AvatarMixerClientData::resetSentTraitData(Node::LocalID nodeLocalID) { diff --git a/assignment-client/src/avatars/AvatarMixerClientData.h b/assignment-client/src/avatars/AvatarMixerClientData.h index 64b1ea3edf..d38a90ef1f 100644 --- a/assignment-client/src/avatars/AvatarMixerClientData.h +++ b/assignment-client/src/avatars/AvatarMixerClientData.h @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include @@ -91,8 +91,8 @@ public: void loadJSONStats(QJsonObject& jsonObject) const; glm::vec3 getPosition() const { return _avatar ? _avatar->getWorldPosition() : glm::vec3(0); } - bool isRadiusIgnoring(const QUuid& other) const { return _radiusIgnoredOthers.find(other) != _radiusIgnoredOthers.end(); } - void addToRadiusIgnoringSet(const QUuid& other) { _radiusIgnoredOthers.insert(other); } + bool isRadiusIgnoring(const QUuid& other) const; + void addToRadiusIgnoringSet(const QUuid& other); void removeFromRadiusIgnoringSet(const QUuid& other); void ignoreOther(SharedNodePointer self, SharedNodePointer other); void ignoreOther(const Node* self, const Node* other); @@ -167,7 +167,7 @@ private: int _numOutOfOrderSends = 0; SimpleMovingAverage _avgOtherAvatarDataRate; - std::unordered_set _radiusIgnoredOthers; + std::vector _radiusIgnoredOthers; ConicalViewFrustums _currentViewFrustums; int _recentOtherAvatarsInView { 0 }; From 6bb143da4273157bd6cfaa49f8e656829da72346 Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Fri, 7 Sep 2018 18:14:39 -0700 Subject: [PATCH 128/210] Make maxAvatarBytesPerFrame int rather than float; other clean-up --- assignment-client/src/avatars/AvatarMixerSlave.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/assignment-client/src/avatars/AvatarMixerSlave.cpp b/assignment-client/src/avatars/AvatarMixerSlave.cpp index 784205a2da..8b69479a4e 100644 --- a/assignment-client/src/avatars/AvatarMixerSlave.cpp +++ b/assignment-client/src/avatars/AvatarMixerSlave.cpp @@ -256,7 +256,7 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) int traitBytesSent = 0; // max number of avatarBytes per frame - auto maxAvatarBytesPerFrame = (_maxKbpsPerNode * BYTES_PER_KILOBIT) / AVATAR_MIXER_BROADCAST_FRAMES_PER_SECOND; + int maxAvatarBytesPerFrame = int(_maxKbpsPerNode * BYTES_PER_KILOBIT / AVATAR_MIXER_BROADCAST_FRAMES_PER_SECOND); // FIXME - find a way to not send the sessionID for every avatar int minimumBytesPerAvatar = AvatarDataPacket::AVATAR_HAS_FLAGS_SIZE + NUM_BYTES_RFC4122_UUID; @@ -412,6 +412,8 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) AvatarData::AvatarDataDetail detail = AvatarData::NoData; // NOTE: Here's where we determine if we are over budget and drop to bare minimum data + // If we're going to just drop the over-budget avatars entirely the decision should + // just use numAvatarDataBytes, not minimRemainingAvatarBytes. int minimRemainingAvatarBytes = minimumBytesPerAvatar * remainingAvatars; bool overBudget = (identityBytesSent + numAvatarDataBytes + minimRemainingAvatarBytes) > maxAvatarBytesPerFrame; if (overBudget) { @@ -441,10 +443,10 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) nodeData->setLastBroadcastTime(otherNode->getUUID(), usecTimestampNow()); } - // determine if avatar is in view which determines how much data to send - bool isInView = sortedAvatar.getPriority() > OUT_OF_VIEW_THRESHOLD; + // Typically all out-of-view avatars but such avatars' priorities will rise with time: + bool isLowerPriority = sortedAvatar.getPriority() <= OUT_OF_VIEW_THRESHOLD; - if (!isInView) { + if (isLowerPriority) { detail = PALIsOpen ? AvatarData::PALMinimum : AvatarData::MinimumData; nodeData->incrementAvatarOutOfView(); } else if (!overBudget) { From ff86e480baa26c02353ad20103a320605c18ca18 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Mon, 10 Sep 2018 11:36:45 -0700 Subject: [PATCH 129/210] adding debug statement to check for window close --- interface/resources/qml/LoginDialog.qml | 7 ++++ .../qml/dialogs/TabletLoginDialog.qml | 6 ++++ .../networking/src/UserActivityLogger.cpp | 36 +++++++++---------- 3 files changed, 31 insertions(+), 18 deletions(-) diff --git a/interface/resources/qml/LoginDialog.qml b/interface/resources/qml/LoginDialog.qml index e21e8b7354..99c999249b 100644 --- a/interface/resources/qml/LoginDialog.qml +++ b/interface/resources/qml/LoginDialog.qml @@ -84,4 +84,11 @@ ModalWindow { break } } + Component.onDestruction: { +/* var data = { + "action": "userOptedOut" + }; + UserActivityLogger.logAction("LoginDialogAction", data); */ + print("destroyed"); + } } diff --git a/interface/resources/qml/dialogs/TabletLoginDialog.qml b/interface/resources/qml/dialogs/TabletLoginDialog.qml index c85b2b2ba0..3be4d8217d 100644 --- a/interface/resources/qml/dialogs/TabletLoginDialog.qml +++ b/interface/resources/qml/dialogs/TabletLoginDialog.qml @@ -173,4 +173,10 @@ TabletModalWindow { break } } + onDestroy: { + var data = { + "action": "userOptedOut" + }; + UserActivityLogger.logAction("LoginDialogAction", data); + } } diff --git a/libraries/networking/src/UserActivityLogger.cpp b/libraries/networking/src/UserActivityLogger.cpp index a5ee417939..c05daf0217 100644 --- a/libraries/networking/src/UserActivityLogger.cpp +++ b/libraries/networking/src/UserActivityLogger.cpp @@ -38,10 +38,10 @@ void UserActivityLogger::logAction(QString action, QJsonObject details, JSONCall if (_disabled.get()) { return; } - + auto accountManager = DependencyManager::get(); QHttpMultiPart* multipart = new QHttpMultiPart(QHttpMultiPart::FormDataType); - + // Adding the action name QHttpPart actionPart; actionPart.setHeader(QNetworkRequest::ContentDispositionHeader, "form-data; name=\"action_name\""); @@ -53,7 +53,7 @@ void UserActivityLogger::logAction(QString action, QJsonObject details, JSONCall elapsedPart.setHeader(QNetworkRequest::ContentDispositionHeader, "form-data; name=\"elapsed_ms\""); elapsedPart.setBody(QString::number(_timer.elapsed()).toLocal8Bit()); multipart->append(elapsedPart); - + // If there are action details, add them to the multipart if (!details.isEmpty()) { QHttpPart detailsPart; @@ -62,13 +62,13 @@ void UserActivityLogger::logAction(QString action, QJsonObject details, JSONCall detailsPart.setBody(QJsonDocument(details).toJson(QJsonDocument::Compact)); multipart->append(detailsPart); } - + // if no callbacks specified, call our owns if (params.isEmpty()) { params.callbackReceiver = this; params.errorCallbackMethod = "requestError"; } - + accountManager->sendRequest(USER_ACTIVITY_URL, AccountManagerAuth::Optional, QNetworkAccessManager::PostOperation, @@ -88,7 +88,7 @@ void UserActivityLogger::launch(QString applicationVersion, bool previousSession actionDetails.insert(VERSION_KEY, applicationVersion); actionDetails.insert(CRASH_KEY, previousSessionCrashed); actionDetails.insert(RUNTIME_KEY, previousSessionRuntime); - + logAction(ACTION_NAME, actionDetails); } @@ -105,9 +105,9 @@ void UserActivityLogger::changedDisplayName(QString displayName) { const QString ACTION_NAME = "changed_display_name"; QJsonObject actionDetails; const QString DISPLAY_NAME = "display_name"; - + actionDetails.insert(DISPLAY_NAME, displayName); - + logAction(ACTION_NAME, actionDetails); } @@ -116,10 +116,10 @@ void UserActivityLogger::changedModel(QString typeOfModel, QString modelURL) { QJsonObject actionDetails; const QString TYPE_OF_MODEL = "type_of_model"; const QString MODEL_URL = "model_url"; - + actionDetails.insert(TYPE_OF_MODEL, typeOfModel); actionDetails.insert(MODEL_URL, modelURL); - + logAction(ACTION_NAME, actionDetails); } @@ -127,9 +127,9 @@ void UserActivityLogger::changedDomain(QString domainURL) { const QString ACTION_NAME = "changed_domain"; QJsonObject actionDetails; const QString DOMAIN_URL = "domain_url"; - + actionDetails.insert(DOMAIN_URL, domainURL); - + logAction(ACTION_NAME, actionDetails); } @@ -151,10 +151,10 @@ void UserActivityLogger::connectedDevice(QString typeOfDevice, QString deviceNam QJsonObject actionDetails; const QString TYPE_OF_DEVICE = "type_of_device"; const QString DEVICE_NAME = "device_name"; - + actionDetails.insert(TYPE_OF_DEVICE, typeOfDevice); actionDetails.insert(DEVICE_NAME, deviceName); - + logAction(ACTION_NAME, actionDetails); } @@ -163,9 +163,9 @@ void UserActivityLogger::loadedScript(QString scriptName) { const QString ACTION_NAME = "loaded_script"; QJsonObject actionDetails; const QString SCRIPT_NAME = "script_name"; - + actionDetails.insert(SCRIPT_NAME, scriptName); - + logAction(ACTION_NAME, actionDetails); } @@ -199,10 +199,10 @@ void UserActivityLogger::wentTo(AddressManager::LookupTrigger lookupTrigger, QSt const QString TRIGGER_TYPE_KEY = "trigger"; const QString DESTINATION_TYPE_KEY = "destination_type"; const QString DESTINATION_NAME_KEY = "detination_name"; - + actionDetails.insert(TRIGGER_TYPE_KEY, trigger); actionDetails.insert(DESTINATION_TYPE_KEY, destinationType); actionDetails.insert(DESTINATION_NAME_KEY, destinationName); - + logAction(ACTION_NAME, actionDetails); } From e7616c7d34d431abdd1fe0874c44c8cf35aaba43 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Mon, 10 Sep 2018 15:06:14 -0700 Subject: [PATCH 130/210] added logging + activity logging --- interface/resources/qml/LoginDialog.qml | 11 +++++---- .../qml/LoginDialog/LinkAccountBody.qml | 23 +++++++++++-------- .../qml/dialogs/TabletLoginDialog.qml | 2 +- .../resources/qml/windows/ModalFrame.qml | 1 + .../resources/qml/windows/ModalWindow.qml | 2 ++ interface/src/Application.cpp | 5 +++- interface/src/ui/LoginDialog.cpp | 5 ++++ interface/src/ui/LoginDialog.h | 5 ++++ 8 files changed, 37 insertions(+), 17 deletions(-) diff --git a/interface/resources/qml/LoginDialog.qml b/interface/resources/qml/LoginDialog.qml index d5db8f9fb1..6ad6cdf93d 100644 --- a/interface/resources/qml/LoginDialog.qml +++ b/interface/resources/qml/LoginDialog.qml @@ -86,10 +86,11 @@ ModalWindow { } } Component.onDestruction: { -/* var data = { - "action": "userOptedOut" - }; - UserActivityLogger.logAction("LoginDialogAction", data); */ - print("destroyed"); + if (closeButtonVisible && clickedCloseButton) { + var data = { + "action": "opted out" + }; + UserActivityLogger.logAction("encourageLoginDialog", data); + } } } diff --git a/interface/resources/qml/LoginDialog/LinkAccountBody.qml b/interface/resources/qml/LoginDialog/LinkAccountBody.qml index 6637a96fbb..d19837a023 100644 --- a/interface/resources/qml/LoginDialog/LinkAccountBody.qml +++ b/interface/resources/qml/LoginDialog/LinkAccountBody.qml @@ -195,22 +195,25 @@ Item { root.isPassword = true; } - Image { - id: showPasswordImage - x: parent.width - ((parent.height) * 31 / 23) - y: (parent.height - (parent.height * 16 / 23)) / 2 - width: parent.width - (parent.width - (((parent.height) * 31/23))) - height: parent.height * 16 / 23 - source: "../../images/eyeOpen.svg" - } - Rectangle { id: showPasswordHitbox z: 10 - x: parent.width - (parent.height * 31/16) + // x: parent.width - (parent.height * 31/16) + x: passwordField.width - ((passwordField.height) * 31 / 23) width: parent.width - (parent.width - (parent.height * 31/16)) + // width: passwordField.width - (passwordField.width - (((passwordField.height) * 31/23))) height: parent.height color: "transparent" + + Image { + id: showPasswordImage + // x: passwordField.width - ((passwordField.height) * 31 / 23) + y: (passwordField.height - (passwordField.height * 16 / 23)) / 2 + width: passwordField.width - (passwordField.width - (((passwordField.height) * 31/23))) + height: passwordField.height * 16 / 23 + source: "../../images/eyeOpen.svg" + } + MouseArea { id: passwordFieldMouseArea anchors.fill: parent diff --git a/interface/resources/qml/dialogs/TabletLoginDialog.qml b/interface/resources/qml/dialogs/TabletLoginDialog.qml index 3be4d8217d..c3889b6a30 100644 --- a/interface/resources/qml/dialogs/TabletLoginDialog.qml +++ b/interface/resources/qml/dialogs/TabletLoginDialog.qml @@ -173,7 +173,7 @@ TabletModalWindow { break } } - onDestroy: { + Component.onDestruction: { var data = { "action": "userOptedOut" }; diff --git a/interface/resources/qml/windows/ModalFrame.qml b/interface/resources/qml/windows/ModalFrame.qml index 820c04f500..cb23ccd5ad 100644 --- a/interface/resources/qml/windows/ModalFrame.qml +++ b/interface/resources/qml/windows/ModalFrame.qml @@ -110,6 +110,7 @@ Frame { glyph: hifi.glyphs.close size: 23 onClicked: { + window.clickedCloseButton = true; window.destroy(); } } diff --git a/interface/resources/qml/windows/ModalWindow.qml b/interface/resources/qml/windows/ModalWindow.qml index 75f5c2d646..ebd5293b0a 100644 --- a/interface/resources/qml/windows/ModalWindow.qml +++ b/interface/resources/qml/windows/ModalWindow.qml @@ -20,6 +20,8 @@ ScrollingWindow { frame: ModalFrame { } property bool closeButtonVisible: false + // only applicable for if close button is visible. + property bool clickedCloseButton: false property int colorScheme: hifi.colorSchemes.light property bool draggable: false diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 9a56a757dd..15545a0275 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -2308,8 +2308,11 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo connect(checkLoginTimer, &QTimer::timeout, this, []() { auto accountManager = DependencyManager::get(); auto dialogsManager = DependencyManager::get(); - if (!accountManager->isLoggedIn()) { + if (!accountManager->isLoggedIn() && !qApp->isHMDMode()) { dialogsManager->showLoginDialog(); + QJsonObject loginData = {}; + loginData["action"] = "login dialog shown"; + UserActivityLogger::getInstance().logAction("encourageLoginDialog", loginData); } }); checkLoginTimer->start(); diff --git a/interface/src/ui/LoginDialog.cpp b/interface/src/ui/LoginDialog.cpp index 8a40ee2f83..31a995c70b 100644 --- a/interface/src/ui/LoginDialog.cpp +++ b/interface/src/ui/LoginDialog.cpp @@ -28,6 +28,7 @@ #include "scripting/HMDScriptingInterface.h" HIFI_QML_DEF(LoginDialog) +Q_LOGGING_CATEGORY(login_dialog, "hifi.login.dialog") LoginDialog::LoginDialog(QQuickItem *parent) : OffscreenQmlDialog(parent) { auto accountManager = DependencyManager::get(); @@ -40,6 +41,10 @@ LoginDialog::LoginDialog(QQuickItem *parent) : OffscreenQmlDialog(parent) { } +LoginDialog::~LoginDialog() { + qCDebug(login_dialog) << "killing"; +} + void LoginDialog::showWithSelection() { auto tabletScriptingInterface = DependencyManager::get(); diff --git a/interface/src/ui/LoginDialog.h b/interface/src/ui/LoginDialog.h index ad8cab9699..210438b856 100644 --- a/interface/src/ui/LoginDialog.h +++ b/interface/src/ui/LoginDialog.h @@ -15,6 +15,9 @@ #define hifi_LoginDialog_h #include +#include + +Q_DECLARE_LOGGING_CATEGORY(login_dialog) class QNetworkReply; @@ -27,6 +30,8 @@ public: LoginDialog(QQuickItem* parent = nullptr); + virtual ~LoginDialog(); + static void showWithSelection(); signals: void handleLoginCompleted(); From dcacfdba7cd0d9d59b467b4b03bd5f3c60b9790a Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Mon, 10 Sep 2018 16:22:55 -0700 Subject: [PATCH 131/210] adding popup property to qml --- interface/src/Application.cpp | 3 +++ interface/src/Application.h | 2 ++ interface/src/ui/DialogsManager.cpp | 4 ++++ interface/src/ui/DialogsManager.h | 1 + interface/src/ui/LoginDialog.h | 6 ++++++ 5 files changed, 16 insertions(+) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 15545a0275..cdf19ea6ac 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -2301,6 +2301,8 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo AndroidHelper::instance().notifyLoadComplete(); #endif + connect(this, &Application::loginDialogPoppedUp, DependencyManager::get().data(), &DialogsManager::loginDialogPoppedUp); + static int CHECK_LOGIN_TIMER = 3000; QTimer* checkLoginTimer = new QTimer(this); checkLoginTimer->setInterval(CHECK_LOGIN_TIMER); @@ -2309,6 +2311,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo auto accountManager = DependencyManager::get(); auto dialogsManager = DependencyManager::get(); if (!accountManager->isLoggedIn() && !qApp->isHMDMode()) { + emit loginDialogPoppedUp(); dialogsManager->showLoginDialog(); QJsonObject loginData = {}; loginData["action"] = "login dialog shown"; diff --git a/interface/src/Application.h b/interface/src/Application.h index aa8323cd38..d661a74bcb 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -331,6 +331,8 @@ signals: void uploadRequest(QString path); + void loginDialogPoppedUp(); + public slots: QVector pasteEntities(float x, float y, float z); bool exportEntities(const QString& filename, const QVector& entityIDs, const glm::vec3* givenOffset = nullptr); diff --git a/interface/src/ui/DialogsManager.cpp b/interface/src/ui/DialogsManager.cpp index 83601a2797..960b099d22 100644 --- a/interface/src/ui/DialogsManager.cpp +++ b/interface/src/ui/DialogsManager.cpp @@ -117,6 +117,10 @@ void DialogsManager::showLoginDialog() { LoginDialog::showWithSelection(); } +void DialogsManager::loginDialogPoppedUp() { + LoginDialog::setLoginDialogPoppedUp(true); +} + void DialogsManager::showUpdateDialog() { UpdateDialog::show(); } diff --git a/interface/src/ui/DialogsManager.h b/interface/src/ui/DialogsManager.h index 0633dec573..9dc70d0cd0 100644 --- a/interface/src/ui/DialogsManager.h +++ b/interface/src/ui/DialogsManager.h @@ -48,6 +48,7 @@ public slots: void setDomainConnectionFailureVisibility(bool visible); void toggleLoginDialog(); void showLoginDialog(); + void loginDialogPoppedUp(); void octreeStatsDetails(); void lodTools(); void hmdTools(bool showTools); diff --git a/interface/src/ui/LoginDialog.h b/interface/src/ui/LoginDialog.h index 210438b856..f9580d0bfe 100644 --- a/interface/src/ui/LoginDialog.h +++ b/interface/src/ui/LoginDialog.h @@ -23,6 +23,7 @@ class QNetworkReply; class LoginDialog : public OffscreenQmlDialog { Q_OBJECT + Q_PROPERTY(bool poppedUp READ getLoginDialogPoppedUp) HIFI_QML_DECL public: @@ -33,6 +34,9 @@ public: virtual ~LoginDialog(); static void showWithSelection(); + + bool getLoginDialogPoppedUp() { return _poppedUp; } + void setLoginDialogPoppedUp(bool poppedUp) { _poppedUp = poppedUp; } signals: void handleLoginCompleted(); void handleLoginFailed(); @@ -68,6 +72,8 @@ protected slots: Q_INVOKABLE void openUrl(const QString& url) const; +private: + bool _poppedUp {false}; }; #endif // hifi_LoginDialog_h From de5a0a714b84ce4348fcbcb9298ff95d5a806c88 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Mon, 10 Sep 2018 16:25:17 -0700 Subject: [PATCH 132/210] handle unable to connect to domain case --- interface/src/Application.h | 2 +- interface/src/ConnectionMonitor.cpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/interface/src/Application.h b/interface/src/Application.h index c82dae3b05..f1452080cb 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -346,6 +346,7 @@ public slots: bool importEntities(const QString& url); void updateThreadPoolCount() const; void updateSystemTabletMode(); + void goToErrorDomainURL(QUrl errorDomainURL); Q_INVOKABLE void loadDialog(); Q_INVOKABLE void loadScriptURLDialog() const; @@ -474,7 +475,6 @@ private slots: void setSessionUUID(const QUuid& sessionUUID) const; void domainURLChanged(QUrl domainURL); - void goToErrorDomainURL(QUrl errorDomainURL); void updateWindowTitle() const; void nodeAdded(SharedNodePointer node) const; void nodeActivated(SharedNodePointer node); diff --git a/interface/src/ConnectionMonitor.cpp b/interface/src/ConnectionMonitor.cpp index 7d535d9eaf..8463539bac 100644 --- a/interface/src/ConnectionMonitor.cpp +++ b/interface/src/ConnectionMonitor.cpp @@ -11,6 +11,7 @@ #include "ConnectionMonitor.h" +#include "Application.h" #include "ui/DialogsManager.h" #include @@ -21,6 +22,7 @@ // should be longer to allow the application to initialize. static const int ON_INITIAL_LOAD_DISPLAY_AFTER_DISCONNECTED_FOR_X_MS = 10000; static const int DISPLAY_AFTER_DISCONNECTED_FOR_X_MS = 5000; +static const QString ERROR_DOMAIN_URL = "file:///~/serverless/redirect.json"; void ConnectionMonitor::init() { // Connect to domain disconnected message @@ -38,7 +40,7 @@ void ConnectionMonitor::init() { connect(&_timer, &QTimer::timeout, this, []() { qDebug() << "ConnectionMonitor: Showing connection failure window"; - //DependencyManager::get()->setDomainConnectionFailureVisibility(true); + qApp->goToErrorDomainURL(ERROR_DOMAIN_URL); }); } @@ -48,5 +50,4 @@ void ConnectionMonitor::startTimer() { void ConnectionMonitor::stopTimer() { _timer.stop(); - //DependencyManager::get()->setDomainConnectionFailureVisibility(false); } From e5a87aa58cac66a5f8d8c834a6d2e3d08a45a058 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Mon, 10 Sep 2018 16:56:13 -0700 Subject: [PATCH 133/210] removing unused variables --- interface/src/Application.cpp | 2 -- interface/src/ConnectionMonitor.cpp | 2 -- libraries/networking/src/AddressManager.cpp | 2 -- 3 files changed, 6 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index de0aea3bc2..c20622f8f3 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -6421,7 +6421,6 @@ void Application::clearDomainAvatars() { void Application::domainURLChanged(QUrl domainURL) { // disable physics until we have enough information about our new location to not cause craziness. resetPhysicsReadyInformation(); - auto urlStr = domainURL.toString().toStdString(); setIsServerlessMode(domainURL.scheme() != URL_SCHEME_HIFI); if (isServerlessMode()) { loadServerlessDomain(domainURL); @@ -6432,7 +6431,6 @@ void Application::domainURLChanged(QUrl domainURL) { void Application::goToErrorDomainURL(QUrl errorDomainURL) { // disable physics until we have enough information about our new location to not cause craziness. resetPhysicsReadyInformation(); - auto urlStr = errorDomainURL.toString().toStdString(); setIsServerlessMode(errorDomainURL.scheme() != URL_SCHEME_HIFI); if (isServerlessMode()) { loadServerlessDomain(errorDomainURL, true); diff --git a/interface/src/ConnectionMonitor.cpp b/interface/src/ConnectionMonitor.cpp index 7d535d9eaf..2407e1bfdf 100644 --- a/interface/src/ConnectionMonitor.cpp +++ b/interface/src/ConnectionMonitor.cpp @@ -38,7 +38,6 @@ void ConnectionMonitor::init() { connect(&_timer, &QTimer::timeout, this, []() { qDebug() << "ConnectionMonitor: Showing connection failure window"; - //DependencyManager::get()->setDomainConnectionFailureVisibility(true); }); } @@ -48,5 +47,4 @@ void ConnectionMonitor::startTimer() { void ConnectionMonitor::stopTimer() { _timer.stop(); - //DependencyManager::get()->setDomainConnectionFailureVisibility(false); } diff --git a/libraries/networking/src/AddressManager.cpp b/libraries/networking/src/AddressManager.cpp index 6ebd516063..1244cd8828 100644 --- a/libraries/networking/src/AddressManager.cpp +++ b/libraries/networking/src/AddressManager.cpp @@ -48,7 +48,6 @@ QString AddressManager::getProtocol() const { QUrl AddressManager::currentAddress(bool domainOnly) const { QUrl hifiURL = _domainURL; - auto urlStr = hifiURL.toString().toStdString(); if (!domainOnly && hifiURL.scheme() == URL_SCHEME_HIFI) { hifiURL.setPath(currentPath()); @@ -156,7 +155,6 @@ void AddressManager::goForward() { void AddressManager::goToLastAddress() { // this should always return something as long as the URL isn't empty. - auto urlStr = _lastVisitedURL.toString().toStdString(); handleUrl(_lastVisitedURL, LookupTrigger::AttemptedRefresh); } From a50e55b83aa0a22513daa04c22faf363ea7bc8a3 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Mon, 10 Sep 2018 11:10:08 -0700 Subject: [PATCH 134/210] use more efficient iterate and clear for removal --- libraries/avatars/src/AvatarHashMap.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/avatars/src/AvatarHashMap.cpp b/libraries/avatars/src/AvatarHashMap.cpp index 0c5ca06989..f0669fbd30 100644 --- a/libraries/avatars/src/AvatarHashMap.cpp +++ b/libraries/avatars/src/AvatarHashMap.cpp @@ -436,9 +436,9 @@ void AvatarHashMap::sessionUUIDChanged(const QUuid& sessionUUID, const QUuid& ol void AvatarHashMap::clearOtherAvatars() { QWriteLocker locker(&_hashLock); - AvatarHash::iterator avatarIterator = _avatarHash.begin(); - while (avatarIterator != _avatarHash.end()) { - handleRemovedAvatar(*avatarIterator); - avatarIterator = _avatarHash.erase(avatarIterator); + for (auto& av : _avatarHash) { + handleRemovedAvatar(av); } + + _avatarHash.clear(); } From 2381d6bc027534dfab5fd560463c77fc0dac5f99 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Mon, 10 Sep 2018 17:07:49 -0700 Subject: [PATCH 135/210] using `REDIRECT_HIFI_ADDRESS` recycling existing, defined variable for error redirection --- interface/src/ConnectionMonitor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/interface/src/ConnectionMonitor.cpp b/interface/src/ConnectionMonitor.cpp index 8463539bac..6578abf285 100644 --- a/interface/src/ConnectionMonitor.cpp +++ b/interface/src/ConnectionMonitor.cpp @@ -16,6 +16,7 @@ #include #include +#include #include // Because the connection monitor is created at startup, the time we wait on initial load @@ -40,7 +41,7 @@ void ConnectionMonitor::init() { connect(&_timer, &QTimer::timeout, this, []() { qDebug() << "ConnectionMonitor: Showing connection failure window"; - qApp->goToErrorDomainURL(ERROR_DOMAIN_URL); + qApp->goToErrorDomainURL(REDIRECT_HIFI_ADDRESS); }); } From c194c236f10c9201ee1c2def76294d0e84e0d6b9 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Mon, 10 Sep 2018 17:10:13 -0700 Subject: [PATCH 136/210] adding inlines --- interface/src/Application.cpp | 4 ---- interface/src/Application.h | 2 +- interface/src/octree/OctreePacketProcessor.cpp | 10 +--------- interface/src/octree/OctreePacketProcessor.h | 4 ++-- libraries/networking/src/AddressManager.cpp | 4 ++-- libraries/networking/src/AddressManager.h | 1 - 6 files changed, 6 insertions(+), 19 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index c20622f8f3..296df7ccb0 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -3493,10 +3493,6 @@ bool Application::isServerlessMode() const { return false; } -bool Application::isInterstitialMode() const { - return _interstitialMode; -} - void Application::setIsInterstitialMode(bool interstitialMode) { if (_interstitialMode != interstitialMode) { _interstitialMode = interstitialMode; diff --git a/interface/src/Application.h b/interface/src/Application.h index c82dae3b05..de02b7f140 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -310,7 +310,7 @@ public: void saveNextPhysicsStats(QString filename); bool isServerlessMode() const; - bool isInterstitialMode() const; + bool isInterstitialMode() const { return _interstitialMode; } void replaceDomainContent(const QString& url); diff --git a/interface/src/octree/OctreePacketProcessor.cpp b/interface/src/octree/OctreePacketProcessor.cpp index e670153a77..a456958108 100644 --- a/interface/src/octree/OctreePacketProcessor.cpp +++ b/interface/src/octree/OctreePacketProcessor.cpp @@ -136,12 +136,4 @@ void OctreePacketProcessor::startEntitySequence() { bool OctreePacketProcessor::isLoadSequenceComplete() const { return _safeLanding->isLoadSequenceComplete(); -} - -bool OctreePacketProcessor::isEntitiesRenderReady() const { - return _safeLanding->entitiesRenderReady(); -} - -float OctreePacketProcessor::domainLoadingProgress() { - return _safeLanding->loadingProgressPercentage(); -} +} \ No newline at end of file diff --git a/interface/src/octree/OctreePacketProcessor.h b/interface/src/octree/OctreePacketProcessor.h index 71e22bf240..3aa23c49f3 100644 --- a/interface/src/octree/OctreePacketProcessor.h +++ b/interface/src/octree/OctreePacketProcessor.h @@ -27,8 +27,8 @@ public: void startEntitySequence(); bool isLoadSequenceComplete() const; - bool isEntitiesRenderReady() const; - float domainLoadingProgress(); + bool isEntitiesRenderReady() const { return _safeLanding->entitiesRenderReady(); } + float domainLoadingProgress() { return _safeLanding->loadingProgressPercentage(); } signals: void packetVersionMismatch(); diff --git a/libraries/networking/src/AddressManager.cpp b/libraries/networking/src/AddressManager.cpp index 1244cd8828..824e0d4515 100644 --- a/libraries/networking/src/AddressManager.cpp +++ b/libraries/networking/src/AddressManager.cpp @@ -48,7 +48,6 @@ QString AddressManager::getProtocol() const { QUrl AddressManager::currentAddress(bool domainOnly) const { QUrl hifiURL = _domainURL; - if (!domainOnly && hifiURL.scheme() == URL_SCHEME_HIFI) { hifiURL.setPath(currentPath()); } @@ -155,7 +154,8 @@ void AddressManager::goForward() { void AddressManager::goToLastAddress() { // this should always return something as long as the URL isn't empty. - handleUrl(_lastVisitedURL, LookupTrigger::AttemptedRefresh); + handleUrl(_lastVisitedURL, + LookupTrigger::AttemptedRefresh); } void AddressManager::storeCurrentAddress() { diff --git a/libraries/networking/src/AddressManager.h b/libraries/networking/src/AddressManager.h index 7226e92451..e27504fc3a 100644 --- a/libraries/networking/src/AddressManager.h +++ b/libraries/networking/src/AddressManager.h @@ -149,7 +149,6 @@ public: UserInput, Back, Forward, - //Retry, StartupFromSettings, DomainPathResponse, Internal, From 9628615c441c8987dddb50c91dccc01b1ba7ff40 Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Mon, 10 Sep 2018 17:16:16 -0700 Subject: [PATCH 137/210] Fix bandwidth quota calculation now we're dropping excess --- .../src/avatars/AvatarMixerSlave.cpp | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/assignment-client/src/avatars/AvatarMixerSlave.cpp b/assignment-client/src/avatars/AvatarMixerSlave.cpp index 8b69479a4e..7368db0c31 100644 --- a/assignment-client/src/avatars/AvatarMixerSlave.cpp +++ b/assignment-client/src/avatars/AvatarMixerSlave.cpp @@ -258,8 +258,6 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) // max number of avatarBytes per frame int maxAvatarBytesPerFrame = int(_maxKbpsPerNode * BYTES_PER_KILOBIT / AVATAR_MIXER_BROADCAST_FRAMES_PER_SECOND); - // FIXME - find a way to not send the sessionID for every avatar - int minimumBytesPerAvatar = AvatarDataPacket::AVATAR_HAS_FLAGS_SIZE + NUM_BYTES_RFC4122_UUID; // keep track of the number of other avatars held back in this frame int numAvatarsHeldBack = 0; @@ -274,14 +272,13 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) // When this is true, the AvatarMixer will send Avatar data to a client about avatars that have ignored them bool getsAnyIgnored = PALIsOpen && destinationNode->getCanKick(); - if (PALIsOpen) { - // Increase minimumBytesPerAvatar if the PAL is open - minimumBytesPerAvatar += sizeof(AvatarDataPacket::AvatarGlobalPosition) + - sizeof(AvatarDataPacket::AudioLoudness); - } + // Bandwidth allowance for data that must be sent. + int minimumBytesPerAvatar = PALIsOpen ? AvatarDataPacket::AVATAR_HAS_FLAGS_SIZE + NUM_BYTES_RFC4122_UUID + + sizeof(AvatarDataPacket::AvatarGlobalPosition) + sizeof(AvatarDataPacket::AudioLoudness) : 0; // setup a PacketList for the avatarPackets auto avatarPacketList = NLPacketList::create(PacketType::BulkAvatarData); + static auto maxAvatarDataBytes = avatarPacketList->getMaxSegmentSize() - NUM_BYTES_RFC4122_UUID; // compute node bounding box const float MY_AVATAR_BUBBLE_EXPANSION_FACTOR = 4.0f; // magic number determined emperically @@ -401,19 +398,18 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) int remainingAvatars = (int)sortedAvatars.size(); auto traitsPacketList = NLPacketList::create(PacketType::BulkAvatarTraits, QByteArray(), true, true); + const auto& sortedAvatarVector = sortedAvatars.getSortedVector(); for (const auto& sortedAvatar : sortedAvatarVector) { const Node* otherNode = sortedAvatar.getNode(); auto lastEncodeForOther = sortedAvatar.getTimestamp(); - remainingAvatars--; assert(otherNode); // we can't have gotten here without the avatarData being a valid key in the map AvatarData::AvatarDataDetail detail = AvatarData::NoData; - // NOTE: Here's where we determine if we are over budget and drop to bare minimum data - // If we're going to just drop the over-budget avatars entirely the decision should - // just use numAvatarDataBytes, not minimRemainingAvatarBytes. + // NOTE: Here's where we determine if we are over budget and drop remaining avatars, + // or send minimal avatar data in uncommon case of PALIsOpen. int minimRemainingAvatarBytes = minimumBytesPerAvatar * remainingAvatars; bool overBudget = (identityBytesSent + numAvatarDataBytes + minimRemainingAvatarBytes) > maxAvatarBytesPerFrame; if (overBudget) { @@ -472,7 +468,6 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) _stats.toByteArrayElapsedTime += (quint64) chrono::duration_cast(endSerialize - startSerialize).count(); - static auto maxAvatarDataBytes = avatarPacketList->getMaxSegmentSize() - NUM_BYTES_RFC4122_UUID; if (bytes.size() > maxAvatarDataBytes) { qCWarning(avatars) << "otherAvatar.toByteArray() for" << otherNode->getUUID() << "resulted in very large buffer of" << bytes.size() << "bytes - dropping facial data"; From fa3097225bfb87d16638b2700bdbf9fce6c281de Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Mon, 10 Sep 2018 17:33:32 -0700 Subject: [PATCH 138/210] removing inlines - not allowed for unique_ptr --- interface/src/octree/OctreePacketProcessor.cpp | 10 +++++++++- interface/src/octree/OctreePacketProcessor.h | 4 ++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/interface/src/octree/OctreePacketProcessor.cpp b/interface/src/octree/OctreePacketProcessor.cpp index a456958108..e670153a77 100644 --- a/interface/src/octree/OctreePacketProcessor.cpp +++ b/interface/src/octree/OctreePacketProcessor.cpp @@ -136,4 +136,12 @@ void OctreePacketProcessor::startEntitySequence() { bool OctreePacketProcessor::isLoadSequenceComplete() const { return _safeLanding->isLoadSequenceComplete(); -} \ No newline at end of file +} + +bool OctreePacketProcessor::isEntitiesRenderReady() const { + return _safeLanding->entitiesRenderReady(); +} + +float OctreePacketProcessor::domainLoadingProgress() { + return _safeLanding->loadingProgressPercentage(); +} diff --git a/interface/src/octree/OctreePacketProcessor.h b/interface/src/octree/OctreePacketProcessor.h index 3aa23c49f3..71e22bf240 100644 --- a/interface/src/octree/OctreePacketProcessor.h +++ b/interface/src/octree/OctreePacketProcessor.h @@ -27,8 +27,8 @@ public: void startEntitySequence(); bool isLoadSequenceComplete() const; - bool isEntitiesRenderReady() const { return _safeLanding->entitiesRenderReady(); } - float domainLoadingProgress() { return _safeLanding->loadingProgressPercentage(); } + bool isEntitiesRenderReady() const; + float domainLoadingProgress(); signals: void packetVersionMismatch(); From 28c3afca9dd59390544d3be34e40eb69ba2289c0 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Mon, 10 Sep 2018 17:40:35 -0700 Subject: [PATCH 139/210] adding back inlines --- interface/src/octree/OctreePacketProcessor.cpp | 15 +-------------- interface/src/octree/OctreePacketProcessor.h | 11 +++++------ 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/interface/src/octree/OctreePacketProcessor.cpp b/interface/src/octree/OctreePacketProcessor.cpp index e670153a77..790cd235d8 100644 --- a/interface/src/octree/OctreePacketProcessor.cpp +++ b/interface/src/octree/OctreePacketProcessor.cpp @@ -16,7 +16,6 @@ #include "Application.h" #include "Menu.h" #include "SceneScriptingInterface.h" -#include "SafeLanding.h" OctreePacketProcessor::OctreePacketProcessor(): _safeLanding(new SafeLanding()) @@ -132,16 +131,4 @@ void OctreePacketProcessor::processPacket(QSharedPointer messag void OctreePacketProcessor::startEntitySequence() { _safeLanding->startEntitySequence(qApp->getEntities()); -} - -bool OctreePacketProcessor::isLoadSequenceComplete() const { - return _safeLanding->isLoadSequenceComplete(); -} - -bool OctreePacketProcessor::isEntitiesRenderReady() const { - return _safeLanding->entitiesRenderReady(); -} - -float OctreePacketProcessor::domainLoadingProgress() { - return _safeLanding->loadingProgressPercentage(); -} +} \ No newline at end of file diff --git a/interface/src/octree/OctreePacketProcessor.h b/interface/src/octree/OctreePacketProcessor.h index 71e22bf240..627bf9b66a 100644 --- a/interface/src/octree/OctreePacketProcessor.h +++ b/interface/src/octree/OctreePacketProcessor.h @@ -15,7 +15,7 @@ #include #include -class SafeLanding; +#include "SafeLanding.h" /// Handles processing of incoming voxel packets for the interface application. As with other ReceivedPacketProcessor classes /// the user is responsible for reading inbound packets and adding them to the processing queue by calling queueReceivedPacket() @@ -26,10 +26,9 @@ public: ~OctreePacketProcessor(); void startEntitySequence(); - bool isLoadSequenceComplete() const; - bool isEntitiesRenderReady() const; - float domainLoadingProgress(); - + bool isLoadSequenceComplete() const { return _safeLanding->isLoadSequenceComplete(); } + bool isEntitiesRenderReady() const { return _safeLanding->entitiesRenderReady(); } + float domainLoadingProgress() { return _safeLanding->loadingProgressPercentage(); } signals: void packetVersionMismatch(); @@ -42,4 +41,4 @@ private slots: private: std::unique_ptr _safeLanding; }; -#endif // hifi_OctreePacketProcessor_h +#endif // hifi_OctreePacketProcessor_h From 5ece8d8707f65f02896944c570295c6d0652840b Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Mon, 10 Sep 2018 18:32:21 -0700 Subject: [PATCH 140/210] using different paradigm for checking login dialog popup --- interface/resources/qml/LoginDialog.qml | 3 ++- interface/src/Application.cpp | 12 ++++++++---- interface/src/ui/DialogsManager.cpp | 4 ---- interface/src/ui/DialogsManager.h | 1 - interface/src/ui/LoginDialog.cpp | 13 +++++++++++-- interface/src/ui/LoginDialog.h | 3 --- 6 files changed, 21 insertions(+), 15 deletions(-) diff --git a/interface/resources/qml/LoginDialog.qml b/interface/resources/qml/LoginDialog.qml index 6ad6cdf93d..227fce3454 100644 --- a/interface/resources/qml/LoginDialog.qml +++ b/interface/resources/qml/LoginDialog.qml @@ -86,11 +86,12 @@ ModalWindow { } } Component.onDestruction: { - if (closeButtonVisible && clickedCloseButton) { + if (closeButtonVisible && clickedCloseButton && Settings.getValue("loginDialogPoppedUp", false)) { var data = { "action": "opted out" }; UserActivityLogger.logAction("encourageLoginDialog", data); } + Settings.setValue("loginDialogPoppedUp", false); } } diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index cdf19ea6ac..7f437e273c 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -2301,23 +2301,24 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo AndroidHelper::instance().notifyLoadComplete(); #endif - connect(this, &Application::loginDialogPoppedUp, DependencyManager::get().data(), &DialogsManager::loginDialogPoppedUp); - static int CHECK_LOGIN_TIMER = 3000; QTimer* checkLoginTimer = new QTimer(this); checkLoginTimer->setInterval(CHECK_LOGIN_TIMER); checkLoginTimer->setSingleShot(true); - connect(checkLoginTimer, &QTimer::timeout, this, []() { + connect(checkLoginTimer, &QTimer::timeout, this, [this]() { auto accountManager = DependencyManager::get(); auto dialogsManager = DependencyManager::get(); if (!accountManager->isLoggedIn() && !qApp->isHMDMode()) { - emit loginDialogPoppedUp(); + Settings settings; + settings.setValue("loginDialogPoppedUp", true); dialogsManager->showLoginDialog(); QJsonObject loginData = {}; loginData["action"] = "login dialog shown"; UserActivityLogger::getInstance().logAction("encourageLoginDialog", loginData); } }); + Settings settings; + settings.setValue("loginDialogPoppedUp", false); checkLoginTimer->start(); } @@ -4948,6 +4949,9 @@ void Application::loadSettings() { } void Application::saveSettings() const { + Settings settings; + settings.setValue("loginDialogPoppedUp", false); + sessionRunTime.set(_sessionRunTimer.elapsed() / MSECS_PER_SECOND); DependencyManager::get()->saveSettings(); DependencyManager::get()->saveSettings(); diff --git a/interface/src/ui/DialogsManager.cpp b/interface/src/ui/DialogsManager.cpp index 960b099d22..83601a2797 100644 --- a/interface/src/ui/DialogsManager.cpp +++ b/interface/src/ui/DialogsManager.cpp @@ -117,10 +117,6 @@ void DialogsManager::showLoginDialog() { LoginDialog::showWithSelection(); } -void DialogsManager::loginDialogPoppedUp() { - LoginDialog::setLoginDialogPoppedUp(true); -} - void DialogsManager::showUpdateDialog() { UpdateDialog::show(); } diff --git a/interface/src/ui/DialogsManager.h b/interface/src/ui/DialogsManager.h index 9dc70d0cd0..0633dec573 100644 --- a/interface/src/ui/DialogsManager.h +++ b/interface/src/ui/DialogsManager.h @@ -48,7 +48,6 @@ public slots: void setDomainConnectionFailureVisibility(bool visible); void toggleLoginDialog(); void showLoginDialog(); - void loginDialogPoppedUp(); void octreeStatsDetails(); void lodTools(); void hmdTools(bool showTools); diff --git a/interface/src/ui/LoginDialog.cpp b/interface/src/ui/LoginDialog.cpp index 31a995c70b..6d94e1419b 100644 --- a/interface/src/ui/LoginDialog.cpp +++ b/interface/src/ui/LoginDialog.cpp @@ -20,6 +20,8 @@ #include #include +#include + #include "AccountManager.h" #include "DependencyManager.h" #include "Menu.h" @@ -38,11 +40,18 @@ LoginDialog::LoginDialog(QQuickItem *parent) : OffscreenQmlDialog(parent) { connect(accountManager.data(), &AccountManager::loginFailed, this, &LoginDialog::handleLoginFailed); #endif - } LoginDialog::~LoginDialog() { - qCDebug(login_dialog) << "killing"; + Settings settings; + Setting::Handle loginDialogPoppedUp{ "loginDialogPoppedUp", false }; + auto poppedUp = loginDialogPoppedUp.get(); + if (poppedUp) { + QJsonObject data; + data["action"] = "user opted out"; + UserActivityLogger::getInstance().logAction("encourageLoginDialog", data); + } + settings.setValue("loginDialogPoppedUp", false); } void LoginDialog::showWithSelection() diff --git a/interface/src/ui/LoginDialog.h b/interface/src/ui/LoginDialog.h index f9580d0bfe..155970e33d 100644 --- a/interface/src/ui/LoginDialog.h +++ b/interface/src/ui/LoginDialog.h @@ -23,7 +23,6 @@ class QNetworkReply; class LoginDialog : public OffscreenQmlDialog { Q_OBJECT - Q_PROPERTY(bool poppedUp READ getLoginDialogPoppedUp) HIFI_QML_DECL public: @@ -35,8 +34,6 @@ public: static void showWithSelection(); - bool getLoginDialogPoppedUp() { return _poppedUp; } - void setLoginDialogPoppedUp(bool poppedUp) { _poppedUp = poppedUp; } signals: void handleLoginCompleted(); void handleLoginFailed(); From 5e76a0c6d74ef89ca219ec9794a0bfd8828850ec Mon Sep 17 00:00:00 2001 From: Sam Gateau Date: Mon, 10 Sep 2018 22:55:12 -0700 Subject: [PATCH 141/210] changing the cpu timer of the batch to std::chrono instead of using gl cpu time stamp --- libraries/gpu-gl-common/src/gpu/gl/GLBackendQuery.cpp | 10 ++++++---- libraries/gpu-gl-common/src/gpu/gl/GLQuery.h | 3 ++- libraries/gpu-gl/src/gpu/gl45/GL45BackendBuffer.cpp | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/libraries/gpu-gl-common/src/gpu/gl/GLBackendQuery.cpp b/libraries/gpu-gl-common/src/gpu/gl/GLBackendQuery.cpp index b64804fe7c..a448fceffe 100644 --- a/libraries/gpu-gl-common/src/gpu/gl/GLBackendQuery.cpp +++ b/libraries/gpu-gl-common/src/gpu/gl/GLBackendQuery.cpp @@ -32,7 +32,8 @@ void GLBackend::do_beginQuery(const Batch& batch, size_t paramOffset) { PROFILE_RANGE_BEGIN(render_gpu_gl_detail, glquery->_profileRangeId, query->getName().c_str(), 0xFFFF7F00); ++_queryStage._rangeQueryDepth; - glGetInteger64v(GL_TIMESTAMP, (GLint64*)&glquery->_batchElapsedTime); + glquery->_batchElapsedTimeBegin = std::chrono::high_resolution_clock::now(); + // glGetInteger64v(GL_TIMESTAMP, (GLint64*)&glquery->_batchElapsedTime); if (timeElapsed) { if (_queryStage._rangeQueryDepth <= MAX_RANGE_QUERY_DEPTH) { @@ -61,9 +62,10 @@ void GLBackend::do_endQuery(const Batch& batch, size_t paramOffset) { } --_queryStage._rangeQueryDepth; - GLint64 now; - glGetInteger64v(GL_TIMESTAMP, &now); - glquery->_batchElapsedTime = now - glquery->_batchElapsedTime; + // GLint64 now; + // glGetInteger64v(GL_TIMESTAMP, &now); + auto duration_ns = (std::chrono::high_resolution_clock::now() - glquery->_batchElapsedTimeBegin); + glquery->_batchElapsedTime = duration_ns.count(); PROFILE_RANGE_END(render_gpu_gl_detail, glquery->_profileRangeId); diff --git a/libraries/gpu-gl-common/src/gpu/gl/GLQuery.h b/libraries/gpu-gl-common/src/gpu/gl/GLQuery.h index 23b1f38621..18d79d5896 100644 --- a/libraries/gpu-gl-common/src/gpu/gl/GLQuery.h +++ b/libraries/gpu-gl-common/src/gpu/gl/GLQuery.h @@ -48,7 +48,8 @@ public: const GLuint& _endqo = { _id }; const GLuint _beginqo = { 0 }; GLuint64 _result { (GLuint64)-1 }; - GLuint64 _batchElapsedTime { (GLuint64) 0 }; + GLuint64 _batchElapsedTime{ (GLuint64)0 }; + std::chrono::high_resolution_clock::time_point _batchElapsedTimeBegin; uint64_t _profileRangeId { 0 }; uint32_t _rangeQueryDepth { 0 }; diff --git a/libraries/gpu-gl/src/gpu/gl45/GL45BackendBuffer.cpp b/libraries/gpu-gl/src/gpu/gl45/GL45BackendBuffer.cpp index 6d17923ebd..d271f79b92 100644 --- a/libraries/gpu-gl/src/gpu/gl45/GL45BackendBuffer.cpp +++ b/libraries/gpu-gl/src/gpu/gl45/GL45BackendBuffer.cpp @@ -52,7 +52,7 @@ GLuint GL45Backend::getBufferID(const Buffer& buffer) { } GLuint GL45Backend::getBufferIDUnsynced(const Buffer& buffer) { - return GL45Buffer::getIdUnsynced(*this, buffer); + return GLBuffer::getIdUnsynced(*this, buffer); } GLBuffer* GL45Backend::syncGPUObject(const Buffer& buffer) { From 69ae475787ded665abe60b820f7c1648e9e4d070 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Mon, 10 Sep 2018 23:04:50 -0700 Subject: [PATCH 142/210] adding user activity logging --- interface/resources/qml/LoginDialog.qml | 9 --------- .../resources/qml/LoginDialog/LinkAccountBody.qml | 12 ++++++++++++ interface/src/Application.cpp | 11 ++++------- interface/src/ui/LoginDialog.cpp | 3 +-- 4 files changed, 17 insertions(+), 18 deletions(-) diff --git a/interface/resources/qml/LoginDialog.qml b/interface/resources/qml/LoginDialog.qml index 227fce3454..336858502d 100644 --- a/interface/resources/qml/LoginDialog.qml +++ b/interface/resources/qml/LoginDialog.qml @@ -85,13 +85,4 @@ ModalWindow { break } } - Component.onDestruction: { - if (closeButtonVisible && clickedCloseButton && Settings.getValue("loginDialogPoppedUp", false)) { - var data = { - "action": "opted out" - }; - UserActivityLogger.logAction("encourageLoginDialog", data); - } - Settings.setValue("loginDialogPoppedUp", false); - } } diff --git a/interface/resources/qml/LoginDialog/LinkAccountBody.qml b/interface/resources/qml/LoginDialog/LinkAccountBody.qml index d19837a023..f7216584e0 100644 --- a/interface/resources/qml/LoginDialog/LinkAccountBody.qml +++ b/interface/resources/qml/LoginDialog/LinkAccountBody.qml @@ -350,11 +350,23 @@ Item { bodyLoader.item.width = root.pane.width bodyLoader.item.height = root.pane.height } + if (Settings.getValue("loginDialogPoppedUp", false)) { + var data = { + "action": "user logged in" + }; + UserActivityLogger.logAction("encourageLoginDialog", data); + } } onHandleLoginFailed: { console.log("Login Failed") mainTextContainer.visible = true toggleLoading(false) + if (Settings.getValue("loginDialogPoppedUp", false)) { + var data = { + "action": "user failed logging in" + }; + UserActivityLogger.logAction("encourageLoginDialog", data); + } } onHandleLinkCompleted: { console.log("Link Succeeded") diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 7f437e273c..de788de99f 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -2309,16 +2309,14 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo auto accountManager = DependencyManager::get(); auto dialogsManager = DependencyManager::get(); if (!accountManager->isLoggedIn() && !qApp->isHMDMode()) { - Settings settings; - settings.setValue("loginDialogPoppedUp", true); + Setting::Handle{"loginDialogPoppedUp", false}.set(true); dialogsManager->showLoginDialog(); QJsonObject loginData = {}; loginData["action"] = "login dialog shown"; UserActivityLogger::getInstance().logAction("encourageLoginDialog", loginData); } }); - Settings settings; - settings.setValue("loginDialogPoppedUp", false); + Setting::Handle{"loginDialogPoppedUp", false}.set(false); checkLoginTimer->start(); } @@ -2453,6 +2451,8 @@ void Application::onAboutToQuit() { // so its persisted explicitly here Setting::Handle{ ACTIVE_DISPLAY_PLUGIN_SETTING_NAME }.set(getActiveDisplayPlugin()->getName()); + Setting::Handle{"loginDialogPoppedUp", false}.set(false); + getActiveDisplayPlugin()->deactivate(); if (_autoSwitchDisplayModeSupportedHMDPlugin && _autoSwitchDisplayModeSupportedHMDPlugin->isSessionActive()) { @@ -4949,9 +4949,6 @@ void Application::loadSettings() { } void Application::saveSettings() const { - Settings settings; - settings.setValue("loginDialogPoppedUp", false); - sessionRunTime.set(_sessionRunTimer.elapsed() / MSECS_PER_SECOND); DependencyManager::get()->saveSettings(); DependencyManager::get()->saveSettings(); diff --git a/interface/src/ui/LoginDialog.cpp b/interface/src/ui/LoginDialog.cpp index 6d94e1419b..5116c2a92c 100644 --- a/interface/src/ui/LoginDialog.cpp +++ b/interface/src/ui/LoginDialog.cpp @@ -43,7 +43,6 @@ LoginDialog::LoginDialog(QQuickItem *parent) : OffscreenQmlDialog(parent) { } LoginDialog::~LoginDialog() { - Settings settings; Setting::Handle loginDialogPoppedUp{ "loginDialogPoppedUp", false }; auto poppedUp = loginDialogPoppedUp.get(); if (poppedUp) { @@ -51,7 +50,7 @@ LoginDialog::~LoginDialog() { data["action"] = "user opted out"; UserActivityLogger::getInstance().logAction("encourageLoginDialog", data); } - settings.setValue("loginDialogPoppedUp", false); + loginDialogPoppedUp.set(false); } void LoginDialog::showWithSelection() From 030ee13f319e8123bb7069ddfcd4a0f02b9ddd58 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Mon, 10 Sep 2018 23:05:31 -0700 Subject: [PATCH 143/210] removing logging from tabletlogindialog --- interface/resources/qml/dialogs/TabletLoginDialog.qml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/interface/resources/qml/dialogs/TabletLoginDialog.qml b/interface/resources/qml/dialogs/TabletLoginDialog.qml index c3889b6a30..c85b2b2ba0 100644 --- a/interface/resources/qml/dialogs/TabletLoginDialog.qml +++ b/interface/resources/qml/dialogs/TabletLoginDialog.qml @@ -173,10 +173,4 @@ TabletModalWindow { break } } - Component.onDestruction: { - var data = { - "action": "userOptedOut" - }; - UserActivityLogger.logAction("LoginDialogAction", data); - } } From 565bf7f6bd0c69c5ff314302f5b38b566b08f997 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 11 Sep 2018 09:08:35 -0700 Subject: [PATCH 144/210] adding correct implementation of show password --- .../resources/qml/LoginDialog/LinkAccountBody.qml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/interface/resources/qml/LoginDialog/LinkAccountBody.qml b/interface/resources/qml/LoginDialog/LinkAccountBody.qml index f7216584e0..06a371c478 100644 --- a/interface/resources/qml/LoginDialog/LinkAccountBody.qml +++ b/interface/resources/qml/LoginDialog/LinkAccountBody.qml @@ -198,19 +198,23 @@ Item { Rectangle { id: showPasswordHitbox z: 10 - // x: parent.width - (parent.height * 31/16) x: passwordField.width - ((passwordField.height) * 31 / 23) width: parent.width - (parent.width - (parent.height * 31/16)) - // width: passwordField.width - (passwordField.width - (((passwordField.height) * 31/23))) height: parent.height + anchors { + right: parent.right + } color: "transparent" Image { id: showPasswordImage - // x: passwordField.width - ((passwordField.height) * 31 / 23) y: (passwordField.height - (passwordField.height * 16 / 23)) / 2 width: passwordField.width - (passwordField.width - (((passwordField.height) * 31/23))) height: passwordField.height * 16 / 23 + anchors { + right: parent.right + rightMargin: 3 + } source: "../../images/eyeOpen.svg" } @@ -223,12 +227,8 @@ Item { showPassword = !showPassword; passwordField.echoMode = showPassword ? TextInput.Normal : TextInput.Password; showPasswordImage.source = showPassword ? "../../images/eyeClosed.svg" : "../../images/eyeOpen.svg"; - showPasswordImage.width = passwordField.width - (passwordField.width - (passwordField.height * 31/23)); - showPasswordImage.x = -(showPasswordImage.width - passwordField.width); showPasswordImage.height = showPassword ? passwordField.height : passwordField.height * 16 / 23; showPasswordImage.y = showPassword ? 0 : (passwordField.height - showPasswordImage.height) / 2; - showPasswordHitbox.width = showPasswordImage.width; - showPasswordHitbox.x = showPasswordImage.x; } } } From 840c8c95fdd62134c5e8d56875b1d84a88f80c1e Mon Sep 17 00:00:00 2001 From: sam gateau Date: Tue, 11 Sep 2018 09:34:42 -0700 Subject: [PATCH 145/210] cleaning the code and comments --- .../src/gpu/gl/GLBackendQuery.cpp | 19 ++++++++++--------- .../gpu-gl/src/gpu/gl45/GL45BackendBuffer.cpp | 2 +- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/libraries/gpu-gl-common/src/gpu/gl/GLBackendQuery.cpp b/libraries/gpu-gl-common/src/gpu/gl/GLBackendQuery.cpp index a448fceffe..b54a12805b 100644 --- a/libraries/gpu-gl-common/src/gpu/gl/GLBackendQuery.cpp +++ b/libraries/gpu-gl-common/src/gpu/gl/GLBackendQuery.cpp @@ -25,7 +25,6 @@ static bool timeElapsed = false; #endif void GLBackend::do_beginQuery(const Batch& batch, size_t paramOffset) { -#if !defined(USE_GLES) auto query = batch._queries.get(batch._params[paramOffset]._uint); GLQuery* glquery = syncGPUObject(*query); if (glquery) { @@ -33,8 +32,8 @@ void GLBackend::do_beginQuery(const Batch& batch, size_t paramOffset) { ++_queryStage._rangeQueryDepth; glquery->_batchElapsedTimeBegin = std::chrono::high_resolution_clock::now(); - // glGetInteger64v(GL_TIMESTAMP, (GLint64*)&glquery->_batchElapsedTime); +#if !defined(USE_GLES) if (timeElapsed) { if (_queryStage._rangeQueryDepth <= MAX_RANGE_QUERY_DEPTH) { glBeginQuery(GL_TIME_ELAPSED, glquery->_endqo); @@ -42,17 +41,18 @@ void GLBackend::do_beginQuery(const Batch& batch, size_t paramOffset) { } else { glQueryCounter(glquery->_beginqo, GL_TIMESTAMP); } +#endif + glquery->_rangeQueryDepth = _queryStage._rangeQueryDepth; (void)CHECK_GL_ERROR(); } -#endif } void GLBackend::do_endQuery(const Batch& batch, size_t paramOffset) { -#if !defined(USE_GLES) auto query = batch._queries.get(batch._params[paramOffset]._uint); GLQuery* glquery = syncGPUObject(*query); if (glquery) { +#if !defined(USE_GLES) if (timeElapsed) { if (_queryStage._rangeQueryDepth <= MAX_RANGE_QUERY_DEPTH) { glEndQuery(GL_TIME_ELAPSED); @@ -60,10 +60,9 @@ void GLBackend::do_endQuery(const Batch& batch, size_t paramOffset) { } else { glQueryCounter(glquery->_endqo, GL_TIMESTAMP); } +#endif --_queryStage._rangeQueryDepth; - // GLint64 now; - // glGetInteger64v(GL_TIMESTAMP, &now); auto duration_ns = (std::chrono::high_resolution_clock::now() - glquery->_batchElapsedTimeBegin); glquery->_batchElapsedTime = duration_ns.count(); @@ -71,17 +70,16 @@ void GLBackend::do_endQuery(const Batch& batch, size_t paramOffset) { (void)CHECK_GL_ERROR(); } -#endif } void GLBackend::do_getQuery(const Batch& batch, size_t paramOffset) { -#if !defined(USE_GLES) auto query = batch._queries.get(batch._params[paramOffset]._uint); GLQuery* glquery = syncGPUObject(*query); if (glquery) { if (glquery->_rangeQueryDepth > MAX_RANGE_QUERY_DEPTH) { query->triggerReturnHandler(glquery->_result, glquery->_batchElapsedTime); } else { +#if !defined(USE_GLES) glGetQueryObjectui64v(glquery->_endqo, GL_QUERY_RESULT_AVAILABLE, &glquery->_result); if (glquery->_result == GL_TRUE) { if (timeElapsed) { @@ -94,10 +92,13 @@ void GLBackend::do_getQuery(const Batch& batch, size_t paramOffset) { } query->triggerReturnHandler(glquery->_result, glquery->_batchElapsedTime); } +#else + // gles3 is not supporting true time query returns just the batch elapsed time + query->triggerReturnHandler(glquery->_result, glquery->_batchElapsedTime); +#endif (void)CHECK_GL_ERROR(); } } -#endif } void GLBackend::resetQueryStage() { diff --git a/libraries/gpu-gl/src/gpu/gl45/GL45BackendBuffer.cpp b/libraries/gpu-gl/src/gpu/gl45/GL45BackendBuffer.cpp index d271f79b92..6d17923ebd 100644 --- a/libraries/gpu-gl/src/gpu/gl45/GL45BackendBuffer.cpp +++ b/libraries/gpu-gl/src/gpu/gl45/GL45BackendBuffer.cpp @@ -52,7 +52,7 @@ GLuint GL45Backend::getBufferID(const Buffer& buffer) { } GLuint GL45Backend::getBufferIDUnsynced(const Buffer& buffer) { - return GLBuffer::getIdUnsynced(*this, buffer); + return GL45Buffer::getIdUnsynced(*this, buffer); } GLBuffer* GL45Backend::syncGPUObject(const Buffer& buffer) { From ee516fd79f65825aa486a3f6f64bcc606e89214e Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 11 Sep 2018 09:36:46 -0700 Subject: [PATCH 146/210] adding proper checking for saved username/login --- .../qml/LoginDialog/LinkAccountBody.qml | 16 ++-- interface/src/ui/LoginDialog.cpp | 80 ++++++++----------- 2 files changed, 42 insertions(+), 54 deletions(-) diff --git a/interface/resources/qml/LoginDialog/LinkAccountBody.qml b/interface/resources/qml/LoginDialog/LinkAccountBody.qml index 06a371c478..4196b7f168 100644 --- a/interface/resources/qml/LoginDialog/LinkAccountBody.qml +++ b/interface/resources/qml/LoginDialog/LinkAccountBody.qml @@ -161,6 +161,10 @@ Item { onFocusChanged: { root.text = ""; } + Component.onCompleted: { + var savedUsername = Settings.getValue("wallet/savedUsername", ""); + usernameField.text = savedUsername === "Unknown user" ? "" : savedUsername; + } } TextField { @@ -256,18 +260,18 @@ Item { anchors.horizontalCenter: parent.horizontalCenter CheckBox { - id: autoLogoutCheckbox; - checked: Settings.getValue("wallet/autoLogout", true); + id: autoLogoutCheckbox + checked: !Settings.getValue("wallet/autoLogout", true) text: "Keep me signed in" boxSize: 20; - labelFontSize: 15; - color: hifi.colors.black; + labelFontSize: 15 + color: hifi.colors.black onCheckedChanged: { Settings.setValue("wallet/autoLogout", !checked); if (checked) { - Settings.setValue("wallet/savedUsername", ""); - } else { Settings.setValue("wallet/savedUsername", Account.username); + } else { + Settings.setValue("wallet/savedUsername", ""); } } Component.onDestruction: { diff --git a/interface/src/ui/LoginDialog.cpp b/interface/src/ui/LoginDialog.cpp index 5116c2a92c..0d574fdc5d 100644 --- a/interface/src/ui/LoginDialog.cpp +++ b/interface/src/ui/LoginDialog.cpp @@ -32,20 +32,17 @@ HIFI_QML_DEF(LoginDialog) Q_LOGGING_CATEGORY(login_dialog, "hifi.login.dialog") -LoginDialog::LoginDialog(QQuickItem *parent) : OffscreenQmlDialog(parent) { +LoginDialog::LoginDialog(QQuickItem* parent) : OffscreenQmlDialog(parent) { auto accountManager = DependencyManager::get(); #if !defined(Q_OS_ANDROID) - connect(accountManager.data(), &AccountManager::loginComplete, - this, &LoginDialog::handleLoginCompleted); - connect(accountManager.data(), &AccountManager::loginFailed, - this, &LoginDialog::handleLoginFailed); + connect(accountManager.data(), &AccountManager::loginComplete, this, &LoginDialog::handleLoginCompleted); + connect(accountManager.data(), &AccountManager::loginFailed, this, &LoginDialog::handleLoginFailed); #endif } LoginDialog::~LoginDialog() { Setting::Handle loginDialogPoppedUp{ "loginDialogPoppedUp", false }; - auto poppedUp = loginDialogPoppedUp.get(); - if (poppedUp) { + if (loginDialogPoppedUp.get()) { QJsonObject data; data["action"] = "user opted out"; UserActivityLogger::getInstance().logAction("encourageLoginDialog", data); @@ -53,8 +50,7 @@ LoginDialog::~LoginDialog() { loginDialogPoppedUp.set(false); } -void LoginDialog::showWithSelection() -{ +void LoginDialog::showWithSelection() { auto tabletScriptingInterface = DependencyManager::get(); auto tablet = dynamic_cast(tabletScriptingInterface->getTablet("com.highfidelity.interface.tablet.system")); auto hmd = DependencyManager::get(); @@ -86,9 +82,7 @@ void LoginDialog::toggleAction() { } else { // change the menu item to login loginAction->setText("Login / Sign Up"); - connection = connect(loginAction, &QAction::triggered, [] { - LoginDialog::showWithSelection(); - }); + connection = connect(loginAction, &QAction::triggered, [] { LoginDialog::showWithSelection(); }); } } @@ -136,9 +130,8 @@ void LoginDialog::linkSteam() { payload.insert("steam_auth_ticket", QJsonValue::fromVariant(QVariant(ticket))); auto accountManager = DependencyManager::get(); - accountManager->sendRequest(LINK_STEAM_PATH, AccountManagerAuth::Required, - QNetworkAccessManager::PostOperation, callbackParams, - QJsonDocument(payload).toJson()); + accountManager->sendRequest(LINK_STEAM_PATH, AccountManagerAuth::Required, QNetworkAccessManager::PostOperation, + callbackParams, QJsonDocument(payload).toJson()); }); } } @@ -167,28 +160,24 @@ void LoginDialog::createAccountFromStream(QString username) { auto accountManager = DependencyManager::get(); accountManager->sendRequest(CREATE_ACCOUNT_FROM_STEAM_PATH, AccountManagerAuth::None, - QNetworkAccessManager::PostOperation, callbackParams, - QJsonDocument(payload).toJson()); + QNetworkAccessManager::PostOperation, callbackParams, QJsonDocument(payload).toJson()); }); } - } void LoginDialog::openUrl(const QString& url) const { - auto tablet = dynamic_cast(DependencyManager::get()->getTablet("com.highfidelity.interface.tablet.system")); + auto tablet = dynamic_cast( + DependencyManager::get()->getTablet("com.highfidelity.interface.tablet.system")); auto hmd = DependencyManager::get(); auto offscreenUi = DependencyManager::get(); if (tablet->getToolbarMode()) { - offscreenUi->load("Browser.qml", [=](QQmlContext* context, QObject* newObject) { - newObject->setProperty("url", url); - }); + offscreenUi->load("Browser.qml", [=](QQmlContext* context, QObject* newObject) { newObject->setProperty("url", url); }); LoginDialog::hide(); } else { if (!hmd->getShouldShowTablet() && !qApp->isHMDMode()) { - offscreenUi->load("Browser.qml", [=](QQmlContext* context, QObject* newObject) { - newObject->setProperty("url", url); - }); + offscreenUi->load("Browser.qml", + [=](QQmlContext* context, QObject* newObject) { newObject->setProperty("url", url); }); LoginDialog::hide(); } else { tablet->gotoWebScreen(url); @@ -213,28 +202,26 @@ void LoginDialog::createFailed(QNetworkReply* reply) { } void LoginDialog::signup(const QString& email, const QString& username, const QString& password) { - JSONCallbackParameters callbackParams; callbackParams.callbackReceiver = this; callbackParams.jsonCallbackMethod = "signupCompleted"; callbackParams.errorCallbackMethod = "signupFailed"; - + QJsonObject payload; - + QJsonObject userObject; userObject.insert("email", email); userObject.insert("username", username); userObject.insert("password", password); - + payload.insert("user", userObject); - + static const QString API_SIGNUP_PATH = "api/v1/users"; - + qDebug() << "Sending a request to create an account for" << username; - + auto accountManager = DependencyManager::get(); - accountManager->sendRequest(API_SIGNUP_PATH, AccountManagerAuth::None, - QNetworkAccessManager::PostOperation, callbackParams, + accountManager->sendRequest(API_SIGNUP_PATH, AccountManagerAuth::None, QNetworkAccessManager::PostOperation, callbackParams, QJsonDocument(payload).toJson()); } @@ -253,41 +240,38 @@ QString errorStringFromAPIObject(const QJsonValue& apiObject) { } void LoginDialog::signupFailed(QNetworkReply* reply) { - // parse the returned JSON to see what the problem was auto jsonResponse = QJsonDocument::fromJson(reply->readAll()); - + static const QString RESPONSE_DATA_KEY = "data"; - + auto dataJsonValue = jsonResponse.object()[RESPONSE_DATA_KEY]; - + if (dataJsonValue.isObject()) { auto dataObject = dataJsonValue.toObject(); - + static const QString EMAIL_DATA_KEY = "email"; static const QString USERNAME_DATA_KEY = "username"; static const QString PASSWORD_DATA_KEY = "password"; - + QStringList errorStringList; - + if (dataObject.contains(EMAIL_DATA_KEY)) { errorStringList.append(QString("Email %1.").arg(errorStringFromAPIObject(dataObject[EMAIL_DATA_KEY]))); } - + if (dataObject.contains(USERNAME_DATA_KEY)) { errorStringList.append(QString("Username %1.").arg(errorStringFromAPIObject(dataObject[USERNAME_DATA_KEY]))); } - + if (dataObject.contains(PASSWORD_DATA_KEY)) { errorStringList.append(QString("Password %1.").arg(errorStringFromAPIObject(dataObject[PASSWORD_DATA_KEY]))); } - + emit handleSignupFailed(errorStringList.join('\n')); } else { - static const QString DEFAULT_SIGN_UP_FAILURE_MESSAGE = "There was an unknown error while creating your account. Please try again later."; + static const QString DEFAULT_SIGN_UP_FAILURE_MESSAGE = + "There was an unknown error while creating your account. Please try again later."; emit handleSignupFailed(DEFAULT_SIGN_UP_FAILURE_MESSAGE); } - - } - From 9d7ba377ca72b99c900c159a758937139bdb5449 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 11 Sep 2018 09:42:53 -0700 Subject: [PATCH 147/210] removing logging for login dialog --- interface/src/ui/LoginDialog.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/interface/src/ui/LoginDialog.h b/interface/src/ui/LoginDialog.h index 155970e33d..717e089f3e 100644 --- a/interface/src/ui/LoginDialog.h +++ b/interface/src/ui/LoginDialog.h @@ -15,9 +15,6 @@ #define hifi_LoginDialog_h #include -#include - -Q_DECLARE_LOGGING_CATEGORY(login_dialog) class QNetworkReply; From aa62a89318d818513139ceecf8283e270380577a Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 11 Sep 2018 09:49:12 -0700 Subject: [PATCH 148/210] removing more logging for login dialog --- interface/src/ui/LoginDialog.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/interface/src/ui/LoginDialog.cpp b/interface/src/ui/LoginDialog.cpp index 0d574fdc5d..c1b9e5ccf3 100644 --- a/interface/src/ui/LoginDialog.cpp +++ b/interface/src/ui/LoginDialog.cpp @@ -30,7 +30,6 @@ #include "scripting/HMDScriptingInterface.h" HIFI_QML_DEF(LoginDialog) -Q_LOGGING_CATEGORY(login_dialog, "hifi.login.dialog") LoginDialog::LoginDialog(QQuickItem* parent) : OffscreenQmlDialog(parent) { auto accountManager = DependencyManager::get(); From 84cf40f8aa70b631326b81b8194b035b0bc6d289 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 11 Sep 2018 10:07:57 -0700 Subject: [PATCH 149/210] changing calculation of load percentage --- interface/src/octree/SafeLanding.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/interface/src/octree/SafeLanding.cpp b/interface/src/octree/SafeLanding.cpp index 6b7a0f582c..ef62b04a55 100644 --- a/interface/src/octree/SafeLanding.cpp +++ b/interface/src/octree/SafeLanding.cpp @@ -130,8 +130,7 @@ bool SafeLanding::isLoadSequenceComplete() { float SafeLanding::loadingProgressPercentage() { Locker lock(_lock); if (_maxTrackedEntityCount > 0) { - float trackedEntityCount = (float)_trackedEntitiesRenderStatus.size(); - return ((_maxTrackedEntityCount - trackedEntityCount) / _maxTrackedEntityCount); + return ((_maxTrackedEntityCount - _trackedEntitiesRenderStatus.size()) / (float)_maxTrackedEntityCount); } return 0.0f; From 2a7e2af44ff17afe323edeb8a58c5f37c8270f3d Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 11 Sep 2018 10:36:10 -0700 Subject: [PATCH 150/210] syntax reversion + removing poppedUp var --- interface/src/ui/LoginDialog.cpp | 39 +++++++++++++++++++------------- interface/src/ui/LoginDialog.h | 3 --- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/interface/src/ui/LoginDialog.cpp b/interface/src/ui/LoginDialog.cpp index c1b9e5ccf3..d6f6eef58c 100644 --- a/interface/src/ui/LoginDialog.cpp +++ b/interface/src/ui/LoginDialog.cpp @@ -19,7 +19,6 @@ #include #include #include - #include #include "AccountManager.h" @@ -31,11 +30,13 @@ HIFI_QML_DEF(LoginDialog) -LoginDialog::LoginDialog(QQuickItem* parent) : OffscreenQmlDialog(parent) { +LoginDialog::LoginDialog(QQuickItem *parent) : OffscreenQmlDialog(parent) { auto accountManager = DependencyManager::get(); #if !defined(Q_OS_ANDROID) - connect(accountManager.data(), &AccountManager::loginComplete, this, &LoginDialog::handleLoginCompleted); - connect(accountManager.data(), &AccountManager::loginFailed, this, &LoginDialog::handleLoginFailed); + connect(accountManager.data(), &AccountManager::loginComplete, + this, &LoginDialog::handleLoginCompleted); + connect(accountManager.data(), &AccountManager::loginFailed, + this, &LoginDialog::handleLoginFailed); #endif } @@ -77,7 +78,9 @@ void LoginDialog::toggleAction() { if (accountManager->isLoggedIn()) { // change the menu item to logout loginAction->setText("Logout " + accountManager->getAccountInfo().getUsername()); - connection = connect(loginAction, &QAction::triggered, accountManager.data(), &AccountManager::logout); + connection = connect(loginAction, &QAction::triggered, [] { + LoginDialog::showWithSelection(); + }); } else { // change the menu item to login loginAction->setText("Login / Sign Up"); @@ -129,8 +132,9 @@ void LoginDialog::linkSteam() { payload.insert("steam_auth_ticket", QJsonValue::fromVariant(QVariant(ticket))); auto accountManager = DependencyManager::get(); - accountManager->sendRequest(LINK_STEAM_PATH, AccountManagerAuth::Required, QNetworkAccessManager::PostOperation, - callbackParams, QJsonDocument(payload).toJson()); + accountManager->sendRequest(LINK_STEAM_PATH, AccountManagerAuth::Required, + QNetworkAccessManager::PostOperation, callbackParams, + QJsonDocument(payload).toJson()); }); } } @@ -159,24 +163,27 @@ void LoginDialog::createAccountFromStream(QString username) { auto accountManager = DependencyManager::get(); accountManager->sendRequest(CREATE_ACCOUNT_FROM_STEAM_PATH, AccountManagerAuth::None, - QNetworkAccessManager::PostOperation, callbackParams, QJsonDocument(payload).toJson()); + QNetworkAccessManager::PostOperation, callbackParams, + QJsonDocument(payload).toJson()); }); } } void LoginDialog::openUrl(const QString& url) const { - auto tablet = dynamic_cast( - DependencyManager::get()->getTablet("com.highfidelity.interface.tablet.system")); + auto tablet = dynamic_cast(DependencyManager::get()->getTablet("com.highfidelity.interface.tablet.system")); auto hmd = DependencyManager::get(); auto offscreenUi = DependencyManager::get(); if (tablet->getToolbarMode()) { - offscreenUi->load("Browser.qml", [=](QQmlContext* context, QObject* newObject) { newObject->setProperty("url", url); }); + offscreenUi->load("Browser.qml", [=](QQmlContext* context, QObject* newObject) { + newObject->setProperty("url", url); + }); LoginDialog::hide(); } else { if (!hmd->getShouldShowTablet() && !qApp->isHMDMode()) { - offscreenUi->load("Browser.qml", - [=](QQmlContext* context, QObject* newObject) { newObject->setProperty("url", url); }); + offscreenUi->load("Browser.qml", [=](QQmlContext* context, QObject* newObject) { + newObject->setProperty("url", url); + }); LoginDialog::hide(); } else { tablet->gotoWebScreen(url); @@ -220,7 +227,8 @@ void LoginDialog::signup(const QString& email, const QString& username, const QS qDebug() << "Sending a request to create an account for" << username; auto accountManager = DependencyManager::get(); - accountManager->sendRequest(API_SIGNUP_PATH, AccountManagerAuth::None, QNetworkAccessManager::PostOperation, callbackParams, + accountManager->sendRequest(API_SIGNUP_PATH, AccountManagerAuth::None, + QNetworkAccessManager::PostOperation, callbackParams, QJsonDocument(payload).toJson()); } @@ -269,8 +277,7 @@ void LoginDialog::signupFailed(QNetworkReply* reply) { emit handleSignupFailed(errorStringList.join('\n')); } else { - static const QString DEFAULT_SIGN_UP_FAILURE_MESSAGE = - "There was an unknown error while creating your account. Please try again later."; + static const QString DEFAULT_SIGN_UP_FAILURE_MESSAGE = "There was an unknown error while creating your account. Please try again later."; emit handleSignupFailed(DEFAULT_SIGN_UP_FAILURE_MESSAGE); } } diff --git a/interface/src/ui/LoginDialog.h b/interface/src/ui/LoginDialog.h index 717e089f3e..b3f3d8a1a4 100644 --- a/interface/src/ui/LoginDialog.h +++ b/interface/src/ui/LoginDialog.h @@ -65,9 +65,6 @@ protected slots: Q_INVOKABLE void signup(const QString& email, const QString& username, const QString& password); Q_INVOKABLE void openUrl(const QString& url) const; - -private: - bool _poppedUp {false}; }; #endif // hifi_LoginDialog_h From 80b7e04bc678838532f8a6d95e7379ef0f9e1af0 Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Tue, 11 Sep 2018 10:51:36 -0700 Subject: [PATCH 151/210] Revert change to chrono for usecTimestampNow() --- libraries/shared/src/SharedUtil.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/libraries/shared/src/SharedUtil.cpp b/libraries/shared/src/SharedUtil.cpp index 6c79a23c20..e52e815520 100644 --- a/libraries/shared/src/SharedUtil.cpp +++ b/libraries/shared/src/SharedUtil.cpp @@ -128,15 +128,11 @@ void usecTimestampNowForceClockSkew(qint64 clockSkew) { ::usecTimestampNowAdjust = clockSkew; } -//static std::atomic TIME_REFERENCE { 0 }; // in usec -//static std::once_flag usecTimestampNowIsInitialized; -//static QElapsedTimer timestampTimer; +static std::atomic TIME_REFERENCE { 0 }; // in usec +static std::once_flag usecTimestampNowIsInitialized; +static QElapsedTimer timestampTimer; quint64 usecTimestampNow(bool wantDebug) { - using namespace std::chrono; - static const auto unixEpoch = system_clock::from_time_t(0); - return duration_cast(system_clock::now() - unixEpoch).count(); -#if 0 std::call_once(usecTimestampNowIsInitialized, [&] { TIME_REFERENCE = QDateTime::currentMSecsSinceEpoch() * USECS_PER_MSEC; // ms to usec timestampTimer.start(); @@ -208,7 +204,6 @@ quint64 usecTimestampNow(bool wantDebug) { } return now; -#endif } float secTimestampNow() { From e931b661a5ac2d4d213263b786609369c58e4162 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 11 Sep 2018 11:00:39 -0700 Subject: [PATCH 152/210] login dialog pops up in HMD again --- interface/src/Application.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index c2bbc72e5b..bb315a4254 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -2308,7 +2308,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo connect(checkLoginTimer, &QTimer::timeout, this, [this]() { auto accountManager = DependencyManager::get(); auto dialogsManager = DependencyManager::get(); - if (!accountManager->isLoggedIn() && !qApp->isHMDMode()) { + if (!accountManager->isLoggedIn()) { Setting::Handle{"loginDialogPoppedUp", false}.set(true); dialogsManager->showLoginDialog(); QJsonObject loginData = {}; From 7aae5366246c0799a04a320a4cf12c6ac45101a5 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 11 Sep 2018 11:41:24 -0700 Subject: [PATCH 153/210] adding fix to allow web scroll --- .../controllers/controllerModules/nearParentGrabEntity.js | 3 +++ .../controllers/controllerModules/webSurfaceLaserInput.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/system/controllers/controllerModules/nearParentGrabEntity.js b/scripts/system/controllers/controllerModules/nearParentGrabEntity.js index 6bbd19550b..2c0c668a42 100644 --- a/scripts/system/controllers/controllerModules/nearParentGrabEntity.js +++ b/scripts/system/controllers/controllerModules/nearParentGrabEntity.js @@ -24,6 +24,9 @@ Script.include("/~/system/libraries/controllers.js"); // XXX this.ignoreIK = (grabbableData.ignoreIK !== undefined) ? grabbableData.ignoreIK : true; // XXX this.kinematicGrab = (grabbableData.kinematic !== undefined) ? grabbableData.kinematic : NEAR_GRABBING_KINEMATIC; + // this offset needs to match the one in libraries/display-plugins/src/display-plugins/hmd/HmdDisplayPlugin.cpp:378 + //var GRAB_POINT_SPHERE_OFFSET = { x: 0.04, y: 0.13, z: 0.039 }; // x = upward, y = forward, z = lateral + function getGrabOffset(handController) { var offset = GRAB_POINT_SPHERE_OFFSET; if (handController === Controller.Standard.LeftHand) { diff --git a/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js b/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js index de3eb26086..dd0af0ba8f 100644 --- a/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js +++ b/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js @@ -146,7 +146,7 @@ Script.include("/~/system/libraries/controllers.js"); var isTriggerPressed = controllerData.triggerValues[this.hand] > TRIGGER_OFF_VALUE; var laserOn = isTriggerPressed || this.parameters.handLaser.allwaysOn; if (allowThisModule && (laserOn && this.isPointingAtTriggerable(controllerData, isTriggerPressed)) && - !this.isPointingAtNearGrabbableEntity(controllerData, isTriggerPressed)) { + (controllerData.nearbyEntityProperties[this.hand] !== [])) { this.running = true; return makeRunningValues(true, [], []); } From 77586933c87bcc5439b9aba8fc2b0d5627e263a6 Mon Sep 17 00:00:00 2001 From: sam gateau Date: Tue, 11 Sep 2018 11:43:14 -0700 Subject: [PATCH 154/210] Merge and fix the default _value of GLquery so it is 0, not broken --- libraries/gpu-gl-common/src/gpu/gl/GLBackendQuery.cpp | 2 +- libraries/gpu-gl-common/src/gpu/gl/GLQuery.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/gpu-gl-common/src/gpu/gl/GLBackendQuery.cpp b/libraries/gpu-gl-common/src/gpu/gl/GLBackendQuery.cpp index b54a12805b..8aa0f3c699 100644 --- a/libraries/gpu-gl-common/src/gpu/gl/GLBackendQuery.cpp +++ b/libraries/gpu-gl-common/src/gpu/gl/GLBackendQuery.cpp @@ -94,7 +94,7 @@ void GLBackend::do_getQuery(const Batch& batch, size_t paramOffset) { } #else // gles3 is not supporting true time query returns just the batch elapsed time - query->triggerReturnHandler(glquery->_result, glquery->_batchElapsedTime); + query->triggerReturnHandler(0, glquery->_batchElapsedTime); #endif (void)CHECK_GL_ERROR(); } diff --git a/libraries/gpu-gl-common/src/gpu/gl/GLQuery.h b/libraries/gpu-gl-common/src/gpu/gl/GLQuery.h index 18d79d5896..11a4ef0c0a 100644 --- a/libraries/gpu-gl-common/src/gpu/gl/GLQuery.h +++ b/libraries/gpu-gl-common/src/gpu/gl/GLQuery.h @@ -47,7 +47,7 @@ public: const GLuint& _endqo = { _id }; const GLuint _beginqo = { 0 }; - GLuint64 _result { (GLuint64)-1 }; + GLuint64 _result { (GLuint64)0 }; GLuint64 _batchElapsedTime{ (GLuint64)0 }; std::chrono::high_resolution_clock::time_point _batchElapsedTimeBegin; uint64_t _profileRangeId { 0 }; From d9e0352028bdb6ffed215bf6ee301885bdd44893 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 11 Sep 2018 11:44:32 -0700 Subject: [PATCH 155/210] removing debug comments --- .../controllers/controllerModules/nearParentGrabEntity.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/scripts/system/controllers/controllerModules/nearParentGrabEntity.js b/scripts/system/controllers/controllerModules/nearParentGrabEntity.js index 2c0c668a42..6bbd19550b 100644 --- a/scripts/system/controllers/controllerModules/nearParentGrabEntity.js +++ b/scripts/system/controllers/controllerModules/nearParentGrabEntity.js @@ -24,9 +24,6 @@ Script.include("/~/system/libraries/controllers.js"); // XXX this.ignoreIK = (grabbableData.ignoreIK !== undefined) ? grabbableData.ignoreIK : true; // XXX this.kinematicGrab = (grabbableData.kinematic !== undefined) ? grabbableData.kinematic : NEAR_GRABBING_KINEMATIC; - // this offset needs to match the one in libraries/display-plugins/src/display-plugins/hmd/HmdDisplayPlugin.cpp:378 - //var GRAB_POINT_SPHERE_OFFSET = { x: 0.04, y: 0.13, z: 0.039 }; // x = upward, y = forward, z = lateral - function getGrabOffset(handController) { var offset = GRAB_POINT_SPHERE_OFFSET; if (handController === Controller.Standard.LeftHand) { From 5c9a88868d65aff271ebc0d65521e7e1f16df934 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Tue, 11 Sep 2018 12:01:55 -0700 Subject: [PATCH 156/210] first round of requested changes --- interface/src/Application.cpp | 7 +- .../src/octree/OctreePacketProcessor.cpp | 4 - interface/src/octree/OctreePacketProcessor.h | 1 - interface/src/octree/SafeLanding.cpp | 89 +++++++++---------- interface/src/octree/SafeLanding.h | 6 +- libraries/audio-client/src/AudioClient.cpp | 2 +- libraries/audio-client/src/AudioClient.h | 4 +- 7 files changed, 49 insertions(+), 64 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index de0aea3bc2..d2079c4b4d 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -1387,7 +1387,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo }); connect(this, &Application::activeDisplayPluginChanged, reinterpret_cast(audioScriptingInterface.data()), &scripting::Audio::onContextChanged); - connect(this, &Application::interstitialModeChanged, audioIO, &AudioClient::setInterstitialStatus); } // Create the rendering engine. This can be slow on some machines due to lots of @@ -3500,6 +3499,9 @@ bool Application::isInterstitialMode() const { void Application::setIsInterstitialMode(bool interstitialMode) { if (_interstitialMode != interstitialMode) { _interstitialMode = interstitialMode; + + auto audioClient = DependencyManager::get(); + audioClient->setAudioPaused(_interstitialMode); emit interstitialModeChanged(_interstitialMode); } } @@ -5581,8 +5583,7 @@ void Application::update(float deltaTime) { // we haven't yet enabled physics. we wait until we think we have all the collision information // for nearby entities before starting bullet up. quint64 now = usecTimestampNow(); - bool renderReady = _octreeProcessor.isEntitiesRenderReady(); - if (isServerlessMode() || (_octreeProcessor.isLoadSequenceComplete() && renderReady)) { + if (isServerlessMode() || _octreeProcessor.isLoadSequenceComplete()) { // we've received a new full-scene octree stats packet, or it's been long enough to try again anyway _lastPhysicsCheckTime = now; _fullSceneCounterAtLastPhysicsCheck = _fullSceneReceivedCounter; diff --git a/interface/src/octree/OctreePacketProcessor.cpp b/interface/src/octree/OctreePacketProcessor.cpp index e670153a77..1abc755057 100644 --- a/interface/src/octree/OctreePacketProcessor.cpp +++ b/interface/src/octree/OctreePacketProcessor.cpp @@ -138,10 +138,6 @@ bool OctreePacketProcessor::isLoadSequenceComplete() const { return _safeLanding->isLoadSequenceComplete(); } -bool OctreePacketProcessor::isEntitiesRenderReady() const { - return _safeLanding->entitiesRenderReady(); -} - float OctreePacketProcessor::domainLoadingProgress() { return _safeLanding->loadingProgressPercentage(); } diff --git a/interface/src/octree/OctreePacketProcessor.h b/interface/src/octree/OctreePacketProcessor.h index 71e22bf240..0460fc7da0 100644 --- a/interface/src/octree/OctreePacketProcessor.h +++ b/interface/src/octree/OctreePacketProcessor.h @@ -27,7 +27,6 @@ public: void startEntitySequence(); bool isLoadSequenceComplete() const; - bool isEntitiesRenderReady() const; float domainLoadingProgress(); signals: diff --git a/interface/src/octree/SafeLanding.cpp b/interface/src/octree/SafeLanding.cpp index 6b7a0f582c..27674920d7 100644 --- a/interface/src/octree/SafeLanding.cpp +++ b/interface/src/octree/SafeLanding.cpp @@ -37,7 +37,6 @@ void SafeLanding::startEntitySequence(QSharedPointer entityT if (entityTree) { Locker lock(_lock); _entityTree = entityTree; - _trackedEntitiesRenderStatus.clear(); _trackedEntities.clear(); _trackingEntities = true; connect(std::const_pointer_cast(_entityTree).get(), @@ -67,35 +66,19 @@ void SafeLanding::addTrackedEntity(const EntityItemID& entityID) { Locker lock(_lock); EntityItemPointer entity = _entityTree->findEntityByID(entityID); - if (entity && !entity->getCollisionless()) { - const auto& entityType = entity->getType(); - if (entityType == EntityTypes::Model) { - ModelEntityItem * modelEntity = std::dynamic_pointer_cast(entity).get(); - static const std::set downloadedCollisionTypes - { SHAPE_TYPE_COMPOUND, SHAPE_TYPE_SIMPLE_COMPOUND, SHAPE_TYPE_STATIC_MESH, SHAPE_TYPE_SIMPLE_HULL }; - bool hasAABox; - entity->getAABox(hasAABox); - if (hasAABox && downloadedCollisionTypes.count(modelEntity->getShapeType()) != 0) { - // Only track entities with downloaded collision bodies. - _trackedEntities.emplace(entityID, entity); - qCDebug(interfaceapp) << "Safe Landing: Tracking entity " << entity->getItemName(); - } - } - } - - _trackedEntitiesRenderStatus.emplace(entityID, entity); - float trackedEntityCount = (float)_trackedEntitiesRenderStatus.size(); + _trackedEntities.emplace(entityID, entity); + int trackedEntityCount = _trackedEntities.size(); if (trackedEntityCount > _maxTrackedEntityCount) { _maxTrackedEntityCount = trackedEntityCount; } + qCDebug(interfaceapp) << "Safe Landing: Tracking entity " << entity->getItemName(); } } void SafeLanding::deleteTrackedEntity(const EntityItemID& entityID) { Locker lock(_lock); _trackedEntities.erase(entityID); - _trackedEntitiesRenderStatus.erase(entityID); } void SafeLanding::setCompletionSequenceNumbers(int first, int last) { @@ -114,7 +97,7 @@ void SafeLanding::noteReceivedsequenceNumber(int sequenceNumber) { } bool SafeLanding::isLoadSequenceComplete() { - if (isEntityPhysicsComplete() && isSequenceNumbersComplete()) { + if (isEntityLoadingComplete() && isSequenceNumbersComplete()) { Locker lock(_lock); _trackedEntities.clear(); _initialStart = INVALID_SEQUENCE; @@ -130,8 +113,8 @@ bool SafeLanding::isLoadSequenceComplete() { float SafeLanding::loadingProgressPercentage() { Locker lock(_lock); if (_maxTrackedEntityCount > 0) { - float trackedEntityCount = (float)_trackedEntitiesRenderStatus.size(); - return ((_maxTrackedEntityCount - trackedEntityCount) / _maxTrackedEntityCount); + int trackedEntityCount = _trackedEntities.size(); + return ((_maxTrackedEntityCount - trackedEntityCount) / (float)_maxTrackedEntityCount); } return 0.0f; @@ -155,38 +138,46 @@ bool SafeLanding::isSequenceNumbersComplete() { return false; } -bool SafeLanding::isEntityPhysicsComplete() { - Locker lock(_lock); - for (auto entityMapIter = _trackedEntities.begin(); entityMapIter != _trackedEntities.end(); ++entityMapIter) { - auto entity = entityMapIter->second; - if (!entity->shouldBePhysical() || entity->isReadyToComputeShape()) { - entityMapIter = _trackedEntities.erase(entityMapIter); - if (entityMapIter == _trackedEntities.end()) { - break; +bool isEntityPhysicsReady(const EntityItemPointer& entity) { + if (entity && !entity->getCollisionless()) { + const auto& entityType = entity->getType(); + if (entityType == EntityTypes::Model) { + ModelEntityItem * modelEntity = std::dynamic_pointer_cast(entity).get(); + static const std::set downloadedCollisionTypes + { SHAPE_TYPE_COMPOUND, SHAPE_TYPE_SIMPLE_COMPOUND, SHAPE_TYPE_STATIC_MESH, SHAPE_TYPE_SIMPLE_HULL }; + bool hasAABox; + entity->getAABox(hasAABox); + if (hasAABox && downloadedCollisionTypes.count(modelEntity->getShapeType()) != 0) { + return entity->isReadyToComputeShape(); + qCDebug(interfaceapp) << "Safe Landing: Tracking entity " << entity->getItemName(); } } } + + return true; +} + +bool SafeLanding::isEntityLoadingComplete() { + Locker lock(_lock); + auto entityTree = qApp->getEntities(); + auto entityMapIter = _trackedEntities.begin(); + + while (entityMapIter != _trackedEntities.end()) { + auto entity = entityMapIter->second; + bool isVisuallyReady = (entity->isVisuallyReady() || !entityTree->renderableForEntityId(entityMapIter->first)); + if (isEntityPhysicsReady(entity) && isVisuallyReady) { + entityMapIter = _trackedEntities.erase(entityMapIter); + } else { + if (!isVisuallyReady) { + entity->requestRenderUpdate(); + } + + entityMapIter++; + } + } return _trackedEntities.empty(); } -bool SafeLanding::entitiesRenderReady() { - Locker lock(_lock); - auto entityTree = qApp->getEntities(); - for (auto entityMapIter = _trackedEntitiesRenderStatus.begin(); entityMapIter != _trackedEntitiesRenderStatus.end(); ++entityMapIter) { - auto entity = entityMapIter->second; - bool visuallyReady = entity->isVisuallyReady(); - if (visuallyReady || !entityTree->renderableForEntityId(entityMapIter->first)) { - entityMapIter = _trackedEntitiesRenderStatus.erase(entityMapIter); - if (entityMapIter == _trackedEntitiesRenderStatus.end()) { - break; - } - } else { - entity->requestRenderUpdate(); - } - } - return _trackedEntitiesRenderStatus.empty(); -} - float SafeLanding::ElevatedPriority(const EntityItem& entityItem) { return entityItem.getCollisionless() ? 0.0f : 10.0f; } diff --git a/interface/src/octree/SafeLanding.h b/interface/src/octree/SafeLanding.h index 611b75ab79..317e4587c7 100644 --- a/interface/src/octree/SafeLanding.h +++ b/interface/src/octree/SafeLanding.h @@ -30,7 +30,6 @@ public: void setCompletionSequenceNumbers(int first, int last); // 'last' exclusive. void noteReceivedsequenceNumber(int sequenceNumber); bool isLoadSequenceComplete(); - bool entitiesRenderReady(); float loadingProgressPercentage(); private slots: @@ -40,7 +39,7 @@ private slots: private: bool isSequenceNumbersComplete(); void debugDumpSequenceIDs() const; - bool isEntityPhysicsComplete(); + bool isEntityLoadingComplete(); std::mutex _lock; using Locker = std::lock_guard; @@ -48,12 +47,11 @@ private: EntityTreePointer _entityTree; using EntityMap = std::map; EntityMap _trackedEntities; - EntityMap _trackedEntitiesRenderStatus; static constexpr int INVALID_SEQUENCE = -1; int _initialStart { INVALID_SEQUENCE }; int _initialEnd { INVALID_SEQUENCE }; - float _maxTrackedEntityCount { 0.0f }; + int _maxTrackedEntityCount { 0 }; struct SequenceLessThan { bool operator()(const int& a, const int& b) const; diff --git a/libraries/audio-client/src/AudioClient.cpp b/libraries/audio-client/src/AudioClient.cpp index 7af8a05f25..caf57cbc6e 100644 --- a/libraries/audio-client/src/AudioClient.cpp +++ b/libraries/audio-client/src/AudioClient.cpp @@ -1024,7 +1024,7 @@ void AudioClient::handleLocalEchoAndReverb(QByteArray& inputByteArray) { } void AudioClient::handleAudioInput(QByteArray& audioBuffer) { - if (!_interstitialMode) { + if (!_audioPaused) { if (_muted) { _lastInputLoudness = 0.0f; _timeSinceLastClip = 0.0f; diff --git a/libraries/audio-client/src/AudioClient.h b/libraries/audio-client/src/AudioClient.h index 90860798b3..099a692e26 100644 --- a/libraries/audio-client/src/AudioClient.h +++ b/libraries/audio-client/src/AudioClient.h @@ -162,6 +162,7 @@ public: bool startRecording(const QString& filename); void stopRecording(); + void setAudioPaused(bool pause) { _audioPaused = pause; } #ifdef Q_OS_WIN @@ -187,7 +188,6 @@ public slots: void handleRecordedAudioInput(const QByteArray& audio); void reset(); void audioMixerKilled(); - void setInterstitialStatus(bool interstitialMode) { _interstitialMode = interstitialMode; } void setMuted(bool muted, bool emitSignal = true); bool isMuted() { return _muted; } @@ -417,7 +417,7 @@ private: QVector _activeLocalAudioInjectors; bool _isPlayingBackRecording { false }; - bool _interstitialMode { true }; + bool _audioPaused { false }; CodecPluginPointer _codec; QString _selectedCodecName; From cc2c208b12f25c7d8ccd22cc91ced86d9f1f953e Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Tue, 11 Sep 2018 12:12:31 -0700 Subject: [PATCH 157/210] fix small issue --- interface/src/octree/SafeLanding.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/interface/src/octree/SafeLanding.cpp b/interface/src/octree/SafeLanding.cpp index 2bbda7f5d5..f73a13f346 100644 --- a/interface/src/octree/SafeLanding.cpp +++ b/interface/src/octree/SafeLanding.cpp @@ -148,7 +148,6 @@ bool isEntityPhysicsReady(const EntityItemPointer& entity) { entity->getAABox(hasAABox); if (hasAABox && downloadedCollisionTypes.count(modelEntity->getShapeType()) != 0) { return entity->isReadyToComputeShape(); - qCDebug(interfaceapp) << "Safe Landing: Tracking entity " << entity->getItemName(); } } } From e7aef92e992af2541515353cab35174a2ef36eea Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 11 Sep 2018 12:51:51 -0700 Subject: [PATCH 158/210] fixing logout bug from syntax reversion --- interface/src/ui/LoginDialog.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/interface/src/ui/LoginDialog.cpp b/interface/src/ui/LoginDialog.cpp index d6f6eef58c..43da6ea863 100644 --- a/interface/src/ui/LoginDialog.cpp +++ b/interface/src/ui/LoginDialog.cpp @@ -78,9 +78,7 @@ void LoginDialog::toggleAction() { if (accountManager->isLoggedIn()) { // change the menu item to logout loginAction->setText("Logout " + accountManager->getAccountInfo().getUsername()); - connection = connect(loginAction, &QAction::triggered, [] { - LoginDialog::showWithSelection(); - }); + connection = connect(loginAction, &QAction::triggered, accountManager.data(), &AccountManager::logout); } else { // change the menu item to login loginAction->setText("Login / Sign Up"); From bc5d9a46a2d5e8966b1931b4a7d18ab5f92774b6 Mon Sep 17 00:00:00 2001 From: Anthony Thibault Date: Tue, 11 Sep 2018 13:12:46 -0700 Subject: [PATCH 159/210] Avatar loading orb now indicates status white - no url has been received yet for this avatar purple - a url has been received for this avatar but it's content is still downloading/loading blue - (only visible breifly) content has succesfully loaded red - (only visible briefly) content has failed to download. --- interface/src/avatar/OtherAvatar.cpp | 27 ++++++++++++++++++- interface/src/avatar/OtherAvatar.h | 1 + .../src/avatars-renderer/Avatar.cpp | 17 +++++++++--- .../src/avatars-renderer/Avatar.h | 10 +++++++ 4 files changed, 50 insertions(+), 5 deletions(-) diff --git a/interface/src/avatar/OtherAvatar.cpp b/interface/src/avatar/OtherAvatar.cpp index a0fa496c4c..cf15d4abdf 100644 --- a/interface/src/avatar/OtherAvatar.cpp +++ b/interface/src/avatar/OtherAvatar.cpp @@ -11,6 +11,24 @@ #include "AvatarMotionState.h" +static xColor getLoadingOrbColor(Avatar::LoadingStatus loadingStatus) { + + const xColor NO_MODEL_COLOR(0xe3, 0xe3, 0xe3); + const xColor LOAD_MODEL_COLOR(0xef, 0x93, 0xd1); + const xColor LOAD_SUCCESS_COLOR(0x1f, 0xc6, 0xa6); + const xColor LOAD_FAILURE_COLOR(0xc6, 0x21, 0x47); + switch (loadingStatus) { + case Avatar::LoadingStatus::NoModel: + return NO_MODEL_COLOR; + case Avatar::LoadingStatus::LoadModel: + return LOAD_MODEL_COLOR; + case Avatar::LoadingStatus::LoadSuccess: + return LOAD_SUCCESS_COLOR; + case Avatar::LoadingStatus::LoadFailure: + return LOAD_FAILURE_COLOR; + } +} + OtherAvatar::OtherAvatar(QThread* thread) : Avatar(thread) { // give the pointer to our head to inherited _headData variable from AvatarData _headData = new Head(this); @@ -48,7 +66,7 @@ void OtherAvatar::createOrb() { if (_otherAvatarOrbMeshPlaceholderID.isNull()) { _otherAvatarOrbMeshPlaceholder = std::make_shared(); _otherAvatarOrbMeshPlaceholder->setAlpha(1.0f); - _otherAvatarOrbMeshPlaceholder->setColor({ 0xFF, 0x00, 0xFF }); + _otherAvatarOrbMeshPlaceholder->setColor(getLoadingOrbColor(_loadingStatus)); _otherAvatarOrbMeshPlaceholder->setIsSolid(false); _otherAvatarOrbMeshPlaceholder->setPulseMin(0.5); _otherAvatarOrbMeshPlaceholder->setPulseMax(1.0); @@ -64,6 +82,13 @@ void OtherAvatar::createOrb() { } } +void OtherAvatar::indicateLoadingStatus(LoadingStatus loadingStatus) { + Avatar::indicateLoadingStatus(loadingStatus); + if (_otherAvatarOrbMeshPlaceholder) { + _otherAvatarOrbMeshPlaceholder->setColor(getLoadingOrbColor(_loadingStatus)); + } +} + void OtherAvatar::setSpaceIndex(int32_t index) { assert(_spaceIndex == -1); _spaceIndex = index; diff --git a/interface/src/avatar/OtherAvatar.h b/interface/src/avatar/OtherAvatar.h index ccfe42dbed..94b98f2747 100644 --- a/interface/src/avatar/OtherAvatar.h +++ b/interface/src/avatar/OtherAvatar.h @@ -28,6 +28,7 @@ public: virtual void instantiableAvatar() override { }; virtual void createOrb() override; + virtual void indicateLoadingStatus(LoadingStatus loadingStatus) override; void updateOrbPosition(); void removeOrb(); diff --git a/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp b/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp index 4ffccefe61..ac25f65576 100644 --- a/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp +++ b/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp @@ -126,6 +126,8 @@ Avatar::Avatar(QThread* thread) : _leftPointerGeometryID = geometryCache->allocateID(); _rightPointerGeometryID = geometryCache->allocateID(); _lastRenderUpdateTime = usecTimestampNow(); + + indicateLoadingStatus(LoadingStatus::NoModel); } Avatar::~Avatar() { @@ -1370,12 +1372,15 @@ void Avatar::scaleVectorRelativeToPosition(glm::vec3 &positionToScale) const { } void Avatar::setSkeletonModelURL(const QUrl& skeletonModelURL) { - if (!isMyAvatar()) { - createOrb(); - } AvatarData::setSkeletonModelURL(skeletonModelURL); if (QThread::currentThread() == thread()) { + + if (!isMyAvatar()) { + createOrb(); + } + _skeletonModel->setURL(_skeletonModelURL); + indicateLoadingStatus(LoadingStatus::LoadModel); } else { QMetaObject::invokeMethod(_skeletonModel.get(), "setURL", Qt::QueuedConnection, Q_ARG(QUrl, _skeletonModelURL)); } @@ -1388,11 +1393,12 @@ void Avatar::setModelURLFinished(bool success) { _reconstructSoftEntitiesJointMap = true; if (!success && _skeletonModelURL != AvatarData::defaultFullAvatarModelUrl()) { + indicateLoadingStatus(LoadingStatus::LoadFailure); const int MAX_SKELETON_DOWNLOAD_ATTEMPTS = 4; // NOTE: we don't want to be as generous as ResourceCache is, we only want 4 attempts if (_skeletonModel->getResourceDownloadAttemptsRemaining() <= 0 || _skeletonModel->getResourceDownloadAttempts() > MAX_SKELETON_DOWNLOAD_ATTEMPTS) { qCWarning(avatars_renderer) << "Using default after failing to load Avatar model: " << _skeletonModelURL - << "after" << _skeletonModel->getResourceDownloadAttempts() << "attempts."; + << "after" << _skeletonModel->getResourceDownloadAttempts() << "attempts."; // call _skeletonModel.setURL, but leave our copy of _skeletonModelURL alone. This is so that // we don't redo this every time we receive an identity packet from the avatar with the bad url. QMetaObject::invokeMethod(_skeletonModel.get(), "setURL", @@ -1403,6 +1409,9 @@ void Avatar::setModelURLFinished(bool success) { << "out of:" << MAX_SKELETON_DOWNLOAD_ATTEMPTS; } } + if (success) { + indicateLoadingStatus(LoadingStatus::LoadSuccess); + } } // rig is ready diff --git a/libraries/avatars-renderer/src/avatars-renderer/Avatar.h b/libraries/avatars-renderer/src/avatars-renderer/Avatar.h index 37c3d08c6c..3482c3c193 100644 --- a/libraries/avatars-renderer/src/avatars-renderer/Avatar.h +++ b/libraries/avatars-renderer/src/avatars-renderer/Avatar.h @@ -107,6 +107,14 @@ public: virtual bool isMyAvatar() const override { return false; } virtual void createOrb() { } + enum class LoadingStatus { + NoModel, + LoadModel, + LoadSuccess, + LoadFailure + }; + virtual void indicateLoadingStatus(LoadingStatus loadingStatus) { _loadingStatus = loadingStatus; } + virtual QVector getJointRotations() const override; using AvatarData::getJointRotation; virtual glm::quat getJointRotation(int index) const override; @@ -540,6 +548,8 @@ protected: static const float MYAVATAR_LOADING_PRIORITY; static const float OTHERAVATAR_LOADING_PRIORITY; static const float ATTACHMENT_LOADING_PRIORITY; + + LoadingStatus _loadingStatus { LoadingStatus::NoModel }; }; #endif // hifi_Avatar_h From b665dbe13e00793de11a1b87153027b0bdccc706 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Tue, 11 Sep 2018 14:18:12 -0700 Subject: [PATCH 160/210] finished requested changes --- interface/src/Application.cpp | 32 ++++++---------------- interface/src/avatar/AvatarManager.cpp | 12 +++++++- interface/src/avatar/AvatarManager.h | 3 ++ libraries/audio-client/src/AudioClient.cpp | 10 +++++++ libraries/audio-client/src/AudioClient.h | 2 +- scripts/system/interstitialPage.js | 2 +- 6 files changed, 34 insertions(+), 27 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 8a68a606fc..ca27b29b92 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -2294,25 +2294,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo // Preload Tablet sounds DependencyManager::get()->preloadSounds(); - connect(this, &Application::interstitialModeChanged, this, [this] (bool interstitialMode) { - if (!interstitialMode) { - DependencyManager::get()->negotiateAudioFormat(); - _queryExpiry = SteadyClock::now(); - if (_avatarOverrideUrl.isValid()) { - getMyAvatar()->useFullAvatarURL(_avatarOverrideUrl); - } - - if (getMyAvatar()->getFullAvatarURLFromPreferences() != getMyAvatar()->getSkeletonModelURL()) { - getMyAvatar()->resetFullAvatarURL(); - } - getMyAvatar()->markIdentityDataChanged(); - getMyAvatar()->resetLastSent(); - - // transmit a "sendAll" packet to the AvatarMixer we just connected to. - getMyAvatar()->sendAvatarDataPacket(true); - } - }); - _pendingIdleEvent = false; _pendingRenderEvent = false; @@ -3496,8 +3477,9 @@ void Application::setIsInterstitialMode(bool interstitialMode) { if (_interstitialMode != interstitialMode) { _interstitialMode = interstitialMode; - auto audioClient = DependencyManager::get(); - audioClient->setAudioPaused(_interstitialMode); + DependencyManager::get()->setAudioPaused(_interstitialMode); + DependencyManager::get()->setMyAvatarDataPacketsPaused(_interstitialMode); + emit interstitialModeChanged(_interstitialMode); } } @@ -6477,7 +6459,7 @@ void Application::nodeActivated(SharedNodePointer node) { DependencyManager::get()->negotiateAudioFormat(); } - if (node->getType() == NodeType::AvatarMixer && !isInterstitialMode()) { + if (node->getType() == NodeType::AvatarMixer) { _queryExpiry = SteadyClock::now(); // new avatar mixer, send off our identity packet on next update loop @@ -6493,8 +6475,10 @@ void Application::nodeActivated(SharedNodePointer node) { getMyAvatar()->markIdentityDataChanged(); getMyAvatar()->resetLastSent(); - // transmit a "sendAll" packet to the AvatarMixer we just connected to. - getMyAvatar()->sendAvatarDataPacket(true); + if (!isInterstitialMode()) { + // transmit a "sendAll" packet to the AvatarMixer we just connected to. + getMyAvatar()->sendAvatarDataPacket(true); + } } } diff --git a/interface/src/avatar/AvatarManager.cpp b/interface/src/avatar/AvatarManager.cpp index 2c758dfc69..b9e30a38eb 100644 --- a/interface/src/avatar/AvatarManager.cpp +++ b/interface/src/avatar/AvatarManager.cpp @@ -137,7 +137,7 @@ void AvatarManager::updateMyAvatar(float deltaTime) { quint64 now = usecTimestampNow(); quint64 dt = now - _lastSendAvatarDataTime; - if (dt > MIN_TIME_BETWEEN_MY_AVATAR_DATA_SENDS && !qApp->isInterstitialMode()) { + if (dt > MIN_TIME_BETWEEN_MY_AVATAR_DATA_SENDS && !_myAvatarDataPacketsPaused) { // send head/hand data to the avatar mixer and voxel server PerformanceTimer perfTimer("send"); _myAvatar->sendAvatarDataPacket(); @@ -155,6 +155,16 @@ float AvatarManager::getAvatarDataRate(const QUuid& sessionID, const QString& ra return avatar ? avatar->getDataRate(rateName) : 0.0f; } +void AvatarManager::setMyAvatarDataPacketsPaused(bool pause) { + if (_myAvatarDataPacketsPaused != pause) { + _myAvatarDataPacketsPaused = pause; + + if (!_myAvatarDataPacketsPaused) { + _myAvatar->sendAvatarDataPacket(true); + } + } +} + float AvatarManager::getAvatarUpdateRate(const QUuid& sessionID, const QString& rateName) const { auto avatar = getAvatarBySessionID(sessionID); return avatar ? avatar->getUpdateRate(rateName) : 0.0f; diff --git a/interface/src/avatar/AvatarManager.h b/interface/src/avatar/AvatarManager.h index bcdfc064bd..ea92389adc 100644 --- a/interface/src/avatar/AvatarManager.h +++ b/interface/src/avatar/AvatarManager.h @@ -91,6 +91,8 @@ public: void updateOtherAvatars(float deltaTime); void sendIdentityRequest(const QUuid& avatarID) const; + void setMyAvatarDataPacketsPaused(bool puase); + void postUpdate(float deltaTime, const render::ScenePointer& scene); void clearOtherAvatars(); @@ -219,6 +221,7 @@ private: int _numAvatarsNotUpdated { 0 }; float _avatarSimulationTime { 0.0f }; bool _shouldRender { true }; + bool _myAvatarDataPacketsPaused { false }; mutable int _identityRequestsSent { 0 }; mutable std::mutex _spaceLock; diff --git a/libraries/audio-client/src/AudioClient.cpp b/libraries/audio-client/src/AudioClient.cpp index caf57cbc6e..3a33eccc8a 100644 --- a/libraries/audio-client/src/AudioClient.cpp +++ b/libraries/audio-client/src/AudioClient.cpp @@ -305,6 +305,16 @@ void AudioClient::audioMixerKilled() { emit disconnected(); } +void AudioClient::setAudioPaused(bool pause) { + if (_audioPaused != pause) { + _audioPaused = pause; + + if (!_audioPaused) { + negotiateAudioFormat(); + } + } +} + QAudioDeviceInfo getNamedAudioDeviceForMode(QAudio::Mode mode, const QString& deviceName) { QAudioDeviceInfo result; foreach(QAudioDeviceInfo audioDevice, getAvailableDevices(mode)) { diff --git a/libraries/audio-client/src/AudioClient.h b/libraries/audio-client/src/AudioClient.h index 099a692e26..4640d7c045 100644 --- a/libraries/audio-client/src/AudioClient.h +++ b/libraries/audio-client/src/AudioClient.h @@ -162,7 +162,7 @@ public: bool startRecording(const QString& filename); void stopRecording(); - void setAudioPaused(bool pause) { _audioPaused = pause; } + void setAudioPaused(bool pause); #ifdef Q_OS_WIN diff --git a/scripts/system/interstitialPage.js b/scripts/system/interstitialPage.js index 1cc048ca99..dcce721cd9 100644 --- a/scripts/system/interstitialPage.js +++ b/scripts/system/interstitialPage.js @@ -305,7 +305,7 @@ } } - var THE_PLACE = "hifi://TheSpot-dev"; + var THE_PLACE = (HifiAbout.buildVersion === "dev") ? "hifi://TheSpot-dev": "hifi://TheSpot"; function clickedOnOverlay(overlayID, event) { if (loadingToTheSpotID === overlayID) { location.handleLookupString(THE_PLACE); From 23ed314250df89800c904bea5bca6b56f0835f35 Mon Sep 17 00:00:00 2001 From: Anthony Thibault Date: Tue, 11 Sep 2018 14:50:50 -0700 Subject: [PATCH 161/210] Fix for missing return warning --- interface/src/avatar/OtherAvatar.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/interface/src/avatar/OtherAvatar.cpp b/interface/src/avatar/OtherAvatar.cpp index cf15d4abdf..29fa98fd1d 100644 --- a/interface/src/avatar/OtherAvatar.cpp +++ b/interface/src/avatar/OtherAvatar.cpp @@ -25,6 +25,7 @@ static xColor getLoadingOrbColor(Avatar::LoadingStatus loadingStatus) { case Avatar::LoadingStatus::LoadSuccess: return LOAD_SUCCESS_COLOR; case Avatar::LoadingStatus::LoadFailure: + default: return LOAD_FAILURE_COLOR; } } From b6c5ae2a688527cdaf5a58a64f05ce61dc9a2345 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 11 Sep 2018 15:23:40 -0700 Subject: [PATCH 162/210] staging changes --- .../controllers/controllerDispatcher.js | 2 +- .../controllerModules/nearParentGrabEntity.js | 3 ++ .../controllerModules/webSurfaceLaserInput.js | 42 ++++++++++++------- 3 files changed, 30 insertions(+), 17 deletions(-) diff --git a/scripts/system/controllers/controllerDispatcher.js b/scripts/system/controllers/controllerDispatcher.js index 7a916392b9..c7a8de87b9 100644 --- a/scripts/system/controllers/controllerDispatcher.js +++ b/scripts/system/controllers/controllerDispatcher.js @@ -31,7 +31,7 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); var BASIC_TIMER_INTERVAL_MS = 1000 / TARGET_UPDATE_HZ; var PROFILE = false; - var DEBUG = false; + var DEBUG = true; if (typeof Test !== "undefined") { PROFILE = true; diff --git a/scripts/system/controllers/controllerModules/nearParentGrabEntity.js b/scripts/system/controllers/controllerModules/nearParentGrabEntity.js index 6bbd19550b..f805dbf60e 100644 --- a/scripts/system/controllers/controllerModules/nearParentGrabEntity.js +++ b/scripts/system/controllers/controllerModules/nearParentGrabEntity.js @@ -24,6 +24,9 @@ Script.include("/~/system/libraries/controllers.js"); // XXX this.ignoreIK = (grabbableData.ignoreIK !== undefined) ? grabbableData.ignoreIK : true; // XXX this.kinematicGrab = (grabbableData.kinematic !== undefined) ? grabbableData.kinematic : NEAR_GRABBING_KINEMATIC; + // this offset needs to match the one in libraries/display-plugins/src/display-plugins/hmd/HmdDisplayPlugin.cpp:378 + var GRAB_POINT_SPHERE_OFFSET = { x: 0.04, y: 0.13, z: 0.039 }; // x = upward, y = forward, z = lateral + function getGrabOffset(handController) { var offset = GRAB_POINT_SPHERE_OFFSET; if (handController === Controller.Standard.LeftHand) { diff --git a/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js b/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js index dd0af0ba8f..e4978884d0 100644 --- a/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js +++ b/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js @@ -21,6 +21,10 @@ Script.include("/~/system/libraries/controllers.js"); this.otherHand = this.hand === RIGHT_HAND ? LEFT_HAND : RIGHT_HAND; this.running = false; + // parameters for things to be working on + this.isObjectEntity = false; + this.objectID = null; + this.parameters = makeDispatcherModuleParameters( 160, this.hand === RIGHT_HAND ? ["rightHand"] : ["leftHand"], @@ -60,15 +64,6 @@ Script.include("/~/system/libraries/controllers.js"); return this.hand === RIGHT_HAND ? leftOverlayLaserInput : rightOverlayLaserInput; }; - this.isPointingAtNearGrabbableEntity = function(controllerData, triggerPressed) { - var intersection = controllerData.rayPicks[this.hand]; - var objectID = intersection.objectID; - if(intersection.type === Picks.INTERSECTED_ENTITY) { - return (controllerData.nearbyEntityPropertiesByID[objectID] !== null && triggerPressed); - } - return false; - } - this.isPointingAtTriggerable = function(controllerData, triggerPressed) { // allow pointing at tablet, unlocked web entities, or web overlays automatically without pressing trigger, // but for pointing at locked web entities or non-web overlays user must be pressing trigger @@ -123,14 +118,17 @@ Script.include("/~/system/libraries/controllers.js"); controllerData.triggerValues[this.otherHand] <= TRIGGER_OFF_VALUE; var allowThisModule = !otherModuleRunning || isTriggerPressed; - if (allowThisModule && this.isPointingAtTriggerable(controllerData, isTriggerPressed) && - !this.isPointingAtNearGrabbableEntity(controllerData, isTriggerPressed)) { + if (allowThisModule && this.isPointingAtTriggerable(controllerData, isTriggerPressed)) { this.updateAllwaysOn(); if (isTriggerPressed) { this.dominantHandOverride = true; // Override dominant hand. this.getOtherModule().dominantHandOverride = false; } if (this.parameters.handLaser.allwaysOn || isTriggerPressed) { + var intersection = controllerData.rayPicks[this.hand]; + // the object is either an entity or an overlay. + this.isObjectEntity = (intersection.type === Picks.INTERSECTED_ENTITY); + this.objectID = intersection.objectID; return makeRunningValues(true, [], []); } } @@ -142,17 +140,29 @@ Script.include("/~/system/libraries/controllers.js"); otherModuleRunning = otherModuleRunning && this.getDominantHand() !== this.hand; // Auto-swap to dominant hand. otherModuleRunning = otherModuleRunning || this.getOtherModule().dominantHandOverride; // Override dominant hand. var grabModuleNeedsToRun = this.grabModuleWantsNearbyOverlay(controllerData); - var allowThisModule = !otherModuleRunning && !grabModuleNeedsToRun; + // only allow for non-near grab + var allowThisModule = !otherModuleRunning && !(grabModuleNeedsToRun && controllerData.secondaryValues[this.hand] > BUMPER_ON_VALUE); var isTriggerPressed = controllerData.triggerValues[this.hand] > TRIGGER_OFF_VALUE; var laserOn = isTriggerPressed || this.parameters.handLaser.allwaysOn; - if (allowThisModule && (laserOn && this.isPointingAtTriggerable(controllerData, isTriggerPressed)) && - (controllerData.nearbyEntityProperties[this.hand] !== [])) { - this.running = true; - return makeRunningValues(true, [], []); + if (allowThisModule) { + if (laserOn && this.isPointingAtTriggerable(controllerData, isTriggerPressed)) { + this.running = true; + return makeRunningValues(true, [], []); + } else { + this.deleteContextOverlay(); + this.running = false; + this.dominantHandOverride = false; + return makeRunningValues(false, [], []); + } } this.deleteContextOverlay(); this.running = false; this.dominantHandOverride = false; + this.objectID = null; + if (this.hand === LEFT_HAND) { + print("allowThisModule = " + allowThisModule); + print("isPointingAtTriggerable = " + (laserOn || this.isPointingAtTriggerable(controllerData, isTriggerPressed))); + } return makeRunningValues(false, [], []); }; } From c97d6460835b023cc5cbc6a549ccf9565fb37e52 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Tue, 11 Sep 2018 15:57:44 -0700 Subject: [PATCH 163/210] making requested changes and fixing compile issue for jenkins --- interface/src/Application.cpp | 4 ---- interface/src/Application.h | 5 ----- interface/src/ConnectionMonitor.cpp | 10 +++++----- interface/src/octree/SafeLanding.cpp | 2 +- libraries/networking/src/AddressManager.cpp | 6 ------ libraries/networking/src/AddressManager.h | 2 +- 6 files changed, 7 insertions(+), 22 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index ca27b29b92..36d2e09abf 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -3479,8 +3479,6 @@ void Application::setIsInterstitialMode(bool interstitialMode) { DependencyManager::get()->setAudioPaused(_interstitialMode); DependencyManager::get()->setMyAvatarDataPacketsPaused(_interstitialMode); - - emit interstitialModeChanged(_interstitialMode); } } @@ -5323,7 +5321,6 @@ void Application::resetPhysicsReadyInformation() { _fullSceneCounterAtLastPhysicsCheck = 0; _nearbyEntitiesCountAtLastPhysicsCheck = 0; _nearbyEntitiesStabilityCount = 0; - _nearbyEntitiesReadyCount = 0; _physicsEnabled = false; _octreeProcessor.startEntitySequence(); } @@ -6592,7 +6589,6 @@ bool Application::nearbyEntitiesAreReadyForPhysics() { readyNearbyEntities++; } } - _nearbyEntitiesReadyCount = readyNearbyEntities; return result; } return false; diff --git a/interface/src/Application.h b/interface/src/Application.h index 4446a7d406..aafc6a4f0d 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -225,9 +225,6 @@ public: bool getPreferStylusOverLaser() { return _preferStylusOverLaserSetting.get(); } void setPreferStylusOverLaser(bool value); - uint32_t getEntitiesStabilityCount() { return _nearbyEntitiesStabilityCount; } - uint32_t getNearbyEntitiesReadyCount() { return _nearbyEntitiesReadyCount; } - uint32_t getNearbyEntitiesCount() { return _nearbyEntitiesCountAtLastPhysicsCheck; } // FIXME: Remove setting completely or make available through JavaScript API? //bool getPreferAvatarFingerOverStylus() { return _preferAvatarFingerOverStylusSetting.get(); } bool getPreferAvatarFingerOverStylus() { return false; } @@ -337,7 +334,6 @@ signals: void activeDisplayPluginChanged(); void uploadRequest(QString path); - void interstitialModeChanged(bool interstitialMode); public slots: QVector pasteEntities(float x, float y, float z); @@ -732,7 +728,6 @@ private: uint32_t _fullSceneCounterAtLastPhysicsCheck { 0 }; // _fullSceneReceivedCounter last time we checked physics ready uint32_t _nearbyEntitiesCountAtLastPhysicsCheck { 0 }; // how many in-range entities last time we checked physics ready uint32_t _nearbyEntitiesStabilityCount { 0 }; // how many times has _nearbyEntitiesCountAtLastPhysicsCheck been the same - uint32_t _nearbyEntitiesReadyCount { 0 }; quint64 _lastPhysicsCheckTime { usecTimestampNow() }; // when did we last check to see if physics was ready bool _keyboardDeviceHasFocus { true }; diff --git a/interface/src/ConnectionMonitor.cpp b/interface/src/ConnectionMonitor.cpp index 6578abf285..2f4e135c9a 100644 --- a/interface/src/ConnectionMonitor.cpp +++ b/interface/src/ConnectionMonitor.cpp @@ -21,8 +21,8 @@ // Because the connection monitor is created at startup, the time we wait on initial load // should be longer to allow the application to initialize. -static const int ON_INITIAL_LOAD_DISPLAY_AFTER_DISCONNECTED_FOR_X_MS = 10000; -static const int DISPLAY_AFTER_DISCONNECTED_FOR_X_MS = 5000; +static const int ON_INITIAL_LOAD_REDIRECT_AFTER_DISCONNECTED_FOR_X_MS = 10000; +static const int REDIRECT_AFTER_DISCONNECTED_FOR_X_MS = 5000; static const QString ERROR_DOMAIN_URL = "file:///~/serverless/redirect.json"; void ConnectionMonitor::init() { @@ -36,17 +36,17 @@ void ConnectionMonitor::init() { _timer.setSingleShot(true); if (!domainHandler.isConnected()) { - _timer.start(ON_INITIAL_LOAD_DISPLAY_AFTER_DISCONNECTED_FOR_X_MS); + _timer.start(ON_INITIAL_LOAD_REDIRECT_AFTER_DISCONNECTED_FOR_X_MS); } connect(&_timer, &QTimer::timeout, this, []() { - qDebug() << "ConnectionMonitor: Showing connection failure window"; + qDebug() << "ConnectionMonitor: Redirecting to 404 error domain"; qApp->goToErrorDomainURL(REDIRECT_HIFI_ADDRESS); }); } void ConnectionMonitor::startTimer() { - _timer.start(DISPLAY_AFTER_DISCONNECTED_FOR_X_MS); + _timer.start(REDIRECT_AFTER_DISCONNECTED_FOR_X_MS); } void ConnectionMonitor::stopTimer() { diff --git a/interface/src/octree/SafeLanding.cpp b/interface/src/octree/SafeLanding.cpp index f73a13f346..8912de668a 100644 --- a/interface/src/octree/SafeLanding.cpp +++ b/interface/src/octree/SafeLanding.cpp @@ -67,7 +67,7 @@ void SafeLanding::addTrackedEntity(const EntityItemID& entityID) { EntityItemPointer entity = _entityTree->findEntityByID(entityID); _trackedEntities.emplace(entityID, entity); - int trackedEntityCount = _trackedEntities.size(); + int trackedEntityCount = (int)_trackedEntities.size(); if (trackedEntityCount > _maxTrackedEntityCount) { _maxTrackedEntityCount = trackedEntityCount; diff --git a/libraries/networking/src/AddressManager.cpp b/libraries/networking/src/AddressManager.cpp index 824e0d4515..9e5cbcaa7b 100644 --- a/libraries/networking/src/AddressManager.cpp +++ b/libraries/networking/src/AddressManager.cpp @@ -152,12 +152,6 @@ void AddressManager::goForward() { } } -void AddressManager::goToLastAddress() { - // this should always return something as long as the URL isn't empty. - handleUrl(_lastVisitedURL, - LookupTrigger::AttemptedRefresh); -} - void AddressManager::storeCurrentAddress() { auto url = currentAddress(); diff --git a/libraries/networking/src/AddressManager.h b/libraries/networking/src/AddressManager.h index e27504fc3a..a97f16dce8 100644 --- a/libraries/networking/src/AddressManager.h +++ b/libraries/networking/src/AddressManager.h @@ -262,7 +262,7 @@ public slots: * Go to the last address tried. This will be the last URL tried from location.handleLookupString * @function location.goToLastAddress */ - void goToLastAddress(); + void goToLastAddress() { handleUrl(_lastVisitedURL, LookupTrigger::AttemptedRefresh); } /**jsdoc * Refresh the current address, e.g., after connecting to a domain in order to position the user to the desired location. From 8c7781a6d47c8afe1409fe289799b1d6d1b4df10 Mon Sep 17 00:00:00 2001 From: sam gateau Date: Tue, 11 Sep 2018 15:57:57 -0700 Subject: [PATCH 164/210] use the std::chrono duration the way it should be --- libraries/gpu-gl-common/src/gpu/gl/GLBackendQuery.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/gpu-gl-common/src/gpu/gl/GLBackendQuery.cpp b/libraries/gpu-gl-common/src/gpu/gl/GLBackendQuery.cpp index 8aa0f3c699..61423bf970 100644 --- a/libraries/gpu-gl-common/src/gpu/gl/GLBackendQuery.cpp +++ b/libraries/gpu-gl-common/src/gpu/gl/GLBackendQuery.cpp @@ -63,7 +63,7 @@ void GLBackend::do_endQuery(const Batch& batch, size_t paramOffset) { #endif --_queryStage._rangeQueryDepth; - auto duration_ns = (std::chrono::high_resolution_clock::now() - glquery->_batchElapsedTimeBegin); + auto duration_ns = std::chrono::duration_cast(std::chrono::high_resolution_clock::now() - glquery->_batchElapsedTimeBegin); glquery->_batchElapsedTime = duration_ns.count(); PROFILE_RANGE_END(render_gpu_gl_detail, glquery->_profileRangeId); From 0f25756908524d08cf9856e4058c8f1f6a084fa9 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 11 Sep 2018 16:29:39 -0700 Subject: [PATCH 165/210] expose domain connection error to Window --- interface/src/Application.cpp | 2 -- interface/src/scripting/WindowScriptingInterface.cpp | 7 +++++++ interface/src/scripting/WindowScriptingInterface.h | 7 +++++++ libraries/networking/src/AddressManager.h | 9 --------- libraries/networking/src/DomainHandler.cpp | 2 +- libraries/networking/src/DomainHandler.h | 5 +++++ 6 files changed, 20 insertions(+), 12 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index ca27b29b92..64cceec0fe 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -1211,8 +1211,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo auto discoverabilityManager = DependencyManager::get(); connect(&locationUpdateTimer, &QTimer::timeout, discoverabilityManager.data(), &DiscoverabilityManager::updateLocation); - connect(&domainHandler, &DomainHandler::domainConnectionErrorChanged, DependencyManager::get().data(), - &AddressManager::setLastDomainConnectionError); connect(&locationUpdateTimer, &QTimer::timeout, DependencyManager::get().data(), &AddressManager::storeCurrentAddress); locationUpdateTimer.start(DATA_SERVER_LOCATION_CHANGE_UPDATE_MSECS); diff --git a/interface/src/scripting/WindowScriptingInterface.cpp b/interface/src/scripting/WindowScriptingInterface.cpp index 9e13e2affb..aa55fd2ebc 100644 --- a/interface/src/scripting/WindowScriptingInterface.cpp +++ b/interface/src/scripting/WindowScriptingInterface.cpp @@ -39,6 +39,9 @@ WindowScriptingInterface::WindowScriptingInterface() { connect(&domainHandler, &DomainHandler::disconnectedFromDomain, this, &WindowScriptingInterface::disconnectedFromDomain); connect(&domainHandler, &DomainHandler::domainConnectionRefused, this, &WindowScriptingInterface::domainConnectionRefused); + connect(&domainHandler, &DomainHandler::domainConnectionErrorChanged, this, [this](int reasonCode) { + _lastDomainConnectionError = reasonCode; + }); connect(qApp, &Application::svoImportRequested, [this](const QString& urlString) { static const QMetaMethod svoImportRequestedSignal = @@ -409,6 +412,10 @@ glm::vec2 WindowScriptingInterface::getDeviceSize() const { return qApp->getDeviceSize(); } +int WindowScriptingInterface::getLastDominConnectionError() const { + return DependencyManager::get()->getDomainHandler().getLastDomainConnectionError(); +} + int WindowScriptingInterface::getX() { return qApp->getWindow()->geometry().x(); } diff --git a/interface/src/scripting/WindowScriptingInterface.h b/interface/src/scripting/WindowScriptingInterface.h index 626d142785..eaf79106d3 100644 --- a/interface/src/scripting/WindowScriptingInterface.h +++ b/interface/src/scripting/WindowScriptingInterface.h @@ -491,6 +491,13 @@ public slots: */ glm::vec2 getDeviceSize() const; + /**jsdoc + * Gets the last domain connection error when a connection is refused. + * @function Window.getLastDomainConnectionError + * @returns {Window.ConnectionRefusedReason} Integer number that enumerates the last domain connection refused. + */ + int getLastDominConnectionError() const; + /**jsdoc * Open a non-modal message box that can have a variety of button combinations. See also, * {@link Window.updateMessageBox|updateMessageBox} and {@link Window.closeMessageBox|closeMessageBox}. diff --git a/libraries/networking/src/AddressManager.h b/libraries/networking/src/AddressManager.h index e27504fc3a..fd787171df 100644 --- a/libraries/networking/src/AddressManager.h +++ b/libraries/networking/src/AddressManager.h @@ -56,9 +56,6 @@ const QString GET_PLACE = "/api/v1/places/%1"; * Read-only. * @property {boolean} isConnected - true if you're connected to the domain in your current href * metaverse address, otherwise false. - * @property {Window.ConnectionRefusedReason} lastDomainConnectionError - The last error saved from connecting to a domain - * unsuccessfully. - * Read-only. * @property {string} pathname - The location and orientation in your current href metaverse address * (e.g., "/15,-10,26/0,0,0,1"). * Read-only. @@ -76,7 +73,6 @@ class AddressManager : public QObject, public Dependency { Q_PROPERTY(QUrl href READ currentShareableAddress) Q_PROPERTY(QString protocol READ getProtocol) Q_PROPERTY(QString hostname READ getHost) - Q_PROPERTY(int lastDomainConnectionError READ getLastDomainConnectionError) Q_PROPERTY(QString pathname READ currentPath) Q_PROPERTY(QString placename READ getPlaceName) Q_PROPERTY(QString domainID READ getDomainID) @@ -187,9 +183,6 @@ public: QUrl getDomainURL() { return _domainURL; } - int getLastDomainConnectionError() { return _lastDomainConnectionError; } - void setLastDomainConnectionError(int reasonCode) { _lastDomainConnectionError = reasonCode; } - public slots: /**jsdoc * Go to a specified metaverse address. @@ -470,8 +463,6 @@ private: QUrl _domainURL; QUrl _lastVisitedURL; - // domain connection error from domain handler. - int _lastDomainConnectionError{ -1 }; QUuid _rootPlaceID; PositionGetter _positionGetter; diff --git a/libraries/networking/src/DomainHandler.cpp b/libraries/networking/src/DomainHandler.cpp index 75d670cd3d..4bed1646ee 100644 --- a/libraries/networking/src/DomainHandler.cpp +++ b/libraries/networking/src/DomainHandler.cpp @@ -480,7 +480,7 @@ void DomainHandler::processDomainServerConnectionDeniedPacket(QSharedPointer _namedPaths; + + // domain connection error upon connection refusal. + int _lastDomainConnectionError{ -1 }; }; const QString DOMAIN_SPAWNING_POINT { "/0, -10, 0" }; From 9ee21c9956dc1cb53cc86f90602faccb9c569023 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 11 Sep 2018 16:49:11 -0700 Subject: [PATCH 166/210] removing `virtual` keyword from destructor --- interface/src/ui/LoginDialog.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/src/ui/LoginDialog.h b/interface/src/ui/LoginDialog.h index b3f3d8a1a4..ae069f9ab1 100644 --- a/interface/src/ui/LoginDialog.h +++ b/interface/src/ui/LoginDialog.h @@ -27,7 +27,7 @@ public: LoginDialog(QQuickItem* parent = nullptr); - virtual ~LoginDialog(); + ~LoginDialog(); static void showWithSelection(); From 2a0ee1c5326fbfceeada45e8d610b20ab31f603d Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Tue, 11 Sep 2018 16:58:21 -0700 Subject: [PATCH 167/210] Cherry-pick of commit cde2dc2e to fix merge issue --- libraries/render-utils/src/CauterizedModel.cpp | 2 +- libraries/render-utils/src/CauterizedModel.h | 2 +- libraries/render-utils/src/Model.cpp | 4 ++-- libraries/render-utils/src/Model.h | 2 +- libraries/render-utils/src/SoftAttachmentModel.cpp | 4 ++-- libraries/render-utils/src/SoftAttachmentModel.h | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libraries/render-utils/src/CauterizedModel.cpp b/libraries/render-utils/src/CauterizedModel.cpp index fe4574a696..c4631c3676 100644 --- a/libraries/render-utils/src/CauterizedModel.cpp +++ b/libraries/render-utils/src/CauterizedModel.cpp @@ -102,7 +102,7 @@ void CauterizedModel::createRenderItemSet() { } } -void CauterizedModel::updateClusterMatrices(bool triggerBlendshapes) { +void CauterizedModel::updateClusterMatrices() { PerformanceTimer perfTimer("CauterizedModel::updateClusterMatrices"); if (!_needsUpdateClusterMatrices || !isLoaded()) { diff --git a/libraries/render-utils/src/CauterizedModel.h b/libraries/render-utils/src/CauterizedModel.h index 12cf921e5b..36a96fb006 100644 --- a/libraries/render-utils/src/CauterizedModel.h +++ b/libraries/render-utils/src/CauterizedModel.h @@ -33,7 +33,7 @@ public: void createRenderItemSet() override; - virtual void updateClusterMatrices(bool triggerBlendshapes = true) override; + virtual void updateClusterMatrices() override; void updateRenderItems() override; const Model::MeshState& getCauterizeMeshState(int index) const; diff --git a/libraries/render-utils/src/Model.cpp b/libraries/render-utils/src/Model.cpp index 2d986168ba..ba2bd28852 100644 --- a/libraries/render-utils/src/Model.cpp +++ b/libraries/render-utils/src/Model.cpp @@ -976,7 +976,7 @@ bool Model::addToScene(const render::ScenePointer& scene, render::Transaction& transaction, render::Item::Status::Getters& statusGetters) { if (!_addedToScene && isLoaded()) { - updateClusterMatrices(false); + updateClusterMatrices(); if (_modelMeshRenderItems.empty()) { createRenderItemSet(); } @@ -1487,7 +1487,7 @@ void Model::computeMeshPartLocalBounds() { } // virtual -void Model::updateClusterMatrices(bool triggerBlendshapes) { +void Model::updateClusterMatrices() { DETAILED_PERFORMANCE_TIMER("Model::updateClusterMatrices"); if (!_needsUpdateClusterMatrices || !isLoaded()) { diff --git a/libraries/render-utils/src/Model.h b/libraries/render-utils/src/Model.h index 2244c94267..e7534f5b89 100644 --- a/libraries/render-utils/src/Model.h +++ b/libraries/render-utils/src/Model.h @@ -159,7 +159,7 @@ public: bool getSnapModelToRegistrationPoint() { return _snapModelToRegistrationPoint; } virtual void simulate(float deltaTime, bool fullUpdate = true); - virtual void updateClusterMatrices(bool triggerBlendshapes = true); + virtual void updateClusterMatrices(); /// Returns a reference to the shared geometry. const Geometry::Pointer& getGeometry() const { return _renderGeometry; } diff --git a/libraries/render-utils/src/SoftAttachmentModel.cpp b/libraries/render-utils/src/SoftAttachmentModel.cpp index 93ce8f595a..b9a6581f1d 100644 --- a/libraries/render-utils/src/SoftAttachmentModel.cpp +++ b/libraries/render-utils/src/SoftAttachmentModel.cpp @@ -31,7 +31,7 @@ int SoftAttachmentModel::getJointIndexOverride(int i) const { // virtual // use the _rigOverride matrices instead of the Model::_rig -void SoftAttachmentModel::updateClusterMatrices(bool triggerBlendshapes) { +void SoftAttachmentModel::updateClusterMatrices() { if (!_needsUpdateClusterMatrices) { return; } @@ -78,7 +78,7 @@ void SoftAttachmentModel::updateClusterMatrices(bool triggerBlendshapes) { // post the blender if we're not currently waiting for one to finish auto modelBlender = DependencyManager::get(); - if (triggerBlendshapes && modelBlender->shouldComputeBlendshapes() && geometry.hasBlendedMeshes() && _blendshapeCoefficients != _blendedBlendshapeCoefficients) { + if (_blendedVertexBuffersInitialized && modelBlender->shouldComputeBlendshapes() && geometry.hasBlendedMeshes() && _blendshapeCoefficients != _blendedBlendshapeCoefficients) { _blendedBlendshapeCoefficients = _blendshapeCoefficients; modelBlender->noteRequiresBlend(getThisPointer()); } diff --git a/libraries/render-utils/src/SoftAttachmentModel.h b/libraries/render-utils/src/SoftAttachmentModel.h index 03038c35f3..4335c1634e 100644 --- a/libraries/render-utils/src/SoftAttachmentModel.h +++ b/libraries/render-utils/src/SoftAttachmentModel.h @@ -27,7 +27,7 @@ public: ~SoftAttachmentModel(); void updateRig(float deltaTime, glm::mat4 parentTransform) override; - void updateClusterMatrices(bool triggerBlendshapes = true) override; + void updateClusterMatrices() override; protected: int getJointIndexOverride(int i) const; From 1a36693161424a82d2e103c96258701a22bde004 Mon Sep 17 00:00:00 2001 From: SamGondelman Date: Tue, 11 Sep 2018 16:58:38 -0700 Subject: [PATCH 168/210] I hate blendshapes --- .../render-utils/src/CauterizedModel.cpp | 3 +- libraries/render-utils/src/Model.cpp | 43 ++++++++++--------- libraries/render-utils/src/Model.h | 2 - 3 files changed, 25 insertions(+), 23 deletions(-) diff --git a/libraries/render-utils/src/CauterizedModel.cpp b/libraries/render-utils/src/CauterizedModel.cpp index c4631c3676..ffb652f923 100644 --- a/libraries/render-utils/src/CauterizedModel.cpp +++ b/libraries/render-utils/src/CauterizedModel.cpp @@ -86,7 +86,7 @@ void CauterizedModel::createRenderItemSet() { // Create the render payloads int numParts = (int)mesh->getNumParts(); for (int partIndex = 0; partIndex < numParts; partIndex++) { - if (!fbxGeometry.meshes[i].blendshapes.empty()) { + if (!fbxGeometry.meshes[i].blendshapes.empty() && _blendedVertexBuffers.find(i) == _blendedVertexBuffers.end()) { initializeBlendshapes(fbxGeometry.meshes[i], i); } auto ptr = std::make_shared(shared_from_this(), i, partIndex, shapeID, transform, offset); @@ -97,6 +97,7 @@ void CauterizedModel::createRenderItemSet() { shapeID++; } } + _blendedVertexBuffersInitialized = true; } else { Model::createRenderItemSet(); } diff --git a/libraries/render-utils/src/Model.cpp b/libraries/render-utils/src/Model.cpp index ba2bd28852..2feae1fabb 100644 --- a/libraries/render-utils/src/Model.cpp +++ b/libraries/render-utils/src/Model.cpp @@ -302,12 +302,18 @@ bool Model::updateGeometry() { assert(_meshStates.empty()); const FBXGeometry& fbxGeometry = getFBXGeometry(); + int i = 0; foreach (const FBXMesh& mesh, fbxGeometry.meshes) { MeshState state; state.clusterDualQuaternions.resize(mesh.clusters.size()); state.clusterMatrices.resize(mesh.clusters.size()); _meshStates.push_back(state); + if (!mesh.blendshapes.empty() && _blendedVertexBuffers.find(i) == _blendedVertexBuffers.end()) { + initializeBlendshapes(mesh, i); + } + i++; } + _blendedVertexBuffersInitialized = true; needFullUpdate = true; emit rigReady(); } @@ -1273,8 +1279,7 @@ QStringList Model::getJointNames() const { class Blender : public QRunnable { public: - Blender(ModelPointer model, int blendNumber, const Geometry::WeakPointer& geometry, - const QVector& meshes, const QVector& blendshapeCoefficients); + Blender(ModelPointer model, int blendNumber, const Geometry::WeakPointer& geometry, const QVector& blendshapeCoefficients); virtual void run() override; @@ -1283,16 +1288,13 @@ private: ModelPointer _model; int _blendNumber; Geometry::WeakPointer _geometry; - QVector _meshes; QVector _blendshapeCoefficients; }; -Blender::Blender(ModelPointer model, int blendNumber, const Geometry::WeakPointer& geometry, - const QVector& meshes, const QVector& blendshapeCoefficients) : +Blender::Blender(ModelPointer model, int blendNumber, const Geometry::WeakPointer& geometry, const QVector& blendshapeCoefficients) : _model(model), _blendNumber(blendNumber), _geometry(geometry), - _meshes(meshes), _blendshapeCoefficients(blendshapeCoefficients) { } @@ -1300,10 +1302,12 @@ void Blender::run() { DETAILED_PROFILE_RANGE_EX(simulation_animation, __FUNCTION__, 0xFFFF0000, 0, { { "url", _model->getURL().toString() } }); QVector vertices; QVector normalsAndTangents; - if (_model) { + auto geometry = _geometry.lock(); + if (_model && geometry) { int offset = 0; int normalsAndTangentsOffset = 0; - foreach (const FBXMesh& mesh, _meshes) { + auto meshes = geometry->getFBXGeometry().meshes; + foreach (const FBXMesh& mesh, meshes) { if (mesh.blendshapes.isEmpty()) { continue; } @@ -1526,8 +1530,7 @@ bool Model::maybeStartBlender() { if (isLoaded()) { const FBXGeometry& fbxGeometry = getFBXGeometry(); if (fbxGeometry.hasBlendedMeshes()) { - QThreadPool::globalInstance()->start(new Blender(getThisPointer(), ++_blendNumber, _renderGeometry, - fbxGeometry.meshes, _blendshapeCoefficients)); + QThreadPool::globalInstance()->start(new Blender(getThisPointer(), ++_blendNumber, _renderGeometry, _blendshapeCoefficients)); return true; } } @@ -1537,11 +1540,11 @@ bool Model::maybeStartBlender() { void Model::setBlendedVertices(int blendNumber, const Geometry::WeakPointer& geometry, const QVector& vertices, const QVector& normalsAndTangents) { auto geometryRef = geometry.lock(); - if (!geometryRef || _renderGeometry != geometryRef || blendNumber < _appliedBlendNumber) { + if (!geometryRef || _renderGeometry != geometryRef || blendNumber < _appliedBlendNumber || !_blendedVertexBuffersInitialized) { return; } _appliedBlendNumber = blendNumber; - const FBXGeometry& fbxGeometry = getFBXGeometry(); + const FBXGeometry& fbxGeometry = geometryRef->getFBXGeometry(); int index = 0; int normalAndTangentIndex = 0; for (int i = 0; i < fbxGeometry.meshes.size(); i++) { @@ -1552,11 +1555,11 @@ void Model::setBlendedVertices(int blendNumber, const Geometry::WeakPointer& geo const auto vertexCount = mesh.vertices.size(); const auto verticesSize = vertexCount * sizeof(glm::vec3); - const auto& buffer = _blendedVertexBuffers[i]; - assert(buffer && _blendedVertexBuffersInitialized); - buffer->resize(mesh.vertices.size() * sizeof(glm::vec3) + mesh.normalsAndTangents.size() * sizeof(NormalType)); - buffer->setSubData(0, verticesSize, (gpu::Byte*) vertices.constData() + index * sizeof(glm::vec3)); - buffer->setSubData(verticesSize, mesh.normalsAndTangents.size() * sizeof(NormalType), (const gpu::Byte*) normalsAndTangents.data() + normalAndTangentIndex * sizeof(NormalType)); + const auto& buffer = _blendedVertexBuffers.find(i); + assert(buffer != _blendedVertexBuffers.end()); + buffer->second->resize(mesh.vertices.size() * sizeof(glm::vec3) + mesh.normalsAndTangents.size() * sizeof(NormalType)); + buffer->second->setSubData(0, verticesSize, (gpu::Byte*) vertices.constData() + index * sizeof(glm::vec3)); + buffer->second->setSubData(verticesSize, mesh.normalsAndTangents.size() * sizeof(NormalType), (const gpu::Byte*) normalsAndTangents.data() + normalAndTangentIndex * sizeof(NormalType)); index += vertexCount; normalAndTangentIndex += mesh.normalsAndTangents.size(); @@ -1599,6 +1602,7 @@ const render::ItemIDs& Model::fetchRenderItemIDs() const { } void Model::initializeBlendshapes(const FBXMesh& mesh, int index) { + _blendedVertexBuffers[index] = std::make_shared(); QVector normalsAndTangents; normalsAndTangents.resize(2 * mesh.normals.size()); @@ -1627,12 +1631,10 @@ void Model::initializeBlendshapes(const FBXMesh& mesh, int index) { } }); const auto verticesSize = mesh.vertices.size() * sizeof(glm::vec3); - _blendedVertexBuffers[index] = std::make_shared(); _blendedVertexBuffers[index]->resize(mesh.vertices.size() * sizeof(glm::vec3) + normalsAndTangents.size() * sizeof(NormalType)); _blendedVertexBuffers[index]->setSubData(0, verticesSize, (const gpu::Byte*) mesh.vertices.constData()); _blendedVertexBuffers[index]->setSubData(verticesSize, normalsAndTangents.size() * sizeof(NormalType), (const gpu::Byte*) normalsAndTangents.data()); mesh.normalsAndTangents = normalsAndTangents; - _blendedVertexBuffersInitialized = true; } void Model::createRenderItemSet() { @@ -1673,7 +1675,7 @@ void Model::createRenderItemSet() { // Create the render payloads int numParts = (int)mesh->getNumParts(); for (int partIndex = 0; partIndex < numParts; partIndex++) { - if (!fbxGeometry.meshes[i].blendshapes.empty()) { + if (!fbxGeometry.meshes[i].blendshapes.empty() && _blendedVertexBuffers.find(i) == _blendedVertexBuffers.end()) { initializeBlendshapes(fbxGeometry.meshes[i], i); } _modelMeshRenderItems << std::make_shared(shared_from_this(), i, partIndex, shapeID, transform, offset); @@ -1683,6 +1685,7 @@ void Model::createRenderItemSet() { shapeID++; } } + _blendedVertexBuffersInitialized = true; } bool Model::isRenderable() const { diff --git a/libraries/render-utils/src/Model.h b/libraries/render-utils/src/Model.h index e7534f5b89..f35048aa2f 100644 --- a/libraries/render-utils/src/Model.h +++ b/libraries/render-utils/src/Model.h @@ -345,8 +345,6 @@ public: void addMaterial(graphics::MaterialLayer material, const std::string& parentMaterialName); void removeMaterial(graphics::MaterialPointer material, const std::string& parentMaterialName); - bool areBlendedVertexBuffersInitialized(int index) { return _blendedVertexBuffersInitialized; } - public slots: void loadURLFinished(bool success); From d478fcf027825ed39f22cafa5198218b48431a28 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 11 Sep 2018 17:01:14 -0700 Subject: [PATCH 169/210] remove unused signal from domain handler --- interface/src/scripting/WindowScriptingInterface.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/interface/src/scripting/WindowScriptingInterface.cpp b/interface/src/scripting/WindowScriptingInterface.cpp index aa55fd2ebc..46f7ee07b6 100644 --- a/interface/src/scripting/WindowScriptingInterface.cpp +++ b/interface/src/scripting/WindowScriptingInterface.cpp @@ -39,9 +39,6 @@ WindowScriptingInterface::WindowScriptingInterface() { connect(&domainHandler, &DomainHandler::disconnectedFromDomain, this, &WindowScriptingInterface::disconnectedFromDomain); connect(&domainHandler, &DomainHandler::domainConnectionRefused, this, &WindowScriptingInterface::domainConnectionRefused); - connect(&domainHandler, &DomainHandler::domainConnectionErrorChanged, this, [this](int reasonCode) { - _lastDomainConnectionError = reasonCode; - }); connect(qApp, &Application::svoImportRequested, [this](const QString& urlString) { static const QMetaMethod svoImportRequestedSignal = From d4dfaec8ea4054666713729b71f9761609319521 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 11 Sep 2018 17:02:38 -0700 Subject: [PATCH 170/210] updating typo --- interface/src/scripting/WindowScriptingInterface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/src/scripting/WindowScriptingInterface.cpp b/interface/src/scripting/WindowScriptingInterface.cpp index 46f7ee07b6..71650c8c87 100644 --- a/interface/src/scripting/WindowScriptingInterface.cpp +++ b/interface/src/scripting/WindowScriptingInterface.cpp @@ -409,7 +409,7 @@ glm::vec2 WindowScriptingInterface::getDeviceSize() const { return qApp->getDeviceSize(); } -int WindowScriptingInterface::getLastDominConnectionError() const { +int WindowScriptingInterface::getLastDomainConnectionError() const { return DependencyManager::get()->getDomainHandler().getLastDomainConnectionError(); } From 84f95dd4b87e1e260903412d383200c9d151851b Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 11 Sep 2018 17:03:06 -0700 Subject: [PATCH 171/210] updating typo --- interface/src/scripting/WindowScriptingInterface.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/src/scripting/WindowScriptingInterface.h b/interface/src/scripting/WindowScriptingInterface.h index eaf79106d3..3827406729 100644 --- a/interface/src/scripting/WindowScriptingInterface.h +++ b/interface/src/scripting/WindowScriptingInterface.h @@ -496,7 +496,7 @@ public slots: * @function Window.getLastDomainConnectionError * @returns {Window.ConnectionRefusedReason} Integer number that enumerates the last domain connection refused. */ - int getLastDominConnectionError() const; + int getLastDomainConnectionError() const; /**jsdoc * Open a non-modal message box that can have a variety of button combinations. See also, From 15f06264f92c52e15424ecfbf07d477cf9ece228 Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Tue, 11 Sep 2018 17:03:39 -0700 Subject: [PATCH 172/210] Remove unneeded #include --- libraries/shared/src/SharedUtil.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/libraries/shared/src/SharedUtil.cpp b/libraries/shared/src/SharedUtil.cpp index e52e815520..bb22a1e753 100644 --- a/libraries/shared/src/SharedUtil.cpp +++ b/libraries/shared/src/SharedUtil.cpp @@ -21,7 +21,6 @@ #include #include #include -#include #include From a85a7a61190c9abc063253139f7309083cbfa39f Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 11 Sep 2018 17:07:49 -0700 Subject: [PATCH 173/210] adding back goToLastAddress back --- libraries/networking/src/AddressManager.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libraries/networking/src/AddressManager.cpp b/libraries/networking/src/AddressManager.cpp index 9e5cbcaa7b..b83891b4f1 100644 --- a/libraries/networking/src/AddressManager.cpp +++ b/libraries/networking/src/AddressManager.cpp @@ -152,6 +152,11 @@ void AddressManager::goForward() { } } +void AddressManager::goToLastAddress() { + // this should always return something as long as the URL isn't empty. + handleUrl(_lastVisitedURL, LookupTrigger::AttemptedRefresh); +} + void AddressManager::storeCurrentAddress() { auto url = currentAddress(); From 8bca1bc5fe9806c0484ca71c2def7eeab7d1cfc1 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 11 Sep 2018 17:09:21 -0700 Subject: [PATCH 174/210] reverting, oversight --- libraries/networking/src/AddressManager.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/libraries/networking/src/AddressManager.cpp b/libraries/networking/src/AddressManager.cpp index b83891b4f1..9e5cbcaa7b 100644 --- a/libraries/networking/src/AddressManager.cpp +++ b/libraries/networking/src/AddressManager.cpp @@ -152,11 +152,6 @@ void AddressManager::goForward() { } } -void AddressManager::goToLastAddress() { - // this should always return something as long as the URL isn't empty. - handleUrl(_lastVisitedURL, LookupTrigger::AttemptedRefresh); -} - void AddressManager::storeCurrentAddress() { auto url = currentAddress(); From 045ac4cb0d8e38517a2f996ebd8f3209ff5566f0 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 11 Sep 2018 17:43:03 -0700 Subject: [PATCH 175/210] allowing grip button for interrupting web scroll --- .../controllerModules/webSurfaceLaserInput.js | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js b/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js index e4978884d0..3ae971cf70 100644 --- a/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js +++ b/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js @@ -33,7 +33,7 @@ Script.include("/~/system/libraries/controllers.js"); makeLaserParams(hand, true)); this.grabModuleWantsNearbyOverlay = function(controllerData) { - if (controllerData.triggerValues[this.hand] > TRIGGER_ON_VALUE) { + if (controllerData.triggerValues[this.hand] > TRIGGER_ON_VALUE || controllerData.secondaryValues[this.hand] > BUMPER_ON_VALUE) { var nearGrabName = this.hand === RIGHT_HAND ? "RightNearParentingGrabOverlay" : "LeftNearParentingGrabOverlay"; var nearGrabModule = getEnabledModuleByName(nearGrabName); if (nearGrabModule) { @@ -64,12 +64,12 @@ Script.include("/~/system/libraries/controllers.js"); return this.hand === RIGHT_HAND ? leftOverlayLaserInput : rightOverlayLaserInput; }; - this.isPointingAtTriggerable = function(controllerData, triggerPressed) { + this.isPointingAtTriggerable = function(controllerData, triggerPressed, checkEntitiesOnly) { // allow pointing at tablet, unlocked web entities, or web overlays automatically without pressing trigger, // but for pointing at locked web entities or non-web overlays user must be pressing trigger var intersection = controllerData.rayPicks[this.hand]; var objectID = intersection.objectID; - if (intersection.type === Picks.INTERSECTED_OVERLAY) { + if (intersection.type === Picks.INTERSECTED_OVERLAY && !checkEntitiesOnly) { if ((HMD.tabletID && objectID === HMD.tabletID) || (HMD.tabletScreenID && objectID === HMD.tabletScreenID) || (HMD.homeButtonID && objectID === HMD.homeButtonID)) { @@ -118,7 +118,7 @@ Script.include("/~/system/libraries/controllers.js"); controllerData.triggerValues[this.otherHand] <= TRIGGER_OFF_VALUE; var allowThisModule = !otherModuleRunning || isTriggerPressed; - if (allowThisModule && this.isPointingAtTriggerable(controllerData, isTriggerPressed)) { + if (allowThisModule && this.isPointingAtTriggerable(controllerData, isTriggerPressed, false)) { this.updateAllwaysOn(); if (isTriggerPressed) { this.dominantHandOverride = true; // Override dominant hand. @@ -141,11 +141,16 @@ Script.include("/~/system/libraries/controllers.js"); otherModuleRunning = otherModuleRunning || this.getOtherModule().dominantHandOverride; // Override dominant hand. var grabModuleNeedsToRun = this.grabModuleWantsNearbyOverlay(controllerData); // only allow for non-near grab - var allowThisModule = !otherModuleRunning && !(grabModuleNeedsToRun && controllerData.secondaryValues[this.hand] > BUMPER_ON_VALUE); + var allowThisModule = !otherModuleRunning && !grabModuleNeedsToRun; var isTriggerPressed = controllerData.triggerValues[this.hand] > TRIGGER_OFF_VALUE; var laserOn = isTriggerPressed || this.parameters.handLaser.allwaysOn; if (allowThisModule) { - if (laserOn && this.isPointingAtTriggerable(controllerData, isTriggerPressed)) { + // if trigger is down + not pointing at a web entity, keep running web surface laser + if (isTriggerPressed && !this.isPointingAtTriggerable(controllerData, isTriggerPressed, true)) { + this.running = true; + return makeRunningValues(true, [], []); + // if trigger is down + pointing at a web entity/overlay, keep running web surface laser + } else if (laserOn && this.isPointingAtTriggerable(controllerData, isTriggerPressed, false)) { this.running = true; return makeRunningValues(true, [], []); } else { @@ -155,14 +160,11 @@ Script.include("/~/system/libraries/controllers.js"); return makeRunningValues(false, [], []); } } + // if module needs to stop from near grabs or other modules are running, stop it. this.deleteContextOverlay(); this.running = false; this.dominantHandOverride = false; this.objectID = null; - if (this.hand === LEFT_HAND) { - print("allowThisModule = " + allowThisModule); - print("isPointingAtTriggerable = " + (laserOn || this.isPointingAtTriggerable(controllerData, isTriggerPressed))); - } return makeRunningValues(false, [], []); }; } From 2267085dbfa9a173fad9db25c6dcb8eb18e05272 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 11 Sep 2018 17:46:01 -0700 Subject: [PATCH 176/210] removing unused counter variable --- interface/src/Application.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index f925dc8819..40ab8e4b91 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -6571,7 +6571,6 @@ bool Application::nearbyEntitiesAreReadyForPhysics() { _nearbyEntitiesCountAtLastPhysicsCheck = nearbyCount; const uint32_t MINIMUM_NEARBY_ENTITIES_STABILITY_COUNT = 3; - uint32_t readyNearbyEntities = 0; if (_nearbyEntitiesStabilityCount >= MINIMUM_NEARBY_ENTITIES_STABILITY_COUNT) { // We've seen the same number of nearby entities for several stats packets in a row. assume we've got all // the local entities. @@ -6581,8 +6580,6 @@ bool Application::nearbyEntitiesAreReadyForPhysics() { HIFI_FCDEBUG(interfaceapp(), "Physics disabled until entity loads: " << entity->getID() << entity->getName()); // don't break here because we want all the relevant entities to start their downloads result = false; - } else { - readyNearbyEntities++; } } return result; From a7321f950a4aa1de1675006b68a6a5063e7cbde8 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 11 Sep 2018 18:32:17 -0700 Subject: [PATCH 177/210] pushing requested changes - adding timeout refusal --- interface/src/Application.h | 2 -- interface/src/ConnectionMonitor.cpp | 7 ++++--- interface/src/scripting/WindowScriptingInterface.cpp | 2 +- libraries/networking/src/DomainHandler.cpp | 6 ++++++ libraries/networking/src/DomainHandler.h | 12 ++++++++++-- 5 files changed, 21 insertions(+), 8 deletions(-) diff --git a/interface/src/Application.h b/interface/src/Application.h index aafc6a4f0d..0d569eed84 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -230,8 +230,6 @@ public: bool getPreferAvatarFingerOverStylus() { return false; } void setPreferAvatarFingerOverStylus(bool value); - float getDomainLoadingProgress() { return _octreeProcessor.domainLoadingProgress(); } - float getSettingConstrainToolbarPosition() { return _constrainToolbarPosition.get(); } void setSettingConstrainToolbarPosition(bool setting); diff --git a/interface/src/ConnectionMonitor.cpp b/interface/src/ConnectionMonitor.cpp index 2f4e135c9a..3fc353ec01 100644 --- a/interface/src/ConnectionMonitor.cpp +++ b/interface/src/ConnectionMonitor.cpp @@ -23,7 +23,6 @@ // should be longer to allow the application to initialize. static const int ON_INITIAL_LOAD_REDIRECT_AFTER_DISCONNECTED_FOR_X_MS = 10000; static const int REDIRECT_AFTER_DISCONNECTED_FOR_X_MS = 5000; -static const QString ERROR_DOMAIN_URL = "file:///~/serverless/redirect.json"; void ConnectionMonitor::init() { // Connect to domain disconnected message @@ -33,15 +32,17 @@ void ConnectionMonitor::init() { connect(&domainHandler, &DomainHandler::disconnectedFromDomain, this, &ConnectionMonitor::startTimer); connect(&domainHandler, &DomainHandler::connectedToDomain, this, &ConnectionMonitor::stopTimer); connect(&domainHandler, &DomainHandler::domainConnectionRefused, this, &ConnectionMonitor::stopTimer); + connect(&domainHandler, &DomainHandler::redirectToErrorDomainURL, this, &ConnectionMonitor::stopTimer); _timer.setSingleShot(true); if (!domainHandler.isConnected()) { _timer.start(ON_INITIAL_LOAD_REDIRECT_AFTER_DISCONNECTED_FOR_X_MS); } - connect(&_timer, &QTimer::timeout, this, []() { + connect(&_timer, &QTimer::timeout, this, [domainHandler]() { qDebug() << "ConnectionMonitor: Redirecting to 404 error domain"; - qApp->goToErrorDomainURL(REDIRECT_HIFI_ADDRESS); + // set in a timeout error + domainHandler.setErrorRedirectState(REDIRECT_HIFI_ADDRESS, 5); }); } diff --git a/interface/src/scripting/WindowScriptingInterface.cpp b/interface/src/scripting/WindowScriptingInterface.cpp index aa55fd2ebc..c217658c62 100644 --- a/interface/src/scripting/WindowScriptingInterface.cpp +++ b/interface/src/scripting/WindowScriptingInterface.cpp @@ -594,5 +594,5 @@ void WindowScriptingInterface::onMessageBoxSelected(int button) { float WindowScriptingInterface::domainLoadingProgress() { - return qApp->getDomainLoadingProgress(); + return qApp->getOctreePacketProcessor().domainLoadingProgress(); } diff --git a/libraries/networking/src/DomainHandler.cpp b/libraries/networking/src/DomainHandler.cpp index 4bed1646ee..59e3de922f 100644 --- a/libraries/networking/src/DomainHandler.cpp +++ b/libraries/networking/src/DomainHandler.cpp @@ -335,6 +335,12 @@ void DomainHandler::loadedErrorDomain(std::map namedPaths) { DependencyManager::get()->goToViewpointForPath(viewpoint, QString()); } +void DomainHandler::setRedirectErrorState(QUrl errorUrl, int reasonCode) { + _errorDomainURL = errorUrl; + _lastDomainConnectionError = reasonCode; + emit redirectToErrorDomainURL(_errorDomainURL); +} + void DomainHandler::requestDomainSettings() { qCDebug(networking) << "Requesting settings from domain server"; diff --git a/libraries/networking/src/DomainHandler.h b/libraries/networking/src/DomainHandler.h index 45c815eb5a..ab20936f43 100644 --- a/libraries/networking/src/DomainHandler.h +++ b/libraries/networking/src/DomainHandler.h @@ -87,6 +87,8 @@ public: void connectedToServerless(std::map namedPaths); void loadedErrorDomain(std::map namedPaths); + // sets domain handler in error state. + void setRedirectErrorState(QUrl errorUrl, int reasonCode); QString getViewPointFromNamedPath(QString namedPath); @@ -142,6 +144,11 @@ public: * 4 * The domain already has its maximum number of users. * + * + * TimedOut + * 5 + * Connecting to the domain timed out. + * * * * @typedef {number} Window.ConnectionRefusedReason @@ -151,7 +158,8 @@ public: ProtocolMismatch, LoginError, NotAuthorized, - TooManyUsers + TooManyUsers, + TimedOut }; public slots: @@ -188,7 +196,7 @@ signals: void settingsReceiveFail(); void domainConnectionRefused(QString reasonMessage, int reason, const QString& extraInfo); - void redirectToErrorDomainURL(QUrl errorDomaunURL); + void redirectToErrorDomainURL(QUrl errorDomainURL); void limitOfSilentDomainCheckInsReached(); From 30e9d57026269a041377d8602884aa42318ae380 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 11 Sep 2018 18:52:28 -0700 Subject: [PATCH 178/210] adding pattern for during timeout to put into error state --- interface/src/ConnectionMonitor.cpp | 5 +++-- interface/src/ConnectionMonitor.h | 4 ++++ interface/src/octree/OctreePacketProcessor.h | 2 +- interface/src/scripting/WindowScriptingInterface.cpp | 3 --- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/interface/src/ConnectionMonitor.cpp b/interface/src/ConnectionMonitor.cpp index 3fc353ec01..3c85cfb339 100644 --- a/interface/src/ConnectionMonitor.cpp +++ b/interface/src/ConnectionMonitor.cpp @@ -33,16 +33,17 @@ void ConnectionMonitor::init() { connect(&domainHandler, &DomainHandler::connectedToDomain, this, &ConnectionMonitor::stopTimer); connect(&domainHandler, &DomainHandler::domainConnectionRefused, this, &ConnectionMonitor::stopTimer); connect(&domainHandler, &DomainHandler::redirectToErrorDomainURL, this, &ConnectionMonitor::stopTimer); + connect(this, &ConnectionMonitor::setRedirectErrorState, &domainHandler, &DomainHandler::setRedirectErrorState); _timer.setSingleShot(true); if (!domainHandler.isConnected()) { _timer.start(ON_INITIAL_LOAD_REDIRECT_AFTER_DISCONNECTED_FOR_X_MS); } - connect(&_timer, &QTimer::timeout, this, [domainHandler]() { + connect(&_timer, &QTimer::timeout, this, [this]() { qDebug() << "ConnectionMonitor: Redirecting to 404 error domain"; // set in a timeout error - domainHandler.setErrorRedirectState(REDIRECT_HIFI_ADDRESS, 5); + emit setRedirectErrorState(REDIRECT_HIFI_ADDRESS, 5); }); } diff --git a/interface/src/ConnectionMonitor.h b/interface/src/ConnectionMonitor.h index e3d393163b..5e75e2618b 100644 --- a/interface/src/ConnectionMonitor.h +++ b/interface/src/ConnectionMonitor.h @@ -15,6 +15,7 @@ #include #include +class QUrl; class QString; class ConnectionMonitor : public QObject { @@ -22,6 +23,9 @@ class ConnectionMonitor : public QObject { public: void init(); +signals: + void setRedirectErrorState(QUrl errorURL, int reasonCode); + private slots: void startTimer(); void stopTimer(); diff --git a/interface/src/octree/OctreePacketProcessor.h b/interface/src/octree/OctreePacketProcessor.h index de26dbc3d2..d6ffb942e6 100644 --- a/interface/src/octree/OctreePacketProcessor.h +++ b/interface/src/octree/OctreePacketProcessor.h @@ -27,7 +27,7 @@ public: void startEntitySequence(); bool isLoadSequenceComplete() const { return _safeLanding->isLoadSequenceComplete(); } - float domainLoadingProgress() { return _safeLanding->loadingProgressPercentage(); } + float domainLoadingProgress() const { return _safeLanding->loadingProgressPercentage(); } signals: void packetVersionMismatch(); diff --git a/interface/src/scripting/WindowScriptingInterface.cpp b/interface/src/scripting/WindowScriptingInterface.cpp index c217658c62..b4bfddd334 100644 --- a/interface/src/scripting/WindowScriptingInterface.cpp +++ b/interface/src/scripting/WindowScriptingInterface.cpp @@ -39,9 +39,6 @@ WindowScriptingInterface::WindowScriptingInterface() { connect(&domainHandler, &DomainHandler::disconnectedFromDomain, this, &WindowScriptingInterface::disconnectedFromDomain); connect(&domainHandler, &DomainHandler::domainConnectionRefused, this, &WindowScriptingInterface::domainConnectionRefused); - connect(&domainHandler, &DomainHandler::domainConnectionErrorChanged, this, [this](int reasonCode) { - _lastDomainConnectionError = reasonCode; - }); connect(qApp, &Application::svoImportRequested, [this](const QString& urlString) { static const QMetaMethod svoImportRequestedSignal = From 0d72e3808c17bd057e1c85d358f4ba467174630b Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Wed, 12 Sep 2018 10:31:26 -0700 Subject: [PATCH 179/210] Small changes per review --- libraries/avatars/src/AvatarData.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/avatars/src/AvatarData.cpp b/libraries/avatars/src/AvatarData.cpp index 04efcb242e..cd1567af4d 100644 --- a/libraries/avatars/src/AvatarData.cpp +++ b/libraries/avatars/src/AvatarData.cpp @@ -563,7 +563,7 @@ QByteArray AvatarData::toByteArray(AvatarDataDetail dataDetail, quint64 lastSent unsigned char* validityPosition = destinationBuffer; unsigned char validity = 0; int validityBit = 0; - int numValidityBytes = (numJoints + BITS_IN_BYTE - 1) / BITS_IN_BYTE; + int numValidityBytes = calcBitVectorSize(numJoints); #ifdef WANT_DEBUG int rotationSentCount = 0; @@ -690,6 +690,7 @@ QByteArray AvatarData::toByteArray(AvatarDataDetail dataDetail, quint64 lastSent glm::quat mouseFarGrabRotation = extractRotation(mouseFarGrabMatrix); AVATAR_MEMCPY(leftFarGrabPosition); + // Can't do block copy as struct order is x, y, z, w. data->leftFarGrabRotation[0] = leftFarGrabRotation.w; data->leftFarGrabRotation[1] = leftFarGrabRotation.x; data->leftFarGrabRotation[2] = leftFarGrabRotation.y; From b9f0af63e1e52837cd2e692bade3084b1c71a0c5 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Wed, 12 Sep 2018 10:38:21 -0700 Subject: [PATCH 180/210] changing check for near grabbing modules - fixes grabbing for dynamic --- .../controllerModules/webSurfaceLaserInput.js | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js b/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js index 3ae971cf70..bd9d5f97e4 100644 --- a/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js +++ b/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js @@ -49,12 +49,19 @@ Script.include("/~/system/libraries/controllers.js"); nearGrabName = this.hand === RIGHT_HAND ? "RightNearParentingGrabEntity" : "LeftNearParentingGrabEntity"; nearGrabModule = getEnabledModuleByName(nearGrabName); if (nearGrabModule && nearGrabModule.isReady(controllerData)) { - return nearGrabModule.isReady(controllerData).active; - } - nearGrabName = this.hand === RIGHT_HAND ? "RightNearActionGrabEntity" : "LeftNearActionGrabEntity"; - nearGrabModule = getEnabledModuleByName(nearGrabName); - if (nearGrabModule && nearGrabModule.isReady(controllerData)) { - return nearGrabModule.isReady(controllerData).active; + // check for if near parent module is active. + var isNearGrabModuleActive = nearGrabModule.isReady(controllerData).active; + if (isNearGrabModuleActive) { + // if true, return true. + return isNearGrabModuleActive; + } else { + // check near action grab entity as a second pass. + nearGrabName = this.hand === RIGHT_HAND ? "RightNearActionGrabEntity" : "LeftNearActionGrabEntity"; + nearGrabModule = getEnabledModuleByName(nearGrabName); + if (nearGrabModule && nearGrabModule.isReady(controllerData)) { + return nearGrabModule.isReady(controllerData).active; + } + } } } return false; From 7136698c6bf0ae1b0dc2379518c0bf5fc0267633 Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Wed, 12 Sep 2018 10:49:26 -0700 Subject: [PATCH 181/210] Move default pose flags out of joint-positions condition --- libraries/avatars/src/AvatarData.cpp | 47 ++++++++++++++-------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/libraries/avatars/src/AvatarData.cpp b/libraries/avatars/src/AvatarData.cpp index cd1567af4d..5be6631c59 100644 --- a/libraries/avatars/src/AvatarData.cpp +++ b/libraries/avatars/src/AvatarData.cpp @@ -548,13 +548,15 @@ QByteArray AvatarData::toByteArray(AvatarDataDetail dataDetail, quint64 lastSent } } + QVector jointData; + if (hasJointData || hasJointDefaultPoseFlags) { + QReadLocker readLock(&_jointDataLock); + jointData = _jointData; + } + // If it is connected, pack up the data if (hasJointData) { auto startSection = destinationBuffer; - QReadLocker readLock(&_jointDataLock); - - const QVector jointData(_jointData); - readLock.unlock(); // Unlock quickly. // joint rotation data int numJoints = jointData.size(); @@ -736,30 +738,29 @@ QByteArray AvatarData::toByteArray(AvatarDataDetail dataDetail, quint64 lastSent outboundDataRateOut->jointDataRate.increment(numBytes); } - // Always true, currently: - if (hasJointDefaultPoseFlags) { - auto startSection = destinationBuffer; + } - // write numJoints - int numJoints = jointData.size(); - *destinationBuffer++ = (uint8_t)numJoints; + if (hasJointDefaultPoseFlags) { + auto startSection = destinationBuffer; - // write rotationIsDefaultPose bits - destinationBuffer += writeBitVector(destinationBuffer, numJoints, [&](int i) { - return jointData[i].rotationIsDefaultPose; - }); + // write numJoints + int numJoints = jointData.size(); + *destinationBuffer++ = (uint8_t)numJoints; - // write translationIsDefaultPose bits - destinationBuffer += writeBitVector(destinationBuffer, numJoints, [&](int i) { - return jointData[i].translationIsDefaultPose; - }); + // write rotationIsDefaultPose bits + destinationBuffer += writeBitVector(destinationBuffer, numJoints, [&](int i) { + return jointData[i].rotationIsDefaultPose; + }); - if (outboundDataRateOut) { - size_t numBytes = destinationBuffer - startSection; - outboundDataRateOut->jointDefaultPoseFlagsRate.increment(numBytes); - } + // write translationIsDefaultPose bits + destinationBuffer += writeBitVector(destinationBuffer, numJoints, [&](int i) { + return jointData[i].translationIsDefaultPose; + }); + + if (outboundDataRateOut) { + size_t numBytes = destinationBuffer - startSection; + outboundDataRateOut->jointDefaultPoseFlagsRate.increment(numBytes); } - } int avatarDataSize = destinationBuffer - startPosition; From a96e78c72d1c1e6963fc992da7346c39b6cbbad6 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Wed, 12 Sep 2018 10:54:38 -0700 Subject: [PATCH 182/210] removing debug --- scripts/system/controllers/controllerDispatcher.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/system/controllers/controllerDispatcher.js b/scripts/system/controllers/controllerDispatcher.js index c7a8de87b9..7a916392b9 100644 --- a/scripts/system/controllers/controllerDispatcher.js +++ b/scripts/system/controllers/controllerDispatcher.js @@ -31,7 +31,7 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); var BASIC_TIMER_INTERVAL_MS = 1000 / TARGET_UPDATE_HZ; var PROFILE = false; - var DEBUG = true; + var DEBUG = false; if (typeof Test !== "undefined") { PROFILE = true; From 8bef0d0de4c05644e6f24ae641b85c76051f6d97 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Wed, 12 Sep 2018 10:55:40 -0700 Subject: [PATCH 183/210] removing unused variables --- .../controllers/controllerModules/webSurfaceLaserInput.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js b/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js index bd9d5f97e4..9a022409fb 100644 --- a/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js +++ b/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js @@ -21,10 +21,6 @@ Script.include("/~/system/libraries/controllers.js"); this.otherHand = this.hand === RIGHT_HAND ? LEFT_HAND : RIGHT_HAND; this.running = false; - // parameters for things to be working on - this.isObjectEntity = false; - this.objectID = null; - this.parameters = makeDispatcherModuleParameters( 160, this.hand === RIGHT_HAND ? ["rightHand"] : ["leftHand"], @@ -133,9 +129,6 @@ Script.include("/~/system/libraries/controllers.js"); } if (this.parameters.handLaser.allwaysOn || isTriggerPressed) { var intersection = controllerData.rayPicks[this.hand]; - // the object is either an entity or an overlay. - this.isObjectEntity = (intersection.type === Picks.INTERSECTED_ENTITY); - this.objectID = intersection.objectID; return makeRunningValues(true, [], []); } } @@ -171,7 +164,6 @@ Script.include("/~/system/libraries/controllers.js"); this.deleteContextOverlay(); this.running = false; this.dominantHandOverride = false; - this.objectID = null; return makeRunningValues(false, [], []); }; } From acf34dcfdf7fff5379946f9a57d87258edf2d85b Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Wed, 12 Sep 2018 10:58:05 -0700 Subject: [PATCH 184/210] one more unused variable --- .../system/controllers/controllerModules/webSurfaceLaserInput.js | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js b/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js index 9a022409fb..45a6064d17 100644 --- a/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js +++ b/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js @@ -128,7 +128,6 @@ Script.include("/~/system/libraries/controllers.js"); this.getOtherModule().dominantHandOverride = false; } if (this.parameters.handLaser.allwaysOn || isTriggerPressed) { - var intersection = controllerData.rayPicks[this.hand]; return makeRunningValues(true, [], []); } } From 521361293a55643fb32eea7a7aa4cb1967864e2a Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Wed, 12 Sep 2018 11:03:00 -0700 Subject: [PATCH 185/210] moving comment locations inside conditionals --- .../controllers/controllerModules/webSurfaceLaserInput.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js b/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js index 45a6064d17..4e36355621 100644 --- a/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js +++ b/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js @@ -144,12 +144,12 @@ Script.include("/~/system/libraries/controllers.js"); var isTriggerPressed = controllerData.triggerValues[this.hand] > TRIGGER_OFF_VALUE; var laserOn = isTriggerPressed || this.parameters.handLaser.allwaysOn; if (allowThisModule) { - // if trigger is down + not pointing at a web entity, keep running web surface laser if (isTriggerPressed && !this.isPointingAtTriggerable(controllerData, isTriggerPressed, true)) { + // if trigger is down + not pointing at a web entity, keep running web surface laser this.running = true; return makeRunningValues(true, [], []); - // if trigger is down + pointing at a web entity/overlay, keep running web surface laser } else if (laserOn && this.isPointingAtTriggerable(controllerData, isTriggerPressed, false)) { + // if trigger is down + pointing at a web entity/overlay, keep running web surface laser this.running = true; return makeRunningValues(true, [], []); } else { From cf1c1296a726e706a728ee7be19f9ca6f4fbc7eb Mon Sep 17 00:00:00 2001 From: David Back Date: Wed, 12 Sep 2018 11:44:26 -0700 Subject: [PATCH 186/210] fix center scale cube in hmd --- .../system/libraries/entitySelectionTool.js | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/scripts/system/libraries/entitySelectionTool.js b/scripts/system/libraries/entitySelectionTool.js index 05f5e41950..2cf1ecdcde 100644 --- a/scripts/system/libraries/entitySelectionTool.js +++ b/scripts/system/libraries/entitySelectionTool.js @@ -2083,6 +2083,7 @@ SelectionDisplay = (function() { var rotation = null; var previousPickRay = null; var beginMouseEvent = null; + var beginControllerPick = null; var onBegin = function(event, pickRay, pickResult) { var proportional = directionEnum === STRETCH_DIRECTION.ALL; @@ -2218,6 +2219,7 @@ SelectionDisplay = (function() { previousPickRay = pickRay; beginMouseEvent = event; + beginControllerPick = pickRay.origin; }; var onEnd = function(event, reason) { @@ -2286,12 +2288,21 @@ SelectionDisplay = (function() { var newDimensions; if (proportional) { var viewportDimensions = Controller.getViewportDimensions(); - var mouseXDifference = (event.x - beginMouseEvent.x) / viewportDimensions.x; - var mouseYDifference = (beginMouseEvent.y - event.y) / viewportDimensions.y; - var mouseDifference = mouseXDifference + mouseYDifference; var toCameraDistance = getDistanceToCamera(position); var dimensionsMultiple = toCameraDistance * STRETCH_DIRECTION_ALL_CAMERA_DISTANCE_MULTIPLE; - var dimensionChange = mouseDifference * dimensionsMultiple; + + var dimensionChange; + if (HMD.active) { + var vecPickDifference = Vec3.subtract(pickRay.origin, beginControllerPick); + var pickDifference = vecPickDifference.x + vecPickDifference.y + vecPickDifference.z; + dimensionChange = pickDifference * dimensionsMultiple; + } else { + var mouseXDifference = (event.x - beginMouseEvent.x) / viewportDimensions.x; + var mouseYDifference = (beginMouseEvent.y - event.y) / viewportDimensions.y; + var mouseDifference = mouseXDifference + mouseYDifference; + dimensionChange = mouseDifference * dimensionsMultiple; + } + var averageInitialDimension = (initialDimensions.x + initialDimensions.y + initialDimensions.z) / 3; percentChange = dimensionChange / averageInitialDimension; percentChange += 1.0; From 4b93f9f5cda5c5233b2a5ba89319ac6975678530 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Wed, 12 Sep 2018 12:20:03 -0700 Subject: [PATCH 187/210] Revert "use different XORed instance ID for replicas" This reverts commit a37a19da1e4e7657548fb29ad6cf4e130a5eda76. --- libraries/avatars/src/AvatarHashMap.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/libraries/avatars/src/AvatarHashMap.cpp b/libraries/avatars/src/AvatarHashMap.cpp index 284bb20f16..6fc53fcc59 100644 --- a/libraries/avatars/src/AvatarHashMap.cpp +++ b/libraries/avatars/src/AvatarHashMap.cpp @@ -86,8 +86,7 @@ void AvatarReplicas::processDeletedTraitInstance(const QUuid& parentID, AvatarTr if (_replicasMap.find(parentID) != _replicasMap.end()) { auto &replicas = _replicasMap[parentID]; for (auto avatar : replicas) { - avatar->processDeletedTraitInstance(traitType, - AvatarTraits::xoredInstanceID(instanceID, avatar->getTraitInstanceXORID())); + avatar->processDeletedTraitInstance(traitType, instanceID); } } } @@ -96,9 +95,7 @@ void AvatarReplicas::processTraitInstance(const QUuid& parentID, AvatarTraits::T if (_replicasMap.find(parentID) != _replicasMap.end()) { auto &replicas = _replicasMap[parentID]; for (auto avatar : replicas) { - avatar->processTraitInstance(traitType, - AvatarTraits::xoredInstanceID(instanceID, avatar->getTraitInstanceXORID()), - traitBinaryData); + avatar->processTraitInstance(traitType, instanceID, traitBinaryData); } } } @@ -364,11 +361,11 @@ void AvatarHashMap::processBulkAvatarTraits(QSharedPointer mess // in order to handle re-connections to the avatar mixer when the other if (traitBinarySize == AvatarTraits::DELETED_TRAIT_SIZE) { avatar->processDeletedTraitInstance(traitType, xoredInstanceID); - _replicas.processDeletedTraitInstance(avatarID, traitType, traitInstanceID); + _replicas.processDeletedTraitInstance(avatarID, traitType, xoredInstanceID); } else { auto traitData = message->read(traitBinarySize); avatar->processTraitInstance(traitType, xoredInstanceID, traitData); - _replicas.processTraitInstance(avatarID, traitType, traitInstanceID, traitData); + _replicas.processTraitInstance(avatarID, traitType, xoredInstanceID, traitData); } processedInstanceVersion = packetTraitVersion; } else { From 6d3e6a661f1bc5d3650c6d11e502d4072c78826e Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Wed, 12 Sep 2018 12:20:31 -0700 Subject: [PATCH 188/210] Revert "XOR incoming trait instance IDs for other avatars" This reverts commit 9b3d9dd0f319ad2964e54a72bd17934765a91c02. --- libraries/avatars/src/AvatarData.h | 5 ----- libraries/avatars/src/AvatarHashMap.cpp | 20 ++++-------------- libraries/avatars/src/AvatarTraits.h | 21 ++----------------- libraries/avatars/src/ClientTraitsHandler.cpp | 21 ++++++++++++------- libraries/avatars/src/ClientTraitsHandler.h | 4 ++++ 5 files changed, 24 insertions(+), 47 deletions(-) diff --git a/libraries/avatars/src/AvatarData.h b/libraries/avatars/src/AvatarData.h index e9f1f5f6c3..b010a9f924 100644 --- a/libraries/avatars/src/AvatarData.h +++ b/libraries/avatars/src/AvatarData.h @@ -1193,9 +1193,6 @@ public: void setReplicaIndex(int replicaIndex) { _replicaIndex = replicaIndex; } int getReplicaIndex() { return _replicaIndex; } - const AvatarTraits::TraitInstanceID getTraitInstanceXORID() const { return _traitInstanceXORID; } - void cycleTraitInstanceXORID() { _traitInstanceXORID = QUuid::createUuid(); } - signals: /**jsdoc @@ -1502,8 +1499,6 @@ private: // privatize the copy constructor and assignment operator so they cannot be called AvatarData(const AvatarData&); AvatarData& operator= (const AvatarData&); - - AvatarTraits::TraitInstanceID _traitInstanceXORID { QUuid::createUuid() }; }; Q_DECLARE_METATYPE(AvatarData*) diff --git a/libraries/avatars/src/AvatarHashMap.cpp b/libraries/avatars/src/AvatarHashMap.cpp index 6fc53fcc59..d205a915f8 100644 --- a/libraries/avatars/src/AvatarHashMap.cpp +++ b/libraries/avatars/src/AvatarHashMap.cpp @@ -343,29 +343,17 @@ void AvatarHashMap::processBulkAvatarTraits(QSharedPointer mess AvatarTraits::TraitInstanceID traitInstanceID = QUuid::fromRfc4122(message->readWithoutCopy(NUM_BYTES_RFC4122_UUID)); - // XOR the incoming trait instance ID with this avatar object's personal XOR ID - - // this ensures that we have separate entity instances in the local tree - // if we briefly end up with two Avatar objects for this node - - // (which can occur if the shared pointer for the - // previous instance of an avatar hasn't yet gone out of scope before the - // new instance is created) - - auto xoredInstanceID = AvatarTraits::xoredInstanceID(traitInstanceID, avatar->getTraitInstanceXORID()); - message->readPrimitive(&traitBinarySize); auto& processedInstanceVersion = lastProcessedVersions.getInstanceValueRef(traitType, traitInstanceID); if (packetTraitVersion > processedInstanceVersion) { - // in order to handle re-connections to the avatar mixer when the other if (traitBinarySize == AvatarTraits::DELETED_TRAIT_SIZE) { - avatar->processDeletedTraitInstance(traitType, xoredInstanceID); - _replicas.processDeletedTraitInstance(avatarID, traitType, xoredInstanceID); + avatar->processDeletedTraitInstance(traitType, traitInstanceID); + _replicas.processDeletedTraitInstance(avatarID, traitType, traitInstanceID); } else { auto traitData = message->read(traitBinarySize); - avatar->processTraitInstance(traitType, xoredInstanceID, traitData); - _replicas.processTraitInstance(avatarID, traitType, xoredInstanceID, traitData); + avatar->processTraitInstance(traitType, traitInstanceID, traitData); + _replicas.processTraitInstance(avatarID, traitType, traitInstanceID, traitData); } processedInstanceVersion = packetTraitVersion; } else { diff --git a/libraries/avatars/src/AvatarTraits.h b/libraries/avatars/src/AvatarTraits.h index 47be0d6111..5866caf234 100644 --- a/libraries/avatars/src/AvatarTraits.h +++ b/libraries/avatars/src/AvatarTraits.h @@ -41,8 +41,7 @@ namespace AvatarTraits { const TraitWireSize DELETED_TRAIT_SIZE = -1; inline qint64 packInstancedTraitDelete(TraitType traitType, TraitInstanceID instanceID, ExtendedIODevice& destination, - TraitVersion traitVersion = NULL_TRAIT_VERSION, - TraitInstanceID xoredInstanceID = TraitInstanceID()) { + TraitVersion traitVersion = NULL_TRAIT_VERSION) { qint64 bytesWritten = 0; bytesWritten += destination.writePrimitive(traitType); @@ -51,28 +50,12 @@ namespace AvatarTraits { bytesWritten += destination.writePrimitive(traitVersion); } - if (xoredInstanceID.isNull()) { - bytesWritten += destination.write(instanceID.toRfc4122()); - } else { - bytesWritten += destination.write(xoredInstanceID.toRfc4122()); - } + bytesWritten += destination.write(instanceID.toRfc4122()); bytesWritten += destination.writePrimitive(DELETED_TRAIT_SIZE); return bytesWritten; } - - inline TraitInstanceID xoredInstanceID(TraitInstanceID localInstanceID, TraitInstanceID xorKeyID) { - QByteArray xoredInstanceID { NUM_BYTES_RFC4122_UUID, 0 }; - auto xorKeyIDBytes = xorKeyID.toRfc4122(); - auto localInstanceIDBytes = localInstanceID.toRfc4122(); - - for (auto i = 0; i < localInstanceIDBytes.size(); ++i) { - xoredInstanceID[i] = localInstanceIDBytes[i] ^ xorKeyIDBytes[i]; - } - - return QUuid::fromRfc4122(xoredInstanceID); - } }; #endif // hifi_AvatarTraits_h diff --git a/libraries/avatars/src/ClientTraitsHandler.cpp b/libraries/avatars/src/ClientTraitsHandler.cpp index 479852cf9a..94823610dc 100644 --- a/libraries/avatars/src/ClientTraitsHandler.cpp +++ b/libraries/avatars/src/ClientTraitsHandler.cpp @@ -45,7 +45,7 @@ void ClientTraitsHandler::resetForNewMixer() { _owningAvatar->prepareResetTraitInstances(); // reset the trait XOR ID since we're resetting for a new avatar mixer - _owningAvatar->cycleTraitInstanceXORID(); + _sessionXORID = QUuid::createUuid().toRfc4122(); } void ClientTraitsHandler::sendChangedTraitsToMixer() { @@ -100,15 +100,11 @@ void ClientTraitsHandler::sendChangedTraitsToMixer() { // since this is going to the mixer, use the XORed instance ID (to anonymize trait instance IDs // that would typically persist across sessions) _owningAvatar->packTraitInstance(instancedIt->traitType, instanceIDValuePair.id, *traitsPacketList, - AvatarTraits::NULL_TRAIT_VERSION, - AvatarTraits::xoredInstanceID(instanceIDValuePair.id, - _owningAvatar->getTraitInstanceXORID())); + AvatarTraits::NULL_TRAIT_VERSION, xorInstanceID(instanceIDValuePair.id)); } else if (!_shouldPerformInitialSend && instanceIDValuePair.value == Deleted) { // pack delete for this trait instance AvatarTraits::packInstancedTraitDelete(instancedIt->traitType, instanceIDValuePair.id, - *traitsPacketList, AvatarTraits::NULL_TRAIT_VERSION, - AvatarTraits::xoredInstanceID(instanceIDValuePair.id, - _owningAvatar->getTraitInstanceXORID())); + *traitsPacketList); } } @@ -122,6 +118,17 @@ void ClientTraitsHandler::sendChangedTraitsToMixer() { } } +AvatarTraits::TraitInstanceID ClientTraitsHandler::xorInstanceID(AvatarTraits::TraitInstanceID localInstanceID) { + QByteArray xorInstanceID { NUM_BYTES_RFC4122_UUID, 0 }; + auto localInstanceIDBytes = localInstanceID.toRfc4122(); + + for (auto i = 0; i < localInstanceIDBytes.size(); ++i) { + xorInstanceID[i] = localInstanceIDBytes[i] ^ _sessionXORID[i]; + } + + return QUuid::fromRfc4122(xorInstanceID); +} + void ClientTraitsHandler::processTraitOverride(QSharedPointer message, SharedNodePointer sendingNode) { if (sendingNode->getType() == NodeType::AvatarMixer) { while (message->getBytesLeftToRead()) { diff --git a/libraries/avatars/src/ClientTraitsHandler.h b/libraries/avatars/src/ClientTraitsHandler.h index 6d1592ba74..2319061502 100644 --- a/libraries/avatars/src/ClientTraitsHandler.h +++ b/libraries/avatars/src/ClientTraitsHandler.h @@ -37,6 +37,8 @@ public: void resetForNewMixer(); + AvatarTraits::TraitInstanceID xorInstanceID(AvatarTraits::TraitInstanceID localInstanceID); + public slots: void processTraitOverride(QSharedPointer message, SharedNodePointer sendingNode); @@ -53,6 +55,8 @@ private: AvatarTraits::TraitVersion _currentTraitVersion { AvatarTraits::DEFAULT_TRAIT_VERSION }; AvatarTraits::TraitVersion _currentSkeletonVersion { AvatarTraits::NULL_TRAIT_VERSION }; + + QByteArray _sessionXORID { NUM_BYTES_RFC4122_UUID, 0}; bool _shouldPerformInitialSend { false }; bool _hasChangedTraits { false }; From 1789d51d6e15ab7982579f8bbc6a03104e15d0a0 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Wed, 12 Sep 2018 12:22:07 -0700 Subject: [PATCH 189/210] Revert "cycle avatar entity IDs for new avatar mixer" This reverts commit 20912349a4f0b8854bda467ee1e1bd04d9bb67ef. --- .../src/avatars-renderer/Avatar.cpp | 1 + libraries/avatars/src/AvatarData.cpp | 10 ++-------- libraries/avatars/src/AvatarData.h | 3 +-- libraries/avatars/src/AvatarTraits.h | 2 +- libraries/avatars/src/ClientTraitsHandler.cpp | 20 +------------------ libraries/avatars/src/ClientTraitsHandler.h | 8 ++------ 6 files changed, 8 insertions(+), 36 deletions(-) diff --git a/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp b/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp index ac25f65576..cadc3b31e3 100644 --- a/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp +++ b/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp @@ -141,6 +141,7 @@ Avatar::~Avatar() { } }); } + auto geometryCache = DependencyManager::get(); if (geometryCache) { geometryCache->releaseID(_nameRectGeometryID); diff --git a/libraries/avatars/src/AvatarData.cpp b/libraries/avatars/src/AvatarData.cpp index e7aaa18576..ea6dbd7074 100644 --- a/libraries/avatars/src/AvatarData.cpp +++ b/libraries/avatars/src/AvatarData.cpp @@ -1861,9 +1861,7 @@ qint64 AvatarData::packTrait(AvatarTraits::TraitType traitType, ExtendedIODevice } qint64 AvatarData::packTraitInstance(AvatarTraits::TraitType traitType, AvatarTraits::TraitInstanceID traitInstanceID, - ExtendedIODevice& destination, AvatarTraits::TraitVersion traitVersion, - AvatarTraits::TraitInstanceID wireInstanceID) { - + ExtendedIODevice& destination, AvatarTraits::TraitVersion traitVersion) { qint64 bytesWritten = 0; bytesWritten += destination.writePrimitive(traitType); @@ -1872,11 +1870,7 @@ qint64 AvatarData::packTraitInstance(AvatarTraits::TraitType traitType, AvatarTr bytesWritten += destination.writePrimitive(traitVersion); } - if (!wireInstanceID.isNull()) { - bytesWritten += destination.write(wireInstanceID.toRfc4122()); - } else { - bytesWritten += destination.write(traitInstanceID.toRfc4122()); - } + bytesWritten += destination.write(traitInstanceID.toRfc4122()); if (traitType == AvatarTraits::AvatarEntity) { // grab a read lock on the avatar entities and check for entity data for the given ID diff --git a/libraries/avatars/src/AvatarData.h b/libraries/avatars/src/AvatarData.h index b010a9f924..db2b82b0b7 100644 --- a/libraries/avatars/src/AvatarData.h +++ b/libraries/avatars/src/AvatarData.h @@ -962,8 +962,7 @@ public: qint64 packTrait(AvatarTraits::TraitType traitType, ExtendedIODevice& destination, AvatarTraits::TraitVersion traitVersion = AvatarTraits::NULL_TRAIT_VERSION); qint64 packTraitInstance(AvatarTraits::TraitType traitType, AvatarTraits::TraitInstanceID instanceID, - ExtendedIODevice& destination, AvatarTraits::TraitVersion traitVersion = AvatarTraits::NULL_TRAIT_VERSION, - AvatarTraits::TraitInstanceID wireInstanceID = AvatarTraits::TraitInstanceID()); + ExtendedIODevice& destination, AvatarTraits::TraitVersion traitVersion = AvatarTraits::NULL_TRAIT_VERSION); void prepareResetTraitInstances(); diff --git a/libraries/avatars/src/AvatarTraits.h b/libraries/avatars/src/AvatarTraits.h index 5866caf234..f0c807a432 100644 --- a/libraries/avatars/src/AvatarTraits.h +++ b/libraries/avatars/src/AvatarTraits.h @@ -41,7 +41,7 @@ namespace AvatarTraits { const TraitWireSize DELETED_TRAIT_SIZE = -1; inline qint64 packInstancedTraitDelete(TraitType traitType, TraitInstanceID instanceID, ExtendedIODevice& destination, - TraitVersion traitVersion = NULL_TRAIT_VERSION) { + TraitVersion traitVersion = NULL_TRAIT_VERSION) { qint64 bytesWritten = 0; bytesWritten += destination.writePrimitive(traitType); diff --git a/libraries/avatars/src/ClientTraitsHandler.cpp b/libraries/avatars/src/ClientTraitsHandler.cpp index 94823610dc..a06b53da7c 100644 --- a/libraries/avatars/src/ClientTraitsHandler.cpp +++ b/libraries/avatars/src/ClientTraitsHandler.cpp @@ -43,9 +43,6 @@ void ClientTraitsHandler::resetForNewMixer() { // pre-fill the instanced statuses that we will need to send next frame _owningAvatar->prepareResetTraitInstances(); - - // reset the trait XOR ID since we're resetting for a new avatar mixer - _sessionXORID = QUuid::createUuid().toRfc4122(); } void ClientTraitsHandler::sendChangedTraitsToMixer() { @@ -96,11 +93,7 @@ void ClientTraitsHandler::sendChangedTraitsToMixer() { || instanceIDValuePair.value == Updated) { // this is a changed trait we need to send or we haven't send out trait information yet // ask the owning avatar to pack it - - // since this is going to the mixer, use the XORed instance ID (to anonymize trait instance IDs - // that would typically persist across sessions) - _owningAvatar->packTraitInstance(instancedIt->traitType, instanceIDValuePair.id, *traitsPacketList, - AvatarTraits::NULL_TRAIT_VERSION, xorInstanceID(instanceIDValuePair.id)); + _owningAvatar->packTraitInstance(instancedIt->traitType, instanceIDValuePair.id, *traitsPacketList); } else if (!_shouldPerformInitialSend && instanceIDValuePair.value == Deleted) { // pack delete for this trait instance AvatarTraits::packInstancedTraitDelete(instancedIt->traitType, instanceIDValuePair.id, @@ -118,17 +111,6 @@ void ClientTraitsHandler::sendChangedTraitsToMixer() { } } -AvatarTraits::TraitInstanceID ClientTraitsHandler::xorInstanceID(AvatarTraits::TraitInstanceID localInstanceID) { - QByteArray xorInstanceID { NUM_BYTES_RFC4122_UUID, 0 }; - auto localInstanceIDBytes = localInstanceID.toRfc4122(); - - for (auto i = 0; i < localInstanceIDBytes.size(); ++i) { - xorInstanceID[i] = localInstanceIDBytes[i] ^ _sessionXORID[i]; - } - - return QUuid::fromRfc4122(xorInstanceID); -} - void ClientTraitsHandler::processTraitOverride(QSharedPointer message, SharedNodePointer sendingNode) { if (sendingNode->getType() == NodeType::AvatarMixer) { while (message->getBytesLeftToRead()) { diff --git a/libraries/avatars/src/ClientTraitsHandler.h b/libraries/avatars/src/ClientTraitsHandler.h index 2319061502..27ba58d46b 100644 --- a/libraries/avatars/src/ClientTraitsHandler.h +++ b/libraries/avatars/src/ClientTraitsHandler.h @@ -30,15 +30,13 @@ public: void markTraitUpdated(AvatarTraits::TraitType updatedTrait) { _traitStatuses[updatedTrait] = Updated; _hasChangedTraits = true; } - void markInstancedTraitUpdated(AvatarTraits::TraitType traitType, AvatarTraits::TraitInstanceID updatedInstanceID) + void markInstancedTraitUpdated(AvatarTraits::TraitType traitType, QUuid updatedInstanceID) { _traitStatuses.instanceInsert(traitType, updatedInstanceID, Updated); _hasChangedTraits = true; } - void markInstancedTraitDeleted(AvatarTraits::TraitType traitType, AvatarTraits::TraitInstanceID deleteInstanceID) + void markInstancedTraitDeleted(AvatarTraits::TraitType traitType, QUuid deleteInstanceID) { _traitStatuses.instanceInsert(traitType, deleteInstanceID, Deleted); _hasChangedTraits = true; } void resetForNewMixer(); - AvatarTraits::TraitInstanceID xorInstanceID(AvatarTraits::TraitInstanceID localInstanceID); - public slots: void processTraitOverride(QSharedPointer message, SharedNodePointer sendingNode); @@ -55,8 +53,6 @@ private: AvatarTraits::TraitVersion _currentTraitVersion { AvatarTraits::DEFAULT_TRAIT_VERSION }; AvatarTraits::TraitVersion _currentSkeletonVersion { AvatarTraits::NULL_TRAIT_VERSION }; - - QByteArray _sessionXORID { NUM_BYTES_RFC4122_UUID, 0}; bool _shouldPerformInitialSend { false }; bool _hasChangedTraits { false }; From b1f44d2ad7c82f085881f8e243f75cf06f272167 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Wed, 12 Sep 2018 12:30:15 -0700 Subject: [PATCH 190/210] perform avatar entity cleanup in AvatarManager::handleRemovedAvatar --- interface/src/avatar/AvatarManager.cpp | 5 ++++ .../src/avatars-renderer/Avatar.cpp | 24 ++++++++++--------- .../src/avatars-renderer/Avatar.h | 1 + 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/interface/src/avatar/AvatarManager.cpp b/interface/src/avatar/AvatarManager.cpp index b9e30a38eb..443d19e473 100644 --- a/interface/src/avatar/AvatarManager.cpp +++ b/interface/src/avatar/AvatarManager.cpp @@ -443,6 +443,11 @@ void AvatarManager::handleRemovedAvatar(const AvatarSharedPointer& removedAvatar avatar->die(); queuePhysicsChange(avatar); + // remove this avatar's entities from the tree now, if we wait (as we did previously) for this Avatar's destructor + // it might not fire until after we create a new instance for the same remote avatar, which creates a race + // on the creation of entities for that avatar instance and the deletion of entities for this instance + avatar->removeAvatarEntitiesFromTree(); + if (removalReason == KillAvatarReason::TheirAvatarEnteredYourBubble) { emit DependencyManager::get()->enteredIgnoreRadius(); } else if (removalReason == KillAvatarReason::AvatarDisconnected) { diff --git a/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp b/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp index cadc3b31e3..914a3b7c6e 100644 --- a/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp +++ b/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp @@ -131,17 +131,6 @@ Avatar::Avatar(QThread* thread) : } Avatar::~Avatar() { - auto treeRenderer = DependencyManager::get(); - EntityTreePointer entityTree = treeRenderer ? treeRenderer->getTree() : nullptr; - if (entityTree) { - entityTree->withWriteLock([&] { - AvatarEntityMap avatarEntities = getAvatarEntityData(); - for (auto entityID : avatarEntities.keys()) { - entityTree->deleteEntity(entityID, true, true); - } - }); - } - auto geometryCache = DependencyManager::get(); if (geometryCache) { geometryCache->releaseID(_nameRectGeometryID); @@ -386,6 +375,19 @@ void Avatar::updateAvatarEntities() { setAvatarEntityDataChanged(false); } +void Avatar::removeAvatarEntitiesFromTree() { + auto treeRenderer = DependencyManager::get(); + EntityTreePointer entityTree = treeRenderer ? treeRenderer->getTree() : nullptr; + if (entityTree) { + entityTree->withWriteLock([&] { + AvatarEntityMap avatarEntities = getAvatarEntityData(); + for (auto entityID : avatarEntities.keys()) { + entityTree->deleteEntity(entityID, true, true); + } + }); + } +} + void Avatar::relayJointDataToChildren() { forEachChild([&](SpatiallyNestablePointer child) { if (child->getNestableType() == NestableType::Entity) { diff --git a/libraries/avatars-renderer/src/avatars-renderer/Avatar.h b/libraries/avatars-renderer/src/avatars-renderer/Avatar.h index 3482c3c193..4f1c010d84 100644 --- a/libraries/avatars-renderer/src/avatars-renderer/Avatar.h +++ b/libraries/avatars-renderer/src/avatars-renderer/Avatar.h @@ -73,6 +73,7 @@ public: void init(); void updateAvatarEntities(); + void removeAvatarEntitiesFromTree(); void simulate(float deltaTime, bool inView); virtual void simulateAttachments(float deltaTime); From 3da442a8f96a0ed0f1d330a9c02bab3b21fa8fe3 Mon Sep 17 00:00:00 2001 From: David Back Date: Wed, 12 Sep 2018 14:44:04 -0700 Subject: [PATCH 191/210] allow highlights in hmd, fix center scale hmd math --- scripts/system/edit.js | 4 +- .../system/libraries/entitySelectionTool.js | 159 +++++++++++------- 2 files changed, 104 insertions(+), 59 deletions(-) diff --git a/scripts/system/edit.js b/scripts/system/edit.js index ed2a179613..88ae2852be 100644 --- a/scripts/system/edit.js +++ b/scripts/system/edit.js @@ -860,7 +860,7 @@ var toolBar = (function () { propertiesTool.setVisible(false); selectionManager.clearSelections(); cameraManager.disable(); - selectionDisplay.triggerMapping.disable(); + selectionDisplay.disableTriggerMapping(); tablet.landscape = false; Controller.disableMapping(CONTROLLER_MAPPING_NAME); } else { @@ -876,7 +876,7 @@ var toolBar = (function () { gridTool.setVisible(true); grid.setEnabled(true); propertiesTool.setVisible(true); - selectionDisplay.triggerMapping.enable(); + selectionDisplay.enableTriggerMapping(); print("starting tablet in landscape mode"); tablet.landscape = true; Controller.enableMapping(CONTROLLER_MAPPING_NAME); diff --git a/scripts/system/libraries/entitySelectionTool.js b/scripts/system/libraries/entitySelectionTool.js index 2cf1ecdcde..72e0dd3144 100644 --- a/scripts/system/libraries/entitySelectionTool.js +++ b/scripts/system/libraries/entitySelectionTool.js @@ -14,7 +14,7 @@ // /* global SelectionManager, SelectionDisplay, grid, rayPlaneIntersection, rayPlaneIntersection2, pushCommandForSelections, - getMainTabletIDs, getControllerWorldLocation */ + getMainTabletIDs, getControllerWorldLocation, TRIGGER_ON_VALUE */ var SPACE_LOCAL = "local"; var SPACE_WORLD = "world"; @@ -22,6 +22,7 @@ var HIGHLIGHT_LIST_NAME = "editHandleHighlightList"; Script.include([ "./controllers.js", + "./controllerDispatcherUtils.js", "./utils.js" ]); @@ -448,6 +449,8 @@ SelectionDisplay = (function() { var CTRL_KEY_CODE = 16777249; var RAIL_AXIS_LENGTH = 10000; + + var NO_HAND = -1; var TRANSLATE_DIRECTION = { X: 0, @@ -478,8 +481,6 @@ SelectionDisplay = (function() { YAW: 1, ROLL: 2 }; - - var NO_TRIGGER_HAND = -1; var spaceMode = SPACE_LOCAL; var overlayNames = []; @@ -802,11 +803,21 @@ SelectionDisplay = (function() { // We get mouseMoveEvents from the handControllers, via handControllerPointer. // But we dont' get mousePressEvents. - that.triggerMapping = Controller.newMapping(Script.resolvePath('') + '-click'); - Script.scriptEnding.connect(that.triggerMapping.disable); - that.triggeredHand = NO_TRIGGER_HAND; + that.triggerClickMapping = Controller.newMapping(Script.resolvePath('') + '-click'); + that.triggerPressMapping = Controller.newMapping(Script.resolvePath('') + '-press'); + that.triggeredHand = NO_HAND; + that.pressedHand = NO_HAND; that.triggered = function() { - return that.triggeredHand !== NO_TRIGGER_HAND; + return that.triggeredHand !== NO_HAND; + } + function pointingAtDesktopWindowOrTablet(hand) { + var pointingAtDesktopWindow = (hand === Controller.Standard.RightHand && + SelectionManager.pointingAtDesktopWindowRight) || + (hand === Controller.Standard.LeftHand && + SelectionManager.pointingAtDesktopWindowLeft); + var pointingAtTablet = (hand === Controller.Standard.RightHand && SelectionManager.pointingAtTabletRight) || + (hand === Controller.Standard.LeftHand && SelectionManager.pointingAtTabletLeft); + return pointingAtDesktopWindow || pointingAtTablet; } function makeClickHandler(hand) { return function (clicked) { @@ -814,26 +825,39 @@ SelectionDisplay = (function() { if (that.triggered() && hand !== that.triggeredHand) { return; } - if (!that.triggered() && clicked) { - var pointingAtDesktopWindow = (hand === Controller.Standard.RightHand && - SelectionManager.pointingAtDesktopWindowRight) || - (hand === Controller.Standard.LeftHand && - SelectionManager.pointingAtDesktopWindowLeft); - var pointingAtTablet = (hand === Controller.Standard.RightHand && SelectionManager.pointingAtTabletRight) || - (hand === Controller.Standard.LeftHand && SelectionManager.pointingAtTabletLeft); - if (pointingAtDesktopWindow || pointingAtTablet) { - return; - } + if (!that.triggered() && clicked && !pointingAtDesktopWindowOrTablet(hand)) { that.triggeredHand = hand; that.mousePressEvent({}); } else if (that.triggered() && !clicked) { - that.triggeredHand = NO_TRIGGER_HAND; + that.triggeredHand = NO_HAND; that.mouseReleaseEvent({}); } }; } - that.triggerMapping.from(Controller.Standard.RTClick).peek().to(makeClickHandler(Controller.Standard.RightHand)); - that.triggerMapping.from(Controller.Standard.LTClick).peek().to(makeClickHandler(Controller.Standard.LeftHand)); + function makePressHandler(hand) { + return function (value) { + if (value >= TRIGGER_ON_VALUE && !that.triggered() && !pointingAtDesktopWindowOrTablet(hand)) { + that.pressedHand = hand; + that.updateHighlight({}); + } else { + that.pressedHand = NO_HAND; + that.resetPreviousHandleColor(); + } + } + } + that.triggerClickMapping.from(Controller.Standard.RTClick).peek().to(makeClickHandler(Controller.Standard.RightHand)); + that.triggerClickMapping.from(Controller.Standard.LTClick).peek().to(makeClickHandler(Controller.Standard.LeftHand)); + that.triggerPressMapping.from(Controller.Standard.RT).peek().to(makePressHandler(Controller.Standard.RightHand)); + that.triggerPressMapping.from(Controller.Standard.LT).peek().to(makePressHandler(Controller.Standard.LeftHand)); + that.enableTriggerMapping = function() { + that.triggerClickMapping.enable(); + that.triggerPressMapping.enable(); + }; + that.disableTriggerMapping = function() { + that.triggerClickMapping.disable(); + that.triggerPressMapping.disable(); + } + Script.scriptEnding.connect(that.disableTriggerMapping); // FUNCTION DEF(s): Intersection Check Helpers function testRayIntersect(queryRay, overlayIncludes, overlayExcludes) { @@ -960,35 +984,18 @@ SelectionDisplay = (function() { } return Uuid.NULL; }; - - // FUNCTION: MOUSE MOVE EVENT - var lastMouseEvent = null; - that.mouseMoveEvent = function(event) { - var wantDebug = false; - if (wantDebug) { - print("=============== eST::MouseMoveEvent BEG ======================="); - } - lastMouseEvent = event; - if (activeTool) { - if (wantDebug) { - print(" Trigger ActiveTool(" + activeTool.mode + ")'s onMove"); - } - activeTool.onMove(event); - - if (wantDebug) { - print(" Trigger SelectionManager::update"); - } - SelectionManager._update(); - - if (wantDebug) { - print("=============== eST::MouseMoveEvent END ======================="); - } - // EARLY EXIT--(Move handled via active tool) - return true; - } - + + that.updateHighlight = function(event) { // if no tool is active, then just look for handles to highlight... var pickRay = generalComputePickRay(event.x, event.y); + + var interactiveOverlays = getMainTabletIDs(); + for (var key in handleTools) { + if (handleTools.hasOwnProperty(key)) { + interactiveOverlays.push(key); + } + } + var result = Overlays.findRayIntersection(pickRay); var pickedColor; var highlightNeeded = false; @@ -1039,7 +1046,36 @@ SelectionDisplay = (function() { } else { that.resetPreviousHandleColor(); } + }; + // FUNCTION: MOUSE MOVE EVENT + var lastMouseEvent = null; + that.mouseMoveEvent = function(event) { + var wantDebug = false; + if (wantDebug) { + print("=============== eST::MouseMoveEvent BEG ======================="); + } + lastMouseEvent = event; + if (activeTool) { + if (wantDebug) { + print(" Trigger ActiveTool(" + activeTool.mode + ")'s onMove"); + } + activeTool.onMove(event); + + if (wantDebug) { + print(" Trigger SelectionManager::update"); + } + SelectionManager._update(); + + if (wantDebug) { + print("=============== eST::MouseMoveEvent END ======================="); + } + // EARLY EXIT--(Move handled via active tool) + return true; + } + + that.updateHighlight(event); + if (wantDebug) { print("=============== eST::MouseMoveEvent END ======================="); } @@ -1135,9 +1171,10 @@ SelectionDisplay = (function() { } }; - function controllerComputePickRay() { - var controllerPose = getControllerWorldLocation(that.triggeredHand, true); - if (controllerPose.valid && that.triggered()) { + function controllerComputePickRay(hand) { + var hand = that.triggered() ? that.triggeredHand : that.pressedHand; + var controllerPose = getControllerWorldLocation(hand, true); + if (controllerPose.valid) { var controllerPosition = controllerPose.translation; // This gets point direction right, but if you want general quaternion it would be more complicated: var controllerDirection = Quat.getUp(controllerPose.rotation); @@ -2083,7 +2120,7 @@ SelectionDisplay = (function() { var rotation = null; var previousPickRay = null; var beginMouseEvent = null; - var beginControllerPick = null; + var beginControllerPosition = null; var onBegin = function(event, pickRay, pickResult) { var proportional = directionEnum === STRETCH_DIRECTION.ALL; @@ -2219,7 +2256,11 @@ SelectionDisplay = (function() { previousPickRay = pickRay; beginMouseEvent = event; - beginControllerPick = pickRay.origin; + + if (that.triggered()) { + beginControllerPosition = that.triggeredHand === Controller.Standard.LeftHand ? + MyAvatar.getLeftHandPosition() : MyAvatar.getRightHandPosition(); + } }; var onEnd = function(event, reason) { @@ -2258,13 +2299,15 @@ SelectionDisplay = (function() { if (usePreviousPickRay(pickRay.direction, previousPickRay.direction, planeNormal)) { pickRay = previousPickRay; } + + var controllerPose = getControllerWorldLocation(that.triggeredHand, true); + var controllerTrigger = HMD.isHMDAvailable() && HMD.isHandControllerAvailable() && + controllerPose.valid && that.triggered(); // Are we using handControllers or Mouse - only relevant for 3D tools - var controllerPose = getControllerWorldLocation(that.triggeredHand, true); var vector = null; var newPick = null; - if (HMD.isHMDAvailable() && HMD.isHandControllerAvailable() && - controllerPose.valid && that.triggered() && directionFor3DStretch) { + if (controllerTrigger && directionFor3DStretch) { localDeltaPivot = deltaPivot3D; newPick = pickRay.origin; vector = Vec3.subtract(newPick, lastPick3D); @@ -2292,8 +2335,10 @@ SelectionDisplay = (function() { var dimensionsMultiple = toCameraDistance * STRETCH_DIRECTION_ALL_CAMERA_DISTANCE_MULTIPLE; var dimensionChange; - if (HMD.active) { - var vecPickDifference = Vec3.subtract(pickRay.origin, beginControllerPick); + if (controllerTrigger) { + var controllerPosition = that.triggeredHand === Controller.Standard.LeftHand ? + MyAvatar.getLeftHandPosition() : MyAvatar.getRightHandPosition(); + var vecPickDifference = Vec3.subtract(controllerPosition, beginControllerPosition); var pickDifference = vecPickDifference.x + vecPickDifference.y + vecPickDifference.z; dimensionChange = pickDifference * dimensionsMultiple; } else { From 55a4c55f781f08f9246ec8d8e91bec48b46fd270 Mon Sep 17 00:00:00 2001 From: David Back Date: Wed, 12 Sep 2018 14:48:27 -0700 Subject: [PATCH 192/210] remove unused and rename var --- scripts/system/libraries/entitySelectionTool.js | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/scripts/system/libraries/entitySelectionTool.js b/scripts/system/libraries/entitySelectionTool.js index 72e0dd3144..8830c60fc5 100644 --- a/scripts/system/libraries/entitySelectionTool.js +++ b/scripts/system/libraries/entitySelectionTool.js @@ -987,15 +987,7 @@ SelectionDisplay = (function() { that.updateHighlight = function(event) { // if no tool is active, then just look for handles to highlight... - var pickRay = generalComputePickRay(event.x, event.y); - - var interactiveOverlays = getMainTabletIDs(); - for (var key in handleTools) { - if (handleTools.hasOwnProperty(key)) { - interactiveOverlays.push(key); - } - } - + var pickRay = generalComputePickRay(event.x, event.y); var result = Overlays.findRayIntersection(pickRay); var pickedColor; var highlightNeeded = false; @@ -2338,9 +2330,10 @@ SelectionDisplay = (function() { if (controllerTrigger) { var controllerPosition = that.triggeredHand === Controller.Standard.LeftHand ? MyAvatar.getLeftHandPosition() : MyAvatar.getRightHandPosition(); - var vecPickDifference = Vec3.subtract(controllerPosition, beginControllerPosition); - var pickDifference = vecPickDifference.x + vecPickDifference.y + vecPickDifference.z; - dimensionChange = pickDifference * dimensionsMultiple; + var vecControllerDifference = Vec3.subtract(controllerPosition, beginControllerPosition); + var controllerDifference = vecControllerDifference.x + vecControllerDifference.y + + vecControllerDifference.z; + dimensionChange = controllerDifference * dimensionsMultiple; } else { var mouseXDifference = (event.x - beginMouseEvent.x) / viewportDimensions.x; var mouseYDifference = (beginMouseEvent.y - event.y) / viewportDimensions.y; From 9a435cdca2965daf13f896c7b4aef5661497ff42 Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Thu, 6 Sep 2018 15:08:46 -0700 Subject: [PATCH 193/210] Reduce needless smart pointer duplication --- libraries/gpu-gl-common/src/gpu/gl/GLBackendInput.cpp | 8 ++++---- libraries/gpu-gl-common/src/gpu/gl/GLBackendPipeline.cpp | 4 ++-- libraries/gpu-gl-common/src/gpu/gl/GLBackendTexture.cpp | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libraries/gpu-gl-common/src/gpu/gl/GLBackendInput.cpp b/libraries/gpu-gl-common/src/gpu/gl/GLBackendInput.cpp index 8d46b4c6e3..ee094a2d2c 100644 --- a/libraries/gpu-gl-common/src/gpu/gl/GLBackendInput.cpp +++ b/libraries/gpu-gl-common/src/gpu/gl/GLBackendInput.cpp @@ -17,7 +17,7 @@ using namespace gpu; using namespace gpu::gl; void GLBackend::do_setInputFormat(const Batch& batch, size_t paramOffset) { - Stream::FormatPointer format = batch._streamFormats.get(batch._params[paramOffset]._uint); + const auto& format = batch._streamFormats.get(batch._params[paramOffset]._uint); if (format != _input._format) { _input._format = format; if (format) { @@ -37,7 +37,7 @@ void GLBackend::do_setInputFormat(const Batch& batch, size_t paramOffset) { void GLBackend::do_setInputBuffer(const Batch& batch, size_t paramOffset) { Offset stride = batch._params[paramOffset + 0]._uint; Offset offset = batch._params[paramOffset + 1]._uint; - BufferPointer buffer = batch._buffers.get(batch._params[paramOffset + 2]._uint); + const auto& buffer = batch._buffers.get(batch._params[paramOffset + 2]._uint); uint32 channel = batch._params[paramOffset + 3]._uint; if (channel < getNumInputBuffers()) { @@ -119,7 +119,7 @@ void GLBackend::do_setIndexBuffer(const Batch& batch, size_t paramOffset) { _input._indexBufferType = (Type)batch._params[paramOffset + 2]._uint; _input._indexBufferOffset = batch._params[paramOffset + 0]._uint; - BufferPointer indexBuffer = batch._buffers.get(batch._params[paramOffset + 1]._uint); + const auto& indexBuffer = batch._buffers.get(batch._params[paramOffset + 1]._uint); if (indexBuffer != _input._indexBuffer) { _input._indexBuffer = indexBuffer; if (indexBuffer) { @@ -136,7 +136,7 @@ void GLBackend::do_setIndirectBuffer(const Batch& batch, size_t paramOffset) { _input._indirectBufferOffset = batch._params[paramOffset + 1]._uint; _input._indirectBufferStride = batch._params[paramOffset + 2]._uint; - BufferPointer buffer = batch._buffers.get(batch._params[paramOffset]._uint); + const auto& buffer = batch._buffers.get(batch._params[paramOffset]._uint); if (buffer != _input._indirectBuffer) { _input._indirectBuffer = buffer; if (buffer) { diff --git a/libraries/gpu-gl-common/src/gpu/gl/GLBackendPipeline.cpp b/libraries/gpu-gl-common/src/gpu/gl/GLBackendPipeline.cpp index 05ded3eece..7e54774df6 100644 --- a/libraries/gpu-gl-common/src/gpu/gl/GLBackendPipeline.cpp +++ b/libraries/gpu-gl-common/src/gpu/gl/GLBackendPipeline.cpp @@ -23,7 +23,7 @@ using namespace gpu; using namespace gpu::gl; void GLBackend::do_setPipeline(const Batch& batch, size_t paramOffset) { - PipelinePointer pipeline = batch._pipelines.get(batch._params[paramOffset + 0]._uint); + const auto& pipeline = batch._pipelines.get(batch._params[paramOffset + 0]._uint); if (_pipeline._pipeline == pipeline) { return; @@ -193,7 +193,7 @@ void GLBackend::do_setUniformBuffer(const Batch& batch, size_t paramOffset) { return; } - BufferPointer uniformBuffer = batch._buffers.get(batch._params[paramOffset + 2]._uint); + const auto& uniformBuffer = batch._buffers.get(batch._params[paramOffset + 2]._uint); GLintptr rangeStart = batch._params[paramOffset + 1]._uint; GLsizeiptr rangeSize = batch._params[paramOffset + 0]._uint; diff --git a/libraries/gpu-gl-common/src/gpu/gl/GLBackendTexture.cpp b/libraries/gpu-gl-common/src/gpu/gl/GLBackendTexture.cpp index ca4e328612..f4fb3fcf2c 100644 --- a/libraries/gpu-gl-common/src/gpu/gl/GLBackendTexture.cpp +++ b/libraries/gpu-gl-common/src/gpu/gl/GLBackendTexture.cpp @@ -66,7 +66,7 @@ GLTexture* GLBackend::syncGPUObject(const TexturePointer& texturePointer) { } void GLBackend::do_generateTextureMips(const Batch& batch, size_t paramOffset) { - TexturePointer resourceTexture = batch._textures.get(batch._params[paramOffset + 0]._uint); + const auto& resourceTexture = batch._textures.get(batch._params[paramOffset + 0]._uint); if (!resourceTexture) { return; } From cfff28ad0af99250319c7471a75f2d85c79ebdd2 Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Thu, 6 Sep 2018 16:03:43 -0700 Subject: [PATCH 194/210] More shared pointer deduplication --- .../gpu-gl-common/src/gpu/gl/GLBackend.cpp | 9 +- .../gpu-gl-common/src/gpu/gl/GLBackend.h | 314 +++++++++++++----- .../src/gpu/gl/GLBackendInput.cpp | 31 +- .../src/gpu/gl/GLBackendOutput.cpp | 25 +- .../src/gpu/gl/GLBackendPipeline.cpp | 54 +-- .../gpu-gl-common/src/gpu/gl/GLPipeline.cpp | 4 +- libraries/gpu-gl/src/gpu/gl41/GL41Backend.h | 2 +- .../gpu-gl/src/gpu/gl41/GL41BackendBuffer.cpp | 13 +- .../gpu-gl/src/gpu/gl41/GL41BackendInput.cpp | 13 +- libraries/gpu-gl/src/gpu/gl45/GL45Backend.h | 2 +- .../gpu-gl/src/gpu/gl45/GL45BackendBuffer.cpp | 8 +- .../gpu-gl/src/gpu/gl45/GL45BackendInput.cpp | 9 +- libraries/gpu-gles/src/gpu/gles/GLESBackend.h | 2 +- .../src/gpu/gles/GLESBackendBuffer.cpp | 6 +- libraries/gpu/src/gpu/Batch.cpp | 2 +- libraries/gpu/src/gpu/Batch.h | 2 +- libraries/gpu/src/gpu/Framebuffer.cpp | 10 +- libraries/gpu/src/gpu/Framebuffer.h | 6 +- 18 files changed, 330 insertions(+), 182 deletions(-) diff --git a/libraries/gpu-gl-common/src/gpu/gl/GLBackend.cpp b/libraries/gpu-gl-common/src/gpu/gl/GLBackend.cpp index c1848d99b1..30a3cf0aaf 100644 --- a/libraries/gpu-gl-common/src/gpu/gl/GLBackend.cpp +++ b/libraries/gpu-gl-common/src/gpu/gl/GLBackend.cpp @@ -150,6 +150,7 @@ void GLBackend::init() { }); } + GLBackend::GLBackend(bool syncCache) { _pipeline._cameraCorrectionBuffer._buffer->flush(); initShaderBinaryCache(); @@ -201,9 +202,10 @@ void GLBackend::renderPassTransfer(const Batch& batch) { { Vec2u outputSize{ 1,1 }; - if (_output._framebuffer) { - outputSize.x = _output._framebuffer->getWidth(); - outputSize.y = _output._framebuffer->getHeight(); + auto framebuffer = acquire(_output._framebuffer); + if (framebuffer) { + outputSize.x = framebuffer->getWidth(); + outputSize.y = framebuffer->getHeight(); } else if (glm::dot(_transform._projectionJitter, _transform._projectionJitter)>0.0f) { qCWarning(gpugllogging) << "Jittering needs to have a frame buffer to be set"; } @@ -220,6 +222,7 @@ void GLBackend::renderPassTransfer(const Batch& batch) { _stereo._contextDisable = false; break; + case Batch::COMMAND_setFramebuffer: case Batch::COMMAND_setViewportTransform: case Batch::COMMAND_setViewTransform: case Batch::COMMAND_setProjectionTransform: diff --git a/libraries/gpu-gl-common/src/gpu/gl/GLBackend.h b/libraries/gpu-gl-common/src/gpu/gl/GLBackend.h index 9b3a28e6fd..7927734256 100644 --- a/libraries/gpu-gl-common/src/gpu/gl/GLBackend.h +++ b/libraries/gpu-gl-common/src/gpu/gl/GLBackend.h @@ -30,7 +30,6 @@ #include "GLShared.h" - // Different versions for the stereo drawcall // Current preferred is "instanced" which draw the shape twice but instanced and rely on clipping plane to draw left/right side only #if defined(USE_GLES) @@ -40,7 +39,6 @@ #define GPU_STEREO_TECHNIQUE_INSTANCED #endif - // Let these be configured by the one define picked above #ifdef GPU_STEREO_TECHNIQUE_DOUBLED_SIMPLE #define GPU_STEREO_DRAWCALL_DOUBLED @@ -56,8 +54,151 @@ #define GPU_STEREO_CAMERA_BUFFER #endif +// +// GL Backend pointer storage mechanism +// One of the following three defines must be uncommented. + +// Equivalent to current state of affairs in master, +// Works pretty well, but ends up creating a lot of needless smart pointer duplication +// which means there's a high aggregate cost of manipulating std::shared_ptr counters +//#define GPU_POINTER_STORAGE_SHARED + +// The platonic ideal, use references to smart pointers. +// However, this produces artifacts because there are too many places in the code right now that +// create temporary values (undesirable smart pointer duplications) and then those temp variables +// get passed on and have their reference taken, and then invalidated +//#define GPU_POINTER_STORAGE_REF + +// Raw pointer manipulation. Seems more dangerous than the reference wrappers, +// but in practice, the danger of grabbing a reference to a temporary variable +// is causing issues +#define GPU_POINTER_STORAGE_RAW + namespace gpu { namespace gl { +#if defined(GPU_POINTER_STORAGE_SHARED) +template +static inline bool compare(const std::shared_ptr& a, const std::shared_ptr& b) { + return a == b; +} + +template +static inline T* acquire(const std::shared_ptr& pointer) { + return pointer.get(); +} + +template +static inline void reset(std::shared_ptr& pointer) { + return pointer.reset(); +} + +template +static inline bool valid(const std::shared_ptr& pointer) { + return pointer.operator bool(); +} + +template +static inline void assign(std::shared_ptr&pointer, const std::shared_ptr& source) { + pointer = source; +} + +using BufferReference = BufferPointer; +using TextureReference = TexturePointer; +using FramebufferReference = FramebufferPointer; +using FormatReference = Stream::FormatPointer; +using PipelineReference = PipelinePointer; + +#define GPU_REFERENCE_INIT_VALUE nullptr + +#elif defined(GPU_POINTER_STORAGE_REF) + +template +class PointerReferenceWrapper : public std::reference_wrapper> { + using Parent = std::reference_wrapper>; + +public: + using Pointer = std::shared_ptr; + PointerReferenceWrapper() : Parent(EMPTY()) {} + PointerReferenceWrapper(const Pointer& pointer) : Parent(pointer) {} + void clear() { *this = EMPTY(); } + +private: + static const Pointer& EMPTY() { + static const Pointer EMPTY_VALUE; + return EMPTY_VALUE; + }; +}; + +template +static bool compare(const PointerReferenceWrapper& reference, const std::shared_ptr& pointer) { + return reference.get() == pointer; +} + +template +static inline T* acquire(const PointerReferenceWrapper& reference) { + return reference.get().get(); +} + +template +static void assign(PointerReferenceWrapper& reference, const std::shared_ptr& pointer) { + reference = pointer; +} + +template +static bool valid(const PointerReferenceWrapper& reference) { + return reference.get().operator bool(); +} + +template +static inline void reset(PointerReferenceWrapper& reference) { + return reference.clear(); +} + +using BufferReference = PointerReferenceWrapper; +using TextureReference = PointerReferenceWrapper; +using FramebufferReference = PointerReferenceWrapper; +using FormatReference = PointerReferenceWrapper; +using PipelineReference = PointerReferenceWrapper; + +#define GPU_REFERENCE_INIT_VALUE + +#elif defined(GPU_POINTER_STORAGE_RAW) + +template +static bool compare(const T*const& rawPointer, const std::shared_ptr& pointer) { + return rawPointer == pointer.get(); +} + +template +static inline T* acquire(T*& rawPointer) { + return rawPointer; +} + +template +static inline bool valid(const T*const& rawPointer) { + return rawPointer; +} + +template +static inline void reset(T*& rawPointer) { + rawPointer = nullptr; +} + +template +static inline void assign(T*& rawPointer, const std::shared_ptr& pointer) { + rawPointer = pointer.get(); +} + +using BufferReference = Buffer*; +using TextureReference = Texture*; +using FramebufferReference = Framebuffer*; +using FormatReference = Stream::Format*; +using PipelineReference = Pipeline*; + +#define GPU_REFERENCE_INIT_VALUE nullptr + +#endif + class GLBackend : public Backend, public std::enable_shared_from_this { // Context Backend static interface required friend class gpu::Context; @@ -67,8 +208,9 @@ class GLBackend : public Backend, public std::enable_shared_from_this protected: explicit GLBackend(bool syncCache); GLBackend(); -public: + +public: #if defined(USE_GLES) // https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGet.xhtml static const GLint MIN_REQUIRED_TEXTURE_IMAGE_UNITS = 16; @@ -109,8 +251,8 @@ public: // This is the ugly "download the pixels to sysmem for taking a snapshot" // Just avoid using it, it's ugly and will break performances virtual void downloadFramebuffer(const FramebufferPointer& srcFramebuffer, - const Vec4i& region, QImage& destImage) final override; - + const Vec4i& region, + QImage& destImage) final override; // this is the maximum numeber of available input buffers size_t getNumInputBuffers() const { return _input._invalidBuffers.size(); } @@ -131,7 +273,6 @@ public: static const int MAX_NUM_RESOURCE_TABLE_TEXTURES = 2; size_t getMaxNumResourceTextureTables() const { return MAX_NUM_RESOURCE_TABLE_TEXTURES; } - // Draw Stage virtual void do_draw(const Batch& batch, size_t paramOffset) = 0; virtual void do_drawIndexed(const Batch& batch, size_t paramOffset) = 0; @@ -183,7 +324,6 @@ public: // Reset stages virtual void do_resetStages(const Batch& batch, size_t paramOffset) final; - virtual void do_disableContextViewCorrection(const Batch& batch, size_t paramOffset) final; virtual void do_restoreContextViewCorrection(const Batch& batch, size_t paramOffset) final; @@ -203,7 +343,7 @@ public: virtual void do_popProfileRange(const Batch& batch, size_t paramOffset) final; // TODO: As long as we have gl calls explicitely issued from interface - // code, we need to be able to record and batch these calls. THe long + // code, we need to be able to record and batch these calls. THe long // term strategy is to get rid of any GL calls in favor of the HIFI GPU API virtual void do_glUniform1i(const Batch& batch, size_t paramOffset) final; virtual void do_glUniform1f(const Batch& batch, size_t paramOffset) final; @@ -228,7 +368,9 @@ public: virtual void do_setStateAntialiasedLineEnable(bool enable) final; virtual void do_setStateDepthBias(Vec2 bias) final; virtual void do_setStateDepthTest(State::DepthTest test) final; - virtual void do_setStateStencil(State::StencilActivation activation, State::StencilTest frontTest, State::StencilTest backTest) final; + virtual void do_setStateStencil(State::StencilActivation activation, + State::StencilTest frontTest, + State::StencilTest backTest) final; virtual void do_setStateAlphaToCoverageEnable(bool enable) final; virtual void do_setStateSampleMask(uint32 mask) final; virtual void do_setStateBlend(State::BlendFunction blendFunction) final; @@ -257,7 +399,9 @@ public: virtual void releaseQuery(GLuint id) const; virtual void queueLambda(const std::function lambda) const; - bool isTextureManagementSparseEnabled() const override { return (_textureManagement._sparseCapable && Texture::getEnableSparseTextures()); } + bool isTextureManagementSparseEnabled() const override { + return (_textureManagement._sparseCapable && Texture::getEnableSparseTextures()); + } protected: virtual GLint getRealUniformLocation(GLint location) const; @@ -266,11 +410,11 @@ protected: // FIXME instead of a single flag, create a features struct similar to // https://www.khronos.org/registry/vulkan/specs/1.0/man/html/VkPhysicalDeviceFeatures.html - virtual bool supportsBindless() const { return false; } + virtual bool supportsBindless() const { return false; } static const size_t INVALID_OFFSET = (size_t)-1; - bool _inRenderTransferPass { false }; - int _currentDraw { -1 }; + bool _inRenderTransferPass{ false }; + int _currentDraw{ -1 }; std::list profileRanges; mutable Mutex _trashMutex; @@ -299,46 +443,42 @@ protected: virtual void updateInput() = 0; struct InputStageState { - bool _invalidFormat { true }; - bool _lastUpdateStereoState{ false }; + bool _invalidFormat{ true }; + bool _lastUpdateStereoState{ false }; bool _hadColorAttribute{ true }; - Stream::FormatPointer _format; + FormatReference _format{ GPU_REFERENCE_INIT_VALUE }; std::string _formatKey; typedef std::bitset ActivationCache; - ActivationCache _attributeActivation { 0 }; + ActivationCache _attributeActivation{ 0 }; typedef std::bitset BuffersState; BuffersState _invalidBuffers{ 0 }; BuffersState _attribBindingBuffers{ 0 }; - Buffers _buffers; - Offsets _bufferOffsets; - Offsets _bufferStrides; - std::vector _bufferVBOs; + std::vector _buffers{ MAX_NUM_INPUT_BUFFERS, GPU_REFERENCE_INIT_VALUE }; + Offsets _bufferOffsets; + Offsets _bufferStrides; + std::vector _bufferVBOs; glm::vec4 _colorAttribute{ 0.0f }; - BufferPointer _indexBuffer; - Offset _indexBufferOffset { 0 }; - Type _indexBufferType { UINT32 }; - - BufferPointer _indirectBuffer; + BufferReference _indexBuffer{ GPU_REFERENCE_INIT_VALUE }; + Offset _indexBufferOffset{ 0 }; + Type _indexBufferType{ UINT32 }; + + BufferReference _indirectBuffer{ GPU_REFERENCE_INIT_VALUE }; Offset _indirectBufferOffset{ 0 }; Offset _indirectBufferStride{ 0 }; - GLuint _defaultVAO { 0 }; + GLuint _defaultVAO{ 0 }; - InputStageState() : - _invalidFormat(true), - _format(0), - _formatKey(), - _attributeActivation(0), - _buffers(_invalidBuffers.size(), BufferPointer(0)), - _bufferOffsets(_invalidBuffers.size(), 0), - _bufferStrides(_invalidBuffers.size(), 0), - _bufferVBOs(_invalidBuffers.size(), 0) {} + InputStageState() { + _bufferOffsets.resize(MAX_NUM_INPUT_BUFFERS, 0); + _bufferStrides.resize(MAX_NUM_INPUT_BUFFERS, 0); + _bufferVBOs.resize(MAX_NUM_INPUT_BUFFERS, 0); + } } _input; virtual void initTransform() = 0; @@ -349,7 +489,7 @@ protected: virtual void resetTransformStage(); // Allows for correction of the camera pose to account for changes - // between the time when a was recorded and the time(s) when it is + // between the time when a was recorded and the time(s) when it is // executed // Prev is the previous correction used at previous frame struct CameraCorrection { @@ -364,9 +504,12 @@ protected: struct Cameras { TransformCamera _cams[2]; - Cameras() {}; + Cameras(){}; Cameras(const TransformCamera& cam) { memcpy(_cams, &cam, sizeof(TransformCamera)); }; - Cameras(const TransformCamera& camL, const TransformCamera& camR) { memcpy(_cams, &camL, sizeof(TransformCamera)); memcpy(_cams + 1, &camR, sizeof(TransformCamera)); }; + Cameras(const TransformCamera& camL, const TransformCamera& camR) { + memcpy(_cams, &camL, sizeof(TransformCamera)); + memcpy(_cams + 1, &camR, sizeof(TransformCamera)); + }; }; using CameraBufferElement = Cameras; @@ -380,25 +523,24 @@ protected: mutable std::map _drawCallInfoOffsets; - GLuint _objectBuffer { 0 }; - GLuint _cameraBuffer { 0 }; - GLuint _drawCallInfoBuffer { 0 }; - GLuint _objectBufferTexture { 0 }; - size_t _cameraUboSize { 0 }; + GLuint _objectBuffer{ 0 }; + GLuint _cameraBuffer{ 0 }; + GLuint _drawCallInfoBuffer{ 0 }; + GLuint _objectBufferTexture{ 0 }; + size_t _cameraUboSize{ 0 }; bool _viewIsCamera{ false }; - bool _skybox { false }; + bool _skybox{ false }; Transform _view; CameraCorrection _correction; bool _viewCorrectionEnabled{ true }; - Mat4 _projection; - Vec4i _viewport { 0, 0, 1, 1 }; - Vec2 _depthRange { 0.0f, 1.0f }; + Vec4i _viewport{ 0, 0, 1, 1 }; + Vec2 _depthRange{ 0.0f, 1.0f }; Vec2 _projectionJitter{ 0.0f, 0.0f }; - bool _invalidView { false }; - bool _invalidProj { false }; - bool _invalidViewport { false }; + bool _invalidView{ false }; + bool _invalidProj{ false }; + bool _invalidViewport{ false }; bool _enabledDrawcallInfoBuffer{ false }; @@ -417,44 +559,47 @@ protected: struct UniformStageState { struct BufferState { - BufferPointer buffer; + BufferReference buffer{ GPU_REFERENCE_INIT_VALUE }; GLintptr offset{ 0 }; GLsizeiptr size{ 0 }; - BufferState(const BufferPointer& buffer = nullptr, GLintptr offset = 0, GLsizeiptr size = 0); - bool operator ==(BufferState& other) const { - return offset == other.offset && size == other.size && buffer == other.buffer; + //BufferState(const BufferPointer& buffer = nullptr, GLintptr offset = 0, GLsizeiptr size = 0); + + BufferState& operator=(const BufferState& other) = delete; + void reset() { gpu::gl::reset(buffer); offset = 0; size = 0; } + bool compare(const BufferPointer& buffer, GLintptr offset, GLsizeiptr size) { + const auto& self = *this; + return (self.offset == offset && self.size == size && gpu::gl::compare(self.buffer, buffer)); } }; // MAX_NUM_UNIFORM_BUFFERS-1 is the max uniform index BATCHES are allowed to set, but - // MIN_REQUIRED_UNIFORM_BUFFER_BINDINGS is used here because the backend sets some - // internal UBOs for things like camera correction + // MIN_REQUIRED_UNIFORM_BUFFER_BINDINGS is used here because the backend sets some + // internal UBOs for things like camera correction std::array _buffers; } _uniform; - // Helper function that provides common code + // Helper function that provides common code void bindUniformBuffer(uint32_t slot, const BufferPointer& buffer, GLintptr offset = 0, GLsizeiptr size = 0); void releaseUniformBuffer(uint32_t slot); void resetUniformStage(); // update resource cache and do the gl bind/unbind call with the current gpu::Buffer cached at slot s // This is using different gl object depending on the gl version - virtual bool bindResourceBuffer(uint32_t slot, BufferPointer& buffer) = 0; + virtual bool bindResourceBuffer(uint32_t slot, const BufferPointer& buffer) = 0; virtual void releaseResourceBuffer(uint32_t slot) = 0; - // Helper function that provides common code used by do_setResourceTexture and + // Helper function that provides common code used by do_setResourceTexture and // do_setResourceTextureTable (in non-bindless mode) void bindResourceTexture(uint32_t slot, const TexturePointer& texture); - // update resource cache and do the gl unbind call with the current gpu::Texture cached at slot s void releaseResourceTexture(uint32_t slot); void resetResourceStage(); struct ResourceStageState { - std::array _buffers; - std::array _textures; + std::vector _buffers{ MAX_NUM_RESOURCE_BUFFERS, BufferReference() }; + std::vector _textures{ MAX_NUM_RESOURCE_TEXTURES, GPU_REFERENCE_INIT_VALUE }; //Textures _textures { { MAX_NUM_RESOURCE_TEXTURES } }; int findEmptyTextureSlot() const; } _resource; @@ -470,21 +615,22 @@ protected: void resetPipelineStage(); struct PipelineStageState { - PipelinePointer _pipeline; + PipelineReference _pipeline{ GPU_REFERENCE_INIT_VALUE }; - GLuint _program { 0 }; - bool _cameraCorrection { false }; - GLShader* _programShader { nullptr }; - bool _invalidProgram { false }; + GLuint _program{ 0 }; + bool _cameraCorrection{ false }; + GLShader* _programShader{ nullptr }; + bool _invalidProgram{ false }; - BufferView _cameraCorrectionBuffer { gpu::BufferView(std::make_shared(sizeof(CameraCorrection), nullptr )) }; - BufferView _cameraCorrectionBufferIdentity { gpu::BufferView(std::make_shared(sizeof(CameraCorrection), nullptr )) }; + BufferView _cameraCorrectionBuffer{ gpu::BufferView(std::make_shared(sizeof(CameraCorrection), nullptr)) }; + BufferView _cameraCorrectionBufferIdentity{ gpu::BufferView( + std::make_shared(sizeof(CameraCorrection), nullptr)) }; State::Data _stateCache{ State::DEFAULT }; - State::Signature _stateSignatureCache { 0 }; + State::Signature _stateSignatureCache{ 0 }; - GLState* _state { nullptr }; - bool _invalidState { false }; + GLState* _state{ nullptr }; + bool _invalidState{ false }; PipelineStageState() { _cameraCorrectionBuffer.edit() = CameraCorrection(); @@ -498,9 +644,9 @@ protected: virtual GLShader* compileBackendProgram(const Shader& program, const Shader::CompilationHandler& handler); virtual GLShader* compileBackendShader(const Shader& shader, const Shader::CompilationHandler& handler); virtual std::string getBackendShaderHeader() const = 0; - // For a program, this will return a string containing all the source files (without any - // backend headers or defines). For a vertex, fragment or geometry shader, this will - // return the fully customized shader with all the version and backend specific + // For a program, this will return a string containing all the source files (without any + // backend headers or defines). For a vertex, fragment or geometry shader, this will + // return the fully customized shader with all the version and backend specific // preprocessor directives // The program string returned can be used as a key for a cache of shader binaries // The shader strings can be reliably sent to the low level `compileShader` functions @@ -516,22 +662,22 @@ protected: // Synchronize the state cache of this Backend with the actual real state of the GL Context void syncOutputStateCache(); void resetOutputStage(); - + struct OutputStageState { - FramebufferPointer _framebuffer { nullptr }; - GLuint _drawFBO { 0 }; + FramebufferReference _framebuffer{ GPU_REFERENCE_INIT_VALUE }; + GLuint _drawFBO{ 0 }; } _output; void resetQueryStage(); struct QueryStageState { - uint32_t _rangeQueryDepth { 0 }; + uint32_t _rangeQueryDepth{ 0 }; } _queryStage; void resetStages(); // Stores cached binary versions of the shaders for quicker startup on subsequent runs - // Note that shaders in the cache can still fail to load due to hardware or driver - // changes that invalidate the cached binary, in which case we fall back on compiling + // Note that shaders in the cache can still fail to load due to hardware or driver + // changes that invalidate the cached binary, in which case we fall back on compiling // the source again struct ShaderBinaryCache { std::mutex _mutex; @@ -543,7 +689,7 @@ protected: virtual void killShaderBinaryCache(); struct TextureManagementStageState { - bool _sparseCapable { false }; + bool _sparseCapable{ false }; GLTextureTransferEnginePointer _transferEngine; } _textureManagement; virtual void initTextureManagementStage(); @@ -556,6 +702,6 @@ protected: friend class GLShader; }; -} } +}} // namespace gpu::gl #endif diff --git a/libraries/gpu-gl-common/src/gpu/gl/GLBackendInput.cpp b/libraries/gpu-gl-common/src/gpu/gl/GLBackendInput.cpp index ee094a2d2c..219efae866 100644 --- a/libraries/gpu-gl-common/src/gpu/gl/GLBackendInput.cpp +++ b/libraries/gpu-gl-common/src/gpu/gl/GLBackendInput.cpp @@ -18,8 +18,8 @@ using namespace gpu::gl; void GLBackend::do_setInputFormat(const Batch& batch, size_t paramOffset) { const auto& format = batch._streamFormats.get(batch._params[paramOffset]._uint); - if (format != _input._format) { - _input._format = format; + if (!compare(_input._format, format)) { + assign(_input._format, format); if (format) { auto inputFormat = GLInputFormat::sync((*format)); assert(inputFormat); @@ -42,8 +42,8 @@ void GLBackend::do_setInputBuffer(const Batch& batch, size_t paramOffset) { if (channel < getNumInputBuffers()) { bool isModified = false; - if (_input._buffers[channel] != buffer) { - _input._buffers[channel] = buffer; + if (!compare(_input._buffers[channel], buffer)) { + assign(_input._buffers[channel], buffer); _input._bufferVBOs[channel] = getBufferIDUnsynced((*buffer)); isModified = true; } @@ -94,18 +94,18 @@ void GLBackend::resetInputStage() { // Reset index buffer _input._indexBufferType = UINT32; _input._indexBufferOffset = 0; - _input._indexBuffer.reset(); + reset(_input._indexBuffer); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); (void) CHECK_GL_ERROR(); // Reset vertex buffer and format - _input._format.reset(); + reset(_input._format); _input._formatKey.clear(); _input._invalidFormat = false; _input._attributeActivation.reset(); for (uint32_t i = 0; i < _input._buffers.size(); i++) { - _input._buffers[i].reset(); + reset(_input._buffers[i]); _input._bufferOffsets[i] = 0; _input._bufferStrides[i] = 0; _input._bufferVBOs[i] = 0; @@ -120,8 +120,8 @@ void GLBackend::do_setIndexBuffer(const Batch& batch, size_t paramOffset) { _input._indexBufferOffset = batch._params[paramOffset + 0]._uint; const auto& indexBuffer = batch._buffers.get(batch._params[paramOffset + 1]._uint); - if (indexBuffer != _input._indexBuffer) { - _input._indexBuffer = indexBuffer; + if (!compare(_input._indexBuffer, indexBuffer)) { + assign(_input._indexBuffer, indexBuffer); if (indexBuffer) { glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, getBufferIDUnsynced(*indexBuffer)); } else { @@ -137,8 +137,8 @@ void GLBackend::do_setIndirectBuffer(const Batch& batch, size_t paramOffset) { _input._indirectBufferStride = batch._params[paramOffset + 2]._uint; const auto& buffer = batch._buffers.get(batch._params[paramOffset]._uint); - if (buffer != _input._indirectBuffer) { - _input._indirectBuffer = buffer; + if (!compare(_input._indirectBuffer, buffer)) { + assign(_input._indirectBuffer, buffer); if (buffer) { glBindBuffer(GL_DRAW_INDIRECT_BUFFER, getBufferIDUnsynced(*buffer)); } else { @@ -152,7 +152,7 @@ void GLBackend::do_setIndirectBuffer(const Batch& batch, size_t paramOffset) { void GLBackend::updateInput() { bool isStereoNow = isStereo(); - // track stereo state change potentially happening wihtout changing the input format + // track stereo state change potentially happening without changing the input format // this is a rare case requesting to invalid the format #ifdef GPU_STEREO_DRAWCALL_INSTANCED _input._invalidFormat |= (isStereoNow != _input._lastUpdateStereoState); @@ -163,13 +163,14 @@ void GLBackend::updateInput() { InputStageState::ActivationCache newActivation; // Assign the vertex format required - if (_input._format) { + auto format = acquire(_input._format); + if (format) { bool hasColorAttribute{ false }; _input._attribBindingBuffers.reset(); - const Stream::Format::AttributeMap& attributes = _input._format->getAttributes(); - auto& inputChannels = _input._format->getChannels(); + const auto& attributes = format->getAttributes(); + const auto& inputChannels = format->getChannels(); for (auto& channelIt : inputChannels) { auto bufferChannelNum = (channelIt).first; const Stream::Format::ChannelMap::value_type::second_type& channel = (channelIt).second; diff --git a/libraries/gpu-gl-common/src/gpu/gl/GLBackendOutput.cpp b/libraries/gpu-gl-common/src/gpu/gl/GLBackendOutput.cpp index d1ab34da90..370e50592d 100644 --- a/libraries/gpu-gl-common/src/gpu/gl/GLBackendOutput.cpp +++ b/libraries/gpu-gl-common/src/gpu/gl/GLBackendOutput.cpp @@ -25,23 +25,19 @@ using namespace gpu::gl; void GLBackend::syncOutputStateCache() { GLint currentFBO; glGetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, ¤tFBO); - _output._drawFBO = currentFBO; - _output._framebuffer.reset(); + reset(_output._framebuffer); } void GLBackend::resetOutputStage() { - if (_output._framebuffer) { - _output._framebuffer.reset(); - _output._drawFBO = 0; - glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0); - } - + _output._drawFBO = 0; + glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0); glEnable(GL_FRAMEBUFFER_SRGB); + reset(_output._framebuffer); } void GLBackend::do_setFramebuffer(const Batch& batch, size_t paramOffset) { - auto framebuffer = batch._framebuffers.get(batch._params[paramOffset]._uint); + const auto& framebuffer = batch._framebuffers.get(batch._params[paramOffset]._uint); setFramebuffer(framebuffer); } @@ -55,13 +51,13 @@ void GLBackend::do_setFramebufferSwapChain(const Batch& batch, size_t paramOffse } void GLBackend::setFramebuffer(const FramebufferPointer& framebuffer) { - if (_output._framebuffer != framebuffer) { + if (!compare(_output._framebuffer, framebuffer)) { auto newFBO = getFramebufferID(framebuffer); if (_output._drawFBO != newFBO) { _output._drawFBO = newFBO; glBindFramebuffer(GL_DRAW_FRAMEBUFFER, newFBO); } - _output._framebuffer = framebuffer; + assign(_output._framebuffer, framebuffer); } } @@ -114,8 +110,9 @@ void GLBackend::do_clearFramebuffer(const Batch& batch, size_t paramOffset) { } std::vector drawBuffers; + auto framebuffer = acquire(_output._framebuffer); if (masks & Framebuffer::BUFFER_COLORS) { - if (_output._framebuffer) { + if (framebuffer) { for (unsigned int i = 0; i < Framebuffer::MAX_NUM_RENDER_BUFFERS; i++) { if (masks & (1 << i)) { drawBuffers.push_back(GL_COLOR_ATTACHMENT0 + i); @@ -163,8 +160,8 @@ void GLBackend::do_clearFramebuffer(const Batch& batch, size_t paramOffset) { } // Restore the color draw buffers only if a frmaebuffer is bound - if (_output._framebuffer && !drawBuffers.empty()) { - auto glFramebuffer = syncGPUObject(*_output._framebuffer); + if (framebuffer && !drawBuffers.empty()) { + auto glFramebuffer = syncGPUObject(*framebuffer); if (glFramebuffer) { glDrawBuffers((GLsizei)glFramebuffer->_colorBuffers.size(), glFramebuffer->_colorBuffers.data()); } diff --git a/libraries/gpu-gl-common/src/gpu/gl/GLBackendPipeline.cpp b/libraries/gpu-gl-common/src/gpu/gl/GLBackendPipeline.cpp index 7e54774df6..9b28fa8114 100644 --- a/libraries/gpu-gl-common/src/gpu/gl/GLBackendPipeline.cpp +++ b/libraries/gpu-gl-common/src/gpu/gl/GLBackendPipeline.cpp @@ -25,7 +25,7 @@ using namespace gpu::gl; void GLBackend::do_setPipeline(const Batch& batch, size_t paramOffset) { const auto& pipeline = batch._pipelines.get(batch._params[paramOffset + 0]._uint); - if (_pipeline._pipeline == pipeline) { + if (compare(_pipeline._pipeline, pipeline)) { return; } @@ -34,7 +34,7 @@ void GLBackend::do_setPipeline(const Batch& batch, size_t paramOffset) { // null pipeline == reset if (!pipeline) { - _pipeline._pipeline.reset(); + reset(_pipeline._pipeline); _pipeline._program = 0; _pipeline._cameraCorrection = false; @@ -73,7 +73,7 @@ void GLBackend::do_setPipeline(const Batch& batch, size_t paramOffset) { } // Remember the new pipeline - _pipeline._pipeline = pipeline; + assign(_pipeline._pipeline, pipeline); } // THis should be done on Pipeline::update... @@ -81,7 +81,7 @@ void GLBackend::do_setPipeline(const Batch& batch, size_t paramOffset) { glUseProgram(_pipeline._program); if (_pipeline._cameraCorrection) { // Invalidate uniform buffer cache slot - _uniform._buffers[gpu::slot::buffer::CameraCorrection] = {}; + _uniform._buffers[gpu::slot::buffer::CameraCorrection].reset(); auto& cameraCorrectionBuffer = _transform._viewCorrectionEnabled ? _pipeline._cameraCorrectionBuffer._buffer : _pipeline._cameraCorrectionBufferIdentity._buffer; @@ -112,7 +112,7 @@ void GLBackend::updatePipeline() { _pipeline._stateSignatureCache |= _pipeline._state->_signature; // And perform - for (auto command : _pipeline._state->_commands) { + for (const auto& command : _pipeline._state->_commands) { command->run(this); } } else { @@ -134,23 +134,21 @@ void GLBackend::resetPipelineStage() { _pipeline._invalidProgram = false; _pipeline._program = 0; _pipeline._programShader = nullptr; - _pipeline._pipeline.reset(); + reset(_pipeline._pipeline); glUseProgram(0); } -GLBackend::UniformStageState::BufferState::BufferState(const BufferPointer& buffer, GLintptr offset, GLsizeiptr size) - : buffer(buffer), offset(offset), size(size) {} - void GLBackend::releaseUniformBuffer(uint32_t slot) { - auto& buf = _uniform._buffers[slot]; - if (buf.buffer) { - auto* object = Backend::getGPUObject(*buf.buffer); + auto& bufferState = _uniform._buffers[slot]; + auto buffer = acquire(bufferState.buffer); + if (buffer) { + auto* object = Backend::getGPUObject(*buffer); if (object) { glBindBufferBase(GL_UNIFORM_BUFFER, slot, 0); // RELEASE (void)CHECK_GL_ERROR(); } - buf = UniformStageState::BufferState(); } + bufferState.reset(); } void GLBackend::resetUniformStage() { @@ -165,18 +163,20 @@ void GLBackend::bindUniformBuffer(uint32_t slot, const BufferPointer& buffer, GL return; } - UniformStageState::BufferState bufferState{ buffer, offset, size }; + auto& currentBufferState = _uniform._buffers[slot]; // check cache before thinking - if (_uniform._buffers[slot] == bufferState) { + if (currentBufferState.compare(buffer, offset, size)) { return; } // Grab the true gl Buffer object auto glBO = getBufferIDUnsynced(*buffer); if (glBO) { - glBindBufferRange(GL_UNIFORM_BUFFER, slot, glBO, bufferState.offset, bufferState.size); - _uniform._buffers[slot] = bufferState; + glBindBufferRange(GL_UNIFORM_BUFFER, slot, glBO, offset, size); + assign(currentBufferState.buffer, buffer); + currentBufferState.offset = offset; + currentBufferState.size = size; (void)CHECK_GL_ERROR(); } else { releaseUniformBuffer(slot); @@ -201,7 +201,7 @@ void GLBackend::do_setUniformBuffer(const Batch& batch, size_t paramOffset) { } void GLBackend::releaseResourceTexture(uint32_t slot) { - auto& tex = _resource._textures[slot]; + auto tex = acquire(_resource._textures[slot]); if (tex) { auto* object = Backend::getGPUObject(*tex); if (object) { @@ -210,8 +210,8 @@ void GLBackend::releaseResourceTexture(uint32_t slot) { glBindTexture(target, 0); // RELEASE (void)CHECK_GL_ERROR(); } - tex.reset(); } + reset(_resource._textures[slot]); } void GLBackend::resetResourceStage() { @@ -232,14 +232,14 @@ void GLBackend::do_setResourceBuffer(const Batch& batch, size_t paramOffset) { return; } - auto resourceBuffer = batch._buffers.get(batch._params[paramOffset + 0]._uint); + const auto& resourceBuffer = batch._buffers.get(batch._params[paramOffset + 0]._uint); if (!resourceBuffer) { releaseResourceBuffer(slot); return; } // check cache before thinking - if (_resource._buffers[slot] == resourceBuffer) { + if (compare(_resource._buffers[slot], resourceBuffer)) { return; } @@ -248,7 +248,7 @@ void GLBackend::do_setResourceBuffer(const Batch& batch, size_t paramOffset) { // If successful bind then cache it if (bindResourceBuffer(slot, resourceBuffer)) { - _resource._buffers[slot] = resourceBuffer; + assign(_resource._buffers[slot], resourceBuffer); } else { // else clear slot and cache releaseResourceBuffer(slot); return; @@ -293,14 +293,14 @@ void GLBackend::do_setResourceFramebufferSwapChainTexture(const Batch& batch, si } auto index = batch._params[paramOffset + 2]._uint; auto renderBufferSlot = batch._params[paramOffset + 3]._uint; - auto resourceFramebuffer = swapChain->get(index); - auto resourceTexture = resourceFramebuffer->getRenderBuffer(renderBufferSlot); + const auto& resourceFramebuffer = swapChain->get(index); + const auto& resourceTexture = resourceFramebuffer->getRenderBuffer(renderBufferSlot); setResourceTexture(slot, resourceTexture); } void GLBackend::setResourceTexture(unsigned int slot, const TexturePointer& resourceTexture) { // check cache before thinking - if (_resource._textures[slot] == resourceTexture) { + if (compare(_resource._textures[slot], resourceTexture)) { return; } @@ -317,7 +317,7 @@ void GLBackend::setResourceTexture(unsigned int slot, const TexturePointer& reso (void)CHECK_GL_ERROR(); - _resource._textures[slot] = resourceTexture; + assign(_resource._textures[slot], resourceTexture); _stats._RSAmountTextureMemoryBounded += (int)object->size(); @@ -343,7 +343,7 @@ void GLBackend::do_setResourceTextureTable(const Batch& batch, size_t paramOffse int GLBackend::ResourceStageState::findEmptyTextureSlot() const { // start from the end of the slots, try to find an empty one that can be used for (auto i = MAX_NUM_RESOURCE_TEXTURES - 1; i > 0; i--) { - if (!_textures[i]) { + if (!valid(_textures[i])) { return i; } } diff --git a/libraries/gpu-gl-common/src/gpu/gl/GLPipeline.cpp b/libraries/gpu-gl-common/src/gpu/gl/GLPipeline.cpp index 1b479dceb8..a099e6e66a 100644 --- a/libraries/gpu-gl-common/src/gpu/gl/GLPipeline.cpp +++ b/libraries/gpu-gl-common/src/gpu/gl/GLPipeline.cpp @@ -24,7 +24,7 @@ GLPipeline* GLPipeline::sync(GLBackend& backend, const Pipeline& pipeline) { } // No object allocated yet, let's see if it's worth it... - ShaderPointer shader = pipeline.getProgram(); + const auto& shader = pipeline.getProgram(); // If this pipeline's shader has already failed to compile, don't try again if (shader->compilationHasFailed()) { @@ -37,7 +37,7 @@ GLPipeline* GLPipeline::sync(GLBackend& backend, const Pipeline& pipeline) { return nullptr; } - StatePointer state = pipeline.getState(); + const auto& state = pipeline.getState(); GLState* stateObject = GLState::sync(*state); if (stateObject == nullptr) { return nullptr; diff --git a/libraries/gpu-gl/src/gpu/gl41/GL41Backend.h b/libraries/gpu-gl/src/gpu/gl41/GL41Backend.h index f4078f5479..e5f7415107 100644 --- a/libraries/gpu-gl/src/gpu/gl41/GL41Backend.h +++ b/libraries/gpu-gl/src/gpu/gl41/GL41Backend.h @@ -161,7 +161,7 @@ protected: void updateTransform(const Batch& batch) override; // Resource Stage - bool bindResourceBuffer(uint32_t slot, BufferPointer& buffer) override; + bool bindResourceBuffer(uint32_t slot, const BufferPointer& buffer) override; void releaseResourceBuffer(uint32_t slot) override; // Output stage diff --git a/libraries/gpu-gl/src/gpu/gl41/GL41BackendBuffer.cpp b/libraries/gpu-gl/src/gpu/gl41/GL41BackendBuffer.cpp index ac5d5ee0c9..80fd214515 100644 --- a/libraries/gpu-gl/src/gpu/gl41/GL41BackendBuffer.cpp +++ b/libraries/gpu-gl/src/gpu/gl41/GL41BackendBuffer.cpp @@ -100,7 +100,7 @@ GLBuffer* GL41Backend::syncGPUObject(const Buffer& buffer) { return GL41Buffer::sync(*this, buffer); } -bool GL41Backend::bindResourceBuffer(uint32_t slot, BufferPointer& buffer) { +bool GL41Backend::bindResourceBuffer(uint32_t slot, const BufferPointer& buffer) { GLuint texBuffer = GL41Backend::getResourceBufferID((*buffer)); if (texBuffer) { glActiveTexture(GL_TEXTURE0 + GL41Backend::RESOURCE_BUFFER_SLOT0_TEX_UNIT + slot); @@ -108,7 +108,7 @@ bool GL41Backend::bindResourceBuffer(uint32_t slot, BufferPointer& buffer) { (void)CHECK_GL_ERROR(); - _resource._buffers[slot] = buffer; + assign(_resource._buffers[slot], buffer); return true; } @@ -117,10 +117,7 @@ bool GL41Backend::bindResourceBuffer(uint32_t slot, BufferPointer& buffer) { } void GL41Backend::releaseResourceBuffer(uint32_t slot) { - auto& buf = _resource._buffers[slot]; - if (buf) { - glActiveTexture(GL_TEXTURE0 + GL41Backend::RESOURCE_BUFFER_SLOT0_TEX_UNIT + slot); - glBindTexture(GL_TEXTURE_BUFFER, 0); - buf.reset(); - } + reset(_resource._buffers[slot]); + glActiveTexture(GL_TEXTURE0 + GL41Backend::RESOURCE_BUFFER_SLOT0_TEX_UNIT + slot); + glBindTexture(GL_TEXTURE_BUFFER, 0); } diff --git a/libraries/gpu-gl/src/gpu/gl41/GL41BackendInput.cpp b/libraries/gpu-gl/src/gpu/gl41/GL41BackendInput.cpp index c61ffb09e5..bd88be0f0d 100644 --- a/libraries/gpu-gl/src/gpu/gl41/GL41BackendInput.cpp +++ b/libraries/gpu-gl/src/gpu/gl41/GL41BackendInput.cpp @@ -35,14 +35,15 @@ void GL41Backend::updateInput() { if (_input._invalidFormat || _input._invalidBuffers.any()) { + auto format = acquire(_input._format); if (_input._invalidFormat) { InputStageState::ActivationCache newActivation; _stats._ISNumFormatChanges++; // Check expected activation - if (_input._format) { - for (auto& it : _input._format->getAttributes()) { + if (format) { + for (auto& it : format->getAttributes()) { const Stream::Attribute& attrib = (it).second; uint8_t locationCount = attrib._element.getLocationCount(); for (int i = 0; i < locationCount; ++i) { @@ -69,15 +70,15 @@ void GL41Backend::updateInput() { } // now we need to bind the buffers and assign the attrib pointers - if (_input._format) { + if (format) { bool hasColorAttribute{ false }; - const Buffers& buffers = _input._buffers; + const auto& buffers = _input._buffers; const Offsets& offsets = _input._bufferOffsets; const Offsets& strides = _input._bufferStrides; - const Stream::Format::AttributeMap& attributes = _input._format->getAttributes(); - auto& inputChannels = _input._format->getChannels(); + const auto& attributes = format->getAttributes(); + const auto& inputChannels = format->getChannels(); int numInvalids = (int)_input._invalidBuffers.count(); _stats._ISNumInputBufferChanges += numInvalids; diff --git a/libraries/gpu-gl/src/gpu/gl45/GL45Backend.h b/libraries/gpu-gl/src/gpu/gl45/GL45Backend.h index a100faf432..30656b47c7 100644 --- a/libraries/gpu-gl/src/gpu/gl45/GL45Backend.h +++ b/libraries/gpu-gl/src/gpu/gl45/GL45Backend.h @@ -262,7 +262,7 @@ protected: void updateTransform(const Batch& batch) override; // Resource Stage - bool bindResourceBuffer(uint32_t slot, BufferPointer& buffer) override; + bool bindResourceBuffer(uint32_t slot, const BufferPointer& buffer) override; void releaseResourceBuffer(uint32_t slot) override; // Output stage diff --git a/libraries/gpu-gl/src/gpu/gl45/GL45BackendBuffer.cpp b/libraries/gpu-gl/src/gpu/gl45/GL45BackendBuffer.cpp index 6d17923ebd..da8f7059bf 100644 --- a/libraries/gpu-gl/src/gpu/gl45/GL45BackendBuffer.cpp +++ b/libraries/gpu-gl/src/gpu/gl45/GL45BackendBuffer.cpp @@ -60,14 +60,14 @@ GLBuffer* GL45Backend::syncGPUObject(const Buffer& buffer) { } -bool GL45Backend::bindResourceBuffer(uint32_t slot, BufferPointer& buffer) { +bool GL45Backend::bindResourceBuffer(uint32_t slot, const BufferPointer& buffer) { GLBuffer* object = syncGPUObject((*buffer)); if (object) { glBindBufferBase(GL_SHADER_STORAGE_BUFFER, slot, object->_id); (void)CHECK_GL_ERROR(); - _resource._buffers[slot] = buffer; + assign(_resource._buffers[slot], buffer); return true; } @@ -76,10 +76,10 @@ bool GL45Backend::bindResourceBuffer(uint32_t slot, BufferPointer& buffer) { } void GL45Backend::releaseResourceBuffer(uint32_t slot) { - auto& buf = _resource._buffers[slot]; + auto buf = acquire(_resource._buffers[slot]); if (buf) { glBindBufferBase(GL_SHADER_STORAGE_BUFFER, slot, 0); - buf.reset(); + reset(_resource._buffers[slot]); } } diff --git a/libraries/gpu-gl/src/gpu/gl45/GL45BackendInput.cpp b/libraries/gpu-gl/src/gpu/gl45/GL45BackendInput.cpp index 7cd8756ead..5285e62d3e 100644 --- a/libraries/gpu-gl/src/gpu/gl45/GL45BackendInput.cpp +++ b/libraries/gpu-gl/src/gpu/gl45/GL45BackendInput.cpp @@ -28,7 +28,7 @@ void GL45Backend::resetInputStage() { void GL45Backend::updateInput() { bool isStereoNow = isStereo(); - // track stereo state change potentially happening wihtout changing the input format + // track stereo state change potentially happening without changing the input format // this is a rare case requesting to invalid the format #ifdef GPU_STEREO_DRAWCALL_INSTANCED _input._invalidFormat |= (isStereoNow != _input._lastUpdateStereoState); @@ -39,13 +39,14 @@ void GL45Backend::updateInput() { InputStageState::ActivationCache newActivation; // Assign the vertex format required - if (_input._format) { + auto format = acquire(_input._format); + if (format) { bool hasColorAttribute{ false }; _input._attribBindingBuffers.reset(); - const Stream::Format::AttributeMap& attributes = _input._format->getAttributes(); - auto& inputChannels = _input._format->getChannels(); + const auto& attributes = format->getAttributes(); + const auto& inputChannels = format->getChannels(); for (auto& channelIt : inputChannels) { auto bufferChannelNum = (channelIt).first; const Stream::Format::ChannelMap::value_type::second_type& channel = (channelIt).second; diff --git a/libraries/gpu-gles/src/gpu/gles/GLESBackend.h b/libraries/gpu-gles/src/gpu/gles/GLESBackend.h index c757de0a72..56ae41da31 100644 --- a/libraries/gpu-gles/src/gpu/gles/GLESBackend.h +++ b/libraries/gpu-gles/src/gpu/gles/GLESBackend.h @@ -157,7 +157,7 @@ protected: void updateTransform(const Batch& batch) override; // Resource Stage - bool bindResourceBuffer(uint32_t slot, BufferPointer& buffer) override; + bool bindResourceBuffer(uint32_t slot, const BufferPointer& buffer) override; void releaseResourceBuffer(uint32_t slot) override; // Output stage diff --git a/libraries/gpu-gles/src/gpu/gles/GLESBackendBuffer.cpp b/libraries/gpu-gles/src/gpu/gles/GLESBackendBuffer.cpp index 7dd08df409..04f8628db3 100644 --- a/libraries/gpu-gles/src/gpu/gles/GLESBackendBuffer.cpp +++ b/libraries/gpu-gles/src/gpu/gles/GLESBackendBuffer.cpp @@ -72,14 +72,14 @@ GLBuffer* GLESBackend::syncGPUObject(const Buffer& buffer) { return GLESBuffer::sync(*this, buffer); } -bool GLESBackend::bindResourceBuffer(uint32_t slot, BufferPointer& buffer) { +bool GLESBackend::bindResourceBuffer(uint32_t slot, const BufferPointer& buffer) { GLBuffer* object = syncGPUObject((*buffer)); if (object) { glBindBufferBase(GL_SHADER_STORAGE_BUFFER, slot, object->_id); (void)CHECK_GL_ERROR(); - _resource._buffers[slot] = buffer; + assign(_resource._buffers[slot], buffer); return true; } @@ -91,7 +91,7 @@ void GLESBackend::releaseResourceBuffer(uint32_t slot) { auto& buf = _resource._buffers[slot]; if (buf) { glBindBufferBase(GL_SHADER_STORAGE_BUFFER, slot, 0); - buf.reset(); + reset(buf); } } diff --git a/libraries/gpu/src/gpu/Batch.cpp b/libraries/gpu/src/gpu/Batch.cpp index b6714e2f1a..745f1d1845 100644 --- a/libraries/gpu/src/gpu/Batch.cpp +++ b/libraries/gpu/src/gpu/Batch.cpp @@ -498,7 +498,7 @@ void Batch::setupNamedCalls(const std::string& instanceName, NamedBatchData::Fun captureNamedDrawCallInfo(instanceName); } -BufferPointer Batch::getNamedBuffer(const std::string& instanceName, uint8_t index) { +const BufferPointer& Batch::getNamedBuffer(const std::string& instanceName, uint8_t index) { NamedBatchData& instance = _namedData[instanceName]; if (instance.buffers.size() <= index) { instance.buffers.resize(index + 1); diff --git a/libraries/gpu/src/gpu/Batch.h b/libraries/gpu/src/gpu/Batch.h index b49d14e5a1..8e607a189e 100644 --- a/libraries/gpu/src/gpu/Batch.h +++ b/libraries/gpu/src/gpu/Batch.h @@ -119,7 +119,7 @@ public: void multiDrawIndexedIndirect(uint32 numCommands, Primitive primitiveType); void setupNamedCalls(const std::string& instanceName, NamedBatchData::Function function); - BufferPointer getNamedBuffer(const std::string& instanceName, uint8_t index = 0); + const BufferPointer& getNamedBuffer(const std::string& instanceName, uint8_t index = 0); // Input Stage // InputFormat diff --git a/libraries/gpu/src/gpu/Framebuffer.cpp b/libraries/gpu/src/gpu/Framebuffer.cpp index 8bb9be4a76..e88d986da6 100755 --- a/libraries/gpu/src/gpu/Framebuffer.cpp +++ b/libraries/gpu/src/gpu/Framebuffer.cpp @@ -203,11 +203,12 @@ uint32 Framebuffer::getNumRenderBuffers() const { return nb; } -TexturePointer Framebuffer::getRenderBuffer(uint32 slot) const { +const TexturePointer& Framebuffer::getRenderBuffer(uint32 slot) const { + static const TexturePointer EMPTY; if (!isSwapchain() && (slot < getMaxNumRenderBuffers())) { return _renderBuffers[slot]._texture; } else { - return TexturePointer(); + return EMPTY; } } @@ -297,9 +298,10 @@ bool Framebuffer::setDepthStencilBuffer(const TexturePointer& texture, const For return false; } -TexturePointer Framebuffer::getDepthStencilBuffer() const { +const TexturePointer& Framebuffer::getDepthStencilBuffer() const { + static const TexturePointer EMPTY; if (isSwapchain()) { - return TexturePointer(); + return EMPTY; } else { return _depthStencilBuffer._texture; } diff --git a/libraries/gpu/src/gpu/Framebuffer.h b/libraries/gpu/src/gpu/Framebuffer.h index fbbec50a28..44e945883f 100755 --- a/libraries/gpu/src/gpu/Framebuffer.h +++ b/libraries/gpu/src/gpu/Framebuffer.h @@ -95,7 +95,7 @@ public: static Framebuffer* createShadowmap(uint16 width); bool isSwapchain() const; - SwapchainPointer getSwapchain() const { return _swapchain; } + const SwapchainPointer& getSwapchain() const { return _swapchain; } uint32 getFrameCount() const; @@ -105,13 +105,13 @@ public: const TextureViews& getRenderBuffers() const { return _renderBuffers; } int32 setRenderBuffer(uint32 slot, const TexturePointer& texture, uint32 subresource = 0); - TexturePointer getRenderBuffer(uint32 slot) const; + const TexturePointer& getRenderBuffer(uint32 slot) const; uint32 getRenderBufferSubresource(uint32 slot) const; bool setDepthBuffer(const TexturePointer& texture, const Format& format, uint32 subresource = 0); bool setStencilBuffer(const TexturePointer& texture, const Format& format, uint32 subresource = 0); bool setDepthStencilBuffer(const TexturePointer& texture, const Format& format, uint32 subresource = 0); - TexturePointer getDepthStencilBuffer() const; + const TexturePointer& getDepthStencilBuffer() const; uint32 getDepthStencilBufferSubresource() const; Format getDepthStencilBufferFormat() const; From 37cf37e3e16498c74cfd285c38a1c0a34bfdeb47 Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Wed, 12 Sep 2018 11:47:32 -0700 Subject: [PATCH 195/210] PR feedback --- .../gpu-gl-common/src/gpu/gl/GLBackend.cpp | 1 - .../gpu-gl-common/src/gpu/gl/GLBackend.h | 150 +++++++++--------- .../src/gpu/gl/GLBackendInput.cpp | 3 +- .../src/gpu/gl/GLBackendOutput.cpp | 10 +- .../src/gpu/gl/GLBackendPipeline.cpp | 40 ++--- .../gpu-gl/src/gpu/gl41/GL41BackendBuffer.cpp | 10 +- .../gpu-gl/src/gpu/gl41/GL41BackendInput.cpp | 4 +- .../gpu-gl/src/gpu/gl45/GL45BackendBuffer.cpp | 9 +- 8 files changed, 108 insertions(+), 119 deletions(-) diff --git a/libraries/gpu-gl-common/src/gpu/gl/GLBackend.cpp b/libraries/gpu-gl-common/src/gpu/gl/GLBackend.cpp index 30a3cf0aaf..4fea4f2dc5 100644 --- a/libraries/gpu-gl-common/src/gpu/gl/GLBackend.cpp +++ b/libraries/gpu-gl-common/src/gpu/gl/GLBackend.cpp @@ -150,7 +150,6 @@ void GLBackend::init() { }); } - GLBackend::GLBackend(bool syncCache) { _pipeline._cameraCorrectionBuffer._buffer->flush(); initShaderBinaryCache(); diff --git a/libraries/gpu-gl-common/src/gpu/gl/GLBackend.h b/libraries/gpu-gl-common/src/gpu/gl/GLBackend.h index 7927734256..fecf1a5798 100644 --- a/libraries/gpu-gl-common/src/gpu/gl/GLBackend.h +++ b/libraries/gpu-gl-common/src/gpu/gl/GLBackend.h @@ -39,6 +39,7 @@ #define GPU_STEREO_TECHNIQUE_INSTANCED #endif + // Let these be configured by the one define picked above #ifdef GPU_STEREO_TECHNIQUE_DOUBLED_SIMPLE #define GPU_STEREO_DRAWCALL_DOUBLED @@ -208,9 +209,8 @@ class GLBackend : public Backend, public std::enable_shared_from_this protected: explicit GLBackend(bool syncCache); GLBackend(); - - public: + #if defined(USE_GLES) // https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGet.xhtml static const GLint MIN_REQUIRED_TEXTURE_IMAGE_UNITS = 16; @@ -251,8 +251,8 @@ public: // This is the ugly "download the pixels to sysmem for taking a snapshot" // Just avoid using it, it's ugly and will break performances virtual void downloadFramebuffer(const FramebufferPointer& srcFramebuffer, - const Vec4i& region, - QImage& destImage) final override; + const Vec4i& region, QImage& destImage) final override; + // this is the maximum numeber of available input buffers size_t getNumInputBuffers() const { return _input._invalidBuffers.size(); } @@ -273,6 +273,7 @@ public: static const int MAX_NUM_RESOURCE_TABLE_TEXTURES = 2; size_t getMaxNumResourceTextureTables() const { return MAX_NUM_RESOURCE_TABLE_TEXTURES; } + // Draw Stage virtual void do_draw(const Batch& batch, size_t paramOffset) = 0; virtual void do_drawIndexed(const Batch& batch, size_t paramOffset) = 0; @@ -324,6 +325,7 @@ public: // Reset stages virtual void do_resetStages(const Batch& batch, size_t paramOffset) final; + virtual void do_disableContextViewCorrection(const Batch& batch, size_t paramOffset) final; virtual void do_restoreContextViewCorrection(const Batch& batch, size_t paramOffset) final; @@ -343,7 +345,7 @@ public: virtual void do_popProfileRange(const Batch& batch, size_t paramOffset) final; // TODO: As long as we have gl calls explicitely issued from interface - // code, we need to be able to record and batch these calls. THe long + // code, we need to be able to record and batch these calls. THe long // term strategy is to get rid of any GL calls in favor of the HIFI GPU API virtual void do_glUniform1i(const Batch& batch, size_t paramOffset) final; virtual void do_glUniform1f(const Batch& batch, size_t paramOffset) final; @@ -368,9 +370,7 @@ public: virtual void do_setStateAntialiasedLineEnable(bool enable) final; virtual void do_setStateDepthBias(Vec2 bias) final; virtual void do_setStateDepthTest(State::DepthTest test) final; - virtual void do_setStateStencil(State::StencilActivation activation, - State::StencilTest frontTest, - State::StencilTest backTest) final; + virtual void do_setStateStencil(State::StencilActivation activation, State::StencilTest frontTest, State::StencilTest backTest) final; virtual void do_setStateAlphaToCoverageEnable(bool enable) final; virtual void do_setStateSampleMask(uint32 mask) final; virtual void do_setStateBlend(State::BlendFunction blendFunction) final; @@ -399,9 +399,7 @@ public: virtual void releaseQuery(GLuint id) const; virtual void queueLambda(const std::function lambda) const; - bool isTextureManagementSparseEnabled() const override { - return (_textureManagement._sparseCapable && Texture::getEnableSparseTextures()); - } + bool isTextureManagementSparseEnabled() const override { return (_textureManagement._sparseCapable && Texture::getEnableSparseTextures()); } protected: virtual GLint getRealUniformLocation(GLint location) const; @@ -410,11 +408,11 @@ protected: // FIXME instead of a single flag, create a features struct similar to // https://www.khronos.org/registry/vulkan/specs/1.0/man/html/VkPhysicalDeviceFeatures.html - virtual bool supportsBindless() const { return false; } + virtual bool supportsBindless() const { return false; } static const size_t INVALID_OFFSET = (size_t)-1; - bool _inRenderTransferPass{ false }; - int _currentDraw{ -1 }; + bool _inRenderTransferPass { false }; + int _currentDraw { -1 }; std::list profileRanges; mutable Mutex _trashMutex; @@ -443,42 +441,36 @@ protected: virtual void updateInput() = 0; struct InputStageState { - bool _invalidFormat{ true }; - bool _lastUpdateStereoState{ false }; + bool _invalidFormat { true }; + bool _lastUpdateStereoState{ false }; bool _hadColorAttribute{ true }; FormatReference _format{ GPU_REFERENCE_INIT_VALUE }; std::string _formatKey; typedef std::bitset ActivationCache; - ActivationCache _attributeActivation{ 0 }; + ActivationCache _attributeActivation { 0 }; typedef std::bitset BuffersState; BuffersState _invalidBuffers{ 0 }; BuffersState _attribBindingBuffers{ 0 }; - std::vector _buffers{ MAX_NUM_INPUT_BUFFERS, GPU_REFERENCE_INIT_VALUE }; - Offsets _bufferOffsets; - Offsets _bufferStrides; - std::vector _bufferVBOs; + std::array _buffers{}; + std::array _bufferOffsets{}; + std::array _bufferStrides{}; + std::array _bufferVBOs{}; glm::vec4 _colorAttribute{ 0.0f }; - BufferReference _indexBuffer{ GPU_REFERENCE_INIT_VALUE }; - Offset _indexBufferOffset{ 0 }; - Type _indexBufferType{ UINT32 }; + BufferReference _indexBuffer{}; + Offset _indexBufferOffset { 0 }; + Type _indexBufferType { UINT32 }; - BufferReference _indirectBuffer{ GPU_REFERENCE_INIT_VALUE }; + BufferReference _indirectBuffer{}; Offset _indirectBufferOffset{ 0 }; Offset _indirectBufferStride{ 0 }; - GLuint _defaultVAO{ 0 }; - - InputStageState() { - _bufferOffsets.resize(MAX_NUM_INPUT_BUFFERS, 0); - _bufferStrides.resize(MAX_NUM_INPUT_BUFFERS, 0); - _bufferVBOs.resize(MAX_NUM_INPUT_BUFFERS, 0); - } + GLuint _defaultVAO { 0 }; } _input; virtual void initTransform() = 0; @@ -489,7 +481,7 @@ protected: virtual void resetTransformStage(); // Allows for correction of the camera pose to account for changes - // between the time when a was recorded and the time(s) when it is + // between the time when a was recorded and the time(s) when it is // executed // Prev is the previous correction used at previous frame struct CameraCorrection { @@ -504,12 +496,9 @@ protected: struct Cameras { TransformCamera _cams[2]; - Cameras(){}; + Cameras() {}; Cameras(const TransformCamera& cam) { memcpy(_cams, &cam, sizeof(TransformCamera)); }; - Cameras(const TransformCamera& camL, const TransformCamera& camR) { - memcpy(_cams, &camL, sizeof(TransformCamera)); - memcpy(_cams + 1, &camR, sizeof(TransformCamera)); - }; + Cameras(const TransformCamera& camL, const TransformCamera& camR) { memcpy(_cams, &camL, sizeof(TransformCamera)); memcpy(_cams + 1, &camR, sizeof(TransformCamera)); }; }; using CameraBufferElement = Cameras; @@ -523,24 +512,25 @@ protected: mutable std::map _drawCallInfoOffsets; - GLuint _objectBuffer{ 0 }; - GLuint _cameraBuffer{ 0 }; - GLuint _drawCallInfoBuffer{ 0 }; - GLuint _objectBufferTexture{ 0 }; - size_t _cameraUboSize{ 0 }; + GLuint _objectBuffer { 0 }; + GLuint _cameraBuffer { 0 }; + GLuint _drawCallInfoBuffer { 0 }; + GLuint _objectBufferTexture { 0 }; + size_t _cameraUboSize { 0 }; bool _viewIsCamera{ false }; - bool _skybox{ false }; + bool _skybox { false }; Transform _view; CameraCorrection _correction; bool _viewCorrectionEnabled{ true }; + Mat4 _projection; - Vec4i _viewport{ 0, 0, 1, 1 }; - Vec2 _depthRange{ 0.0f, 1.0f }; + Vec4i _viewport { 0, 0, 1, 1 }; + Vec2 _depthRange { 0.0f, 1.0f }; Vec2 _projectionJitter{ 0.0f, 0.0f }; - bool _invalidView{ false }; - bool _invalidProj{ false }; - bool _invalidViewport{ false }; + bool _invalidView { false }; + bool _invalidProj { false }; + bool _invalidViewport { false }; bool _enabledDrawcallInfoBuffer{ false }; @@ -559,10 +549,9 @@ protected: struct UniformStageState { struct BufferState { - BufferReference buffer{ GPU_REFERENCE_INIT_VALUE }; + BufferReference buffer{}; GLintptr offset{ 0 }; GLsizeiptr size{ 0 }; - //BufferState(const BufferPointer& buffer = nullptr, GLintptr offset = 0, GLsizeiptr size = 0); BufferState& operator=(const BufferState& other) = delete; void reset() { gpu::gl::reset(buffer); offset = 0; size = 0; } @@ -573,12 +562,12 @@ protected: }; // MAX_NUM_UNIFORM_BUFFERS-1 is the max uniform index BATCHES are allowed to set, but - // MIN_REQUIRED_UNIFORM_BUFFER_BINDINGS is used here because the backend sets some - // internal UBOs for things like camera correction + // MIN_REQUIRED_UNIFORM_BUFFER_BINDINGS is used here because the backend sets some + // internal UBOs for things like camera correction std::array _buffers; } _uniform; - // Helper function that provides common code + // Helper function that provides common code void bindUniformBuffer(uint32_t slot, const BufferPointer& buffer, GLintptr offset = 0, GLsizeiptr size = 0); void releaseUniformBuffer(uint32_t slot); void resetUniformStage(); @@ -588,19 +577,23 @@ protected: virtual bool bindResourceBuffer(uint32_t slot, const BufferPointer& buffer) = 0; virtual void releaseResourceBuffer(uint32_t slot) = 0; - // Helper function that provides common code used by do_setResourceTexture and + // Helper function that provides common code used by do_setResourceTexture and // do_setResourceTextureTable (in non-bindless mode) void bindResourceTexture(uint32_t slot, const TexturePointer& texture); + // update resource cache and do the gl unbind call with the current gpu::Texture cached at slot s void releaseResourceTexture(uint32_t slot); void resetResourceStage(); struct ResourceStageState { - std::vector _buffers{ MAX_NUM_RESOURCE_BUFFERS, BufferReference() }; - std::vector _textures{ MAX_NUM_RESOURCE_TEXTURES, GPU_REFERENCE_INIT_VALUE }; - //Textures _textures { { MAX_NUM_RESOURCE_TEXTURES } }; + struct TextureState { + TextureReference _texture{}; + GLenum _target; + }; + std::array _buffers{}; + std::array _textures{}; int findEmptyTextureSlot() const; } _resource; @@ -615,22 +608,21 @@ protected: void resetPipelineStage(); struct PipelineStageState { - PipelineReference _pipeline{ GPU_REFERENCE_INIT_VALUE }; + PipelineReference _pipeline{}; - GLuint _program{ 0 }; - bool _cameraCorrection{ false }; - GLShader* _programShader{ nullptr }; - bool _invalidProgram{ false }; + GLuint _program { 0 }; + bool _cameraCorrection { false }; + GLShader* _programShader { nullptr }; + bool _invalidProgram { false }; - BufferView _cameraCorrectionBuffer{ gpu::BufferView(std::make_shared(sizeof(CameraCorrection), nullptr)) }; - BufferView _cameraCorrectionBufferIdentity{ gpu::BufferView( - std::make_shared(sizeof(CameraCorrection), nullptr)) }; + BufferView _cameraCorrectionBuffer { gpu::BufferView(std::make_shared(sizeof(CameraCorrection), nullptr )) }; + BufferView _cameraCorrectionBufferIdentity { gpu::BufferView(std::make_shared(sizeof(CameraCorrection), nullptr )) }; State::Data _stateCache{ State::DEFAULT }; - State::Signature _stateSignatureCache{ 0 }; + State::Signature _stateSignatureCache { 0 }; - GLState* _state{ nullptr }; - bool _invalidState{ false }; + GLState* _state { nullptr }; + bool _invalidState { false }; PipelineStageState() { _cameraCorrectionBuffer.edit() = CameraCorrection(); @@ -644,9 +636,9 @@ protected: virtual GLShader* compileBackendProgram(const Shader& program, const Shader::CompilationHandler& handler); virtual GLShader* compileBackendShader(const Shader& shader, const Shader::CompilationHandler& handler); virtual std::string getBackendShaderHeader() const = 0; - // For a program, this will return a string containing all the source files (without any - // backend headers or defines). For a vertex, fragment or geometry shader, this will - // return the fully customized shader with all the version and backend specific + // For a program, this will return a string containing all the source files (without any + // backend headers or defines). For a vertex, fragment or geometry shader, this will + // return the fully customized shader with all the version and backend specific // preprocessor directives // The program string returned can be used as a key for a cache of shader binaries // The shader strings can be reliably sent to the low level `compileShader` functions @@ -662,22 +654,22 @@ protected: // Synchronize the state cache of this Backend with the actual real state of the GL Context void syncOutputStateCache(); void resetOutputStage(); - + struct OutputStageState { - FramebufferReference _framebuffer{ GPU_REFERENCE_INIT_VALUE }; - GLuint _drawFBO{ 0 }; + FramebufferReference _framebuffer{}; + GLuint _drawFBO { 0 }; } _output; void resetQueryStage(); struct QueryStageState { - uint32_t _rangeQueryDepth{ 0 }; + uint32_t _rangeQueryDepth { 0 }; } _queryStage; void resetStages(); // Stores cached binary versions of the shaders for quicker startup on subsequent runs - // Note that shaders in the cache can still fail to load due to hardware or driver - // changes that invalidate the cached binary, in which case we fall back on compiling + // Note that shaders in the cache can still fail to load due to hardware or driver + // changes that invalidate the cached binary, in which case we fall back on compiling // the source again struct ShaderBinaryCache { std::mutex _mutex; @@ -689,7 +681,7 @@ protected: virtual void killShaderBinaryCache(); struct TextureManagementStageState { - bool _sparseCapable{ false }; + bool _sparseCapable { false }; GLTextureTransferEnginePointer _transferEngine; } _textureManagement; virtual void initTextureManagementStage(); diff --git a/libraries/gpu-gl-common/src/gpu/gl/GLBackendInput.cpp b/libraries/gpu-gl-common/src/gpu/gl/GLBackendInput.cpp index 219efae866..85e6ba5382 100644 --- a/libraries/gpu-gl-common/src/gpu/gl/GLBackendInput.cpp +++ b/libraries/gpu-gl-common/src/gpu/gl/GLBackendInput.cpp @@ -19,8 +19,8 @@ using namespace gpu::gl; void GLBackend::do_setInputFormat(const Batch& batch, size_t paramOffset) { const auto& format = batch._streamFormats.get(batch._params[paramOffset]._uint); if (!compare(_input._format, format)) { - assign(_input._format, format); if (format) { + assign(_input._format, format); auto inputFormat = GLInputFormat::sync((*format)); assert(inputFormat); if (_input._formatKey != inputFormat->key) { @@ -28,6 +28,7 @@ void GLBackend::do_setInputFormat(const Batch& batch, size_t paramOffset) { _input._invalidFormat = true; } } else { + reset(_input._format); _input._formatKey.clear(); _input._invalidFormat = true; } diff --git a/libraries/gpu-gl-common/src/gpu/gl/GLBackendOutput.cpp b/libraries/gpu-gl-common/src/gpu/gl/GLBackendOutput.cpp index 370e50592d..411e16b18e 100644 --- a/libraries/gpu-gl-common/src/gpu/gl/GLBackendOutput.cpp +++ b/libraries/gpu-gl-common/src/gpu/gl/GLBackendOutput.cpp @@ -25,15 +25,19 @@ using namespace gpu::gl; void GLBackend::syncOutputStateCache() { GLint currentFBO; glGetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, ¤tFBO); + _output._drawFBO = currentFBO; reset(_output._framebuffer); } void GLBackend::resetOutputStage() { - _output._drawFBO = 0; - glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0); + if (valid(_output._framebuffer)) { + reset(_output._framebuffer); + _output._drawFBO = 0; + glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0); + } + glEnable(GL_FRAMEBUFFER_SRGB); - reset(_output._framebuffer); } void GLBackend::do_setFramebuffer(const Batch& batch, size_t paramOffset) { diff --git a/libraries/gpu-gl-common/src/gpu/gl/GLBackendPipeline.cpp b/libraries/gpu-gl-common/src/gpu/gl/GLBackendPipeline.cpp index 9b28fa8114..7a06b3af86 100644 --- a/libraries/gpu-gl-common/src/gpu/gl/GLBackendPipeline.cpp +++ b/libraries/gpu-gl-common/src/gpu/gl/GLBackendPipeline.cpp @@ -140,13 +140,9 @@ void GLBackend::resetPipelineStage() { void GLBackend::releaseUniformBuffer(uint32_t slot) { auto& bufferState = _uniform._buffers[slot]; - auto buffer = acquire(bufferState.buffer); - if (buffer) { - auto* object = Backend::getGPUObject(*buffer); - if (object) { - glBindBufferBase(GL_UNIFORM_BUFFER, slot, 0); // RELEASE - (void)CHECK_GL_ERROR(); - } + if (valid(bufferState.buffer)) { + glBindBufferBase(GL_UNIFORM_BUFFER, slot, 0); // RELEASE + (void)CHECK_GL_ERROR(); } bufferState.reset(); } @@ -201,17 +197,13 @@ void GLBackend::do_setUniformBuffer(const Batch& batch, size_t paramOffset) { } void GLBackend::releaseResourceTexture(uint32_t slot) { - auto tex = acquire(_resource._textures[slot]); - if (tex) { - auto* object = Backend::getGPUObject(*tex); - if (object) { - GLuint target = object->_target; - glActiveTexture(GL_TEXTURE0 + slot); - glBindTexture(target, 0); // RELEASE - (void)CHECK_GL_ERROR(); - } + auto& textureState = _resource._textures[slot]; + if (valid(textureState._texture)) { + glActiveTexture(GL_TEXTURE0 + slot); + glBindTexture(textureState._target, 0); // RELEASE + (void)CHECK_GL_ERROR(); + reset(textureState._texture); } - reset(_resource._textures[slot]); } void GLBackend::resetResourceStage() { @@ -299,8 +291,9 @@ void GLBackend::do_setResourceFramebufferSwapChainTexture(const Batch& batch, si } void GLBackend::setResourceTexture(unsigned int slot, const TexturePointer& resourceTexture) { + auto& textureState = _resource._textures[slot]; // check cache before thinking - if (compare(_resource._textures[slot], resourceTexture)) { + if (compare(textureState._texture, resourceTexture)) { return; } @@ -310,15 +303,12 @@ void GLBackend::setResourceTexture(unsigned int slot, const TexturePointer& reso // Always make sure the GLObject is in sync GLTexture* object = syncGPUObject(resourceTexture); if (object) { + assign(textureState._texture, resourceTexture); GLuint to = object->_texture; - GLuint target = object->_target; + textureState._target = object->_target; glActiveTexture(GL_TEXTURE0 + slot); - glBindTexture(target, to); - + glBindTexture(textureState._target, to); (void)CHECK_GL_ERROR(); - - assign(_resource._textures[slot], resourceTexture); - _stats._RSAmountTextureMemoryBounded += (int)object->size(); } else { @@ -343,7 +333,7 @@ void GLBackend::do_setResourceTextureTable(const Batch& batch, size_t paramOffse int GLBackend::ResourceStageState::findEmptyTextureSlot() const { // start from the end of the slots, try to find an empty one that can be used for (auto i = MAX_NUM_RESOURCE_TEXTURES - 1; i > 0; i--) { - if (!valid(_textures[i])) { + if (!valid(_textures[i]._texture)) { return i; } } diff --git a/libraries/gpu-gl/src/gpu/gl41/GL41BackendBuffer.cpp b/libraries/gpu-gl/src/gpu/gl41/GL41BackendBuffer.cpp index 80fd214515..d5193f892a 100644 --- a/libraries/gpu-gl/src/gpu/gl41/GL41BackendBuffer.cpp +++ b/libraries/gpu-gl/src/gpu/gl41/GL41BackendBuffer.cpp @@ -117,7 +117,11 @@ bool GL41Backend::bindResourceBuffer(uint32_t slot, const BufferPointer& buffer) } void GL41Backend::releaseResourceBuffer(uint32_t slot) { - reset(_resource._buffers[slot]); - glActiveTexture(GL_TEXTURE0 + GL41Backend::RESOURCE_BUFFER_SLOT0_TEX_UNIT + slot); - glBindTexture(GL_TEXTURE_BUFFER, 0); + auto& bufferReference = _resource._buffers[slot]; + auto buffer = acquire(bufferReference); + if (buffer) { + glActiveTexture(GL_TEXTURE0 + GL41Backend::RESOURCE_BUFFER_SLOT0_TEX_UNIT + slot); + glBindTexture(GL_TEXTURE_BUFFER, 0); + reset(bufferReference); + } } diff --git a/libraries/gpu-gl/src/gpu/gl41/GL41BackendInput.cpp b/libraries/gpu-gl/src/gpu/gl41/GL41BackendInput.cpp index bd88be0f0d..2b985c122e 100644 --- a/libraries/gpu-gl/src/gpu/gl41/GL41BackendInput.cpp +++ b/libraries/gpu-gl/src/gpu/gl41/GL41BackendInput.cpp @@ -74,8 +74,8 @@ void GL41Backend::updateInput() { bool hasColorAttribute{ false }; const auto& buffers = _input._buffers; - const Offsets& offsets = _input._bufferOffsets; - const Offsets& strides = _input._bufferStrides; + const auto& offsets = _input._bufferOffsets; + const auto& strides = _input._bufferStrides; const auto& attributes = format->getAttributes(); const auto& inputChannels = format->getChannels(); diff --git a/libraries/gpu-gl/src/gpu/gl45/GL45BackendBuffer.cpp b/libraries/gpu-gl/src/gpu/gl45/GL45BackendBuffer.cpp index da8f7059bf..cb0591c31c 100644 --- a/libraries/gpu-gl/src/gpu/gl45/GL45BackendBuffer.cpp +++ b/libraries/gpu-gl/src/gpu/gl45/GL45BackendBuffer.cpp @@ -76,11 +76,10 @@ bool GL45Backend::bindResourceBuffer(uint32_t slot, const BufferPointer& buffer) } void GL45Backend::releaseResourceBuffer(uint32_t slot) { - auto buf = acquire(_resource._buffers[slot]); - if (buf) { + auto& bufferReference = _resource._buffers[slot]; + auto buffer = acquire(bufferReference); + if (buffer) { glBindBufferBase(GL_SHADER_STORAGE_BUFFER, slot, 0); - reset(_resource._buffers[slot]); + reset(bufferReference); } } - - From 700c6519bf23ec5c343e44106130c57016dc39f9 Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Wed, 12 Sep 2018 11:55:07 -0700 Subject: [PATCH 196/210] More PR comments --- libraries/gpu-gles/src/gpu/gles/GLESBackendBuffer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/gpu-gles/src/gpu/gles/GLESBackendBuffer.cpp b/libraries/gpu-gles/src/gpu/gles/GLESBackendBuffer.cpp index 04f8628db3..5e4da4d1fe 100644 --- a/libraries/gpu-gles/src/gpu/gles/GLESBackendBuffer.cpp +++ b/libraries/gpu-gles/src/gpu/gles/GLESBackendBuffer.cpp @@ -88,10 +88,10 @@ bool GLESBackend::bindResourceBuffer(uint32_t slot, const BufferPointer& buffer) } void GLESBackend::releaseResourceBuffer(uint32_t slot) { - auto& buf = _resource._buffers[slot]; - if (buf) { + auto& bufferReference = _resource._buffers[slot]; + if (valid(bufferReference)) { glBindBufferBase(GL_SHADER_STORAGE_BUFFER, slot, 0); - reset(buf); + reset(bufferReference); } } From d92c62c7423684533d6ba4d9602696538f8e73b2 Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Wed, 12 Sep 2018 15:04:27 -0700 Subject: [PATCH 197/210] Make android use the existing shared pointers --- .../gpu-gl-common/src/gpu/gl/GLBackend.h | 159 +++++++++--------- 1 file changed, 84 insertions(+), 75 deletions(-) diff --git a/libraries/gpu-gl-common/src/gpu/gl/GLBackend.h b/libraries/gpu-gl-common/src/gpu/gl/GLBackend.h index fecf1a5798..0b76ef17de 100644 --- a/libraries/gpu-gl-common/src/gpu/gl/GLBackend.h +++ b/libraries/gpu-gl-common/src/gpu/gl/GLBackend.h @@ -39,7 +39,6 @@ #define GPU_STEREO_TECHNIQUE_INSTANCED #endif - // Let these be configured by the one define picked above #ifdef GPU_STEREO_TECHNIQUE_DOUBLED_SIMPLE #define GPU_STEREO_DRAWCALL_DOUBLED @@ -57,23 +56,25 @@ // // GL Backend pointer storage mechanism -// One of the following three defines must be uncommented. +// One of the following three defines must be defined. +// GPU_POINTER_STORAGE_SHARED -// Equivalent to current state of affairs in master, -// Works pretty well, but ends up creating a lot of needless smart pointer duplication -// which means there's a high aggregate cost of manipulating std::shared_ptr counters -//#define GPU_POINTER_STORAGE_SHARED - -// The platonic ideal, use references to smart pointers. -// However, this produces artifacts because there are too many places in the code right now that +// The platonic ideal, use references to smart pointers. +// However, this produces artifacts because there are too many places in the code right now that // create temporary values (undesirable smart pointer duplications) and then those temp variables // get passed on and have their reference taken, and then invalidated -//#define GPU_POINTER_STORAGE_REF +// GPU_POINTER_STORAGE_REF // Raw pointer manipulation. Seems more dangerous than the reference wrappers, -// but in practice, the danger of grabbing a reference to a temporary variable +// but in practice, the danger of grabbing a reference to a temporary variable // is causing issues +// GPU_POINTER_STORAGE_RAW + +#if defined(USE_GLES) +#define GPU_POINTER_STORAGE_SHARED +#else #define GPU_POINTER_STORAGE_RAW +#endif namespace gpu { namespace gl { @@ -99,7 +100,7 @@ static inline bool valid(const std::shared_ptr& pointer) { } template -static inline void assign(std::shared_ptr&pointer, const std::shared_ptr& source) { +static inline void assign(std::shared_ptr& pointer, const std::shared_ptr& source) { pointer = source; } @@ -130,7 +131,7 @@ private: }; }; -template +template static bool compare(const PointerReferenceWrapper& reference, const std::shared_ptr& pointer) { return reference.get() == pointer; } @@ -140,12 +141,12 @@ static inline T* acquire(const PointerReferenceWrapper& reference) { return reference.get().get(); } -template +template static void assign(PointerReferenceWrapper& reference, const std::shared_ptr& pointer) { reference = pointer; } -template +template static bool valid(const PointerReferenceWrapper& reference) { return reference.get().operator bool(); } @@ -161,12 +162,12 @@ using FramebufferReference = PointerReferenceWrapper; using FormatReference = PointerReferenceWrapper; using PipelineReference = PointerReferenceWrapper; -#define GPU_REFERENCE_INIT_VALUE +#define GPU_REFERENCE_INIT_VALUE #elif defined(GPU_POINTER_STORAGE_RAW) -template -static bool compare(const T*const& rawPointer, const std::shared_ptr& pointer) { +template +static bool compare(const T* const& rawPointer, const std::shared_ptr& pointer) { return rawPointer == pointer.get(); } @@ -176,7 +177,7 @@ static inline T* acquire(T*& rawPointer) { } template -static inline bool valid(const T*const& rawPointer) { +static inline bool valid(const T* const& rawPointer) { return rawPointer; } @@ -209,8 +210,8 @@ class GLBackend : public Backend, public std::enable_shared_from_this protected: explicit GLBackend(bool syncCache); GLBackend(); -public: +public: #if defined(USE_GLES) // https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGet.xhtml static const GLint MIN_REQUIRED_TEXTURE_IMAGE_UNITS = 16; @@ -251,8 +252,8 @@ public: // This is the ugly "download the pixels to sysmem for taking a snapshot" // Just avoid using it, it's ugly and will break performances virtual void downloadFramebuffer(const FramebufferPointer& srcFramebuffer, - const Vec4i& region, QImage& destImage) final override; - + const Vec4i& region, + QImage& destImage) final override; // this is the maximum numeber of available input buffers size_t getNumInputBuffers() const { return _input._invalidBuffers.size(); } @@ -273,7 +274,6 @@ public: static const int MAX_NUM_RESOURCE_TABLE_TEXTURES = 2; size_t getMaxNumResourceTextureTables() const { return MAX_NUM_RESOURCE_TABLE_TEXTURES; } - // Draw Stage virtual void do_draw(const Batch& batch, size_t paramOffset) = 0; virtual void do_drawIndexed(const Batch& batch, size_t paramOffset) = 0; @@ -325,7 +325,6 @@ public: // Reset stages virtual void do_resetStages(const Batch& batch, size_t paramOffset) final; - virtual void do_disableContextViewCorrection(const Batch& batch, size_t paramOffset) final; virtual void do_restoreContextViewCorrection(const Batch& batch, size_t paramOffset) final; @@ -345,7 +344,7 @@ public: virtual void do_popProfileRange(const Batch& batch, size_t paramOffset) final; // TODO: As long as we have gl calls explicitely issued from interface - // code, we need to be able to record and batch these calls. THe long + // code, we need to be able to record and batch these calls. THe long // term strategy is to get rid of any GL calls in favor of the HIFI GPU API virtual void do_glUniform1i(const Batch& batch, size_t paramOffset) final; virtual void do_glUniform1f(const Batch& batch, size_t paramOffset) final; @@ -370,7 +369,9 @@ public: virtual void do_setStateAntialiasedLineEnable(bool enable) final; virtual void do_setStateDepthBias(Vec2 bias) final; virtual void do_setStateDepthTest(State::DepthTest test) final; - virtual void do_setStateStencil(State::StencilActivation activation, State::StencilTest frontTest, State::StencilTest backTest) final; + virtual void do_setStateStencil(State::StencilActivation activation, + State::StencilTest frontTest, + State::StencilTest backTest) final; virtual void do_setStateAlphaToCoverageEnable(bool enable) final; virtual void do_setStateSampleMask(uint32 mask) final; virtual void do_setStateBlend(State::BlendFunction blendFunction) final; @@ -399,7 +400,9 @@ public: virtual void releaseQuery(GLuint id) const; virtual void queueLambda(const std::function lambda) const; - bool isTextureManagementSparseEnabled() const override { return (_textureManagement._sparseCapable && Texture::getEnableSparseTextures()); } + bool isTextureManagementSparseEnabled() const override { + return (_textureManagement._sparseCapable && Texture::getEnableSparseTextures()); + } protected: virtual GLint getRealUniformLocation(GLint location) const; @@ -408,11 +411,11 @@ protected: // FIXME instead of a single flag, create a features struct similar to // https://www.khronos.org/registry/vulkan/specs/1.0/man/html/VkPhysicalDeviceFeatures.html - virtual bool supportsBindless() const { return false; } + virtual bool supportsBindless() const { return false; } static const size_t INVALID_OFFSET = (size_t)-1; - bool _inRenderTransferPass { false }; - int _currentDraw { -1 }; + bool _inRenderTransferPass{ false }; + int _currentDraw{ -1 }; std::list profileRanges; mutable Mutex _trashMutex; @@ -441,14 +444,14 @@ protected: virtual void updateInput() = 0; struct InputStageState { - bool _invalidFormat { true }; - bool _lastUpdateStereoState{ false }; + bool _invalidFormat{ true }; + bool _lastUpdateStereoState{ false }; bool _hadColorAttribute{ true }; FormatReference _format{ GPU_REFERENCE_INIT_VALUE }; std::string _formatKey; typedef std::bitset ActivationCache; - ActivationCache _attributeActivation { 0 }; + ActivationCache _attributeActivation{ 0 }; typedef std::bitset BuffersState; @@ -463,14 +466,14 @@ protected: glm::vec4 _colorAttribute{ 0.0f }; BufferReference _indexBuffer{}; - Offset _indexBufferOffset { 0 }; - Type _indexBufferType { UINT32 }; + Offset _indexBufferOffset{ 0 }; + Type _indexBufferType{ UINT32 }; BufferReference _indirectBuffer{}; Offset _indirectBufferOffset{ 0 }; Offset _indirectBufferStride{ 0 }; - GLuint _defaultVAO { 0 }; + GLuint _defaultVAO{ 0 }; } _input; virtual void initTransform() = 0; @@ -481,7 +484,7 @@ protected: virtual void resetTransformStage(); // Allows for correction of the camera pose to account for changes - // between the time when a was recorded and the time(s) when it is + // between the time when a was recorded and the time(s) when it is // executed // Prev is the previous correction used at previous frame struct CameraCorrection { @@ -496,9 +499,12 @@ protected: struct Cameras { TransformCamera _cams[2]; - Cameras() {}; + Cameras(){}; Cameras(const TransformCamera& cam) { memcpy(_cams, &cam, sizeof(TransformCamera)); }; - Cameras(const TransformCamera& camL, const TransformCamera& camR) { memcpy(_cams, &camL, sizeof(TransformCamera)); memcpy(_cams + 1, &camR, sizeof(TransformCamera)); }; + Cameras(const TransformCamera& camL, const TransformCamera& camR) { + memcpy(_cams, &camL, sizeof(TransformCamera)); + memcpy(_cams + 1, &camR, sizeof(TransformCamera)); + }; }; using CameraBufferElement = Cameras; @@ -512,25 +518,24 @@ protected: mutable std::map _drawCallInfoOffsets; - GLuint _objectBuffer { 0 }; - GLuint _cameraBuffer { 0 }; - GLuint _drawCallInfoBuffer { 0 }; - GLuint _objectBufferTexture { 0 }; - size_t _cameraUboSize { 0 }; + GLuint _objectBuffer{ 0 }; + GLuint _cameraBuffer{ 0 }; + GLuint _drawCallInfoBuffer{ 0 }; + GLuint _objectBufferTexture{ 0 }; + size_t _cameraUboSize{ 0 }; bool _viewIsCamera{ false }; - bool _skybox { false }; + bool _skybox{ false }; Transform _view; CameraCorrection _correction; bool _viewCorrectionEnabled{ true }; - Mat4 _projection; - Vec4i _viewport { 0, 0, 1, 1 }; - Vec2 _depthRange { 0.0f, 1.0f }; + Vec4i _viewport{ 0, 0, 1, 1 }; + Vec2 _depthRange{ 0.0f, 1.0f }; Vec2 _projectionJitter{ 0.0f, 0.0f }; - bool _invalidView { false }; - bool _invalidProj { false }; - bool _invalidViewport { false }; + bool _invalidView{ false }; + bool _invalidProj{ false }; + bool _invalidViewport{ false }; bool _enabledDrawcallInfoBuffer{ false }; @@ -554,7 +559,11 @@ protected: GLsizeiptr size{ 0 }; BufferState& operator=(const BufferState& other) = delete; - void reset() { gpu::gl::reset(buffer); offset = 0; size = 0; } + void reset() { + gpu::gl::reset(buffer); + offset = 0; + size = 0; + } bool compare(const BufferPointer& buffer, GLintptr offset, GLsizeiptr size) { const auto& self = *this; return (self.offset == offset && self.size == size && gpu::gl::compare(self.buffer, buffer)); @@ -562,12 +571,12 @@ protected: }; // MAX_NUM_UNIFORM_BUFFERS-1 is the max uniform index BATCHES are allowed to set, but - // MIN_REQUIRED_UNIFORM_BUFFER_BINDINGS is used here because the backend sets some - // internal UBOs for things like camera correction + // MIN_REQUIRED_UNIFORM_BUFFER_BINDINGS is used here because the backend sets some + // internal UBOs for things like camera correction std::array _buffers; } _uniform; - // Helper function that provides common code + // Helper function that provides common code void bindUniformBuffer(uint32_t slot, const BufferPointer& buffer, GLintptr offset = 0, GLsizeiptr size = 0); void releaseUniformBuffer(uint32_t slot); void resetUniformStage(); @@ -577,11 +586,10 @@ protected: virtual bool bindResourceBuffer(uint32_t slot, const BufferPointer& buffer) = 0; virtual void releaseResourceBuffer(uint32_t slot) = 0; - // Helper function that provides common code used by do_setResourceTexture and + // Helper function that provides common code used by do_setResourceTexture and // do_setResourceTextureTable (in non-bindless mode) void bindResourceTexture(uint32_t slot, const TexturePointer& texture); - // update resource cache and do the gl unbind call with the current gpu::Texture cached at slot s void releaseResourceTexture(uint32_t slot); @@ -610,19 +618,20 @@ protected: struct PipelineStageState { PipelineReference _pipeline{}; - GLuint _program { 0 }; - bool _cameraCorrection { false }; - GLShader* _programShader { nullptr }; - bool _invalidProgram { false }; + GLuint _program{ 0 }; + bool _cameraCorrection{ false }; + GLShader* _programShader{ nullptr }; + bool _invalidProgram{ false }; - BufferView _cameraCorrectionBuffer { gpu::BufferView(std::make_shared(sizeof(CameraCorrection), nullptr )) }; - BufferView _cameraCorrectionBufferIdentity { gpu::BufferView(std::make_shared(sizeof(CameraCorrection), nullptr )) }; + BufferView _cameraCorrectionBuffer{ gpu::BufferView(std::make_shared(sizeof(CameraCorrection), nullptr)) }; + BufferView _cameraCorrectionBufferIdentity{ gpu::BufferView( + std::make_shared(sizeof(CameraCorrection), nullptr)) }; State::Data _stateCache{ State::DEFAULT }; - State::Signature _stateSignatureCache { 0 }; + State::Signature _stateSignatureCache{ 0 }; - GLState* _state { nullptr }; - bool _invalidState { false }; + GLState* _state{ nullptr }; + bool _invalidState{ false }; PipelineStageState() { _cameraCorrectionBuffer.edit() = CameraCorrection(); @@ -636,9 +645,9 @@ protected: virtual GLShader* compileBackendProgram(const Shader& program, const Shader::CompilationHandler& handler); virtual GLShader* compileBackendShader(const Shader& shader, const Shader::CompilationHandler& handler); virtual std::string getBackendShaderHeader() const = 0; - // For a program, this will return a string containing all the source files (without any - // backend headers or defines). For a vertex, fragment or geometry shader, this will - // return the fully customized shader with all the version and backend specific + // For a program, this will return a string containing all the source files (without any + // backend headers or defines). For a vertex, fragment or geometry shader, this will + // return the fully customized shader with all the version and backend specific // preprocessor directives // The program string returned can be used as a key for a cache of shader binaries // The shader strings can be reliably sent to the low level `compileShader` functions @@ -654,22 +663,22 @@ protected: // Synchronize the state cache of this Backend with the actual real state of the GL Context void syncOutputStateCache(); void resetOutputStage(); - + struct OutputStageState { FramebufferReference _framebuffer{}; - GLuint _drawFBO { 0 }; + GLuint _drawFBO{ 0 }; } _output; void resetQueryStage(); struct QueryStageState { - uint32_t _rangeQueryDepth { 0 }; + uint32_t _rangeQueryDepth{ 0 }; } _queryStage; void resetStages(); // Stores cached binary versions of the shaders for quicker startup on subsequent runs - // Note that shaders in the cache can still fail to load due to hardware or driver - // changes that invalidate the cached binary, in which case we fall back on compiling + // Note that shaders in the cache can still fail to load due to hardware or driver + // changes that invalidate the cached binary, in which case we fall back on compiling // the source again struct ShaderBinaryCache { std::mutex _mutex; @@ -681,7 +690,7 @@ protected: virtual void killShaderBinaryCache(); struct TextureManagementStageState { - bool _sparseCapable { false }; + bool _sparseCapable{ false }; GLTextureTransferEnginePointer _transferEngine; } _textureManagement; virtual void initTextureManagementStage(); From d76a2c1add5b7be59460bfd45a11d734db64d5c1 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Wed, 12 Sep 2018 15:31:03 -0700 Subject: [PATCH 198/210] disable interstitial by default and fix crash --- interface/src/Application.cpp | 4 +++- interface/src/octree/SafeLanding.cpp | 30 +++++++++++++++++++++------- scripts/defaultScripts.js | 5 ++++- 3 files changed, 30 insertions(+), 9 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 77e2cb3211..ec2288e402 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -3498,7 +3498,9 @@ bool Application::isServerlessMode() const { } void Application::setIsInterstitialMode(bool interstitialMode) { - if (_interstitialMode != interstitialMode) { + Settings settings; + bool enableInterstitial = settings.value("enableIntersitialMode", false).toBool(); + if (_interstitialMode != interstitialMode && enableInterstitial) { _interstitialMode = interstitialMode; DependencyManager::get()->setAudioPaused(_interstitialMode); diff --git a/interface/src/octree/SafeLanding.cpp b/interface/src/octree/SafeLanding.cpp index 9785e0ba95..8b3f1ab7e4 100644 --- a/interface/src/octree/SafeLanding.cpp +++ b/interface/src/octree/SafeLanding.cpp @@ -66,13 +66,18 @@ void SafeLanding::addTrackedEntity(const EntityItemID& entityID) { Locker lock(_lock); EntityItemPointer entity = _entityTree->findEntityByID(entityID); - _trackedEntities.emplace(entityID, entity); - int trackedEntityCount = (int)_trackedEntities.size(); + if (entity) { - if (trackedEntityCount > _maxTrackedEntityCount) { - _maxTrackedEntityCount = trackedEntityCount; + _trackedEntities.emplace(entityID, entity); + int trackedEntityCount = (int)_trackedEntities.size(); + + if (trackedEntityCount > _maxTrackedEntityCount) { + _maxTrackedEntityCount = trackedEntityCount; + } + qCDebug(interfaceapp) << "Safe Landing: Tracking entity " << entity->getItemName(); } - qCDebug(interfaceapp) << "Safe Landing: Tracking entity " << entity->getItemName(); + } else { + qCDebug(interfaceapp) << "Safe Landing: Null Entity: " << entityID; } } @@ -146,7 +151,7 @@ bool isEntityPhysicsReady(const EntityItemPointer& entity) { bool hasAABox; entity->getAABox(hasAABox); if (hasAABox && downloadedCollisionTypes.count(modelEntity->getShapeType()) != 0) { - return entity->isReadyToComputeShape(); + return (!entity->shouldBePhysical() || entity->isReadyToComputeShape()); } } } @@ -156,12 +161,23 @@ bool isEntityPhysicsReady(const EntityItemPointer& entity) { bool SafeLanding::isEntityLoadingComplete() { Locker lock(_lock); + + auto entityTree = qApp->getEntities(); auto entityMapIter = _trackedEntities.begin(); while (entityMapIter != _trackedEntities.end()) { auto entity = entityMapIter->second; - bool isVisuallyReady = (entity->isVisuallyReady() || !entityTree->renderableForEntityId(entityMapIter->first)); + + bool isVisuallyReady = true; + + Settings settings; + bool enableInterstitial = settings.value("enableIntersitialMode", false).toBool(); + + if (enableInterstitial) { + bool isVisuallyReady = (entity->isVisuallyReady() || !entityTree->renderableForEntityId(entityMapIter->first)); + } + if (isEntityPhysicsReady(entity) && isVisuallyReady) { entityMapIter = _trackedEntities.erase(entityMapIter); } else { diff --git a/scripts/defaultScripts.js b/scripts/defaultScripts.js index 31510831c8..aaf5ca7260 100644 --- a/scripts/defaultScripts.js +++ b/scripts/defaultScripts.js @@ -35,10 +35,13 @@ var DEFAULT_SCRIPTS_COMBINED = [ ]; var DEFAULT_SCRIPTS_SEPARATE = [ "system/controllers/controllerScripts.js", - "system/interstitialPage.js" //"system/chat.js" ]; +if (Settings.getValue("enableInterstitialMode", false)) { + DEFAULT_SCRIPTS_SEPARATE.push("system/interstitialPage.js"); +} + // add a menu item for debugging var MENU_CATEGORY = "Developer"; var MENU_ITEM = "Debug defaultScripts.js"; From 2b2091290eab1ef6ae3906c1b4f8ad1a09928826 Mon Sep 17 00:00:00 2001 From: SamGondelman Date: Wed, 12 Sep 2018 14:28:39 -0700 Subject: [PATCH 199/210] fix everything --- libraries/fbx/src/FBX.h | 1 - libraries/render-utils/src/Model.cpp | 72 +++++++++++++++------------- libraries/render-utils/src/Model.h | 8 ++-- 3 files changed, 44 insertions(+), 37 deletions(-) diff --git a/libraries/fbx/src/FBX.h b/libraries/fbx/src/FBX.h index 7bd87a4554..fdebb16bc8 100644 --- a/libraries/fbx/src/FBX.h +++ b/libraries/fbx/src/FBX.h @@ -240,7 +240,6 @@ public: QVector vertices; QVector normals; QVector tangents; - mutable QVector normalsAndTangents; // Populated later if needed for blendshapes QVector colors; QVector texCoords; QVector texCoords1; diff --git a/libraries/render-utils/src/Model.cpp b/libraries/render-utils/src/Model.cpp index 2feae1fabb..b9ed43c339 100644 --- a/libraries/render-utils/src/Model.cpp +++ b/libraries/render-utils/src/Model.cpp @@ -317,6 +317,7 @@ bool Model::updateGeometry() { needFullUpdate = true; emit rigReady(); } + return needFullUpdate; } @@ -1033,6 +1034,10 @@ void Model::removeFromScene(const render::ScenePointer& scene, render::Transacti _modelMeshMaterialNames.clear(); _modelMeshRenderItemShapes.clear(); + _blendedVertexBuffers.clear(); + _normalsAndTangents.clear(); + _blendedVertexBuffersInitialized = false; + _addedToScene = false; _renderInfoVertexCount = 0; @@ -1299,25 +1304,26 @@ Blender::Blender(ModelPointer model, int blendNumber, const Geometry::WeakPointe } void Blender::run() { - DETAILED_PROFILE_RANGE_EX(simulation_animation, __FUNCTION__, 0xFFFF0000, 0, { { "url", _model->getURL().toString() } }); QVector vertices; QVector normalsAndTangents; - auto geometry = _geometry.lock(); - if (_model && geometry) { + if (_model && _model->isLoaded()) { + DETAILED_PROFILE_RANGE_EX(simulation_animation, __FUNCTION__, 0xFFFF0000, 0, { { "url", _model->getURL().toString() } }); int offset = 0; int normalsAndTangentsOffset = 0; - auto meshes = geometry->getFBXGeometry().meshes; + auto meshes = _model->getFBXGeometry().meshes; + int meshIndex = 0; foreach (const FBXMesh& mesh, meshes) { - if (mesh.blendshapes.isEmpty()) { + auto modelMeshNormalsAndTangents = _model->_normalsAndTangents.find(meshIndex++); + if (mesh.blendshapes.isEmpty() || modelMeshNormalsAndTangents == _model->_normalsAndTangents.end()) { continue; } vertices += mesh.vertices; - normalsAndTangents += mesh.normalsAndTangents; + normalsAndTangents += modelMeshNormalsAndTangents->second; glm::vec3* meshVertices = vertices.data() + offset; NormalType* meshNormalsAndTangents = normalsAndTangents.data() + normalsAndTangentsOffset; offset += mesh.vertices.size(); - normalsAndTangentsOffset += mesh.normalsAndTangents.size(); + normalsAndTangentsOffset += modelMeshNormalsAndTangents->second.size(); const float NORMAL_COEFFICIENT_SCALE = 0.01f; for (int i = 0, n = qMin(_blendshapeCoefficients.size(), mesh.blendshapes.size()); i < n; i++) { float vertexCoefficient = _blendshapeCoefficients.at(i); @@ -1357,9 +1363,8 @@ void Blender::run() { } // post the result to the ModelBlender, which will dispatch to the model if still alive QMetaObject::invokeMethod(DependencyManager::get().data(), "setBlendedVertices", - Q_ARG(ModelPointer, _model), Q_ARG(int, _blendNumber), - Q_ARG(const Geometry::WeakPointer&, _geometry), Q_ARG(const QVector&, vertices), - Q_ARG(const QVector&, normalsAndTangents)); + Q_ARG(ModelPointer, _model), Q_ARG(int, _blendNumber), Q_ARG(QVector, vertices), + Q_ARG(QVector, normalsAndTangents)); } void Model::setScaleToFit(bool scaleToFit, const glm::vec3& dimensions, bool forceRescale) { @@ -1537,19 +1542,18 @@ bool Model::maybeStartBlender() { return false; } -void Model::setBlendedVertices(int blendNumber, const Geometry::WeakPointer& geometry, - const QVector& vertices, const QVector& normalsAndTangents) { - auto geometryRef = geometry.lock(); - if (!geometryRef || _renderGeometry != geometryRef || blendNumber < _appliedBlendNumber || !_blendedVertexBuffersInitialized) { +void Model::setBlendedVertices(int blendNumber, const QVector& vertices, const QVector& normalsAndTangents) { + if (!isLoaded() || blendNumber < _appliedBlendNumber || !_blendedVertexBuffersInitialized) { return; } _appliedBlendNumber = blendNumber; - const FBXGeometry& fbxGeometry = geometryRef->getFBXGeometry(); + const FBXGeometry& fbxGeometry = getFBXGeometry(); int index = 0; int normalAndTangentIndex = 0; for (int i = 0; i < fbxGeometry.meshes.size(); i++) { const FBXMesh& mesh = fbxGeometry.meshes.at(i); - if (mesh.blendshapes.isEmpty()) { + auto meshNormalsAndTangents = _normalsAndTangents.find(i); + if (mesh.blendshapes.isEmpty() || meshNormalsAndTangents == _normalsAndTangents.end()) { continue; } @@ -1557,18 +1561,19 @@ void Model::setBlendedVertices(int blendNumber, const Geometry::WeakPointer& geo const auto verticesSize = vertexCount * sizeof(glm::vec3); const auto& buffer = _blendedVertexBuffers.find(i); assert(buffer != _blendedVertexBuffers.end()); - buffer->second->resize(mesh.vertices.size() * sizeof(glm::vec3) + mesh.normalsAndTangents.size() * sizeof(NormalType)); + buffer->second->resize(mesh.vertices.size() * sizeof(glm::vec3) + meshNormalsAndTangents->second.size() * sizeof(NormalType)); buffer->second->setSubData(0, verticesSize, (gpu::Byte*) vertices.constData() + index * sizeof(glm::vec3)); - buffer->second->setSubData(verticesSize, mesh.normalsAndTangents.size() * sizeof(NormalType), (const gpu::Byte*) normalsAndTangents.data() + normalAndTangentIndex * sizeof(NormalType)); + buffer->second->setSubData(verticesSize, meshNormalsAndTangents->second.size() * sizeof(NormalType), (const gpu::Byte*) normalsAndTangents.data() + normalAndTangentIndex * sizeof(NormalType)); index += vertexCount; - normalAndTangentIndex += mesh.normalsAndTangents.size(); + normalAndTangentIndex += meshNormalsAndTangents->second.size(); } } void Model::deleteGeometry() { _deleteGeometryCounter++; _blendedVertexBuffers.clear(); + _normalsAndTangents.clear(); _blendedVertexBuffersInitialized = false; _meshStates.clear(); _rig.destroyAnimGraph(); @@ -1634,7 +1639,7 @@ void Model::initializeBlendshapes(const FBXMesh& mesh, int index) { _blendedVertexBuffers[index]->resize(mesh.vertices.size() * sizeof(glm::vec3) + normalsAndTangents.size() * sizeof(NormalType)); _blendedVertexBuffers[index]->setSubData(0, verticesSize, (const gpu::Byte*) mesh.vertices.constData()); _blendedVertexBuffers[index]->setSubData(verticesSize, normalsAndTangents.size() * sizeof(NormalType), (const gpu::Byte*) normalsAndTangents.data()); - mesh.normalsAndTangents = normalsAndTangents; + _normalsAndTangents[index] = normalsAndTangents; } void Model::createRenderItemSet() { @@ -1778,35 +1783,38 @@ ModelBlender::~ModelBlender() { } void ModelBlender::noteRequiresBlend(ModelPointer model) { + Lock lock(_mutex); if (_pendingBlenders < QThread::idealThreadCount()) { if (model->maybeStartBlender()) { _pendingBlenders++; + return; } - return; } - { - Lock lock(_mutex); - _modelsRequiringBlends.insert(model); - } + _modelsRequiringBlends.insert(model); } -void ModelBlender::setBlendedVertices(ModelPointer model, int blendNumber, const Geometry::WeakPointer& geometry, - const QVector& vertices, const QVector& normalsAndTangents) { +void ModelBlender::setBlendedVertices(ModelPointer model, int blendNumber, QVector vertices, QVector normalsAndTangents) { if (model) { - model->setBlendedVertices(blendNumber, geometry, vertices, normalsAndTangents); + model->setBlendedVertices(blendNumber, vertices, normalsAndTangents); } - _pendingBlenders--; { Lock lock(_mutex); - for (auto i = _modelsRequiringBlends.begin(); i != _modelsRequiringBlends.end();) { + _pendingBlenders--; + _modelsRequiringBlends.erase(model); + std::set> modelsToErase; + for (auto i = _modelsRequiringBlends.begin(); i != _modelsRequiringBlends.end(); i++) { auto weakPtr = *i; - _modelsRequiringBlends.erase(i++); // remove front of the set ModelPointer nextModel = weakPtr.lock(); if (nextModel && nextModel->maybeStartBlender()) { _pendingBlenders++; - return; + break; + } else { + modelsToErase.insert(weakPtr); } } + for (auto& weakPtr : modelsToErase) { + _modelsRequiringBlends.erase(weakPtr); + } } } diff --git a/libraries/render-utils/src/Model.h b/libraries/render-utils/src/Model.h index f35048aa2f..447f75dd9d 100644 --- a/libraries/render-utils/src/Model.h +++ b/libraries/render-utils/src/Model.h @@ -144,8 +144,7 @@ public: bool maybeStartBlender(); /// Sets blended vertices computed in a separate thread. - void setBlendedVertices(int blendNumber, const Geometry::WeakPointer& geometry, - const QVector& vertices, const QVector& normalsAndTangents); + void setBlendedVertices(int blendNumber, const QVector& vertices, const QVector& normalsAndTangents); bool isLoaded() const { return (bool)_renderGeometry && _renderGeometry->isGeometryLoaded(); } bool isAddedToScene() const { return _addedToScene; } @@ -345,6 +344,8 @@ public: void addMaterial(graphics::MaterialLayer material, const std::string& parentMaterialName); void removeMaterial(graphics::MaterialPointer material, const std::string& parentMaterialName); + std::unordered_map> _normalsAndTangents; + public slots: void loadURLFinished(bool success); @@ -519,8 +520,7 @@ public: bool shouldComputeBlendshapes() { return _computeBlendshapes; } public slots: - void setBlendedVertices(ModelPointer model, int blendNumber, const Geometry::WeakPointer& geometry, - const QVector& vertices, const QVector& normalsAndTangents); + void setBlendedVertices(ModelPointer model, int blendNumber, QVector vertices, QVector normalsAndTangents); void setComputeBlendshapes(bool computeBlendshapes) { _computeBlendshapes = computeBlendshapes; } private: From 3fe3f674d0875dfa801995e7b0caea6398784459 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Wed, 12 Sep 2018 15:45:06 -0700 Subject: [PATCH 200/210] adding fix for getting DomainHandler into error state --- libraries/networking/src/DomainHandler.cpp | 15 ++++++++++----- libraries/networking/src/DomainHandler.h | 5 +++-- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/libraries/networking/src/DomainHandler.cpp b/libraries/networking/src/DomainHandler.cpp index 59e3de922f..a432b41a0d 100644 --- a/libraries/networking/src/DomainHandler.cpp +++ b/libraries/networking/src/DomainHandler.cpp @@ -55,6 +55,9 @@ DomainHandler::DomainHandler(QObject* parent) : // stop the refresh timer if we connect to a domain connect(this, &DomainHandler::connectedToDomain, &_apiRefreshTimer, &QTimer::stop); + + // stop the refresh timer if we connect to a domain + connect(this, &DomainHandler::redirectToErrorDomainURL, &_apiRefreshTimer, &QTimer::stop); } void DomainHandler::disconnect() { @@ -99,7 +102,6 @@ void DomainHandler::softReset() { clearSettings(); - _isInErrorState = false; _connectionDenialsSinceKeypairRegen = 0; _checkInPacketsSinceLastReply = 0; @@ -107,11 +109,14 @@ void DomainHandler::softReset() { QMetaObject::invokeMethod(&_settingsTimer, "stop"); // restart the API refresh timer in case we fail to connect and need to refresh information - QMetaObject::invokeMethod(&_apiRefreshTimer, "start"); + if (!_isInErrorState) + QMetaObject::invokeMethod(&_apiRefreshTimer, "start"); + _isInErrorState = false; } void DomainHandler::hardReset() { - emit resetting(); + if (!_isInErrorState) + emit resetting(); softReset(); @@ -338,6 +343,7 @@ void DomainHandler::loadedErrorDomain(std::map namedPaths) { void DomainHandler::setRedirectErrorState(QUrl errorUrl, int reasonCode) { _errorDomainURL = errorUrl; _lastDomainConnectionError = reasonCode; + _isInErrorState = true; emit redirectToErrorDomainURL(_errorDomainURL); } @@ -480,9 +486,8 @@ void DomainHandler::processDomainServerConnectionDeniedPacket(QSharedPointer namedPaths); void loadedErrorDomain(std::map namedPaths); - // sets domain handler in error state. - void setRedirectErrorState(QUrl errorUrl, int reasonCode); QString getViewPointFromNamedPath(QString namedPath); @@ -172,6 +170,9 @@ public slots: void processICEResponsePacket(QSharedPointer icePacket); void processDomainServerConnectionDeniedPacket(QSharedPointer message); + // sets domain handler in error state. + void setRedirectErrorState(QUrl errorUrl, int reasonCode); + private slots: void completedHostnameLookup(const QHostInfo& hostInfo); void completedIceServerHostnameLookup(); From be650d5af0c9293791b315d87bfcc924c2c42d8f Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Wed, 12 Sep 2018 16:00:43 -0700 Subject: [PATCH 201/210] changing when to log - there is broken code in bodyLoader --- .../qml/LoginDialog/LinkAccountBody.qml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/interface/resources/qml/LoginDialog/LinkAccountBody.qml b/interface/resources/qml/LoginDialog/LinkAccountBody.qml index 4196b7f168..6c0a7046e6 100644 --- a/interface/resources/qml/LoginDialog/LinkAccountBody.qml +++ b/interface/resources/qml/LoginDialog/LinkAccountBody.qml @@ -347,6 +347,12 @@ Item { onHandleLoginCompleted: { console.log("Login Succeeded, linking steam account") + if (Settings.getValue("loginDialogPoppedUp", false)) { + var data = { + "action": "user logged in" + }; + UserActivityLogger.logAction("encourageLoginDialog", data); + } if (loginDialog.isSteamRunning()) { loginDialog.linkSteam() } else { @@ -354,23 +360,17 @@ Item { bodyLoader.item.width = root.pane.width bodyLoader.item.height = root.pane.height } - if (Settings.getValue("loginDialogPoppedUp", false)) { - var data = { - "action": "user logged in" - }; - UserActivityLogger.logAction("encourageLoginDialog", data); - } } onHandleLoginFailed: { console.log("Login Failed") - mainTextContainer.visible = true - toggleLoading(false) if (Settings.getValue("loginDialogPoppedUp", false)) { var data = { "action": "user failed logging in" }; UserActivityLogger.logAction("encourageLoginDialog", data); } + mainTextContainer.visible = true + toggleLoading(false) } onHandleLinkCompleted: { console.log("Link Succeeded") From 1b8e9ed9063ab1562af0acfbedff236ea2b06638 Mon Sep 17 00:00:00 2001 From: David Back Date: Wed, 12 Sep 2018 16:02:43 -0700 Subject: [PATCH 202/210] get controller position from avatar frame --- scripts/system/libraries/entitySelectionTool.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/scripts/system/libraries/entitySelectionTool.js b/scripts/system/libraries/entitySelectionTool.js index 8830c60fc5..d38e09e244 100644 --- a/scripts/system/libraries/entitySelectionTool.js +++ b/scripts/system/libraries/entitySelectionTool.js @@ -1177,6 +1177,12 @@ SelectionDisplay = (function() { function generalComputePickRay(x, y) { return controllerComputePickRay() || Camera.computePickRay(x, y); } + + function getControllerAvatarFramePosition(pickRay) { + var controllerPosition = Vec3.subtract(pickRay.origin, MyAvatar.position); + controllerPosition = Vec3.multiplyQbyV(Quat.inverse(MyAvatar.orientation), controllerPosition); + return controllerPosition; + } function getDistanceToCamera(position) { var cameraPosition = Camera.getPosition(); @@ -2248,10 +2254,8 @@ SelectionDisplay = (function() { previousPickRay = pickRay; beginMouseEvent = event; - if (that.triggered()) { - beginControllerPosition = that.triggeredHand === Controller.Standard.LeftHand ? - MyAvatar.getLeftHandPosition() : MyAvatar.getRightHandPosition(); + beginControllerPosition = getControllerAvatarFramePosition(pickRay); } }; @@ -2328,8 +2332,7 @@ SelectionDisplay = (function() { var dimensionChange; if (controllerTrigger) { - var controllerPosition = that.triggeredHand === Controller.Standard.LeftHand ? - MyAvatar.getLeftHandPosition() : MyAvatar.getRightHandPosition(); + var controllerPosition = getControllerAvatarFramePosition(pickRay); var vecControllerDifference = Vec3.subtract(controllerPosition, beginControllerPosition); var controllerDifference = vecControllerDifference.x + vecControllerDifference.y + vecControllerDifference.z; From 7768e08510f1dd753f7867f966b2b7b1ccf43765 Mon Sep 17 00:00:00 2001 From: David Back Date: Wed, 12 Sep 2018 16:06:14 -0700 Subject: [PATCH 203/210] rename func --- scripts/system/libraries/entitySelectionTool.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/system/libraries/entitySelectionTool.js b/scripts/system/libraries/entitySelectionTool.js index d38e09e244..5bca58b1ac 100644 --- a/scripts/system/libraries/entitySelectionTool.js +++ b/scripts/system/libraries/entitySelectionTool.js @@ -1178,7 +1178,7 @@ SelectionDisplay = (function() { return controllerComputePickRay() || Camera.computePickRay(x, y); } - function getControllerAvatarFramePosition(pickRay) { + function getControllerAvatarFramePositionFromPickRay(pickRay) { var controllerPosition = Vec3.subtract(pickRay.origin, MyAvatar.position); controllerPosition = Vec3.multiplyQbyV(Quat.inverse(MyAvatar.orientation), controllerPosition); return controllerPosition; @@ -2255,7 +2255,7 @@ SelectionDisplay = (function() { previousPickRay = pickRay; beginMouseEvent = event; if (that.triggered()) { - beginControllerPosition = getControllerAvatarFramePosition(pickRay); + beginControllerPosition = getControllerAvatarFramePositionFromPickRay(pickRay); } }; @@ -2332,7 +2332,7 @@ SelectionDisplay = (function() { var dimensionChange; if (controllerTrigger) { - var controllerPosition = getControllerAvatarFramePosition(pickRay); + var controllerPosition = getControllerAvatarFramePositionFromPickRay(pickRay); var vecControllerDifference = Vec3.subtract(controllerPosition, beginControllerPosition); var controllerDifference = vecControllerDifference.x + vecControllerDifference.y + vecControllerDifference.z; From ad233677b8898814570d163db0755c327a4577e0 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Wed, 12 Sep 2018 18:31:01 -0700 Subject: [PATCH 204/210] adding changes for overriding host change for error state --- libraries/networking/src/AddressManager.cpp | 5 ++++- libraries/networking/src/DomainHandler.cpp | 8 +++++--- libraries/networking/src/DomainHandler.h | 2 ++ 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/libraries/networking/src/AddressManager.cpp b/libraries/networking/src/AddressManager.cpp index 9e5cbcaa7b..ebb4e325e3 100644 --- a/libraries/networking/src/AddressManager.cpp +++ b/libraries/networking/src/AddressManager.cpp @@ -269,6 +269,7 @@ bool AddressManager::handleUrl(const QUrl& lookupUrl, LookupTrigger trigger) { // save the last visited domain URL. _lastVisitedURL = lookupUrl; + auto lastVisitedURLStr = lookupUrl.toString().toStdString(); // a network address lookup clears the previous lookup since we don't expect to re-attempt it _previousAPILookup.clear(); @@ -816,8 +817,10 @@ bool AddressManager::setDomainInfo(const QUrl& domainURL, LookupTrigger trigger) const QString hostname = domainURL.host(); quint16 port = domainURL.port(); bool emitHostChanged { false }; + // Check if domain handler is in error state. always emit host changed if true. + bool isInErrorState = DependencyManager::get()->getDomainHandler().isInErrorState(); - if (domainURL != _domainURL) { + if (domainURL != _domainURL || isInErrorState) { addCurrentAddressToHistory(trigger); emitHostChanged = true; } diff --git a/libraries/networking/src/DomainHandler.cpp b/libraries/networking/src/DomainHandler.cpp index a432b41a0d..c20a7057f8 100644 --- a/libraries/networking/src/DomainHandler.cpp +++ b/libraries/networking/src/DomainHandler.cpp @@ -56,7 +56,7 @@ DomainHandler::DomainHandler(QObject* parent) : // stop the refresh timer if we connect to a domain connect(this, &DomainHandler::connectedToDomain, &_apiRefreshTimer, &QTimer::stop); - // stop the refresh timer if we connect to a domain + // stop the refresh timer if redirected to the error domain connect(this, &DomainHandler::redirectToErrorDomainURL, &_apiRefreshTimer, &QTimer::stop); } @@ -109,14 +109,16 @@ void DomainHandler::softReset() { QMetaObject::invokeMethod(&_settingsTimer, "stop"); // restart the API refresh timer in case we fail to connect and need to refresh information - if (!_isInErrorState) + if (!_isInErrorState) { QMetaObject::invokeMethod(&_apiRefreshTimer, "start"); + } _isInErrorState = false; } void DomainHandler::hardReset() { - if (!_isInErrorState) + if (!_isInErrorState) { emit resetting(); + } softReset(); diff --git a/libraries/networking/src/DomainHandler.h b/libraries/networking/src/DomainHandler.h index 6381dbb546..3d361482ac 100644 --- a/libraries/networking/src/DomainHandler.h +++ b/libraries/networking/src/DomainHandler.h @@ -173,6 +173,8 @@ public slots: // sets domain handler in error state. void setRedirectErrorState(QUrl errorUrl, int reasonCode); + bool isInErrorState() { return _isInErrorState; } + private slots: void completedHostnameLookup(const QHostInfo& hostInfo); void completedIceServerHostnameLookup(); From fc007982e0ca606987d44c29f4de4992539306b4 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Wed, 12 Sep 2018 21:25:41 -0700 Subject: [PATCH 205/210] muting opt out activity if login fail/success --- .../resources/qml/LoginDialog/LinkAccountBody.qml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/interface/resources/qml/LoginDialog/LinkAccountBody.qml b/interface/resources/qml/LoginDialog/LinkAccountBody.qml index 6c0a7046e6..57293cb5e3 100644 --- a/interface/resources/qml/LoginDialog/LinkAccountBody.qml +++ b/interface/resources/qml/LoginDialog/LinkAccountBody.qml @@ -346,12 +346,14 @@ Item { target: loginDialog onHandleLoginCompleted: { console.log("Login Succeeded, linking steam account") - - if (Settings.getValue("loginDialogPoppedUp", false)) { + var poppedUp = Settings.getValue("loginDialogPoppedUp", false); + if (poppedUp) { + console.log("[ENCOURAGELOGINDIALOG]: logging in") var data = { "action": "user logged in" }; UserActivityLogger.logAction("encourageLoginDialog", data); + Settings.setValue("loginDialogPoppedUp", false); } if (loginDialog.isSteamRunning()) { loginDialog.linkSteam() @@ -363,11 +365,14 @@ Item { } onHandleLoginFailed: { console.log("Login Failed") - if (Settings.getValue("loginDialogPoppedUp", false)) { + var poppedUp = Settings.getValue("loginDialogPoppedUp", false); + if (poppedUp) { + console.log("[ENCOURAGELOGINDIALOG]: failed logging in") var data = { "action": "user failed logging in" }; UserActivityLogger.logAction("encourageLoginDialog", data); + Settings.setValue("loginDialogPoppedUp", false); } mainTextContainer.visible = true toggleLoading(false) From 5902699870bade4efe47b41761d2ff218241ab39 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Wed, 12 Sep 2018 22:54:23 -0700 Subject: [PATCH 206/210] adding updated models for redirect --- .../meshes/redirect/oopsDialog_timeout.fbx | Bin 0 -> 31904 bytes .../meshes/redirect/oopsDialog_timeout.png | Bin 0 -> 4555 bytes .../meshes/redirect/oopsDialog_vague.fbx | Bin 32480 -> 32448 bytes 3 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 interface/resources/meshes/redirect/oopsDialog_timeout.fbx create mode 100644 interface/resources/meshes/redirect/oopsDialog_timeout.png diff --git a/interface/resources/meshes/redirect/oopsDialog_timeout.fbx b/interface/resources/meshes/redirect/oopsDialog_timeout.fbx new file mode 100644 index 0000000000000000000000000000000000000000..846d38bbee3f38ddb874005669bb38561f293584 GIT binary patch literal 31904 zcmeHwcUV+M_y0vvuwX2SEf$QiBMR7qAXSMpSwO7hvU|amW$&_uq9VqxHTFcshFD|l z8VhzXcF~|FDvE*vN)&rTMCJFKduNur!(Ld7@B91bo#zp^%zVz7Gv}N+b7to5P&!^l zt7&Ub*AQ!0xsq1LTU%2tDeu-4RZ@pCS{i%0h74h78Kd@y(=tkpoKW{63WR|`z~pPCfaU!;=x2!>XBR1kC;$vC0OvBZ(MExQ=ZyCVE$iXJLTHQrzS-7!LQH+vjO0=92 zaTWFb)vSt9YvqilZ_m4k1a=Oi5uBO7q#i|4?yOV?l!DX>i3LSbLnT_ZTp1yOPQqtU zTVhL5l-q#OpaPoFE(#`2PLFnHG?7|XHJW8r8h1IZU?W1c@+gMYX>G&9;zlBJm}+P_ z)dqm5mi~tbFGCcuT7i8)G4tni(@!mrkSl2g_r{HlQn5OvjPE4WdPT79$~T7AEh$Rh zdXkGurI1TG4;RcRWvtpjcF>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{mRXoMB7p_~0KA0G2M)-UgMB+9$hSqRgWo3KMl zMScK@OcDE=k{~iK_MG6hHgycLW->Bd9w-`ifokAb#d+?;62NjRHg3}5y#tdo8 zWi3b$yx$)rB3<>Ap0{}@87b^hh0s_DYAPig=It~D0 z*8w0k)>l9wXSn6Q{RHUWzxuELf3aoDXhBine&aJ=ckLS?{~NS42j8qVef0dlaZ%{H literal 0 HcmV?d00001 diff --git a/interface/resources/meshes/redirect/oopsDialog_vague.fbx b/interface/resources/meshes/redirect/oopsDialog_vague.fbx index 324d90578b833552f01a1199fbded078b49900ba..707f09e51a8872b44615aafbe7d5dab5c7306f51 100644 GIT binary patch delta 1251 zcmZ`&UrbwN6hGft|BN~;AnSsotX(_CoY3B~G9V_5F$H5giXd%C=GK_jb+X>udv8k% z?O=)73pkM@50Xt-Voaus5$k-I$?TK|eK0uVpTq~3r?&dJF+ zzw`Uf`JG#9thmNr&occs0GOu*w!^6F;Zx$n7P`P3%t}S(FjN9S1=1yEp>^;U=fOjWxNztXC(+`Tn*D%A;7%UKh()i7iNb7)%c@8Cqq`l z&)q7LiMQfPf?f$Z@poQAMZ9)l*i8LYf;hO>t3?0Hx1a%JklXmtD z`IENY6%Q$R0R3hFh{cDaTpO@~Xhu$n(S87c2tAwR*g3k9bmH|S^*&;uwWJM~MYSs@ zlC`0S7MwaJ({tisd`qOoh6m`yS}U%L!waKfR zxb$HhOqY1Ed0I}p@R#%^t!C;Q=|o|qL<=t~?m_%&gigr^usTBvvJcm@bUssWIPus^ ziYl&UcHy^Kwbyr%Vmb?HkktJ(G4PD7L`(jLMsM8EIZCKXT zj{wjc@ckE~0sscYNJ0`KVl*ME{mOG%;g*g18pYCluDnV+1%OSULo}J&U8%|%z*qW< zM3Xstm3FHDzS2ZqR>EfOGB?AtShf>&XH;dcTG%M*SVv2lV+LpoZO4cikc|vnD=-+em@Ok(qz3KVzHMm> zj3s6_%7yYwFQ&3_vzRO&22-(0TOT5AP!G#}jADP5tR?XW2W=ni8pPW3; zFXue}H=W@-8Jo5NIV&sjCp9Ea^D*meUxEv_lLsc#Y&+i^=0>I z=5d62_Mpvd!(8KTz6oHc+VRYjS}*G zvKW^XZ`~8#D=`sx6l;vh>1AvN@bSw?kDl; zAICczg*{{w7ov~x%|)|(N1`TiBbMc}#kTn5*cRXQ*d`zU4Jl?79m8O`Lre~50dFES zoCOpGaeN~m5=Y|L9&rdcj^>D4oJqnOe@3PIb?JVF@nXD8v?Q}(tqDxWTg5vG^cOd3 zB-g}OP9pj)0b`{BoXwv_7SsX^XmT% zK21c&0s{k4IX72<=23G|uF*>VMooINa;}d=?#;kAvvTeY61g|A=M-6+dvRN`^2gv( zq(_Zx#_DL55a)1ruO8)NMLY)Qn4M?w%2*x$jQ7Vb=y%>uufFu@$od;)_bQ}~B@m(d G9R3AsWTBP- From dca34c7cbe6800cc45017453ecc8c66b6b264b4f Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Thu, 13 Sep 2018 08:32:47 -0700 Subject: [PATCH 207/210] remove warning for GCC --- interface/src/octree/SafeLanding.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/src/octree/SafeLanding.cpp b/interface/src/octree/SafeLanding.cpp index 8b3f1ab7e4..5d4ebe9853 100644 --- a/interface/src/octree/SafeLanding.cpp +++ b/interface/src/octree/SafeLanding.cpp @@ -175,7 +175,7 @@ bool SafeLanding::isEntityLoadingComplete() { bool enableInterstitial = settings.value("enableIntersitialMode", false).toBool(); if (enableInterstitial) { - bool isVisuallyReady = (entity->isVisuallyReady() || !entityTree->renderableForEntityId(entityMapIter->first)); + isVisuallyReady = (entity->isVisuallyReady() || !entityTree->renderableForEntityId(entityMapIter->first)); } if (isEntityPhysicsReady(entity) && isVisuallyReady) { From f3d86cfc7de66fe39081141ca44ac064063fff2b Mon Sep 17 00:00:00 2001 From: sabrina-shanman Date: Thu, 13 Sep 2018 10:51:53 -0700 Subject: [PATCH 208/210] Fix crash when teleporting into avatars with bubble active --- libraries/physics/src/PhysicsEngine.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/physics/src/PhysicsEngine.cpp b/libraries/physics/src/PhysicsEngine.cpp index 58c197d6f4..871958f883 100644 --- a/libraries/physics/src/PhysicsEngine.cpp +++ b/libraries/physics/src/PhysicsEngine.cpp @@ -286,6 +286,7 @@ void PhysicsEngine::reinsertObject(ObjectMotionState* object) { void PhysicsEngine::processTransaction(PhysicsEngine::Transaction& transaction) { // removes for (auto object : transaction.objectsToRemove) { + bumpAndPruneContacts(object); btRigidBody* body = object->getRigidBody(); if (body) { removeDynamicsForBody(body); From 380f24b37fca1c6f6df24fb37fffb9d8b5062f04 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Thu, 13 Sep 2018 11:53:21 -0700 Subject: [PATCH 209/210] adding fix, changing window title --- interface/src/Application.cpp | 11 +++++++++-- libraries/networking/src/AddressManager.cpp | 1 - libraries/networking/src/DomainHandler.cpp | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 77e2cb3211..889d3ce9c6 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -6346,6 +6346,8 @@ void Application::updateWindowTitle() const { auto nodeList = DependencyManager::get(); auto accountManager = DependencyManager::get(); + auto isInErrorState = nodeList->getDomainHandler().isInErrorState(); + auto isConnected = nodeList->getDomainHandler().isConnected(); QString buildVersion = " - " + (BuildInfo::BUILD_TYPE == BuildInfo::BuildType::Stable ? QString("Version") : QString("Build")) @@ -6353,14 +6355,19 @@ void Application::updateWindowTitle() const { QString loginStatus = accountManager->isLoggedIn() ? "" : " (NOT LOGGED IN)"; - QString connectionStatus = nodeList->getDomainHandler().isConnected() ? "" : " (NOT CONNECTED)"; + QString connectionStatus = isInErrorState ? " (ERROR CONNECTING)" : + nodeList->getDomainHandler().isConnected() ? "" : " (NOT CONNECTED)"; QString username = accountManager->getAccountInfo().getUsername(); setCrashAnnotation("username", username.toStdString()); QString currentPlaceName; if (isServerlessMode()) { - currentPlaceName = "serverless: " + DependencyManager::get()->getDomainURL().toString(); + if (isInErrorState) { + currentPlaceName = "serverless: " + nodeList->getDomainHandler().getErrorDomainURL().toString(); + } else { + currentPlaceName = "serverless: " + DependencyManager::get()->getDomainURL().toString(); + } } else { currentPlaceName = DependencyManager::get()->getDomainURL().host(); if (currentPlaceName.isEmpty()) { diff --git a/libraries/networking/src/AddressManager.cpp b/libraries/networking/src/AddressManager.cpp index ebb4e325e3..8085039b02 100644 --- a/libraries/networking/src/AddressManager.cpp +++ b/libraries/networking/src/AddressManager.cpp @@ -269,7 +269,6 @@ bool AddressManager::handleUrl(const QUrl& lookupUrl, LookupTrigger trigger) { // save the last visited domain URL. _lastVisitedURL = lookupUrl; - auto lastVisitedURLStr = lookupUrl.toString().toStdString(); // a network address lookup clears the previous lookup since we don't expect to re-attempt it _previousAPILookup.clear(); diff --git a/libraries/networking/src/DomainHandler.cpp b/libraries/networking/src/DomainHandler.cpp index c20a7057f8..3dec310ffc 100644 --- a/libraries/networking/src/DomainHandler.cpp +++ b/libraries/networking/src/DomainHandler.cpp @@ -112,7 +112,6 @@ void DomainHandler::softReset() { if (!_isInErrorState) { QMetaObject::invokeMethod(&_apiRefreshTimer, "start"); } - _isInErrorState = false; } void DomainHandler::hardReset() { @@ -121,6 +120,7 @@ void DomainHandler::hardReset() { } softReset(); + _isInErrorState = false; qCDebug(networking) << "Hard reset in NodeList DomainHandler."; _pendingDomainID = QUuid(); From 647c4e1694f6f0abb72570007c28cfd355b2afed Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Thu, 13 Sep 2018 13:51:42 -0700 Subject: [PATCH 210/210] adding true fix for localhost timeouts --- interface/src/Application.cpp | 1 - libraries/networking/src/DomainHandler.cpp | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 889d3ce9c6..4dc2e637b6 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -6347,7 +6347,6 @@ void Application::updateWindowTitle() const { auto nodeList = DependencyManager::get(); auto accountManager = DependencyManager::get(); auto isInErrorState = nodeList->getDomainHandler().isInErrorState(); - auto isConnected = nodeList->getDomainHandler().isConnected(); QString buildVersion = " - " + (BuildInfo::BUILD_TYPE == BuildInfo::BuildType::Stable ? QString("Version") : QString("Build")) diff --git a/libraries/networking/src/DomainHandler.cpp b/libraries/networking/src/DomainHandler.cpp index 3dec310ffc..f34a93de96 100644 --- a/libraries/networking/src/DomainHandler.cpp +++ b/libraries/networking/src/DomainHandler.cpp @@ -115,9 +115,7 @@ void DomainHandler::softReset() { } void DomainHandler::hardReset() { - if (!_isInErrorState) { - emit resetting(); - } + emit resetting(); softReset(); _isInErrorState = false;