diff --git a/README.md b/README.md index 6294981e9a..e0bbed3105 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,10 @@ Documentation is available at [docs.highfidelity.com](https://docs.highfidelity. There is also detailed [documentation on our coding standards](https://wiki.highfidelity.com/wiki/Coding_Standards). +Contributor License Agreement (CLA) +========= +Technology companies frequently receive and use code from contributors outside the company's development team. Outside code can be a tremendous resource, but it also carries responsibility. Best practice for accepting outside contributions consists of an Apache-type Contributor License Agreement (CLA). We have modeled the High Fidelity CLA after the CLA that Google presents to developers for contributions to their projects. This CLA does not transfer ownership of code, instead simply granting a non-exclusive right for High Fidelity to use the code you’ve contributed. In that regard, you should be sure you have permission if the work relates to or uses the resources of a company that you work for. You will be asked to sign our CLA when you create your first PR or when the CLA is updated. You can also [review it here](https://gist.githubusercontent.com/hifi-gustavo/fef8f06a8233d42a0040d45c3efb97a9/raw/9981827eb94f0b18666083670b6f6a02929fb402/High%2520Fidelity%2520CLA). We sincerely appreciate your contribution and efforts toward the success of the platform. + Build Instructions ========= All information required to build is found in the [build guide](BUILD.md). diff --git a/assignment-client/src/Agent.cpp b/assignment-client/src/Agent.cpp index 4efc3343d1..f166a780ff 100644 --- a/assignment-client/src/Agent.cpp +++ b/assignment-client/src/Agent.cpp @@ -441,7 +441,7 @@ void Agent::executeScript() { Transform audioTransform; auto headOrientation = scriptedAvatar->getHeadOrientation(); - audioTransform.setTranslation(scriptedAvatar->getPosition()); + audioTransform.setTranslation(scriptedAvatar->getWorldPosition()); audioTransform.setRotation(headOrientation); QByteArray encodedBuffer; @@ -452,7 +452,7 @@ void Agent::executeScript() { } AbstractAudioInterface::emitAudioPacket(encodedBuffer.data(), encodedBuffer.size(), audioSequenceNumber, - audioTransform, scriptedAvatar->getPosition(), glm::vec3(0), + audioTransform, scriptedAvatar->getWorldPosition(), glm::vec3(0), packetType, _selectedCodecName); }); @@ -742,10 +742,10 @@ void Agent::processAgentAvatarAudio() { audioPacket->writePrimitive(numAvailableSamples); // use the orientation and position of this avatar for the source of this audio - audioPacket->writePrimitive(scriptedAvatar->getPosition()); + audioPacket->writePrimitive(scriptedAvatar->getWorldPosition()); glm::quat headOrientation = scriptedAvatar->getHeadOrientation(); audioPacket->writePrimitive(headOrientation); - audioPacket->writePrimitive(scriptedAvatar->getPosition()); + audioPacket->writePrimitive(scriptedAvatar->getWorldPosition()); audioPacket->writePrimitive(glm::vec3(0)); // no matter what, the loudness should be set to 0 @@ -759,10 +759,10 @@ void Agent::processAgentAvatarAudio() { audioPacket->writePrimitive((quint8)0); // use the orientation and position of this avatar for the source of this audio - audioPacket->writePrimitive(scriptedAvatar->getPosition()); + audioPacket->writePrimitive(scriptedAvatar->getWorldPosition()); glm::quat headOrientation = scriptedAvatar->getHeadOrientation(); audioPacket->writePrimitive(headOrientation); - audioPacket->writePrimitive(scriptedAvatar->getPosition()); + audioPacket->writePrimitive(scriptedAvatar->getWorldPosition()); // HUH? why do we write this twice?? audioPacket->writePrimitive(glm::vec3(0)); QByteArray encodedBuffer; diff --git a/assignment-client/src/audio/AudioMixer.cpp b/assignment-client/src/audio/AudioMixer.cpp index 9ed6c7fdbc..7f088d8183 100644 --- a/assignment-client/src/audio/AudioMixer.cpp +++ b/assignment-client/src/audio/AudioMixer.cpp @@ -29,6 +29,7 @@ #include #include +#include "AudioLogging.h" #include "AudioHelpers.h" #include "AudioRingBuffer.h" #include "AudioMixerClientData.h" @@ -130,7 +131,7 @@ void AudioMixer::queueReplicatedAudioPacket(QSharedPointer mess PacketType rewrittenType = PacketTypeEnum::getReplicatedPacketMapping().key(message->getType()); if (rewrittenType == PacketType::Unknown) { - qDebug() << "Cannot unwrap replicated packet type not present in REPLICATED_PACKET_WRAPPING"; + qCDebug(audio) << "Cannot unwrap replicated packet type not present in REPLICATED_PACKET_WRAPPING"; } auto replicatedMessage = QSharedPointer::create(audioData, rewrittenType, @@ -345,7 +346,7 @@ void AudioMixer::sendStatsPacket() { void AudioMixer::run() { - qDebug() << "Waiting for connection to domain to request settings from domain-server."; + qCDebug(audio) << "Waiting for connection to domain to request settings from domain-server."; // wait until we have the domain-server settings, otherwise we bail DomainHandler& domainHandler = DependencyManager::get()->getDomainHandler(); @@ -502,14 +503,14 @@ void AudioMixer::throttle(std::chrono::microseconds duration, int frame) { int proportionalTerm = 1 + (_trailingMixRatio - TARGET) / 0.1f; _throttlingRatio += THROTTLE_RATE * proportionalTerm; _throttlingRatio = std::min(_throttlingRatio, 1.0f); - qDebug("audio-mixer is struggling (%f mix/sleep) - throttling %f of streams", - (double)_trailingMixRatio, (double)_throttlingRatio); + qCDebug(audio) << "audio-mixer is struggling (" << _trailingMixRatio << "mix/sleep) - throttling" + << _throttlingRatio << "of streams"; } else if (_throttlingRatio > 0.0f && _trailingMixRatio <= BACKOFF_TARGET) { int proportionalTerm = 1 + (TARGET - _trailingMixRatio) / 0.2f; _throttlingRatio -= BACKOFF_RATE * proportionalTerm; _throttlingRatio = std::max(_throttlingRatio, 0.0f); - qDebug("audio-mixer is recovering (%f mix/sleep) - throttling %f of streams", - (double)_trailingMixRatio, (double)_throttlingRatio); + qCDebug(audio) << "audio-mixer is recovering (" << _trailingMixRatio << "mix/sleep) - throttling" + << _throttlingRatio << "of streams"; } } } @@ -534,7 +535,7 @@ void AudioMixer::clearDomainSettings() { } void AudioMixer::parseSettingsObject(const QJsonObject& settingsObject) { - qDebug() << "AVX2 Support:" << (cpuSupportsAVX2() ? "enabled" : "disabled"); + qCDebug(audio) << "AVX2 Support:" << (cpuSupportsAVX2() ? "enabled" : "disabled"); if (settingsObject.contains(AUDIO_THREADING_GROUP_KEY)) { QJsonObject audioThreadingGroupObject = settingsObject[AUDIO_THREADING_GROUP_KEY].toObject(); @@ -557,7 +558,7 @@ void AudioMixer::parseSettingsObject(const QJsonObject& settingsObject) { const QString DYNAMIC_JITTER_BUFFER_JSON_KEY = "dynamic_jitter_buffer"; bool enableDynamicJitterBuffer = audioBufferGroupObject[DYNAMIC_JITTER_BUFFER_JSON_KEY].toBool(); if (enableDynamicJitterBuffer) { - qDebug() << "Enabling dynamic jitter buffers."; + qCDebug(audio) << "Enabling dynamic jitter buffers."; bool ok; const QString DESIRED_JITTER_BUFFER_FRAMES_KEY = "static_desired_jitter_buffer_frames"; @@ -565,9 +566,9 @@ void AudioMixer::parseSettingsObject(const QJsonObject& settingsObject) { if (!ok) { _numStaticJitterFrames = InboundAudioStream::DEFAULT_STATIC_JITTER_FRAMES; } - qDebug() << "Static desired jitter buffer frames:" << _numStaticJitterFrames; + qCDebug(audio) << "Static desired jitter buffer frames:" << _numStaticJitterFrames; } else { - qDebug() << "Disabling dynamic jitter buffers."; + qCDebug(audio) << "Disabling dynamic jitter buffers."; _numStaticJitterFrames = DISABLE_STATIC_JITTER_FRAMES; } @@ -621,7 +622,7 @@ void AudioMixer::parseSettingsObject(const QJsonObject& settingsObject) { if (audioEnvGroupObject[CODEC_PREFERENCE_ORDER].isString()) { QString codecPreferenceOrder = audioEnvGroupObject[CODEC_PREFERENCE_ORDER].toString(); _codecPreferenceOrder = codecPreferenceOrder.split(","); - qDebug() << "Codec preference order changed to" << _codecPreferenceOrder; + qCDebug(audio) << "Codec preference order changed to" << _codecPreferenceOrder; } const QString ATTENATION_PER_DOULING_IN_DISTANCE = "attenuation_per_doubling_in_distance"; @@ -630,7 +631,7 @@ void AudioMixer::parseSettingsObject(const QJsonObject& settingsObject) { float attenuation = audioEnvGroupObject[ATTENATION_PER_DOULING_IN_DISTANCE].toString().toFloat(&ok); if (ok) { _attenuationPerDoublingInDistance = attenuation; - qDebug() << "Attenuation per doubling in distance changed to" << _attenuationPerDoublingInDistance; + qCDebug(audio) << "Attenuation per doubling in distance changed to" << _attenuationPerDoublingInDistance; } } @@ -640,7 +641,7 @@ void AudioMixer::parseSettingsObject(const QJsonObject& settingsObject) { float noiseMutingThreshold = audioEnvGroupObject[NOISE_MUTING_THRESHOLD].toString().toFloat(&ok); if (ok) { _noiseMutingThreshold = noiseMutingThreshold; - qDebug() << "Noise muting threshold changed to" << _noiseMutingThreshold; + qCDebug(audio) << "Noise muting threshold changed to" << _noiseMutingThreshold; } } @@ -680,8 +681,7 @@ void AudioMixer::parseSettingsObject(const QJsonObject& settingsObject) { glm::vec3 dimensions(xMax - xMin, yMax - yMin, zMax - zMin); AABox zoneAABox(corner, dimensions); _audioZones.insert(zone, zoneAABox); - qDebug() << "Added zone:" << zone << "(corner:" << corner - << ", dimensions:" << dimensions << ")"; + qCDebug(audio) << "Added zone:" << zone << "(corner:" << corner << ", dimensions:" << dimensions << ")"; } } } @@ -712,7 +712,7 @@ void AudioMixer::parseSettingsObject(const QJsonObject& settingsObject) { _audioZones.contains(settings.source) && _audioZones.contains(settings.listener)) { _zoneSettings.push_back(settings); - qDebug() << "Added Coefficient:" << settings.source << settings.listener << settings.coefficient; + qCDebug(audio) << "Added Coefficient:" << settings.source << settings.listener << settings.coefficient; } } } @@ -745,7 +745,7 @@ void AudioMixer::parseSettingsObject(const QJsonObject& settingsObject) { _zoneReverbSettings.push_back(settings); - qDebug() << "Added Reverb:" << zone << reverbTime << wetLevel; + qCDebug(audio) << "Added Reverb:" << zone << reverbTime << wetLevel; } } } diff --git a/assignment-client/src/audio/AudioMixerClientData.cpp b/assignment-client/src/audio/AudioMixerClientData.cpp index 9bba9c7f30..49453c6fc6 100644 --- a/assignment-client/src/audio/AudioMixerClientData.cpp +++ b/assignment-client/src/audio/AudioMixerClientData.cpp @@ -19,6 +19,7 @@ #include "InjectedAudioStream.h" +#include "AudioLogging.h" #include "AudioHelpers.h" #include "AudioMixer.h" #include "AudioMixerClientData.h" @@ -132,7 +133,7 @@ void AudioMixerClientData::optionallyReplicatePacket(ReceivedMessage& message, c if (PacketTypeEnum::getReplicatedPacketMapping().key(message.getType()) != PacketType::Unknown) { mirroredType = message.getType(); } else { - qDebug() << "Packet passed to optionallyReplicatePacket was not a replicatable type - returning"; + qCDebug(audio) << "Packet passed to optionallyReplicatePacket was not a replicatable type - returning"; return; } } @@ -189,8 +190,16 @@ void AudioMixerClientData::parsePerAvatarGainSet(ReceivedMessage& message, const uint8_t packedGain; message.readPrimitive(&packedGain); float gain = unpackFloatGainFromByte(packedGain); - hrtfForStream(avatarUuid, QUuid()).setGainAdjustment(gain); - qDebug() << "Setting gain adjustment for hrtf[" << uuid << "][" << avatarUuid << "] to " << gain; + + if (avatarUuid.isNull()) { + // set the MASTER avatar gain + setMasterAvatarGain(gain); + qCDebug(audio) << "Setting MASTER avatar gain for " << uuid << " to " << gain; + } else { + // set the per-source avatar gain + hrtfForStream(avatarUuid, QUuid()).setGainAdjustment(gain); + qCDebug(audio) << "Setting avatar gain adjustment for hrtf[" << uuid << "][" << avatarUuid << "] to " << gain; + } } void AudioMixerClientData::parseNodeIgnoreRequest(QSharedPointer message, const SharedNodePointer& node) { @@ -276,7 +285,7 @@ int AudioMixerClientData::parseData(ReceivedMessage& message) { auto avatarAudioStream = new AvatarAudioStream(isStereo, AudioMixer::getStaticJitterFrames()); avatarAudioStream->setupCodec(_codec, _selectedCodecName, AudioConstants::MONO); - qDebug() << "creating new AvatarAudioStream... codec:" << _selectedCodecName; + qCDebug(audio) << "creating new AvatarAudioStream... codec:" << _selectedCodecName; connect(avatarAudioStream, &InboundAudioStream::mismatchedAudioCodec, this, &AudioMixerClientData::handleMismatchAudioFormat); @@ -315,7 +324,7 @@ int AudioMixerClientData::parseData(ReceivedMessage& message) { #if INJECTORS_SUPPORT_CODECS injectorStream->setupCodec(_codec, _selectedCodecName, isStereo ? AudioConstants::STEREO : AudioConstants::MONO); - qDebug() << "creating new injectorStream... codec:" << _selectedCodecName; + qCDebug(audio) << "creating new injectorStream... codec:" << _selectedCodecName; #endif auto emplaced = _audioStreams.emplace( @@ -339,8 +348,8 @@ int AudioMixerClientData::parseData(ReceivedMessage& message) { auto parseResult = matchingStream->parseData(message); if (matchingStream->getOverflowCount() > overflowBefore) { - qDebug() << "Just overflowed on stream from" << message.getSourceID() << "at" << message.getSenderSockAddr(); - qDebug() << "This stream is for" << (isMicStream ? "microphone audio" : "injected audio"); + qCDebug(audio) << "Just overflowed on stream from" << message.getSourceID() << "at" << message.getSenderSockAddr(); + qCDebug(audio) << "This stream is for" << (isMicStream ? "microphone audio" : "injected audio"); } return parseResult; @@ -689,7 +698,7 @@ void AudioMixerClientData::setupCodecForReplicatedAgent(QSharedPointerreadString(); if (codecString != _selectedCodecName) { - qDebug() << "Manually setting codec for replicated agent" << uuidStringWithoutCurlyBraces(getNodeID()) + qCDebug(audio) << "Manually setting codec for replicated agent" << uuidStringWithoutCurlyBraces(getNodeID()) << "-" << codecString; const std::pair codec = AudioMixer::negotiateCodec({ codecString }); diff --git a/assignment-client/src/audio/AudioMixerClientData.h b/assignment-client/src/audio/AudioMixerClientData.h index 7a8690d8cc..c3a31715ea 100644 --- a/assignment-client/src/audio/AudioMixerClientData.h +++ b/assignment-client/src/audio/AudioMixerClientData.h @@ -83,6 +83,9 @@ public: // uses randomization to have the AudioMixer send a stats packet to this node around every second bool shouldSendStats(int frameNumber); + float getMasterAvatarGain() const { return _masterAvatarGain; } + void setMasterAvatarGain(float gain) { _masterAvatarGain = gain; } + AudioLimiter audioLimiter; void setupCodec(CodecPluginPointer codec, const QString& codecName); @@ -175,6 +178,8 @@ private: int _frameToSendStats { 0 }; + float _masterAvatarGain { 1.0f }; // per-listener mixing gain, applied only to avatars + CodecPluginPointer _codec; QString _selectedCodecName; Encoder* _encoder{ nullptr }; // for outbound mixed stream diff --git a/assignment-client/src/audio/AudioMixerSlave.cpp b/assignment-client/src/audio/AudioMixerSlave.cpp index a131e266d2..6d150a0dc3 100644 --- a/assignment-client/src/audio/AudioMixerSlave.cpp +++ b/assignment-client/src/audio/AudioMixerSlave.cpp @@ -48,8 +48,8 @@ void sendEnvironmentPacket(const SharedNodePointer& node, AudioMixerClientData& // mix helpers inline float approximateGain(const AvatarAudioStream& listeningNodeStream, const PositionalAudioStream& streamToAdd, const glm::vec3& relativePosition); -inline float computeGain(const AvatarAudioStream& listeningNodeStream, const PositionalAudioStream& streamToAdd, - const glm::vec3& relativePosition, bool isEcho); +inline float computeGain(const AudioMixerClientData& listenerNodeData, const AvatarAudioStream& listeningNodeStream, + const PositionalAudioStream& streamToAdd, const glm::vec3& relativePosition, bool isEcho); inline float computeAzimuth(const AvatarAudioStream& listeningNodeStream, const PositionalAudioStream& streamToAdd, const glm::vec3& relativePosition); @@ -266,7 +266,7 @@ void AudioMixerSlave::addStream(AudioMixerClientData& listenerNodeData, const QU glm::vec3 relativePosition = streamToAdd.getPosition() - listeningNodeStream.getPosition(); float distance = glm::max(glm::length(relativePosition), EPSILON); - float gain = computeGain(listeningNodeStream, streamToAdd, relativePosition, isEcho); + float gain = computeGain(listenerNodeData, listeningNodeStream, streamToAdd, relativePosition, isEcho); float azimuth = isEcho ? 0.0f : computeAzimuth(listeningNodeStream, listeningNodeStream, relativePosition); const int HRTF_DATASET_INDEX = 1; @@ -484,10 +484,12 @@ float approximateGain(const AvatarAudioStream& listeningNodeStream, const Positi // when throttling, as close streams are expected to be heard by a user float distance = glm::length(relativePosition); return gain / distance; + + // avatar: skip master gain - it is constant for all streams } -float computeGain(const AvatarAudioStream& listeningNodeStream, const PositionalAudioStream& streamToAdd, - const glm::vec3& relativePosition, bool isEcho) { +float computeGain(const AudioMixerClientData& listenerNodeData, const AvatarAudioStream& listeningNodeStream, + const PositionalAudioStream& streamToAdd, const glm::vec3& relativePosition, bool isEcho) { float gain = 1.0f; // injector: apply attenuation @@ -507,6 +509,9 @@ float computeGain(const AvatarAudioStream& listeningNodeStream, const Positional float offAxisCoefficient = MAX_OFF_AXIS_ATTENUATION + (angleOfDelivery * (OFF_AXIS_ATTENUATION_STEP / PI_OVER_TWO)); gain *= offAxisCoefficient; + + // apply master gain, only to avatars + gain *= listenerNodeData.getMasterAvatarGain(); } auto& audioZones = AudioMixer::getAudioZones(); diff --git a/assignment-client/src/avatars/AvatarMixerClientData.h b/assignment-client/src/avatars/AvatarMixerClientData.h index 12b0286088..d5c7784da7 100644 --- a/assignment-client/src/avatars/AvatarMixerClientData.h +++ b/assignment-client/src/avatars/AvatarMixerClientData.h @@ -91,7 +91,7 @@ public: void loadJSONStats(QJsonObject& jsonObject) const; - glm::vec3 getPosition() const { return _avatar ? _avatar->getPosition() : glm::vec3(0); } + 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); } diff --git a/assignment-client/src/avatars/AvatarMixerSlave.cpp b/assignment-client/src/avatars/AvatarMixerSlave.cpp index 5d36a6d261..dd045c24ea 100644 --- a/assignment-client/src/avatars/AvatarMixerSlave.cpp +++ b/assignment-client/src/avatars/AvatarMixerSlave.cpp @@ -209,7 +209,7 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) assert(avatarNode); // we can't have gotten here without the avatarData being a valid key in the map return nodeData->getLastBroadcastTime(avatarNode->getUUID()); }, [&](AvatarSharedPointer avatar)->float{ - glm::vec3 nodeBoxHalfScale = (avatar->getPosition() - avatar->getGlobalBoundingBoxCorner() * avatar->getSensorToWorldScale()); + glm::vec3 nodeBoxHalfScale = (avatar->getWorldPosition() - avatar->getGlobalBoundingBoxCorner() * avatar->getSensorToWorldScale()); return glm::max(nodeBoxHalfScale.x, glm::max(nodeBoxHalfScale.y, nodeBoxHalfScale.z)); }, [&](AvatarSharedPointer avatar)->bool { if (avatar == thisAvatar) { diff --git a/assignment-client/src/avatars/ScriptableAvatar.cpp b/assignment-client/src/avatars/ScriptableAvatar.cpp index 5060891284..c9ded2d6fb 100644 --- a/assignment-client/src/avatars/ScriptableAvatar.cpp +++ b/assignment-client/src/avatars/ScriptableAvatar.cpp @@ -20,7 +20,7 @@ QByteArray ScriptableAvatar::toByteArrayStateful(AvatarDataDetail dataDetail, bool dropFaceTracking) { - _globalPosition = getPosition(); + _globalPosition = getWorldPosition(); return AvatarData::toByteArrayStateful(dataDetail); } diff --git a/assignment-client/src/entities/EntityTreeSendThread.cpp b/assignment-client/src/entities/EntityTreeSendThread.cpp index 11e4d533fb..e5cee84f1b 100644 --- a/assignment-client/src/entities/EntityTreeSendThread.cpp +++ b/assignment-client/src/entities/EntityTreeSendThread.cpp @@ -23,6 +23,17 @@ EntityTreeSendThread::EntityTreeSendThread(OctreeServer* myServer, const SharedN { connect(std::static_pointer_cast(myServer->getOctree()).get(), &EntityTree::editingEntityPointer, this, &EntityTreeSendThread::editingEntityPointer, Qt::QueuedConnection); connect(std::static_pointer_cast(myServer->getOctree()).get(), &EntityTree::deletingEntityPointer, this, &EntityTreeSendThread::deletingEntityPointer, Qt::QueuedConnection); + + // connect to connection ID change on EntityNodeData so we can clear state for this receiver + auto nodeData = static_cast(node->getLinkedData()); + connect(nodeData, &EntityNodeData::incomingConnectionIDChanged, this, &EntityTreeSendThread::resetState); +} + +void EntityTreeSendThread::resetState() { + qCDebug(entities) << "Clearing known EntityTreeSendThread state for" << _nodeUuid; + + _knownState.clear(); + _traversal.reset(); } void EntityTreeSendThread::preDistributionProcessing() { diff --git a/assignment-client/src/entities/EntityTreeSendThread.h b/assignment-client/src/entities/EntityTreeSendThread.h index a96a18494d..594f423838 100644 --- a/assignment-client/src/entities/EntityTreeSendThread.h +++ b/assignment-client/src/entities/EntityTreeSendThread.h @@ -33,6 +33,9 @@ protected: void traverseTreeAndSendContents(SharedNodePointer node, OctreeQueryNode* nodeData, bool viewFrustumChanged, bool isFullScene) override; +private slots: + void resetState(); // clears our known state forcing entities to appear unsent + private: // the following two methods return booleans to indicate if any extra flagged entities were new additions to set bool addAncestorsToExtraFlaggedEntities(const QUuid& filteredEntityID, EntityItem& entityItem, EntityNodeData& nodeData); diff --git a/assignment-client/src/octree/OctreeSendThread.h b/assignment-client/src/octree/OctreeSendThread.h index bc7d2c2588..220952e209 100644 --- a/assignment-client/src/octree/OctreeSendThread.h +++ b/assignment-client/src/octree/OctreeSendThread.h @@ -59,7 +59,8 @@ protected: OctreePacketData _packetData; QWeakPointer _node; OctreeServer* _myServer { nullptr }; - + QUuid _nodeUuid; + private: /// Called before a packetDistributor pass to allow for pre-distribution processing virtual void preDistributionProcessing() {}; @@ -71,8 +72,6 @@ private: virtual void preStartNewScene(OctreeQueryNode* nodeData, bool isFullScene); virtual bool shouldTraverseAndSend(OctreeQueryNode* nodeData) { return hasSomethingToSend(nodeData); } - QUuid _nodeUuid; - int _truePacketsSent { 0 }; // available for debug stats int _trueBytesSent { 0 }; // available for debug stats int _packetsSentThisInterval { 0 }; // used for bandwidth throttle condition diff --git a/domain-server/resources/web/css/style.css b/domain-server/resources/web/css/style.css index 547b903b15..158008fc2b 100644 --- a/domain-server/resources/web/css/style.css +++ b/domain-server/resources/web/css/style.css @@ -1,3 +1,17 @@ +/* cairo-regular - latin */ +@font-face { + font-family: 'Cairo'; + font-style: normal; + font-weight: 400; + src: url('/fonts/cairo-v2-latin-regular.eot'); /* IE9 Compat Modes */ + src: local('Cairo'), local('Cairo-Regular'), + url('/fonts/cairo-v2-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ + url('/fonts/cairo-v2-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */ + url('/fonts/cairo-v2-latin-regular.woff') format('woff'), /* Modern Browsers */ + url('/fonts/cairo-v2-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */ + url('/fonts/cairo-v2-latin-regular.svg#Cairo') format('svg'); /* Legacy iOS */ +} + body { position: relative; padding-bottom: 30px; @@ -80,11 +94,23 @@ span.port { display: none; } -#setup-sidebar.affix { - /* This overrides a case where going to the bottom of the page, - * then scrolling up, causes `position: relative` to be added to the style - */ - position: fixed !important; +@media (min-width: 768px) { + #setup-sidebar.affix { + /* This overrides a case where going to the bottom of the page, + * then scrolling up, causes `position: relative` to be added to the style + */ + position: fixed !important; + } +} + +@media (max-width: 767px) { + #setup-sidebar.affix { + position: static !important; + } + + #setup-sidebar { + margin-bottom: 20px; + } } #setup-sidebar button { @@ -302,6 +328,7 @@ table .headers + .headers td { } .account-connected-header { + vertical-align: middle; color: #6FCF97; font-size: 30px; margin-right: 20px; @@ -311,7 +338,7 @@ table .headers + .headers td { font-size: 14px; text-decoration-line: underline; font-weight: normal; - color: #2F80ED; + color: #00B3F8; } #manage-cloud-domains-link { diff --git a/domain-server/resources/web/fonts/cairo-v2-latin-regular.eot b/domain-server/resources/web/fonts/cairo-v2-latin-regular.eot new file mode 100644 index 0000000000..6a22e7926d Binary files /dev/null and b/domain-server/resources/web/fonts/cairo-v2-latin-regular.eot differ diff --git a/domain-server/resources/web/fonts/cairo-v2-latin-regular.svg b/domain-server/resources/web/fonts/cairo-v2-latin-regular.svg new file mode 100644 index 0000000000..64e5a31732 --- /dev/null +++ b/domain-server/resources/web/fonts/cairo-v2-latin-regular.svg @@ -0,0 +1 @@ +Error 500 (Server Error)!!1

500. That’s an error.

There was an error. Please try again later. That’s all we know.

\ No newline at end of file diff --git a/domain-server/resources/web/fonts/cairo-v2-latin-regular.ttf b/domain-server/resources/web/fonts/cairo-v2-latin-regular.ttf new file mode 100644 index 0000000000..216effc099 Binary files /dev/null and b/domain-server/resources/web/fonts/cairo-v2-latin-regular.ttf differ diff --git a/domain-server/resources/web/fonts/cairo-v2-latin-regular.woff b/domain-server/resources/web/fonts/cairo-v2-latin-regular.woff new file mode 100644 index 0000000000..73f2ef82fa Binary files /dev/null and b/domain-server/resources/web/fonts/cairo-v2-latin-regular.woff differ diff --git a/domain-server/resources/web/fonts/cairo-v2-latin-regular.woff2 b/domain-server/resources/web/fonts/cairo-v2-latin-regular.woff2 new file mode 100644 index 0000000000..1d36dc0112 Binary files /dev/null and b/domain-server/resources/web/fonts/cairo-v2-latin-regular.woff2 differ diff --git a/domain-server/resources/web/images/checkmark.svg b/domain-server/resources/web/images/checkmark.svg deleted file mode 100644 index f4403921ee..0000000000 --- a/domain-server/resources/web/images/checkmark.svg +++ /dev/null @@ -1,25 +0,0 @@ - -CongratulationImage -Created using Figma - - - - - - - - - - - - - - - - - - - - - - diff --git a/domain-server/resources/web/images/copy-icon.svg b/domain-server/resources/web/images/copy-icon.svg new file mode 100644 index 0000000000..ce1d841072 --- /dev/null +++ b/domain-server/resources/web/images/copy-icon.svg @@ -0,0 +1,17 @@ + + + + + + diff --git a/domain-server/resources/web/images/wizard-congratulation-header.jpg b/domain-server/resources/web/images/wizard-congratulation-header.jpg new file mode 100644 index 0000000000..80a3823033 Binary files /dev/null and b/domain-server/resources/web/images/wizard-congratulation-header.jpg differ diff --git a/domain-server/resources/web/js/shared.js b/domain-server/resources/web/js/shared.js index 66159209ea..00f699fa4e 100644 --- a/domain-server/resources/web/js/shared.js +++ b/domain-server/resources/web/js/shared.js @@ -62,26 +62,25 @@ var Strings = { // dialog with new path still set, allowing them to retry immediately, and without // having to type the new path in again. EDIT_PLACE_TITLE: "Modify Viewpoint or Path", - EDIT_PLACE_ERROR: "Failed to update place path. Please try again.", + EDIT_PLACE_ERROR: "Failed to update Viewpoint or Path for this Place Name. Please try again.", EDIT_PLACE_CONFIRM_BUTTON: "Save", EDIT_PLACE_CONFIRM_BUTTON_PENDING: "Saving...", EDIT_PLACE_CANCEL_BUTTON: "Cancel", - REMOVE_PLACE_TITLE: "Are you sure you want to remove {{place}}?", - REMOVE_PLACE_ERROR: "Failed to remove place. Please try again.", - REMOVE_PLACE_DELETE_BUTTON: "Delete", + REMOVE_PLACE_TITLE: "Are you sure you want to remove {{place}} and its path information?", + REMOVE_PLACE_ERROR: "Failed to remove Place Name and its Path information.", + REMOVE_PLACE_DELETE_BUTTON: "This action removes your Place Name", REMOVE_PLACE_DELETE_BUTTON_PENDING: "Deleting...", REMOVE_PLACE_CANCEL_BUTTON: "Cancel", ADD_PLACE_TITLE: "Choose a place", - ADD_PLACE_MESSAGE: "Choose the High Fidelity place to point at this domain server.", - ADD_PLACE_CONFIRM_BUTTON: "Choose place", + ADD_PLACE_MESSAGE: "Choose a Place Name that you own or register a new Place Name.", + ADD_PLACE_CONFIRM_BUTTON: "Save", ADD_PLACE_CONFIRM_BUTTON_PENDING: "Saving...", ADD_PLACE_CANCEL_BUTTON: "Cancel", - ADD_PLACE_UNKNOWN_ERROR: "There was an error adding this place name.", + ADD_PLACE_UNKNOWN_ERROR: "There was an error adding this Place Name. Try saving again", - ADD_PLACE_NO_PLACES_MESSAGE: "

You do not have any places in your High Fidelity account." - + "

Go to your places page to create a new one. Once your place is created re-open this dialog to select it.

", + ADD_PLACE_NO_PLACES_MESSAGE: "You don't have any Place Names registered. Once you have a Place Name, reopen this window to select it.", ADD_PLACE_NO_PLACES_BUTTON: "Create new place", ADD_PLACE_UNABLE_TO_LOAD_ERROR: "We were unable to load your place names. Please try again later.", ADD_PLACE_LOADING_DIALOG: "Loading your places...", @@ -236,7 +235,7 @@ function chooseFromHighFidelityPlaces(accessToken, forcePathTo, onSuccessfullyAd if (forcePathTo === undefined || forcePathTo === null) { var path = "
"; - path += ""; + path += ""; path += ""; path += "
"; modal_body.append($(path)); @@ -339,7 +338,6 @@ function chooseFromHighFidelityPlaces(accessToken, forcePathTo, onSuccessfullyAd $('.add-place-confirm-button').html(Strings.ADD_PLACE_CONFIRM_BUTTON); $('.add-place-cancel-button').removeAttr('disabled'); bootbox.alert(Strings.ADD_PLACE_UNKNOWN_ERROR); - bootbox.alert("FAIL"); }); } } @@ -363,7 +361,8 @@ function chooseFromHighFidelityPlaces(accessToken, forcePathTo, onSuccessfullyAd title: Strings.ADD_PLACE_TITLE, message: modal_body, closeButton: false, - buttons: modal_buttons + buttons: modal_buttons, + onEscape: true }); } else { bootbox.alert(Strings.ADD_PLACE_UNABLE_TO_LOAD_ERROR); diff --git a/domain-server/resources/web/settings/index.shtml b/domain-server/resources/web/settings/index.shtml index 5a8184db30..d36330375a 100644 --- a/domain-server/resources/web/settings/index.shtml +++ b/domain-server/resources/web/settings/index.shtml @@ -36,11 +36,6 @@
- - -