From 0b7d6cb7203a60e7f4b31154b4de8db01c498028 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Tue, 31 Jul 2018 14:10:19 -0700 Subject: [PATCH 01/25] 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 02/25] 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 03/25] 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 04/25] 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 05/25] 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 06/25] 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 07/25] 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 08/25] 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 09/25] 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..b5c77054c4b2e185da0992a2237d2eb80d9033fc GIT binary patch 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;8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*Bfp&)BOA`^P(F3-VUAGO0 z5=oeDOL#Gwo5rpB6uB>$mZ(+?OUw$j5vkT)=@$o;?YQXAxCx-X?;ya6c42X-8yw(D zAUF5N)bw2it- z(>8lDlfs~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 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 10/25] 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 11/25] 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 zcmbVOYgAL&6+S_Mk%u^n;AkCU5C;bH4hac)pahUA6fsj&#E{%vBm>C}Nq_(%_&}tH zTA3+ON5Nu!R*$r%{NYL|Ba#!@Hz%4sN7g zi^EDK99*ld+XHJ@JMVBqJ*)21Ueof(eDQXT5Hy46T5gz^>v0U{oQ4k^{YD5Ym znLr}SWN2L0fK}=!_x<=`;o-{A_~laDI(?^ z&-?JyAbN=ZdMb?>#OIUA!TwAV&7U6X8c_-mBx$Y+A`=ibqDnv%*q|V+ceGS4LDEz{=n1_Im=7zZsjwtOiO8_l6tkr7 zF)yZxDRdEuil;#o2A)c$#p6XJKR>*P?hi?*P`p2dPQtyzOa9-~5xH145v`N|sGGU1 zD1HdK{H_bQ*zfxYmPt5$$OaBaWtl?@bIaIu`Ww7wkM>TkZk1gtC(Wj24*_J1TZ#ahTl8wL3ZEH66R1oH| zWLiy!7l2E$afSq4eo1%q!YcefedhrHN{+SjUZynX-6x+Dx87dcnYHKfMi8 zbT7!69fpcH9-#TyV&tH1JkVY|~ZKbPSH$6b68j77A8h zmA;#0kmxM`x*DFmq;Yj4&tpP1IMP;@*i(59M4}nK@@T(h`_5=Kfg+FfiHv^=jhQ+h z-td^N3$1SLvJG^bA-2p6vtKeeatGr+E*jRao&IiV);{d|64PI8slL9fK2N;87*tFV zLEG)G@Hexy&xFyyNwo$&BKDEsz~$x+oARD2rf*!@U|Hc%40)2?01nx@b(=jB9Ly=6 z=6L{+hP(pxXR3T_#`ofVCwr#Pf0l}5E@><+ExlD;K9PQ9B(?t4r@$3W>n7!>FcA}} z8y{EdU-joGq2?T=k zge4}{W>J&n7S4Qb9oJW}@?K@DW07`nE+?`XwhS$U>Kz zgYx^6qsbqeFSQH9wNx+;q4kj8b-cj7f8cNVr@KjmULYWK@ZnNN)8!g*r_kJy>vpt* z(KV81t%LJIV+1l&d}>C>t~3_)C)$UMk;5DJlUcaU4ZXbjPH*c()HB=GMBmxU{ zBB#MJPI{V{SP*=Jl(6|Gngu5U=6HaG_j(7bKYQUrrfyQIvTLl}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..2b1fb089d97f0acce5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IjNJ5lcfrHaIJ_MBYUF1n}p<3!`+ zu-fv8Jj5Qw5<-p^n|AVx#LsmW*48JL<{n4nBs}DrrwJ?*BHCTJHLGzAi};4f{0Y$y z2Y{&kfQWDSScEEM zO>+P7J5(U9z7MY=0A$NIF!ZLU`LU$fFJD$LEFu=j`5EMur;#B}11@Oc`00m9v(sz# z-)7vu3%4Yyd;K3+)8yy9_yYZ37XT9G1^=1-yZ)~<)Nl6EZ)ntSo&R}=U&ayu@L%Mr h-$LM)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 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(q8IBK+|$4K#RL*_Ofns!62-uqkPeFG3zy};ng zS?bb5{d&;Hcji-`IG?vyvH1J(Po{qI-k$VeuG9_}fpg~=J>^`F9YRM;rMO2;wC-DU z7Y%?tv0gdG!XC$8Am}{HwmnVty6Wc{UlAJ+#RykLy=m*Bfp&)BOA`^P(F3-VUAGO0 z5=oeDOL#Gwo5rpB6uB>$mZ(+?OUw$j5vkT)=@$o;?YQXAxCx-X?;ya6c42X-8yw(D zAUF5N)bw2it- z(>8lDlfs~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 12/25] 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 13/25] 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 26a30edec9f2d1c659d65b598a9bb9844c77040f Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Tue, 21 Aug 2018 18:27:21 -0700 Subject: [PATCH 14/25] 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 54236e5c59ab8f33a52b1af381b1cbd31c2fdae1 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Wed, 22 Aug 2018 10:58:55 -0700 Subject: [PATCH 15/25] 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 16/25] 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 17/25] 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 18/25] 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 19/25] 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 20/25] 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 92acaade2b736eab9c711d1f3586d90107f097e8 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Fri, 24 Aug 2018 17:13:57 -0700 Subject: [PATCH 21/25] 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 e4293d9ad57705cfb778737c337ff8018a9a8b13 Mon Sep 17 00:00:00 2001 From: danteruiz Date: Sun, 26 Aug 2018 21:50:01 -0700 Subject: [PATCH 22/25] 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 e2cd695dfb9ada63d8a14664d4e75b13bf2ec978 Mon Sep 17 00:00:00 2001 From: danteruiz Date: Mon, 27 Aug 2018 11:01:29 -0700 Subject: [PATCH 23/25] 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 93b0f151166d818fb019e4e2e48353d112738fcd Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Thu, 30 Aug 2018 13:22:17 -0700 Subject: [PATCH 24/25] 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 25/25] 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);