diff --git a/interface/src/RefreshRateManager.h b/interface/src/RefreshRateManager.h index f7414c57e9..4b91f0c45e 100644 --- a/interface/src/RefreshRateManager.h +++ b/interface/src/RefreshRateManager.h @@ -118,7 +118,7 @@ private: mutable int _activeRefreshRate { 20 }; RefreshRateProfile _refreshRateProfile { RefreshRateProfile::INTERACTIVE}; RefreshRateRegime _refreshRateRegime { RefreshRateRegime::STARTUP }; - UXMode _uxMode { UXMode::UX_NUM }; + UXMode _uxMode { UXMode::DESKTOP }; mutable ReadWriteLockable _refreshRateProfileSettingLock; Setting::Handle<int> _refreshRateProfileSetting { "refreshRateProfile", RefreshRateProfile::INTERACTIVE }; diff --git a/interface/src/raypick/ParabolaPointer.cpp b/interface/src/raypick/ParabolaPointer.cpp index 4f65480191..63a17b217c 100644 --- a/interface/src/raypick/ParabolaPointer.cpp +++ b/interface/src/raypick/ParabolaPointer.cpp @@ -249,18 +249,7 @@ std::shared_ptr<StartEndRenderState> 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()) { - int pathPropertyIndex = propMap["pathPropertyIndex"].toInt(); - if (pathPropertyIndex >= 0 && pathPropertyIndex < entityProperties.length()) { - const EntityItemProperties &pathProperties(entityProperties[pathPropertyIndex]); - enabled = true; - color = pathProperties.getColor(); - alpha = pathProperties.getAlpha(); - //V8TODO I'm not sure how to do this one - //width = pathProperties.getWidth; - drawInFront = (pathProperties.getRenderLayer() == RenderLayer::FRONT); - } - }*/ + if (propMap["path"].isValid()) { enabled = true; QVariantMap pathMap = propMap["path"].toMap(); diff --git a/interface/src/raypick/StylusPointer.cpp b/interface/src/raypick/StylusPointer.cpp index 0e19b0fe6b..8a6097816e 100644 --- a/interface/src/raypick/StylusPointer.cpp +++ b/interface/src/raypick/StylusPointer.cpp @@ -85,13 +85,9 @@ QUuid StylusPointer::buildStylus(const QVariantMap& properties) { entityProperties.setType(EntityTypes::Model); entityProperties.setName("stylus"); entityProperties.setModelURL(modelURL); - // V8TODO: I can't find equivalent for entities - //propertiesMap["loadPriority"] = 10.0f; entityProperties.setPrimitiveMode(PrimitiveMode::SOLID); entityProperties.setVisible(true); entityProperties.setIgnorePickIntersection(true); - // V8TODO: I can't find equivalent for entities but shouldn't be necessary - //propertiesMap["drawInFront"] = false; return DependencyManager::get<EntityScriptingInterface>()->addEntityInternal(entityProperties, entity::HostType::LOCAL); } diff --git a/interface/src/ui/overlays/Overlays.cpp b/interface/src/ui/overlays/Overlays.cpp index 721632c6c7..e245acfd40 100644 --- a/interface/src/ui/overlays/Overlays.cpp +++ b/interface/src/ui/overlays/Overlays.cpp @@ -195,588 +195,8 @@ QString Overlays::entityToOverlayType(const QString& type) { return "unknown"; } -/*QString Overlays::overlayToEntityType(const QString& type) { - auto iter = _overlayToEntityTypes.find(type); - if (iter != _overlayToEntityTypes.end()) { - return iter->second; - } - return "Unknown"; -}*/ - -#define SET_OVERLAY_PROP_DEFAULT(o, d) \ - { \ - if (add && !overlayProps.contains(#o)) { \ - overlayProps[#o] = d; \ - } \ - } - -#define RENAME_PROP(o, e) \ - { \ - auto iter = overlayProps.find(#o); \ - if (iter != overlayProps.end() && \ - !overlayProps.contains(#e)) { \ - overlayProps[#e] = iter.value(); \ - } \ - } - -#define RENAME_PROP_CONVERT(o, e, C) \ - { \ - auto iter = overlayProps.find(#o); \ - if (iter != overlayProps.end()) { \ - overlayProps[#e] = C(iter.value()); \ - } \ - } - -#define OVERLAY_TO_GROUP_ENTITY_PROP(o, g, e) \ - { \ - auto iter = overlayProps.find(#o); \ - if (iter != overlayProps.end()) { \ - if (!overlayProps.contains(#g)) { \ - overlayProps[#g] = QVariantMap(); \ - } \ - auto map = overlayProps[#g].toMap(); \ - map[#e] = iter.value(); \ - overlayProps[#g] = map; \ - } \ - } - -#define OVERLAY_TO_GROUP_ENTITY_PROP_DEFAULT(o, g, e, d) \ - { \ - auto iter = overlayProps.find(#o); \ - if (iter != overlayProps.end()) { \ - if (!overlayProps.contains(#g)) { \ - overlayProps[#g] = QVariantMap(); \ - } \ - auto map = overlayProps[#g].toMap(); \ - map[#e] = iter.value(); \ - overlayProps[#g] = map; \ - } else if (add) { \ - if (!overlayProps.contains(#g)) { \ - overlayProps[#g] = QVariantMap(); \ - } \ - auto map = overlayProps[#g].toMap(); \ - map[#e] = d; \ - overlayProps[#g] = map; \ - } \ - } - -#define OVERLAY_TO_ENTITY_PROP_CONVERT_DEFAULT(o, e, d, C) \ - { \ - auto iter = overlayProps.find(#o); \ - if (iter != overlayProps.end()) { \ - overlayProps[#e] = C(iter.value()); \ - } else if (add) { \ - overlayProps[#e] = C(d); \ - } \ - } - -#define OVERLAY_TO_GROUP_ENTITY_PROP_CONVERT(o, g, e, C) \ - { \ - auto iter = overlayProps.find(#o); \ - if (iter != overlayProps.end()) { \ - if (!overlayProps.contains(#g)) { \ - overlayProps[#g] = QVariantMap(); \ - } \ - auto map = overlayProps[#g].toMap(); \ - map[#e] = C(iter.value()); \ - overlayProps[#g] = map; \ - } \ - } - -#define GROUP_ENTITY_TO_OVERLAY_PROP(g, e, o) \ - { \ - auto iter = overlayProps.find(#g); \ - if (iter != overlayProps.end()) { \ - auto map = iter.value().toMap(); \ - auto iter2 = map.find(#e); \ - if (iter2 != map.end()) { \ - overlayProps[#o] = iter2.value(); \ - } \ - } \ - } - -#define GROUP_ENTITY_TO_OVERLAY_PROP_CONVERT(g, e, o, C) \ - { \ - auto iter = overlayProps.find(#g); \ - if (iter != overlayProps.end()) { \ - auto map = iter.value().toMap(); \ - auto iter2 = map.find(#e); \ - if (iter2 != map.end()) { \ - overlayProps[#o] = C(iter2.value()); \ - } \ - } \ - } - static QHash<QUuid, std::pair<glm::quat, bool>> savedRotations = QHash<QUuid, std::pair<glm::quat, bool>>(); -// V8TODO: This can be safely removed as soon as 3D overlays are not used anymore by default scripts -/*EntityItemProperties Overlays::convertOverlayToEntityProperties(QVariantMap& overlayProps, std::pair<glm::quat, bool>& rotationToSave, const QString& type, bool add, const QUuid& id) { - overlayProps["type"] = type; - - SET_OVERLAY_PROP_DEFAULT(alpha, 0.7); - if (type != "PolyLine") { - RENAME_PROP(p1, position); - RENAME_PROP(start, position); - } - RENAME_PROP(point, position); - if (type != "Model") { - RENAME_PROP(scale, dimensions); - } else { - RENAME_PROP(scale, modelScale); - } - RENAME_PROP(size, dimensions); - RENAME_PROP(orientation, rotation); - RENAME_PROP(localOrientation, localRotation); - RENAME_PROP(ignoreRayIntersection, ignorePickIntersection); - - RENAME_PROP_CONVERT(drawInFront, renderLayer, [](const QVariant& v) { return v.toBool() ? "front" : "world"; }); - RENAME_PROP_CONVERT(drawHUDLayer, renderLayer, [=](const QVariant& v) { - bool f = v.toBool(); - if (f) { - return QVariant("hud"); - } else if (overlayProps.contains("renderLayer")) { - return overlayProps["renderLayer"]; - } - return QVariant("world"); - }); - - OVERLAY_TO_GROUP_ENTITY_PROP_DEFAULT(grabbable, grab, grabbable, false); - - OVERLAY_TO_GROUP_ENTITY_PROP(pulseMin, pulse, min); - OVERLAY_TO_GROUP_ENTITY_PROP(pulseMax, pulse, max); - OVERLAY_TO_GROUP_ENTITY_PROP(pulsePeriod, pulse, period); - OVERLAY_TO_GROUP_ENTITY_PROP_CONVERT(colorPulse, pulse, colorMode, [](const QVariant& v) { - float f = v.toFloat(); - if (f > 0.0f) { - return "in"; - } else if (f < 0.0f) { - return "out"; - } - return "none"; - }); - OVERLAY_TO_GROUP_ENTITY_PROP_CONVERT(alphaPulse, pulse, alphaMode, [](const QVariant& v) { - float f = v.toFloat(); - if (f > 0.0f) { - return "in"; - } else if (f < 0.0f) { - return "out"; - } - return "none"; - }); - - RENAME_PROP_CONVERT(textures, textures, [](const QVariant& v) { - auto map = v.toMap(); - if (!map.isEmpty()) { - auto json = QJsonDocument::fromVariant(map); - if (!json.isNull()) { - return QVariant(QString(json.toJson())); - } - } - return v; - }); - - if (type == "Shape" || type == "Box" || type == "Sphere" || type == "Gizmo") { - RENAME_PROP(solid, isSolid); - RENAME_PROP(isFilled, isSolid); - RENAME_PROP(filled, isSolid); - OVERLAY_TO_ENTITY_PROP_CONVERT_DEFAULT(isSolid, primitiveMode, false, [](const QVariant& v) { return v.toBool() ? "solid" : "lines"; }); - - RENAME_PROP(wire, isWire); - RENAME_PROP_CONVERT(isWire, primitiveMode, [](const QVariant& v) { return v.toBool() ? "lines" : "solid"; }); - } - - if (type == "Shape") { - SET_OVERLAY_PROP_DEFAULT(shape, "Hexagon"); - } else if (type == "Model") { - RENAME_PROP(url, modelURL); - RENAME_PROP(animationSettings, animation); - } else if (type == "Image") { - RENAME_PROP(url, imageURL); - } else if (type == "Text") { - RENAME_PROP(color, textColor); - } else if (type == "Web") { - RENAME_PROP(url, sourceUrl); - RENAME_PROP_CONVERT(inputMode, inputMode, [](const QVariant& v) { return v.toString() == "Mouse" ? "mouse" : "touch"; }); - } else if (type == "Gizmo") { - RENAME_PROP(radius, outerRadius); - if (add || overlayProps.contains("outerRadius")) { - float ratio = 2.0f; - { - auto iter = overlayProps.find("outerRadius"); - if (iter != overlayProps.end()) { - ratio = iter.value().toFloat() / 0.5f; - } - } - glm::vec3 dimensions = glm::vec3(1.0f); - { - auto iter = overlayProps.find("dimensions"); - if (iter != overlayProps.end()) { - dimensions = vec3FromVariant(iter.value()); - } else if (!add) { - EntityPropertyFlags desiredProperties; - desiredProperties += PROP_DIMENSIONS; - dimensions = DependencyManager::get<EntityScriptingInterface>()->getEntityProperties(id, desiredProperties).getDimensions(); - } - } - overlayProps["dimensions"] = vec3toVariant(ratio * dimensions); - } - - if (add && !overlayProps.contains("rotation") && !overlayProps.contains("localRotation")) { - overlayProps["rotation"] = quatToVariant(glm::angleAxis(-(float)M_PI_2, Vectors::RIGHT)); - } else if (overlayProps.contains("rotation")) { - glm::quat rotation = quatFromVariant(overlayProps["rotation"]); - overlayProps["rotation"] = quatToVariant(glm::angleAxis(-(float)M_PI_2, rotation * Vectors::RIGHT) * rotation); - } else if (overlayProps.contains("localRotation")) { - glm::quat rotation = quatFromVariant(overlayProps["localRotation"]); - overlayProps["localRotation"] = quatToVariant(glm::angleAxis(-(float)M_PI_2, rotation * Vectors::RIGHT) * rotation); - } - - { - RENAME_PROP(color, innerStartColor); - RENAME_PROP(color, innerEndColor); - RENAME_PROP(color, outerStartColor); - RENAME_PROP(color, outerEndColor); - - RENAME_PROP(startColor, innerStartColor); - RENAME_PROP(startColor, outerStartColor); - - RENAME_PROP(endColor, innerEndColor); - RENAME_PROP(endColor, outerEndColor); - - RENAME_PROP(innerColor, innerStartColor); - RENAME_PROP(innerColor, innerEndColor); - - RENAME_PROP(outerColor, outerStartColor); - RENAME_PROP(outerColor, outerEndColor); - } - - { - RENAME_PROP(alpha, innerStartAlpha); - RENAME_PROP(alpha, innerEndAlpha); - RENAME_PROP(alpha, outerStartAlpha); - RENAME_PROP(alpha, outerEndAlpha); - - RENAME_PROP(startAlpha, innerStartAlpha); - RENAME_PROP(startAlpha, outerStartAlpha); - - RENAME_PROP(endAlpha, innerEndAlpha); - RENAME_PROP(endAlpha, outerEndAlpha); - - RENAME_PROP(innerAlpha, innerStartAlpha); - RENAME_PROP(innerAlpha, innerEndAlpha); - - RENAME_PROP(outerAlpha, outerStartAlpha); - RENAME_PROP(outerAlpha, outerEndAlpha); - } - - OVERLAY_TO_GROUP_ENTITY_PROP(startAt, ring, startAngle); - OVERLAY_TO_GROUP_ENTITY_PROP(endAt, ring, endAngle); - OVERLAY_TO_GROUP_ENTITY_PROP(innerRadius, ring, innerRadius); - - OVERLAY_TO_GROUP_ENTITY_PROP(innerStartColor, ring, innerStartColor); - OVERLAY_TO_GROUP_ENTITY_PROP(innerEndColor, ring, innerEndColor); - OVERLAY_TO_GROUP_ENTITY_PROP(outerStartColor, ring, outerStartColor); - OVERLAY_TO_GROUP_ENTITY_PROP(outerEndColor, ring, outerEndColor); - OVERLAY_TO_GROUP_ENTITY_PROP(innerStartAlpha, ring, innerStartAlpha); - OVERLAY_TO_GROUP_ENTITY_PROP(innerEndAlpha, ring, innerEndAlpha); - OVERLAY_TO_GROUP_ENTITY_PROP(outerStartAlpha, ring, outerStartAlpha); - OVERLAY_TO_GROUP_ENTITY_PROP(outerEndAlpha, ring, outerEndAlpha); - - OVERLAY_TO_GROUP_ENTITY_PROP(hasTickMarks, ring, hasTickMarks); - OVERLAY_TO_GROUP_ENTITY_PROP(majorTickMarksAngle, ring, majorTickMarksAngle); - OVERLAY_TO_GROUP_ENTITY_PROP(minorTickMarksAngle, ring, minorTickMarksAngle); - OVERLAY_TO_GROUP_ENTITY_PROP(majorTickMarksLength, ring, majorTickMarksLength); - OVERLAY_TO_GROUP_ENTITY_PROP(minorTickMarksLength, ring, minorTickMarksLength); - OVERLAY_TO_GROUP_ENTITY_PROP(majorTickMarksColor, ring, majorTickMarksColor); - OVERLAY_TO_GROUP_ENTITY_PROP(minorTickMarksColor, ring, minorTickMarksColor); - } else if (type == "PolyLine") { - RENAME_PROP(startPoint, p1); - RENAME_PROP(start, p1); - RENAME_PROP(endPoint, p2); - RENAME_PROP(end, p2); - - RENAME_PROP(p1, position); - RENAME_PROP_CONVERT(p1, p1, [](const QVariant& v) { return vec3toVariant(glm::vec3(0.0f)); }); - RENAME_PROP_CONVERT(p2, p2, [=](const QVariant& v) { - glm::vec3 position; - bool hasPosition = false; - glm::quat rotation; - bool hasRotation = false; - - auto iter2 = overlayProps.find("position"); - if (iter2 != overlayProps.end()) { - position = vec3FromVariant(iter2.value()); - hasPosition = true; - } - iter2 = overlayProps.find("rotation"); - if (iter2 != overlayProps.end()) { - rotation = quatFromVariant(iter2.value()); - hasRotation = true; - } - - if (!add && !(hasPosition && hasRotation)) { - auto entity = DependencyManager::get<EntityTreeRenderer>()->getEntity(id); - if (entity) { - if (!hasPosition) { - position = entity->getWorldPosition(); - } - if (!hasRotation) { - rotation = entity->getWorldOrientation(); - } - } - } - - return vec3toVariant(glm::inverse(rotation) * (vec3FromVariant(v) - position)); - }); - - RENAME_PROP(localStart, p1); - RENAME_PROP(localEnd, p2); - - { - QVariantList points; - { - auto iter = overlayProps.find("p1"); - if (iter != overlayProps.end()) { - points.push_back(iter.value()); - } - } - { - auto iter = overlayProps.find("p2"); - if (iter != overlayProps.end()) { - points.push_back(iter.value()); - } - } - overlayProps["linePoints"] = points; - } - { - auto iter = overlayProps.find("lineWidth"); - if (iter != overlayProps.end()) { - QVariantList widths; - QVariant width = iter.value(); - widths.append(width); - widths.append(width); - overlayProps["strokeWidths"] = widths; - } - } - - RENAME_PROP_CONVERT(glow, glow, [](const QVariant& v) { return v.toFloat() > 0.0f ? true : false; }); - SET_OVERLAY_PROP_DEFAULT(faceCamera, true); - { - QVariantList normals; - normals.append(vec3toVariant(Vectors::UP)); - normals.append(vec3toVariant(Vectors::UP)); - SET_OVERLAY_PROP_DEFAULT(normals, normals); - } - - SET_OVERLAY_PROP_DEFAULT(textures, PathUtils::resourcesUrl() + "images/whitePixel.png"); - } - - if (type == "Text" || type == "Image" || type == "Grid" || type == "Web") { - glm::quat originalRotation = ENTITY_ITEM_DEFAULT_ROTATION; - bool local = false; - { - auto iter = overlayProps.find("rotation"); - if (iter != overlayProps.end()) { - originalRotation = quatFromVariant(iter.value()); - local = false; - } else { - iter = overlayProps.find("localRotation"); - if (iter != overlayProps.end()) { - originalRotation = quatFromVariant(iter.value()); - local = true; - } else if (!add) { - auto iter2 = savedRotations.find(id); - if (iter2 != savedRotations.end()) { - originalRotation = iter2.value().first; - local = iter2.value().second; - } - } - } - } - - if (!add) { - savedRotations[id] = { originalRotation, local }; - } else { - rotationToSave = { originalRotation, local }; - } - - glm::vec3 dimensions = ENTITY_ITEM_DEFAULT_DIMENSIONS; - { - auto iter = overlayProps.find("dimensions"); - if (iter != overlayProps.end()) { - bool valid = false; - dimensions = vec3FromVariant(iter.value(), valid); - if (!valid) { - dimensions = glm::vec3(vec2FromVariant(iter.value()), 0.0f); - } - } else if (!add) { - EntityPropertyFlags desiredProperties; - desiredProperties += PROP_DIMENSIONS; - dimensions = DependencyManager::get<EntityScriptingInterface>()->getEntityProperties(id, desiredProperties).getDimensions(); - } - } - - bool rotateX = dimensions.y < 0.0f; - bool rotateY = dimensions.x < 0.0f; - - { - glm::quat rotation = originalRotation; - if (rotateX) { - rotation = glm::angleAxis((float)M_PI, rotation * Vectors::RIGHT) * rotation; - } - if (rotateY) { - rotation = glm::angleAxis((float)M_PI, rotation * Vectors::UP) * rotation; - } - - if (local) { - overlayProps["localRotation"] = quatToVariant(rotation); - } else { - overlayProps["rotation"] = quatToVariant(rotation); - } - overlayProps["dimensions"] = vec3toVariant(glm::abs(dimensions)); - } - } - - ScriptEnginePointer scriptEngine = newScriptEngine(); - ScriptValue props = variantMapToScriptValue(overlayProps, *scriptEngine); - //qDebug() << "Overlay props: " << scriptEngine->scriptValueDebugDetails(props); - EntityItemProperties toReturn; - EntityItemPropertiesFromScriptValueHonorReadOnly(props, toReturn); - return toReturn; -}*/ - -// V8TODO: This can be safely removed once scripts don't use 3D overlays -/*QVariantMap Overlays::convertEntityToOverlayProperties(const EntityItemProperties& properties) { - ScriptEnginePointer scriptEngine = newScriptEngine(); - QVariantMap overlayProps = EntityItemPropertiesToScriptValue(scriptEngine.get(), properties).toVariant().toMap(); - - QString type = overlayProps["type"].toString(); - overlayProps["type"] = entityToOverlayType(type); - - if (type != "PolyLine") { - RENAME_PROP(position, p1); - RENAME_PROP(position, start); - } - RENAME_PROP(position, point); - if (type != "Model") { - RENAME_PROP(dimensions, scale); - } else { - RENAME_PROP(modelScale, scale); - } - RENAME_PROP(dimensions, size); - RENAME_PROP(ignorePickIntersection, ignoreRayIntersection); - - { - RENAME_PROP_CONVERT(primitiveMode, isSolid, [](const QVariant& v) { return v.toString() == "solid" ? true : false; }); - RENAME_PROP(isSolid, solid); - RENAME_PROP(isSolid, isFilled); - RENAME_PROP(isSolid, filled); - - RENAME_PROP_CONVERT(primitiveMode, isWire, [](const QVariant& v) { return v.toString() == "lines" ? true : false; }); - RENAME_PROP(isWire, wire); - } - - RENAME_PROP_CONVERT(renderLayer, drawInFront, [](const QVariant& v) { return v.toString() == "front" ? true : false; }); - RENAME_PROP_CONVERT(renderLayer, drawHUDLayer, [](const QVariant& v) { return v.toString() == "hud" ? true : false; }); - - GROUP_ENTITY_TO_OVERLAY_PROP(grab, grabbable, grabbable); - - GROUP_ENTITY_TO_OVERLAY_PROP(pulse, min, pulseMin); - GROUP_ENTITY_TO_OVERLAY_PROP(pulse, max, pulseMax); - GROUP_ENTITY_TO_OVERLAY_PROP(pulse, period, pulsePeriod); - GROUP_ENTITY_TO_OVERLAY_PROP_CONVERT(pulse, colorMode, colorPulse, [](const QVariant& v) { - QString f = v.toString(); - if (f == "in") { - return 1.0f; - } else if (f == "out") { - return -1.0f; - } - return 0.0f; - }); - GROUP_ENTITY_TO_OVERLAY_PROP_CONVERT(pulse, alphaMode, alphaPulse, [](const QVariant& v) { - QString f = v.toString(); - if (f == "in") { - return 1.0f; - } else if (f == "out") { - return -1.0f; - } - return 0.0f; - }); - - if (type == "Model") { - RENAME_PROP(modelURL, url); - RENAME_PROP(animation, animationSettings); - } else if (type == "Image") { - RENAME_PROP(imageURL, url); - } else if (type == "Text") { - RENAME_PROP(textColor, color); - } else if (type == "Web") { - RENAME_PROP(sourceUrl, url); - RENAME_PROP_CONVERT(inputMode, inputMode, [](const QVariant& v) { return v.toString() == "mouse" ? "Mouse" : "Touch"; }); - } else if (type == "Gizmo") { - RENAME_PROP_CONVERT(dimensions, outerRadius, [](const QVariant& v) { return 2.0f * vec3FromVariant(v).x; }); - RENAME_PROP(outerRadius, radius); - - RENAME_PROP_CONVERT(rotation, rotation, [](const QVariant& v) { - glm::quat rot = quatFromVariant(v); - return quatToVariant(glm::angleAxis((float)M_PI_2, rot * Vectors::RIGHT) * rot); - }); - RENAME_PROP_CONVERT(localRotation, localRotation, [](const QVariant& v) { - glm::quat rot = quatFromVariant(v); - return quatToVariant(glm::angleAxis((float)M_PI_2, rot * Vectors::RIGHT) * rot); - }); - - GROUP_ENTITY_TO_OVERLAY_PROP(ring, startAngle, startAt); - GROUP_ENTITY_TO_OVERLAY_PROP(ring, endAngle, endAt); - GROUP_ENTITY_TO_OVERLAY_PROP(ring, innerRadius, innerRadius); - - GROUP_ENTITY_TO_OVERLAY_PROP(ring, innerStartColor, innerStartColor); - GROUP_ENTITY_TO_OVERLAY_PROP(ring, innerEndColor, innerEndColor); - GROUP_ENTITY_TO_OVERLAY_PROP(ring, outerStartColor, outerStartColor); - GROUP_ENTITY_TO_OVERLAY_PROP(ring, outerEndColor, outerEndColor); - GROUP_ENTITY_TO_OVERLAY_PROP(ring, innerStartAlpha, innerStartAlpha); - GROUP_ENTITY_TO_OVERLAY_PROP(ring, innerEndAlpha, innerEndAlpha); - GROUP_ENTITY_TO_OVERLAY_PROP(ring, outerStartAlpha, outerStartAlpha); - GROUP_ENTITY_TO_OVERLAY_PROP(ring, outerEndAlpha, outerEndAlpha); - - GROUP_ENTITY_TO_OVERLAY_PROP(ring, hasTickMarks, hasTickMarks); - GROUP_ENTITY_TO_OVERLAY_PROP(ring, majorTickMarksAngle, majorTickMarksAngle); - GROUP_ENTITY_TO_OVERLAY_PROP(ring, minorTickMarksAngle, minorTickMarksAngle); - GROUP_ENTITY_TO_OVERLAY_PROP(ring, majorTickMarksLength, majorTickMarksLength); - GROUP_ENTITY_TO_OVERLAY_PROP(ring, minorTickMarksLength, minorTickMarksLength); - GROUP_ENTITY_TO_OVERLAY_PROP(ring, majorTickMarksColor, majorTickMarksColor); - GROUP_ENTITY_TO_OVERLAY_PROP(ring, minorTickMarksColor, minorTickMarksColor); - } else if (type == "PolyLine") { - QVector<glm::vec3> points = qVectorVec3FromScriptValue(scriptEngine->newVariant(overlayProps["linePoints"])); - glm::vec3 position = vec3FromVariant(overlayProps["position"]); - if (points.length() > 1) { - overlayProps["p1"] = vec3toVariant(points[0] + position); - overlayProps["p2"] = vec3toVariant(points[1] + position); - - overlayProps["localStart"] = vec3toVariant(points[0]); - overlayProps["localEnd"] = vec3toVariant(points[1]); - } - - RENAME_PROP(p1, startPoint); - RENAME_PROP(p1, start); - RENAME_PROP(p2, endPoint); - RENAME_PROP(p2, end); - - QVector<float> widths = qVectorFloatFromScriptValue(scriptEngine->newVariant(overlayProps["strokeWidths"])); - if (widths.length() > 0) { - overlayProps["lineWidth"] = widths[0]; - } - - RENAME_PROP_CONVERT(glow, glow, [](const QVariant& v) { return v.toBool() ? 1.0f : 0.0f; }); - } - - // Do at the end, in case this type was rotated above - RENAME_PROP(rotation, orientation); - RENAME_PROP(localRotation, localOrientation); - - return overlayProps; -}*/ - QUuid Overlays::addOverlay(const QString& type, const QVariant& properties) { if (_shuttingDown) { return UNKNOWN_ENTITY_ID; @@ -986,51 +406,6 @@ QUuid Overlays::getOverlayAtPoint(const glm::vec2& point) { return bestID; } -QVariant Overlays::getProperty(const QUuid& id, const QString& property) { - /*Overlay::Pointer overlay = get2DOverlay(id); - if (overlay) { - // We don't support getting properties from QML Overlays right now - return QVariant(); - } - - QVariantMap overlayProperties = convertEntityToOverlayProperties(DependencyManager::get<EntityScriptingInterface>()->getEntityProperties(id)); - auto propIter = overlayProperties.find(property); - if (propIter != overlayProperties.end()) { - return propIter.value(); - }*/ - qDebug() << "Overlays::getProperty is not supported anymore"; - return QVariant(); -} - -QVariantMap Overlays::getProperties(const QUuid& id, const QStringList& properties) { - /*Overlay::Pointer overlay = get2DOverlay(id); - QVariantMap result; - if (overlay) { - // We don't support getting properties from QML Overlays right now - return QVariantMap(); - } - - QVariantMap overlayProperties = convertEntityToOverlayProperties(DependencyManager::get<EntityScriptingInterface>()->getEntityProperties(id)); - for (const auto& property : properties) { - auto propIter = overlayProperties.find(property); - if (propIter != overlayProperties.end()) { - result.insert(property, propIter.value()); - } - }*/ - qDebug() << "Overlays::getProperties is not supported anymore"; - QVariantMap result; - return result; -} - -QVariantMap Overlays::getOverlaysProperties(const QVariant& propertiesById) { - QVariantMap map = propertiesById.toMap(); - QVariantMap result; - for (const auto& key : map.keys()) { - result[key] = getProperties(QUuid(key), map[key].toStringList()); - } - return result; -} - RayToOverlayIntersectionResult Overlays::findRayIntersection(const PickRay& ray, bool precisionPicking, const ScriptValue& overlayIDsToInclude, const ScriptValue& overlayIDsToDiscard, @@ -1339,53 +714,10 @@ QVector<QUuid> Overlays::findOverlays(const glm::vec3& center, float radius) { * <td>{@link Overlays.OverlayProperties-Text|OverlayProperties-Text}</td></tr> * <tr><td><code>"cube"</code></td><td>3D</td> * <td><p>A cube. A <code>"shape"</code> overlay can also be used to create a cube.</p> - * <p class="important">Deprecated.</p></td> - * <td>{@link Overlays.OverlayProperties-Cube|OverlayProperties-Cube}</td></tr> - * <tr><td><code>"sphere"</code></td><td>3D</td> - * <td><p>A sphere. A <code>"shape"</code> overlay can also be used to create a sphere.</p> - * <p class="important">Deprecated.</p></td> - * <td>{@link Overlays.OverlayProperties-Sphere|OverlayProperties-Sphere}</td></tr> - * <tr><td><code>"shape"</code></td><td>3D</td> - * <td><p>A geometric shape, such as a cube, sphere, or cylinder.</p> - * <p class="important">Deprecated.</p></td> - * <td>{@link Overlays.OverlayProperties-Shape|OverlayProperties-Shape}</td></tr> - * <tr><td><code>"model"</code></td><td>3D</td> - * <td><p>A model.</p> - * <p class="important">Deprecated.</p></td> - * <td>{@link Overlays.OverlayProperties-Model|OverlayProperties-Model}</td></tr> - * <tr><td><code>"image3d"</code></td><td>3D</td> - * <td><p>An image. Synonym: <code>"billboard"</code>.</p> - * <p class="important">Deprecated.</p></td> - * <td>{@link Overlays.OverlayProperties-Image3D|OverlayProperties-Image3D}</td></tr> - * <tr><td><code>"rectangle3d"</code></td><td>3D</td> - * <td><p>A rectangle.</p> - * <p class="important">Deprecated.</p></td> - * <td>{@link Overlays.OverlayProperties-Rectangle3D|OverlayProperties-Rectangle3D}</td></tr> - * <tr><td><code>"text3d"</code></td><td>3D</td> - * <td><p>Some text.</p> - * <p class="important">Deprecated.</p></td> - * <td>{@link Overlays.OverlayProperties-Text3D|OverlayProperties-Text3D}</td></tr> - * <tr><td><code>"web3d"</code></td><td>3D</td> - * <td><p>Web content.</p> - * <p class="important">Deprecated.</p></td> - * <td>{@link Overlays.OverlayProperties-Web3D|OverlayProperties-Web3D}</td></tr> - * <tr><td><code>"line3d"</code></td><td>3D</td> - * <td><p>A line.</p> - * <p class="important">Deprecated.</p></td> - * <td>{@link Overlays.OverlayProperties-Line3D|OverlayProperties-Line3D}</td></tr> - * <tr><td><code>"grid"</code></td><td>3D</td> - * <td><p>A grid of lines in a plane.</p> - * <p class="important">Deprecated.</p></td> - * <td>{@link Overlays.OverlayProperties-Grid|OverlayProperties-Grid}</td></tr> - * <tr><td><code>"circle3d"</code></td><td>3D</td> - * <td><p>A circle.</p> - * <p class="important">Deprecated.</p></td> - * <td>{@link Overlays.OverlayProperties-Circle3D|OverlayProperties-Circle3D}</td></tr> * </tbody> * </table> * <p>2D overlays are rendered on the display surface in desktop mode and on the HUD surface in HMD mode. 3D overlays are * rendered at a position and orientation in-world.</p> - * <p class="important">3D overlays are deprecated. Use local {@link Entities} instead.</p> * @typedef {string} Overlays.OverlayType */ @@ -1401,17 +733,6 @@ QVector<QUuid> Overlays::findOverlays(const glm::vec3& center, float radius) { * @see {@link Overlays.OverlayProperties-Rectangle|OverlayProperties-Rectangle} * @see {@link Overlays.OverlayProperties-Image|OverlayProperties-Image} * @see {@link Overlays.OverlayProperties-Text|OverlayProperties-Text} - * @see {@link Overlays.OverlayProperties-Cube|OverlayProperties-Cube} — <span class="important">Deprecated.</span> - * @see {@link Overlays.OverlayProperties-Sphere|OverlayProperties-Sphere} — <span class="important">Deprecated.</span> - * @see {@link Overlays.OverlayProperties-Shape|OverlayProperties-Shape} — <span class="important">Deprecated.</span> - * @see {@link Overlays.OverlayProperties-Model|OverlayProperties-Model} — <span class="important">Deprecated.</span> - * @see {@link Overlays.OverlayProperties-Rectangle3D|OverlayProperties-Rectangle3D} — <span class="important">Deprecated.</span> - * @see {@link Overlays.OverlayProperties-Image3D|OverlayProperties-Image3D} — <span class="important">Deprecated.</span> - * @see {@link Overlays.OverlayProperties-Text3D|OverlayProperties-Text3D} — <span class="important">Deprecated.</span> - * @see {@link Overlays.OverlayProperties-Web3D|OverlayProperties-Web3D} — <span class="important">Deprecated.</span> - * @see {@link Overlays.OverlayProperties-Line3D|OverlayProperties-Line3D} — <span class="important">Deprecated.</span> - * @see {@link Overlays.OverlayProperties-Grid|OverlayProperties-Grid} — <span class="important">Deprecated.</span> - * @see {@link Overlays.OverlayProperties-Circle3D|OverlayProperties-Circle3D} — <span class="important">Deprecated.</span> */ /*@jsdoc @@ -1478,613 +799,3 @@ QVector<QUuid> Overlays::findOverlays(const glm::vec3& center, float radius) { * @property {number} borderAlpha=1.0 - The opacity of the border, <code>0.0</code> – <code>1.0</code>. * <em>Write-only.</em> */ - -/*@jsdoc - * The <code>"cube"</code> {@link Overlays.OverlayType|OverlayType} is for 3D cubes. - * It has properties in addition to the common {@link Overlays.OverlayProperties|OverlayProperties}. - * It additionally has properties per the {@link Entities.EntityProperties-Box|Box} entity. - * <p class="important">Deprecated: Use local {@link Entities} instead.</p> - * @typedef {object} Overlays.OverlayProperties-Cube - * @property {string} name - The name of the overlay. - * @property {Color} color=255,255,255 - The color of the overlay. - * @property {number} alpha=0.7 - The opacity of the overlay, <code>0.0</code> – <code>1.0</code>. - * @property {number} pulseMax=0 - The maximum value of the pulse multiplier. - * @property {number} pulseMin=0 - The minimum value of the pulse multiplier. - * @property {number} pulsePeriod=1 - The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from - * <code>pulseMin</code> to <code>pulseMax</code>, then <code>pulseMax</code> to <code>pulseMin</code> in one period. - * @property {number} alphaPulse=0 - If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the - * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 - * the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise - * used.) - * @property {number} colorPulse=0 - If non-zero, the color of the overlay is pulsed: the color value is multiplied by the - * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 - * the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise - * used.) - * - * @property {Vec3} position - The position of the overlay center. Synonyms: <code>p1</code>, <code>point</code>, and - * <code>start</code>. - * @property {Vec3} dimensions - The dimensions of the overlay. Synonyms: <code>scale</code>, <code>size</code>. - * @property {Quat} rotation - The orientation of the overlay. Synonym: <code>orientation</code>. - * @property {Vec3} localPosition - The local position of the overlay relative to its parent if the overlay has a - * <code>parentID</code> set, otherwise the same value as <code>position</code>. - * @property {Quat} localRotation - The orientation of the overlay relative to its parent if the overlay has a - * <code>parentID</code> set, otherwise the same value as <code>rotation</code>. Synonym: <code>localOrientation</code>. - * @property {boolean} isSolid=false - <code>true</code> if the overlay is rendered as a solid, <code>false</code> if it is - * rendered as a wire frame. - * Synonyms: <code>solid</code>, <code>isFilled</code>, and <code>filled</code>. - * Antonyms: <code>isWire</code> and <code>wire</code>. - * @property {boolean} ignorePickIntersection=false - <code>true</code> if {@link Picks} ignore the overlay, <code>false</code> - * if they don't. - * Synonym: <code>ignoreRayIntersection</code>. - * @property {boolean} drawInFront=false - <code>true</code> if the overlay is rendered on top of the world layer but behind - * the HUD surface. - * @property {boolean} drawHUDLayer=false - <code>true</code> if the overlay is rendered in front of everything, including the - * HUD surface. - * @property {boolean} grabbable=false - <code>true</code> if the overlay can be grabbed, <code>false</code> if it can't be. - * @property {Uuid} parentID=null - The avatar, entity, or overlay that the overlay is parented to. - * @property {number} parentJointIndex=65535 - Integer value specifying the joint of the entity or avatar that the entity is - * parented to if <code>parentID</code> is set. Use 65535 or -1 to parent to the parent's position and orientation rather - * than a joint. - */ - -/*@jsdoc - * The <code>"sphere"</code> {@link Overlays.OverlayType|OverlayType} is for 3D spheres. - * It has properties in addition to the common {@link Overlays.OverlayProperties|OverlayProperties}. - * It additionally has properties per the {@link Entities.EntityProperties-Sphere|Sphere} entity. - * <p class="important">Deprecated: Use local {@link Entities} instead.</p> - * @typedef {object} Overlays.OverlayProperties-Sphere - * @property {string} name - The name of the overlay. - * @property {Color} color=255,255,255 - The color of the overlay. - * @property {number} alpha=0.7 - The opacity of the overlay, <code>0.0</code> – <code>1.0</code>. - * @property {number} pulseMax=0 - The maximum value of the pulse multiplier. - * @property {number} pulseMin=0 - The minimum value of the pulse multiplier. - * @property {number} pulsePeriod=1 - The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from - * <code>pulseMin</code> to <code>pulseMax</code>, then <code>pulseMax</code> to <code>pulseMin</code> in one period. - * @property {number} alphaPulse=0 - If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the - * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 - * the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise - * used.) - * @property {number} colorPulse=0 - If non-zero, the color of the overlay is pulsed: the color value is multiplied by the - * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 - * the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise - * used.) - * - * @property {Vec3} position - The position of the overlay center. Synonyms: <code>p1</code>, <code>point</code>, and - * <code>start</code>. - * @property {Vec3} dimensions - The dimensions of the overlay. Synonyms: <code>scale</code>, <code>size</code>. - * @property {Quat} rotation - The orientation of the overlay. Synonym: <code>orientation</code>. - * @property {Vec3} localPosition - The local position of the overlay relative to its parent if the overlay has a - * <code>parentID</code> set, otherwise the same value as <code>position</code>. - * @property {Quat} localRotation - The orientation of the overlay relative to its parent if the overlay has a - * <code>parentID</code> set, otherwise the same value as <code>rotation</code>. Synonym: <code>localOrientation</code>. - * @property {boolean} isSolid=false - <code>true</code> if the overlay is rendered as a solid, <code>false</code> if it is - * rendered as a wire frame. - * Synonyms: <code>solid</code>, <code>isFilled</code>, and <code>filled</code>. - * Antonyms: <code>isWire</code> and <code>wire</code>. - * @property {boolean} ignorePickIntersection=false - <code>true</code> if {@link Picks} ignore the overlay, <code>false</code> - * if they don't. - * Synonym: <code>ignoreRayIntersection</code>. - * @property {boolean} drawInFront=false - <code>true</code> if the overlay is rendered on top of the world layer but behind - * the HUD surface. - * @property {boolean} drawHUDLayer=false - <code>true</code> if the overlay is rendered in front of everything, including the - * HUD surface. - * @property {boolean} grabbable=false - <code>true</code> if the overlay can be grabbed, <code>false</code> if it can't be. - * @property {Uuid} parentID=null - The avatar, entity, or overlay that the overlay is parented to. - * @property {number} parentJointIndex=65535 - Integer value specifying the joint of the entity or avatar that the entity is - * parented to if <code>parentID</code> is set. Use 65535 or -1 to parent to the parent's position and orientation rather - * than a joint. - */ - -/*@jsdoc - * The <code>"rectangle3D"</code> {@link Overlays.OverlayType|OverlayType} is for 3D rectangles. - * It has properties in addition to the common {@link Overlays.OverlayProperties|OverlayProperties}. - * It additionally has properties per the {@link Entities.EntityProperties-Shape|Shape} entity, with the <code>shape</code> - * property value being <code>"Quad"</code>. - * <p class="important">Deprecated: Use local {@link Entities} instead.</p> - * @typedef {object} Overlays.OverlayProperties-Rectangle3D - * @property {string} name - The name of the overlay. - * @property {Color} color=255,255,255 - The color of the overlay. - * @property {number} alpha=0.7 - The opacity of the overlay, <code>0.0</code> – <code>1.0</code>. - * @property {number} pulseMax=0 - The maximum value of the pulse multiplier. - * @property {number} pulseMin=0 - The minimum value of the pulse multiplier. - * @property {number} pulsePeriod=1 - The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from - * <code>pulseMin</code> to <code>pulseMax</code>, then <code>pulseMax</code> to <code>pulseMin</code> in one period. - * @property {number} alphaPulse=0 - If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the - * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 - * the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise - * used.) - * @property {number} colorPulse=0 - If non-zero, the color of the overlay is pulsed: the color value is multiplied by the - * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 - * the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise - * used.) - * - * @property {Vec3} position - The position of the overlay center. Synonyms: <code>p1</code>, <code>point</code>, and - * <code>start</code>. - * @property {Vec3} dimensions - The dimensions of the overlay. Synonyms: <code>scale</code>, <code>size</code>. - * @property {Quat} rotation - The orientation of the overlay. Synonym: <code>orientation</code>. - * @property {Vec3} localPosition - The local position of the overlay relative to its parent if the overlay has a - * <code>parentID</code> set, otherwise the same value as <code>position</code>. - * @property {Quat} localRotation - The orientation of the overlay relative to its parent if the overlay has a - * <code>parentID</code> set, otherwise the same value as <code>rotation</code>. Synonym: <code>localOrientation</code>. - * @property {boolean} isSolid=false - <code>true</code> if the overlay is rendered as a solid, <code>false</code> if it is - * rendered as a wire frame. - * Synonyms: <code>solid</code>, <code>isFilled</code>, and <code>filled</code>. - * Antonyms: <code>isWire</code> and <code>wire</code>. - * @property {boolean} ignorePickIntersection=false - <code>true</code> if {@link Picks} ignore the overlay, <code>false</code> - * if they don't. - * Synonym: <code>ignoreRayIntersection</code>. - * @property {boolean} drawInFront=false - <code>true</code> if the overlay is rendered on top of the world layer but behind - * the HUD surface. - * @property {boolean} drawHUDLayer=false - <code>true</code> if the overlay is rendered in front of everything, including the - * HUD surface. - * @property {boolean} grabbable=false - <code>true</code> if the overlay can be grabbed, <code>false</code> if it can't be. - * @property {Uuid} parentID=null - The avatar, entity, or overlay that the overlay is parented to. - * @property {number} parentJointIndex=65535 - Integer value specifying the joint of the entity or avatar that the entity is - * parented to if <code>parentID</code> is set. Use 65535 or -1 to parent to the parent's position and orientation rather - * than a joint. - */ - -/*@jsdoc - * <p>A <code>"shape"</code> {@link Overlays.OverlayType|OverlayType} may display as one of the following geometrical - * shapes:</p> - * <table> - * <thead> - * <tr><th>Value</th><th>Dimensions</th><th>Description</th></tr> - * </thead> - * <tbody> - * <tr><td><code>"Circle"</code></td><td>2D</td><td>A circle oriented in 3D.</td></tr> - * <tr><td><code>"Cone"</code></td><td>3D</td><td></td></tr> - * <tr><td><code>"Cube"</code></td><td>3D</td><td></td></tr> - * <tr><td><code>"Cylinder"</code></td><td>3D</td><td></td></tr> - * <tr><td><code>"Dodecahedron"</code></td><td>3D</td><td></td></tr> - * <tr><td><code>"Hexagon"</code></td><td>3D</td><td>A hexagonal prism.</td></tr> - * <tr><td><code>"Icosahedron"</code></td><td>3D</td><td></td></tr> - * <tr><td><code>"Octagon"</code></td><td>3D</td><td>An octagonal prism.</td></tr> - * <tr><td><code>"Octahedron"</code></td><td>3D</td><td></td></tr> - * <tr><td><code>"Quad"</code></td><td>2D</td><td>A square oriented in 3D.</tr> - * <tr><td><code>"Sphere"</code></td><td>3D</td><td></td></tr> - * <tr><td><code>"Tetrahedron"</code></td><td>3D</td><td></td></tr> - * <tr><td><code>"Torus"</code></td><td>3D</td><td><em>Not implemented.</em></td></tr> - * <tr><td><code>"Triangle"</code></td><td>3D</td><td>A triangular prism.</td></tr> - * </tbody> - * </table> - * @typedef {string} Overlays.Shape - */ - -/*@jsdoc - * The <code>"shape"</code> {@link Overlays.OverlayType|OverlayType} is for 3D shapes. - * It has properties in addition to the common {@link Overlays.OverlayProperties|OverlayProperties}. - * It additionally has properties per the {@link Entities.EntityProperties-Shape|Shape} entity. - * <p class="important">Deprecated: Use local {@link Entities} instead.</p> - * @typedef {object} Overlays.OverlayProperties-Shape - * @property {string} name - The name of the overlay. - * @property {Color} color=255,255,255 - The color of the overlay. - * @property {number} alpha=0.7 - The opacity of the overlay, <code>0.0</code> – <code>1.0</code>. - * @property {number} pulseMax=0 - The maximum value of the pulse multiplier. - * @property {number} pulseMin=0 - The minimum value of the pulse multiplier. - * @property {number} pulsePeriod=1 - The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from - * <code>pulseMin</code> to <code>pulseMax</code>, then <code>pulseMax</code> to <code>pulseMin</code> in one period. - * @property {number} alphaPulse=0 - If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the - * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 - * the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise - * used.) - * @property {number} colorPulse=0 - If non-zero, the color of the overlay is pulsed: the color value is multiplied by the - * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 - * the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise - * used.) - * - * @property {Vec3} position - The position of the overlay center. Synonyms: <code>p1</code>, <code>point</code>, and - * <code>start</code>. - * @property {Vec3} dimensions - The dimensions of the overlay. Synonyms: <code>scale</code>, <code>size</code>. - * @property {Quat} rotation - The orientation of the overlay. Synonym: <code>orientation</code>. - * @property {Vec3} localPosition - The local position of the overlay relative to its parent if the overlay has a - * <code>parentID</code> set, otherwise the same value as <code>position</code>. - * @property {Quat} localRotation - The orientation of the overlay relative to its parent if the overlay has a - * <code>parentID</code> set, otherwise the same value as <code>rotation</code>. Synonym: <code>localOrientation</code>. - * @property {boolean} isSolid=false - <code>true</code> if the overlay is rendered as a solid, <code>false</code> if it is - * rendered as a wire frame. - * Synonyms: <code>solid</code>, <code>isFilled</code>, and <code>filled</code>. - * Antonyms: <code>isWire</code> and <code>wire</code>. - * @property {boolean} ignorePickIntersection=false - <code>true</code> if {@link Picks} ignore the overlay, <code>false</code> - * if they don't. - * Synonym: <code>ignoreRayIntersection</code>. - * @property {boolean} drawInFront=false - <code>true</code> if the overlay is rendered on top of the world layer but behind - * the HUD surface. - * @property {boolean} drawHUDLayer=false - <code>true</code> if the overlay is rendered in front of everything, including the - * HUD surface. - * @property {boolean} grabbable=false - <code>true</code> if the overlay can be grabbed, <code>false</code> if it can't be. - * @property {Uuid} parentID=null - The avatar, entity, or overlay that the overlay is parented to. - * @property {number} parentJointIndex=65535 - Integer value specifying the joint of the entity or avatar that the entity is - * parented to if <code>parentID</code> is set. Use 65535 or -1 to parent to the parent's position and orientation rather - * than a joint. - * - * @property {Overlays.Shape} shape=Hexagon - The geometrical shape of the overlay. - */ - -/*@jsdoc - * The <code>"model"</code> {@link Overlays.OverlayType|OverlayType} is for 3D models. - * It has properties in addition to the common {@link Overlays.OverlayProperties|OverlayProperties}. - * It additionally has properties per the {@link Entities.EntityProperties-Model|Model} entity. - * <p class="important">Deprecated: Use local {@link Entities} instead.</p> - * @typedef {object} Overlays.OverlayProperties-Model - * @property {string} name - The name of the overlay. - * - * @property {Vec3} position - The position of the overlay center. Synonyms: <code>p1</code>, <code>point</code>, and - * <code>start</code>. - * @property {Vec3} dimensions - The dimensions of the overlay. Synonyms: <code>size</code>. - * @property {Vec3} scale - The scale factor applied to the model's dimensions. - * @property {Quat} rotation - The orientation of the overlay. Synonym: <code>orientation</code>. - * @property {Vec3} localPosition - The local position of the overlay relative to its parent if the overlay has a - * <code>parentID</code> set, otherwise the same value as <code>position</code>. - * @property {Quat} localRotation - The orientation of the overlay relative to its parent if the overlay has a - * <code>parentID</code> set, otherwise the same value as <code>rotation</code>. Synonym: <code>localOrientation</code>. - * @property {boolean} ignorePickIntersection=false - <code>true</code> if {@link Picks} ignore the overlay, <code>false</code> - * if they don't. - * Synonym: <code>ignoreRayIntersection</code>. - * @property {boolean} drawInFront=false - <code>true</code> if the overlay is rendered on top of the world layer but behind - * the HUD surface. - * @property {boolean} drawHUDLayer=false - <code>true</code> if the overlay is rendered in front of everything, including the - * HUD surface. - * @property {boolean} grabbable=false - <code>true</code> if the overlay can be grabbed, <code>false</code> if it can't be. - * @property {Uuid} parentID=null - The avatar, entity, or overlay that the overlay is parented to. - * @property {number} parentJointIndex=65535 - Integer value specifying the joint of the entity or avatar that the entity is - * parented to if <code>parentID</code> is set. Use 65535 or -1 to parent to the parent's position and orientation rather - * than a joint. - * - * @property {string} url - The URL of the glTF, FBX, or OBJ model used for the overlay. glTF models may be in JSON or binary - * format (".gltf" or ".glb" URLs respectively). Baked models' URLs have ".baked" before the file type. Model files may - * also be compressed in GZ format, in which case the URL ends in ".gz". - * @property {number} loadPriority=0.0 - The priority for loading and displaying the overlay. Overlays with higher values load - * first. <em>Currently not used.</em> - * @property {Object.<string, string>|string} textures - Texture name, URL pairs used when rendering the model in place of the - * model's original textures, per the {@link Entities.EntityProperties-Model} property of the same name. - * <p>The value can be an object or a JSON string when setting the value; it is a JSON string when getting the value.</p> - * @property {Entities.AnimationProperties} animationSettings - An animation to play on the model. - */ - -/*@jsdoc - * The <code>"text3D"</code> {@link Overlays.OverlayType|OverlayType} is for 3D text. - * It has properties in addition to the common {@link Overlays.OverlayProperties|OverlayProperties}. - * It additionally has properties per the {@link Entities.EntityProperties-Text|Text} entity. - * <p class="important">Deprecated: Use local {@link Entities} instead.</p> - * @typedef {object} Overlays.OverlayProperties-Text3D - * @property {string} name - The name of the overlay. - * @property {Color} color=255,255,255 - The color of the overlay text. Synonym: <code>textColor</code>. - * @property {number} alpha=0.7 - The opacity of the overlay text, <code>0.0</code> – <code>1.0</code>. - * <p><em>Currently not used; use <code>textAlpha</code> instead.</em></p> - * @comment CURRENTLY BROKEN - * @property {number} pulseMax=0 - The maximum value of the pulse multiplier. - * @property {number} pulseMin=0 - The minimum value of the pulse multiplier. - * @property {number} pulsePeriod=1 - The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from - * <code>pulseMin</code> to <code>pulseMax</code>, then <code>pulseMax</code> to <code>pulseMin</code> in one period. - * @property {number} alphaPulse=0 - If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the - * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 - * the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise - * used.) - * @property {number} colorPulse=0 - If non-zero, the color of the overlay is pulsed: the color value is multiplied by the - * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 - * the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise - * used.) - * - * @property {Vec3} position - The position of the overlay center. Synonyms: <code>p1</code>, <code>point</code>, and - * <code>start</code>. - * @property {Vec3} dimensions - The dimensions of the overlay. Synonyms: <code>scale</code>, <code>size</code>. - * @property {Quat} rotation - The orientation of the overlay. Synonym: <code>orientation</code>. - * @property {Vec3} localPosition - The local position of the overlay relative to its parent if the overlay has a - * <code>parentID</code> set, otherwise the same value as <code>position</code>. - * @property {Quat} localRotation - The orientation of the overlay relative to its parent if the overlay has a - * <code>parentID</code> set, otherwise the same value as <code>rotation</code>. Synonym: <code>localOrientation</code>. - * @property {boolean} ignorePickIntersection=false - <code>true</code> if {@link Picks} ignore the overlay, <code>false</code> - * if they don't. - * Synonym: <code>ignoreRayIntersection</code>. - * @property {boolean} drawInFront=false - <code>true</code> if the overlay is rendered on top of the world layer but behind - * the HUD surface. - * @property {boolean} drawHUDLayer=false - <code>true</code> if the overlay is rendered in front of everything, including the - * HUD surface. - * @property {boolean} grabbable=false - <code>true</code> if the overlay can be grabbed, <code>false</code> if it can't be. - * @property {Uuid} parentID=null - The avatar, entity, or overlay that the overlay is parented to. - * @property {number} parentJointIndex=65535 - Integer value specifying the joint of the entity or avatar that the entity is - * parented to if <code>parentID</code> is set. Use 65535 or -1 to parent to the parent's position and orientation rather - * than a joint. - */ - -/*@jsdoc - * The <code>"image3D"</code> {@link Overlays.OverlayType|OverlayType} is for 3D images. - * It has properties in addition to the common {@link Overlays.OverlayProperties|OverlayProperties}. - * It additionally has properties per the {@link Entities.EntityProperties-Image|Image} entity. - * <p class="important">Deprecated: Use local {@link Entities} instead.</p> - * @typedef {object} Overlays.OverlayProperties-Image3D - * @property {string} name - The name of the overlay. - * @property {Color} color=255,255,255 - The color of the overlay. - * @property {number} alpha=0.7 - The opacity of the overlay, <code>0.0</code> – <code>1.0</code>. - * @property {number} pulseMax=0 - The maximum value of the pulse multiplier. - * @property {number} pulseMin=0 - The minimum value of the pulse multiplier. - * @property {number} pulsePeriod=1 - The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from - * <code>pulseMin</code> to <code>pulseMax</code>, then <code>pulseMax</code> to <code>pulseMin</code> in one period. - * @property {number} alphaPulse=0 - If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the - * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 - * the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise - * used.) - * @property {number} colorPulse=0 - If non-zero, the color of the overlay is pulsed: the color value is multiplied by the - * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 - * the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise - * used.) - * - * @property {Vec3} position - The position of the overlay center. Synonyms: <code>p1</code>, <code>point</code>, and - * <code>start</code>. - * @property {Vec3} dimensions - The dimensions of the overlay. Synonyms: <code>scale</code>, <code>size</code>. - * @property {Quat} rotation - The orientation of the overlay. Synonym: <code>orientation</code>. - * @property {Vec3} localPosition - The local position of the overlay relative to its parent if the overlay has a - * <code>parentID</code> set, otherwise the same value as <code>position</code>. - * @property {Quat} localRotation - The orientation of the overlay relative to its parent if the overlay has a - * <code>parentID</code> set, otherwise the same value as <code>rotation</code>. Synonym: <code>localOrientation</code>. - * @property {boolean} ignorePickIntersection=false - <code>true</code> if {@link Picks} ignore the overlay, <code>false</code> - * if they don't. - * Synonym: <code>ignoreRayIntersection</code>. - * @property {boolean} drawInFront=false - <code>true</code> if the overlay is rendered on top of the world layer but behind - * the HUD surface. - * @property {boolean} drawHUDLayer=false - <code>true</code> if the overlay is rendered in front of everything, including the - * HUD surface. - * @property {boolean} grabbable=false - <code>true</code> if the overlay can be grabbed, <code>false</code> if it can't be. - * @property {Uuid} parentID=null - The avatar, entity, or overlay that the overlay is parented to. - * @property {number} parentJointIndex=65535 - Integer value specifying the joint of the entity or avatar that the entity is - * parented to if <code>parentID</code> is set. Use 65535 or -1 to parent to the parent's position and orientation rather - * than a joint. - * - * @property {string} url - The URL of the image to display. - */ - -/*@jsdoc - * The <code>"web3d"</code> {@link Overlays.OverlayType|OverlayType} is for 3D web surfaces. - * It has properties in addition to the common {@link Overlays.OverlayProperties|OverlayProperties}. - * It additionally has properties per the {@link Entities.EntityProperties-Web|Web} entity. - * <p class="important">Deprecated: Use local {@link Entities} instead.</p> - * @typedef {object} Overlays.OverlayProperties-Web3D - * @property {string} name - The name of the overlay. - * @property {Color} color=255,255,255 - The color of the overlay. - * @property {number} alpha=0.7 - The opacity of the overlay, <code>0.0</code> – <code>1.0</code>. - * @property {number} pulseMax=0 - The maximum value of the pulse multiplier. - * @property {number} pulseMin=0 - The minimum value of the pulse multiplier. - * @property {number} pulsePeriod=1 - The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from - * <code>pulseMin</code> to <code>pulseMax</code>, then <code>pulseMax</code> to <code>pulseMin</code> in one period. - * @property {number} alphaPulse=0 - If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the - * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 - * the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise - * used.) - * @property {number} colorPulse=0 - If non-zero, the color of the overlay is pulsed: the color value is multiplied by the - * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 - * the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise - * used.) - * - * @property {Vec3} position - The position of the overlay center. Synonyms: <code>p1</code>, <code>point</code>, and - * <code>start</code>. - * @property {Vec3} dimensions - The dimensions of the overlay. Synonyms: <code>scale</code>, <code>size</code>. - * @property {Quat} rotation - The orientation of the overlay. Synonym: <code>orientation</code>. - * @property {Vec3} localPosition - The local position of the overlay relative to its parent if the overlay has a - * <code>parentID</code> set, otherwise the same value as <code>position</code>. - * @property {Quat} localRotation - The orientation of the overlay relative to its parent if the overlay has a - * <code>parentID</code> set, otherwise the same value as <code>rotation</code>. Synonym: <code>localOrientation</code>. - * @property {boolean} ignorePickIntersection=false - <code>true</code> if {@link Picks} ignore the overlay, <code>false</code> - * if they don't. - * Synonym: <code>ignoreRayIntersection</code>. - * @property {boolean} drawInFront=false - <code>true</code> if the overlay is rendered on top of the world layer but behind - * the HUD surface. - * @property {boolean} drawHUDLayer=false - <code>true</code> if the overlay is rendered in front of everything, including the - * HUD surface. - * @property {boolean} grabbable=false - <code>true</code> if the overlay can be grabbed, <code>false</code> if it can't be. - * @property {Uuid} parentID=null - The avatar, entity, or overlay that the overlay is parented to. - * @property {number} parentJointIndex=65535 - Integer value specifying the joint of the entity or avatar that the entity is - * parented to if <code>parentID</code> is set. Use 65535 or -1 to parent to the parent's position and orientation rather - * than a joint. - * - * @property {string} url - The URL of the web page to display. - */ - -/*@jsdoc - * The <code>"line3d"</code> {@link Overlays.OverlayType|OverlayType} is for 3D lines. - * It has properties in addition to the common {@link Overlays.OverlayProperties|OverlayProperties}. - * It additionally has properties per the {@link Entities.EntityProperties-PolyLine|PolyLine} entity. - * <p class="important">Deprecated: Use local {@link Entities} instead.</p> - * @typedef {object} Overlays.OverlayProperties-Line3D - * @property {string} name - The name of the overlay. - * @property {Color} color=255,255,255 - The color of the overlay. - * @property {number} alpha=0.7 - The opacity of the overlay, <code>0.0</code> – <code>1.0</code>. - * - * @property {Vec3} position - The position of the overlay center. Synonyms: <code>p1</code>, <code>point</code>, and - * <code>start</code>. - * @property {Vec3} dimensions - The dimensions of the overlay. Synonyms: <code>scale</code>, <code>size</code>. - * @property {Quat} rotation - The orientation of the overlay. Synonym: <code>orientation</code>. - * @property {Vec3} localPosition - The local position of the overlay relative to its parent if the overlay has a - * <code>parentID</code> set, otherwise the same value as <code>position</code>. - * @property {Quat} localRotation - The orientation of the overlay relative to its parent if the overlay has a - * <code>parentID</code> set, otherwise the same value as <code>rotation</code>. Synonym: <code>localOrientation</code>. - * @property {boolean} ignorePickIntersection=false - <code>true</code> if {@link Picks} ignore the overlay, <code>false</code> - * if they don't. - * Synonym: <code>ignoreRayIntersection</code>. - * @property {boolean} drawInFront=false - <code>true</code> if the overlay is rendered on top of the world layer but behind - * the HUD surface. - * @property {boolean} drawHUDLayer=false - <code>true</code> if the overlay is rendered in front of everything, including the - * HUD surface. - * @property {boolean} grabbable=false - <code>true</code> if the overlay can be grabbed, <code>false</code> if it can't be. - * @property {Uuid} parentID=null - The avatar, entity, or overlay that the overlay is parented to. - * <p><em>Currently doesn't work.</em></p> - * @comment CURRENTLY BROKEN - * @property {number} parentJointIndex=65535 - Integer value specifying the joint of the entity or avatar that the entity is - * parented to if <code>parentID</code> is set. Use 65535 or -1 to parent to the parent's position and orientation rather - * than a joint. - * - * @property {Uuid} endParentID=null - The avatar, entity, or overlay that the end point of the line is parented to. - * <p><em>Currently doesn't work.</em></p> - * @comment CURRENTLY BROKEN - * @property {number} endParentJointIndex=65535 - Integer value specifying the skeleton joint that the end point of the line is - * attached to if <code>parentID</code> is an avatar skeleton. A value of <code>65535</code> means "no joint". - * <p><em>Currently doesn't work.</em></p> - * @comment CURRENTLY BROKEN - - * @property {Vec3} start - The start point of the line. Synonyms: <code>startPoint</code> and <code>p1</code>. - * <p><strong>Note:</strong> If <code>parentID</code> is set, use <code>localStart</code> to set the local position of the - * start point.</p> - * @property {Vec3} end - The end point of the line. Synonyms: <code>endPoint</code> and <code>p2</code>. - * <p><strong>Note:</strong> If <code>parentID</code> is set, use <code>localEnd</code> to set the local position of the - * end point.</p> - - * @property {Vec3} localStart - The local position of the overlay relative to its parent if the overlay has a - * <code>parentID</code> set, otherwise the same value as <code>start</code>. - * <p><em>Currently doesn't work.</em></p> - * @comment CURRENTLY BROKEN - * @property {Vec3} localEnd - The local position of the overlay relative to its parent if the overlay has a - * <code>endParentID</code> set, otherwise the same value as <code>end</code>. - * <p><em>Currently doesn't work.</em></p> - * @comment CURRENTLY BROKEN - - * @property {number} length - The length of the line, in meters. This can be set after creating a line with start and end - * points. - * <p><em>Currently doesn't work.</em></p> - * @comment CURRENTLY BROKEN - - * @property {number} glow=0 - If <code>glow > 0</code>, the line is rendered with a glow. - * @property {number} lineWidth=0.02 - Width of the line, in meters. - * <p><em>You can set this property's value but currently cannot retrieve its value. Use the <code>strokeWidths</code> - * property to retrieve its value instead.</em></p> - */ - -/*@jsdoc - * The <code>"grid"</code> {@link Overlays.OverlayType|OverlayType} is for 3D grids. - * It has properties in addition to the common {@link Overlays.OverlayProperties|OverlayProperties}. - * It additionally has properties per the {@link Entities.EntityProperties-Grid|Grid} entity. - * <p class="important">Deprecated: Use local {@link Entities} instead.</p> - * @typedef {object} Overlays.OverlayProperties-Grid - * @property {string} name - The name of the overlay. - * @property {Color} color=255,255,255 - The color of the overlay. - * @property {number} alpha=0.7 - The opacity of the overlay, <code>0.0</code> – <code>1.0</code>. - * @property {number} pulseMax=0 - The maximum value of the pulse multiplier. - * @property {number} pulseMin=0 - The minimum value of the pulse multiplier. - * @property {number} pulsePeriod=1 - The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from - * <code>pulseMin</code> to <code>pulseMax</code>, then <code>pulseMax</code> to <code>pulseMin</code> in one period. - * @property {number} alphaPulse=0 - If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the - * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 - * the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise - * used.) - * @property {number} colorPulse=0 - If non-zero, the color of the overlay is pulsed: the color value is multiplied by the - * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 - * the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise - * used.) - * - * @property {Vec3} position - The position of the overlay center. Synonyms: <code>p1</code>, <code>point</code>, and - * <code>start</code>. - * @property {Vec3} dimensions - The dimensions of the overlay. Synonyms: <code>scale</code>, <code>size</code>. - * @property {Quat} rotation - The orientation of the overlay. Synonym: <code>orientation</code>. - * @property {Vec3} localPosition - The local position of the overlay relative to its parent if the overlay has a - * <code>parentID</code> set, otherwise the same value as <code>position</code>. - * @property {Quat} localRotation - The orientation of the overlay relative to its parent if the overlay has a - * <code>parentID</code> set, otherwise the same value as <code>rotation</code>. Synonym: <code>localOrientation</code>. - * @property {boolean} ignorePickIntersection=false - <code>true</code> if {@link Picks} ignore the overlay, <code>false</code> - * if they don't. - * Synonym: <code>ignoreRayIntersection</code>. - * @property {boolean} drawInFront=false - <code>true</code> if the overlay is rendered on top of the world layer but behind - * the HUD surface. - * @property {boolean} drawHUDLayer=false - <code>true</code> if the overlay is rendered in front of everything, including the - * HUD surface. - * @property {boolean} grabbable=false - <code>true</code> if the overlay can be grabbed, <code>false</code> if it can't be. - * @property {Uuid} parentID=null - The avatar, entity, or overlay that the overlay is parented to. - * @property {number} parentJointIndex=65535 - Integer value specifying the joint of the entity or avatar that the entity is - * parented to if <code>parentID</code> is set. Use 65535 or -1 to parent to the parent's position and orientation rather - * than a joint. - */ - -/*@jsdoc - * The <code>"circle3d"</code> {@link Overlays.OverlayType|OverlayType} is for 3D circles. - * It has properties in addition to the common {@link Overlays.OverlayProperties|OverlayProperties}. - * It additionally has properties per the {@link Entities.EntityProperties-Gizmo|Gizmo} entity, with the - * <code>gizmoType</code> property value being <code>"ring"</code>. - * <p class="important">Deprecated: Use local {@link Entities} instead.</p> - * @typedef {object} Overlays.OverlayProperties-Circle3D - * @property {string} name - The name of the overlay. - * @property {number} pulseMax=0 - The maximum value of the pulse multiplier. - * @property {number} pulseMin=0 - The minimum value of the pulse multiplier. - * @property {number} pulsePeriod=1 - The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from - * <code>pulseMin</code> to <code>pulseMax</code>, then <code>pulseMax</code> to <code>pulseMin</code> in one period. - * @property {number} alphaPulse=0 - If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the - * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 - * the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise - * used.) - * @property {number} colorPulse=0 - If non-zero, the color of the overlay is pulsed: the color value is multiplied by the - * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 - * the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise - * used.) - * - * @property {Vec3} position - The position of the overlay center. Synonyms: <code>p1</code>, <code>point</code>, and - * <code>start</code>. - * @property {Vec3} dimensions - The dimensions of the overlay. Synonyms: <code>scale</code>, <code>size</code>. - * <em>Read-only.</em> - * @property {Quat} rotation - The orientation of the overlay. Synonym: <code>orientation</code>. - * @property {Vec3} localPosition - The local position of the overlay relative to its parent if the overlay has a - * <code>parentID</code> set, otherwise the same value as <code>position</code>. - * @property {Quat} localRotation - The orientation of the overlay relative to its parent if the overlay has a - * <code>parentID</code> set, otherwise the same value as <code>rotation</code>. Synonym: <code>localOrientation</code>. - * @property {boolean} isSolid=false - <code>true</code> if the overlay is rendered as a solid, <code>false</code> if it is - * rendered as a wire frame. - * Synonyms: <code>solid</code>, <code>isFilled</code>, and <code>filled</code>. - * Antonyms: <code>isWire</code> and <code>wire</code>. - * @property {boolean} ignorePickIntersection=false - <code>true</code> if {@link Picks} ignore the overlay, <code>false</code> - * if they don't. - * Synonym: <code>ignoreRayIntersection</code>. - * @property {boolean} drawInFront=false - <code>true</code> if the overlay is rendered on top of the world layer but behind - * the HUD surface. - * @property {boolean} drawHUDLayer=false - <code>true</code> if the overlay is rendered in front of everything, including the - * HUD surface. - * @property {boolean} grabbable=false - <code>true</code> if the overlay can be grabbed, <code>false</code> if it can't be. - * @property {Uuid} parentID=null - The avatar, entity, or overlay that the overlay is parented to. - * @property {number} parentJointIndex=65535 - Integer value specifying the joint of the entity or avatar that the entity is - * parented to if <code>parentID</code> is set. Use 65535 or -1 to parent to the parent's position and orientation rather - * than a joint. - * - * @property {number} startAt=0 - The counter-clockwise angle from the overlay's x-axis that drawing starts at, in degrees. - * @property {number} endAt=360 - The counter-clockwise angle from the overlay's x-axis that drawing ends at, in degrees. - * @property {number} outerRadius=1 - The outer radius of the overlay in meters. Synonym: <code>radius</code>. - * @property {number} innerRadius=0 - The inner radius of the overlay in meters. - * @property {Color} color - Sets the color of the overlay. Setting this value sets the values of <code>innerStartColor</code>, - * <code>innerEndColor</code>, <code>outerStartColor</code>, and <code>outerEndColor</code>. - * <em>Write-only.</em> - * @property {Color} startColor - Sets the values of <code>innerStartColor</code> and <code>outerStartColor</code>. - * <em>Write-only.</em> - * @property {Color} endColor - Sets the values of <code>innerEndColor</code> and <code>outerEndColor</code>. - * <em>Write-only.</em> - * @property {Color} innerColor - Sets the values of <code>innerStartColor</code> and <code>innerEndColor</code>. - * <em>Write-only.</em> - * @property {Color} outerColor - Sets the values of <code>outerStartColor</code> and <code>outerEndColor</code>. - * <em>Write-only.</em> - * @property {Color} innerStartcolor=255,255,255 - The color at the inner start point of the overlay. - * @property {Color} innerEndColor=255,255,255 - The color at the inner end point of the overlay. - * @property {Color} outerStartColor=255,255,255 - The color at the outer start point of the overlay. - * @property {Color} outerEndColor=255,255,255 - The color at the outer end point of the overlay. - * @property {number} alpha - Sets the opacity of the overlay, <code>0.0</code> – <code>1.0</code>. Setting this value - * sets the values of <code>innerStartAlpha</code>, <code>innerEndAlpha</code>, <code>outerStartAlpha</code>, and - * <code>outerEndAlpha</code>. Synonym: <code>Alpha</code>. - * @property {number} startAlpha - Sets the values of <code>innerStartAlpha</code> and <code>outerStartAlpha</code>. - * <em>Write-only.</em> - * @property {number} endAlpha - Sets the values of <code>innerEndAlpha</code> and <code>outerEndAlpha</code>. - * <em>Write-only.</em> - * @property {number} innerAlpha - Sets the values of <code>innerStartAlpha</code> and <code>innerEndAlpha</code>. - * <em>Write-only.</em> - * @property {number} outerAlpha - Sets the values of <code>outerStartAlpha</code> and <code>outerEndAlpha</code>. - * <em>Write-only.</em> - * @property {number} innerStartAlpha=0.7 - The opacity at the inner start point of the overlay, <code>0.0</code> – - * <code>1.0</code>. - * @property {number} innerEndAlpha=0.7 - The opacity at the inner end point of the overlay, <code>0.0</code> – - * <code>1.0</code>. - * @property {number} outerStartAlpha=0.7 - The opacity at the outer start point of the overlay, <code>0.0</code> – - * <code>1.0</code>. - * @property {number} outerEndAlpha=0.7 - The opacity at the outer end point of the overlay, <code>0.0</code> – - * <code>1.0</code>. - * - * @property {boolean} hasTickMarks=false - <code>true</code> if tick marks are drawn, <code>false</code> if they aren't. - * @property {number} majorTickMarksAngle=0 - The angle between major tick marks, in degrees. - * @property {number} minorTickMarksAngle=0 - The angle between minor tick marks, in degrees. - * @property {number} majorTickMarksLength=0 - The length of the major tick marks, in meters. A positive value draws tick marks - * outwards from the inner radius; a negative value draws tick marks inwards from the outer radius. - * @property {number} minorTickMarksLength=0 - The length of the minor tick marks, in meters. A positive value draws tick marks - * outwards from the inner radius; a negative value draws tick marks inwards from the outer radius. - * @property {Color} majorTickMarksColor=0,0,0 - The color of the major tick marks. - * @property {Color} minorTickMarksColor=0,0,0 - The color of the minor tick marks. - */ diff --git a/interface/src/ui/overlays/Overlays.h b/interface/src/ui/overlays/Overlays.h index f96424553e..5f3d631a36 100644 --- a/interface/src/ui/overlays/Overlays.h +++ b/interface/src/ui/overlays/Overlays.h @@ -77,8 +77,6 @@ public: * <p><strong>Note:</strong> 3D overlays are local {@link Entities}, internally, so many of the methods also work with * entities.</p> * - * <p class="important">3D overlays are deprecated: Use local {@link Entities} for these instead.</p> - * * @namespace Overlays * * @hifi-interface @@ -311,75 +309,7 @@ public slots: * }); */ QUuid getOverlayAtPoint(const glm::vec2& point); - - /*@jsdoc - * Gets a specified property value of a 3D overlay (or entity). - * <p><strong>Note:</strong> 2D overlays' property values cannot be retrieved.</p> - * @function Overlays.getProperty - * @param {Uuid} id - The ID of the 3D overlay (or entity). - * @param {string} property - The name of the property to get the value of. - * @returns {object} The value of the property if the 3D overlay and property can be found, otherwise - * <code>undefined</code>. - * @example <caption>Create an overlay in front of your avatar then report its alpha property value.</caption> - * var overlay = Overlays.addOverlay("cube", { - * position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0, z: -3 })), - * rotation: MyAvatar.orientation, - * dimensions: { x: 0.3, y: 0.3, z: 0.3 }, - * solid: true - * }); - * var alpha = Overlays.getProperty(overlay, "alpha"); - * print("Overlay alpha: " + alpha); - */ - QVariant getProperty(const QUuid& id, const QString& property); - - /*@jsdoc - * Gets specified property values of a 3D overlay (or entity). - * <p><strong>Note:</strong> 2D overlays' property values cannot be retrieved.</p> - * @function Overlays.getProperties - * @param {Uuid} id - The ID of the overlay (or entity). - * @param {Array.<string>} properties - The names of the properties to get the values of. - * @returns {Overlays.OverlayProperties} The values of valid properties if the overlay can be found, otherwise an empty - * object. - * @example <caption>Create an overlay in front of your avatar then report some of its properties.</caption> - * var overlay = Overlays.addOverlay("cube", { - * position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0, z: -3 })), - * rotation: MyAvatar.orientation, - * dimensions: { x: 0.3, y: 0.3, z: 0.3 }, - * solid: true - * }); - * var properties = Overlays.getProperties(overlay, ["color", "alpha", "grabbable"]); - * print("Overlay properties: " + JSON.stringify(properties)); - */ - QVariantMap getProperties(const QUuid& id, const QStringList& properties); - - /*@jsdoc - * Gets the values of multiple overlays' (or entities') properties. - * @function Overlays.getOverlaysProperties - * @param propertiesById {object.<Uuid, Array.<string>>} - An object with overlay (or entity) IDs as keys and arrays of the - * names of properties to get for each as values. - * @returns {object.<Uuid, Overlays.OverlayProperties>} An object with overlay (or entity) IDs as keys and - * {@link Overlays.OverlayProperties|OverlayProperties} as values. - * @example <caption>Create two cube overlays in front of your avatar then get some of their properties.</caption> - * var overlayA = Overlays.addOverlay("cube", { - * position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: -0.3, y: 0, z: -3 })), - * rotation: MyAvatar.orientation, - * dimensions: { x: 0.3, y: 0.3, z: 0.3 }, - * solid: true - * }); - * var overlayB = Overlays.addOverlay("cube", { - * position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0.3, y: 0, z: -3 })), - * rotation: MyAvatar.orientation, - * dimensions: { x: 0.3, y: 0.3, z: 0.3 }, - * solid: true - * }); - * var propertiesToGet = {}; - * propertiesToGet[overlayA] = ["color", "alpha"]; - * propertiesToGet[overlayB] = ["dimensions"]; - * var properties = Overlays.getOverlaysProperties(propertiesToGet); - * print("Overlays properties: " + JSON.stringify(properties)); - */ - QVariantMap getOverlaysProperties(const QVariant& overlaysProperties); - + /*@jsdoc * Finds the closest 3D overlay (or local entity) intersected by a {@link PickRay}. * @function Overlays.findRayIntersection diff --git a/libraries/entities/src/EntityEditFilters.cpp b/libraries/entities/src/EntityEditFilters.cpp index 3f31a6739a..1c5744fddc 100644 --- a/libraries/entities/src/EntityEditFilters.cpp +++ b/libraries/entities/src/EntityEditFilters.cpp @@ -232,19 +232,8 @@ static bool hasCorrectSyntax(const ScriptProgramPointer& program) { } static bool hadUncaughtExceptions(ScriptEngine& engine, const QString& fileName) { if (engine.hasUncaughtException()) { - //const auto backtrace = engine.uncaughtException().backtrace; - //const auto exception = engine.uncaughtException().toString(); - //const auto line = QString::number(engine.uncaughtExceptionLineNumber()); qCritical() << engine.uncaughtException(); engine.clearExceptions(); - - //static const QString SCRIPT_EXCEPTION_FORMAT = "[UncaughtException] %1 in %2:%3"; - //auto message = QString(SCRIPT_EXCEPTION_FORMAT).arg(exception, fileName, line); - //if (!backtrace.empty()) { - // static const auto lineSeparator = "\n "; - // message += QString("\n[Backtrace]%1%2").arg(lineSeparator, backtrace.join(lineSeparator)); - //} - //qCritical() << qPrintable(message); return true; } return false; diff --git a/libraries/script-engine/src/ScriptManager.cpp b/libraries/script-engine/src/ScriptManager.cpp index 07df59bf7b..a34a622e1c 100644 --- a/libraries/script-engine/src/ScriptManager.cpp +++ b/libraries/script-engine/src/ScriptManager.cpp @@ -2059,6 +2059,7 @@ void ScriptManager::entityScriptContentAvailable(const EntityItemID& entityID, c exception = testConstructor; } } else { + // V8TODO: re-enable entity script whitelist // ENTITY SCRIPT WHITELIST STARTS HERE auto nodeList = DependencyManager::get<NodeList>(); bool passList = false; // assume unsafe