diff --git a/interface/src/raypick/ParabolaPointer.cpp b/interface/src/raypick/ParabolaPointer.cpp index 2d74385eb7..f59cd7a0f1 100644 --- a/interface/src/raypick/ParabolaPointer.cpp +++ b/interface/src/raypick/ParabolaPointer.cpp @@ -230,6 +230,7 @@ void ParabolaPointer::RenderState::update(const glm::vec3& origin, const glm::ve item.updateBounds(); }); scene->enqueueTransaction(transaction); + qDebug() << "ParabolaPointer::RenderState::update"; } } @@ -249,7 +250,7 @@ std::shared_ptr ParabolaPointer::buildRenderState(const QVa bool isVisibleInSecondaryCamera = RenderState::ParabolaRenderItem::DEFAULT_PARABOLA_ISVISIBLEINSECONDARYCAMERA; bool drawInFront = RenderState::ParabolaRenderItem::DEFAULT_PARABOLA_DRAWINFRONT; bool enabled = false; - if (propMap["pathPropertyIndex"].isValid()) { + /*if (propMap["pathPropertyIndex"].isValid()) { int pathPropertyIndex = propMap["pathPropertyIndex"].toInt(); if (pathPropertyIndex >= 0 && pathPropertyIndex < entityProperties.length()) { const EntityItemProperties &pathProperties(entityProperties[pathPropertyIndex]); @@ -260,6 +261,30 @@ std::shared_ptr ParabolaPointer::buildRenderState(const QVa //width = pathProperties.getWidth; drawInFront = (pathProperties.getRenderLayer() == RenderLayer::FRONT); } + }*/ + if (propMap["path"].isValid()) { + enabled = true; + QVariantMap pathMap = propMap["path"].toMap(); + if (pathMap["color"].isValid()) { + color = toGlm(u8vec3FromVariant(pathMap["color"])); + } + + if (pathMap["alpha"].isValid()) { + alpha = pathMap["alpha"].toFloat(); + } + + if (pathMap["width"].isValid()) { + width = pathMap["width"].toFloat(); + } + + if (pathMap["isVisibleInSecondaryCamera"].isValid()) { + isVisibleInSecondaryCamera = pathMap["isVisibleInSecondaryCamera"].toBool(); + } + + if (pathMap["drawInFront"].isValid()) { + drawInFront = pathMap["drawInFront"].toBool(); + } + qDebug() << "ParabolaPointer::buildRenderState"; } QUuid endID; @@ -445,6 +470,7 @@ void ParabolaPointer::RenderState::ParabolaRenderItem::render(RenderArgs* args) // We draw 2 * n + 2 vertices for a triangle strip batch.draw(gpu::TRIANGLE_STRIP, 2 * _parabolaData.numSections + 2, 0); + qDebug() << "ParabolaPointer::RenderState::ParabolaRenderItem::render"; } namespace render { diff --git a/interface/src/raypick/PathPointer.cpp b/interface/src/raypick/PathPointer.cpp index ae2340ab7f..b24c5630c4 100644 --- a/interface/src/raypick/PathPointer.cpp +++ b/interface/src/raypick/PathPointer.cpp @@ -144,11 +144,13 @@ void PathPointer::updateVisuals(const PickResultPointer& pickResult) { auto renderState = _renderStates.find(_currentRenderState); auto defaultRenderState = _defaultRenderStates.find(_currentRenderState); float parentScale = 1.0f; + //if (_scaleWithParent) { if (_enabled && _scaleWithParent) { glm::vec3 dimensions = DependencyManager::get()->getParentTransform(_pickUID).getScale(); parentScale = glm::max(glm::max(dimensions.x, dimensions.y), dimensions.z); } + //if (!_currentRenderState.empty() && renderState != _renderStates.end() && if (_enabled && !_currentRenderState.empty() && renderState != _renderStates.end() && (type != IntersectionType::NONE || _pathLength > 0.0f)) { glm::vec3 origin = getPickOrigin(pickResult); @@ -160,6 +162,7 @@ void PathPointer::updateVisuals(const PickResultPointer& pickResult) { defaultRenderState->second.second->disable(); } } else if (_enabled && !_currentRenderState.empty() && defaultRenderState != _defaultRenderStates.end()) { + //} else if (!_currentRenderState.empty() && defaultRenderState != _defaultRenderStates.end()) { if (renderState != _renderStates.end() && renderState->second->isEnabled()) { renderState->second->disable(); } diff --git a/interface/src/raypick/PointerScriptingInterface.cpp b/interface/src/raypick/PointerScriptingInterface.cpp index cb83a67199..17a1c7e184 100644 --- a/interface/src/raypick/PointerScriptingInterface.cpp +++ b/interface/src/raypick/PointerScriptingInterface.cpp @@ -677,7 +677,7 @@ bool stylusPointerPropertiesFromScriptValue(const ScriptValue& value, StylusPoin out.properties[*renderStatesName].setValue(renderStates); } } - qDebug() << "rayPointerPropertiesFromScriptValue" << out.properties; + qDebug() << "stylusPointerPropertiesFromScriptValue" << out.properties; return true; } @@ -716,6 +716,7 @@ bool parabolaPointerPropertiesFromScriptValue(const ScriptValue& value, Parabola pathProperties.copyFromScriptValue(path, false); stateMap.insert("pathPropertyIndex", QVariant(out.entityProperties.length())); out.entityProperties.append(pathProperties); + qDebug() << "parabolaPointerPropertiesFromScriptValue : added path entity"; } if (stateMap["end"].isValid()) { @@ -724,6 +725,7 @@ bool parabolaPointerPropertiesFromScriptValue(const ScriptValue& value, Parabola endProperties.copyFromScriptValue(end, false); stateMap.insert("endPropertyIndex", QVariant(out.entityProperties.length())); out.entityProperties.append(endProperties); + qDebug() << "parabolaPointerPropertiesFromScriptValue : added end entity"; } // V8TODO: Check if path is a polyline and if values are valid renderStates[i].setValue(stateMap); @@ -732,6 +734,6 @@ bool parabolaPointerPropertiesFromScriptValue(const ScriptValue& value, Parabola out.properties[*renderStatesName].setValue(renderStates); } } - qDebug() << "rayPointerPropertiesFromScriptValue" << out.properties; + qDebug() << "parabolaPointerPropertiesFromScriptValue" << out.properties; return true; } diff --git a/libraries/script-engine/src/v8/ScriptObjectV8Proxy.cpp b/libraries/script-engine/src/v8/ScriptObjectV8Proxy.cpp index aaee5ee76c..005ed43a71 100644 --- a/libraries/script-engine/src/v8/ScriptObjectV8Proxy.cpp +++ b/libraries/script-engine/src/v8/ScriptObjectV8Proxy.cpp @@ -1458,7 +1458,7 @@ void ScriptSignalV8Proxy::disconnect(ScriptValue arg0, ScriptValue arg1) { // For debugging ScriptSignalV8Proxy* thisProxy = dynamic_cast(ScriptObjectV8Proxy::unwrapProxy(v8ThisObject)->toQObject()); Q_ASSERT(thisProxy); - qCDebug(scriptengine_v8) << "ScriptSignalV8Proxy::disconnect: " << thisProxy->fullName() << " fullName: " << fullName(); + //qCDebug(scriptengine_v8) << "ScriptSignalV8Proxy::disconnect: " << thisProxy->fullName() << " fullName: " << fullName(); if (!destFunction->Get(destFunctionContext, destDataName).ToLocal(&destData)) { Q_ASSERT(false); } @@ -1472,21 +1472,18 @@ void ScriptSignalV8Proxy::disconnect(ScriptValue arg0, ScriptValue arg1) { v8::Local entry = destArray->Get(destFunctionContext, idx).ToLocalChecked(); // For debugging: { - _engine->logBacktrace("ScriptSignalV8Proxy::disconnect"); - qCDebug(scriptengine_v8) << "ScriptSignalV8Proxy::disconnect: entry details: " << _engine->scriptValueDebugDetailsV8(V8ScriptValue(_engine, entry)) - << " Array: " << _engine->scriptValueDebugDetailsV8(V8ScriptValue(_engine, destArray)); + //qCDebug(scriptengine_v8) << "ScriptSignalV8Proxy::disconnect: entry details: " << _engine->scriptValueDebugDetailsV8(V8ScriptValue(_engine, entry)) + // << " Array: " << _engine->scriptValueDebugDetailsV8(V8ScriptValue(_engine, destArray)); Q_ASSERT(entry->IsObject()); V8ScriptValue v8EntryObject(_engine, entry); Q_ASSERT(ScriptObjectV8Proxy::unwrapProxy(v8EntryObject)); // For debugging - ScriptSignalV8Proxy* entryProxy = dynamic_cast(ScriptObjectV8Proxy::unwrapProxy(v8EntryObject)->toQObject()); + //ScriptSignalV8Proxy* entryProxy = dynamic_cast(ScriptObjectV8Proxy::unwrapProxy(v8EntryObject)->toQObject()); Q_ASSERT(thisProxy); - qCDebug(scriptengine_v8) << "ScriptSignalV8Proxy::disconnect: entry proxy: " << entryProxy->fullName(); + //qCDebug(scriptengine_v8) << "ScriptSignalV8Proxy::disconnect: entry proxy: " << entryProxy->fullName(); } if (entry->StrictEquals(v8ThisObject.get())) { - //V8TODO: compare proxies instead? foundIt = true; - qCDebug(scriptengine_v8) << "ScriptSignalV8Proxy::disconnect foundIt"; } else { if (!newArray->Set(destFunctionContext, newIndex, entry).FromMaybe(false)) { Q_ASSERT(false); diff --git a/libraries/script-engine/src/v8/ScriptValueV8Wrapper.cpp b/libraries/script-engine/src/v8/ScriptValueV8Wrapper.cpp index 7ce54acbc8..72e4d71a46 100644 --- a/libraries/script-engine/src/v8/ScriptValueV8Wrapper.cpp +++ b/libraries/script-engine/src/v8/ScriptValueV8Wrapper.cpp @@ -646,10 +646,8 @@ bool ScriptValueV8Wrapper::isError() const { } auto errorObj = v8::Local::Cast(error); if (_value.constGet()->InstanceOf(context, errorObj).FromMaybe(false)) { - qDebug() << "ScriptValueV8Wrapper::isError : true"; return true; } - qDebug() << "ScriptValueV8Wrapper::isError : false"; return false; } diff --git a/scripts/defaultScripts.js b/scripts/defaultScripts.js index ac047ecf78..8c44910581 100644 --- a/scripts/defaultScripts.js +++ b/scripts/defaultScripts.js @@ -36,7 +36,6 @@ var DEFAULT_SCRIPTS_COMBINED = [ "system/audioMuteOverlay.js", "system/inspect.js", "system/keyboardShortcuts/keyboardShortcuts.js", - "system/checkForUpdates.js", "system/onEscape.js", "system/onFirstRun.js", "system/appreciate/appreciate_app.js", diff --git a/scripts/system/checkForUpdates.js b/scripts/system/checkForUpdates.js deleted file mode 100644 index 6982024db1..0000000000 --- a/scripts/system/checkForUpdates.js +++ /dev/null @@ -1,54 +0,0 @@ -// checkForUpdates.js -// -// Created by Kalila L. on 8/27/20 -// Copyright 2020 Vircadia contributors. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html - -Script.include("/~/system/libraries/utils.js"); -var networkingConstants = Script.require("./libraries/networkingConstants.js"); - -// We'll want a way to specify this later, auto detection can also be a thing, but strictly optional. -var currentBuildType = "latest"; -var currentVersion = About.buildVersion; - -// Notification Variables -var NOTIFICATION_CHANNEL = "System-Notifications"; -var NOTIFICATION_TYPE = "Update-Notification"; -var NOTIFICATION_CATEGORY = "Interface"; -var notificationText = "An update is available: "; -var notificationColor = { red: 137, green: 63, blue: 255 }; - -function retrieveMetadata() { - var requireMetadata = Script.require(networkingConstants.INTERFACE_METADATA_SOURCE + '?' + Date.now()); - - if (requireMetadata) { - return requireMetadata; - } else { - return false; - } -} - -function checkForUpdates() { - var vircadiaMetadata = retrieveMetadata(); - - // Don't check for updates on a dev build. - if (vircadiaMetadata && currentVersion !== "dev") { - var checkVersion = semanticVersionCompare(currentVersion, vircadiaMetadata[currentBuildType].version); - - // An update is available! - if (checkVersion === -1) { - Messages.sendMessage(NOTIFICATION_CHANNEL, JSON.stringify({ - type: NOTIFICATION_TYPE, - category: NOTIFICATION_CATEGORY, - channel: "Local", - position: MyAvatar.position, - colour: notificationColor, - message: notificationText + vircadiaMetadata[currentBuildType].version, - })); - } - } -} - -checkForUpdates(); diff --git a/scripts/system/menu.js b/scripts/system/menu.js index 277a223e07..15c8da3e3b 100644 --- a/scripts/system/menu.js +++ b/scripts/system/menu.js @@ -77,8 +77,8 @@ var HOME_BUTTON_TEXTURE = Script.getExternalPath(Script.ExternalPaths.HF_Content if (button) { button.clicked.disconnect(onClicked); + tablet.removeButton(button); } - tablet.removeButton(button); tablet.screenChanged.disconnect(onScreenChanged); }); }());