mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 10:07:58 +02:00
Merge branch 'master' of https://github.com/highfidelity/hifi into project-freeloco
This commit is contained in:
commit
a093fe5c4f
16 changed files with 148 additions and 158 deletions
|
@ -2548,7 +2548,7 @@ bool DomainServer::processPendingContent(HTTPConnection* connection, QString ite
|
||||||
_pendingFileContent.seek(_pendingFileContent.size());
|
_pendingFileContent.seek(_pendingFileContent.size());
|
||||||
_pendingFileContent.write(dataChunk);
|
_pendingFileContent.write(dataChunk);
|
||||||
_pendingFileContent.close();
|
_pendingFileContent.close();
|
||||||
|
|
||||||
// Respond immediately - will timeout if we wait for restore.
|
// Respond immediately - will timeout if we wait for restore.
|
||||||
connection->respond(HTTPConnection::StatusCode200);
|
connection->respond(HTTPConnection::StatusCode200);
|
||||||
if (itemName == "restore-file" || itemName == "restore-file-chunk-final" || itemName == "restore-file-chunk-only") {
|
if (itemName == "restore-file" || itemName == "restore-file-chunk-final" || itemName == "restore-file-chunk-only") {
|
||||||
|
|
|
@ -32,6 +32,17 @@ void GrabManager::simulateGrabs() {
|
||||||
bool success;
|
bool success;
|
||||||
SpatiallyNestablePointer grabbedThing = SpatiallyNestable::findByID(grabbedThingID, success);
|
SpatiallyNestablePointer grabbedThing = SpatiallyNestable::findByID(grabbedThingID, success);
|
||||||
if (success && grabbedThing) {
|
if (success && grabbedThing) {
|
||||||
|
auto entity = std::dynamic_pointer_cast<EntityItem>(grabbedThing);
|
||||||
|
if (entity) {
|
||||||
|
if (entity->getLocked()) {
|
||||||
|
continue; // even if someone else claims to be grabbing it, don't move a locked thing
|
||||||
|
}
|
||||||
|
const GrabPropertyGroup& grabProps = entity->getGrabProperties();
|
||||||
|
if (!grabProps.getGrabbable()) {
|
||||||
|
continue; // even if someone else claims to be grabbing it, don't move non-grabbable
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
glm::vec3 finalPosition = acc.finalizePosition();
|
glm::vec3 finalPosition = acc.finalizePosition();
|
||||||
glm::quat finalOrientation = acc.finalizeOrientation();
|
glm::quat finalOrientation = acc.finalizeOrientation();
|
||||||
grabbedThing->setTransform(createMatFromQuatAndPos(finalOrientation, finalPosition));
|
grabbedThing->setTransform(createMatFromQuatAndPos(finalOrientation, finalPosition));
|
||||||
|
|
|
@ -939,7 +939,8 @@ void MyAvatar::simulate(float deltaTime, bool inView) {
|
||||||
bool isPhysicsEnabled = qApp->isPhysicsEnabled();
|
bool isPhysicsEnabled = qApp->isPhysicsEnabled();
|
||||||
bool zoneAllowsFlying = zoneInteractionProperties.first;
|
bool zoneAllowsFlying = zoneInteractionProperties.first;
|
||||||
bool collisionlessAllowed = zoneInteractionProperties.second;
|
bool collisionlessAllowed = zoneInteractionProperties.second;
|
||||||
_characterController.setFlyingAllowed((zoneAllowsFlying && _enableFlying) || !isPhysicsEnabled);
|
_characterController.setZoneFlyingAllowed(zoneAllowsFlying || !isPhysicsEnabled);
|
||||||
|
_characterController.setComfortFlyingAllowed(_enableFlying);
|
||||||
_characterController.setCollisionlessAllowed(collisionlessAllowed);
|
_characterController.setCollisionlessAllowed(collisionlessAllowed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -295,14 +295,14 @@ QString Overlays::overlayToEntityType(const QString& type) {
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
static QHash<QUuid, glm::quat> savedRotations = QHash<QUuid, glm::quat>();
|
static QHash<QUuid, std::pair<glm::quat, bool>> savedRotations = QHash<QUuid, std::pair<glm::quat, bool>>();
|
||||||
|
|
||||||
EntityItemProperties Overlays::convertOverlayToEntityProperties(QVariantMap& overlayProps, const QString& type, bool add, const QUuid& id) {
|
EntityItemProperties Overlays::convertOverlayToEntityProperties(QVariantMap& overlayProps, const QString& type, bool add, const QUuid& id) {
|
||||||
glm::quat rotation;
|
std::pair<glm::quat, bool> rotation;
|
||||||
return convertOverlayToEntityProperties(overlayProps, rotation, type, add, id);
|
return convertOverlayToEntityProperties(overlayProps, rotation, type, add, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
EntityItemProperties Overlays::convertOverlayToEntityProperties(QVariantMap& overlayProps, glm::quat& rotationToSave, const QString& type, bool add, const QUuid& id) {
|
EntityItemProperties Overlays::convertOverlayToEntityProperties(QVariantMap& overlayProps, std::pair<glm::quat, bool>& rotationToSave, const QString& type, bool add, const QUuid& id) {
|
||||||
overlayProps["type"] = type;
|
overlayProps["type"] = type;
|
||||||
|
|
||||||
SET_OVERLAY_PROP_DEFAULT(alpha, 0.7);
|
SET_OVERLAY_PROP_DEFAULT(alpha, 0.7);
|
||||||
|
@ -563,65 +563,33 @@ EntityItemProperties Overlays::convertOverlayToEntityProperties(QVariantMap& ove
|
||||||
SET_OVERLAY_PROP_DEFAULT(textures, PathUtils::resourcesUrl() + "images/whitePixel.png");
|
SET_OVERLAY_PROP_DEFAULT(textures, PathUtils::resourcesUrl() + "images/whitePixel.png");
|
||||||
}
|
}
|
||||||
|
|
||||||
{ // Overlays did this conversion for rotation
|
|
||||||
auto iter = overlayProps.find("rotation");
|
|
||||||
if (iter != overlayProps.end() && !overlayProps.contains("localRotation")) {
|
|
||||||
QUuid parentID;
|
|
||||||
{
|
|
||||||
auto iter = overlayProps.find("parentID");
|
|
||||||
if (iter != overlayProps.end()) {
|
|
||||||
parentID = iter.value().toUuid();
|
|
||||||
} else if (!add) {
|
|
||||||
EntityPropertyFlags desiredProperties;
|
|
||||||
desiredProperties += PROP_PARENT_ID;
|
|
||||||
parentID = DependencyManager::get<EntityScriptingInterface>()->getEntityProperties(id, desiredProperties).getParentID();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int parentJointIndex = -1;
|
|
||||||
{
|
|
||||||
auto iter = overlayProps.find("parentJointIndex");
|
|
||||||
if (iter != overlayProps.end()) {
|
|
||||||
parentJointIndex = iter.value().toInt();
|
|
||||||
} else if (!add) {
|
|
||||||
EntityPropertyFlags desiredProperties;
|
|
||||||
desiredProperties += PROP_PARENT_JOINT_INDEX;
|
|
||||||
parentJointIndex = DependencyManager::get<EntityScriptingInterface>()->getEntityProperties(id, desiredProperties).getParentJointIndex();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
glm::quat rotation = quatFromVariant(iter.value());
|
|
||||||
bool success = false;
|
|
||||||
glm::quat localRotation = SpatiallyNestable::worldToLocal(rotation, parentID, parentJointIndex, false, success);
|
|
||||||
if (success) {
|
|
||||||
overlayProps["rotation"] = quatToVariant(localRotation);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (type == "Text" || type == "Image" || type == "Grid" || type == "Web") {
|
if (type == "Text" || type == "Image" || type == "Grid" || type == "Web") {
|
||||||
glm::quat originalRotation = ENTITY_ITEM_DEFAULT_ROTATION;
|
glm::quat originalRotation = ENTITY_ITEM_DEFAULT_ROTATION;
|
||||||
|
bool local = false;
|
||||||
{
|
{
|
||||||
auto iter = overlayProps.find("rotation");
|
auto iter = overlayProps.find("rotation");
|
||||||
if (iter != overlayProps.end()) {
|
if (iter != overlayProps.end()) {
|
||||||
originalRotation = quatFromVariant(iter.value());
|
originalRotation = quatFromVariant(iter.value());
|
||||||
|
local = false;
|
||||||
} else {
|
} else {
|
||||||
iter = overlayProps.find("localRotation");
|
iter = overlayProps.find("localRotation");
|
||||||
if (iter != overlayProps.end()) {
|
if (iter != overlayProps.end()) {
|
||||||
originalRotation = quatFromVariant(iter.value());
|
originalRotation = quatFromVariant(iter.value());
|
||||||
|
local = true;
|
||||||
} else if (!add) {
|
} else if (!add) {
|
||||||
auto iter2 = savedRotations.find(id);
|
auto iter2 = savedRotations.find(id);
|
||||||
if (iter2 != savedRotations.end()) {
|
if (iter2 != savedRotations.end()) {
|
||||||
originalRotation = iter2.value();
|
originalRotation = iter2.value().first;
|
||||||
|
local = iter2.value().second;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!add) {
|
if (!add) {
|
||||||
savedRotations[id] = originalRotation;
|
savedRotations[id] = { originalRotation, local };
|
||||||
} else {
|
} else {
|
||||||
rotationToSave = originalRotation;
|
rotationToSave = { originalRotation, local };
|
||||||
}
|
}
|
||||||
|
|
||||||
glm::vec3 dimensions = ENTITY_ITEM_DEFAULT_DIMENSIONS;
|
glm::vec3 dimensions = ENTITY_ITEM_DEFAULT_DIMENSIONS;
|
||||||
|
@ -652,7 +620,11 @@ EntityItemProperties Overlays::convertOverlayToEntityProperties(QVariantMap& ove
|
||||||
rotation = glm::angleAxis((float)M_PI, rotation * Vectors::UP) * rotation;
|
rotation = glm::angleAxis((float)M_PI, rotation * Vectors::UP) * rotation;
|
||||||
}
|
}
|
||||||
|
|
||||||
overlayProps["localRotation"] = quatToVariant(rotation);
|
if (local) {
|
||||||
|
overlayProps["localRotation"] = quatToVariant(rotation);
|
||||||
|
} else {
|
||||||
|
overlayProps["rotation"] = quatToVariant(rotation);
|
||||||
|
}
|
||||||
overlayProps["dimensions"] = vec3toVariant(glm::abs(dimensions));
|
overlayProps["dimensions"] = vec3toVariant(glm::abs(dimensions));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -834,7 +806,7 @@ QUuid Overlays::addOverlay(const QString& type, const QVariant& properties) {
|
||||||
if (type == "rectangle3d") {
|
if (type == "rectangle3d") {
|
||||||
propertyMap["shape"] = "Quad";
|
propertyMap["shape"] = "Quad";
|
||||||
}
|
}
|
||||||
glm::quat rotationToSave;
|
std::pair<glm::quat, bool> rotationToSave;
|
||||||
QUuid id = DependencyManager::get<EntityScriptingInterface>()->addEntityInternal(convertOverlayToEntityProperties(propertyMap, rotationToSave, entityType, true), entity::HostType::LOCAL);
|
QUuid id = DependencyManager::get<EntityScriptingInterface>()->addEntityInternal(convertOverlayToEntityProperties(propertyMap, rotationToSave, entityType, true), entity::HostType::LOCAL);
|
||||||
if (entityType == "Text" || entityType == "Image" || entityType == "Grid" || entityType == "Web") {
|
if (entityType == "Text" || entityType == "Image" || entityType == "Grid" || entityType == "Web") {
|
||||||
savedRotations[id] = rotationToSave;
|
savedRotations[id] = rotationToSave;
|
||||||
|
|
|
@ -729,7 +729,7 @@ private:
|
||||||
|
|
||||||
QVariantMap convertEntityToOverlayProperties(const EntityItemProperties& entityProps);
|
QVariantMap convertEntityToOverlayProperties(const EntityItemProperties& entityProps);
|
||||||
EntityItemProperties convertOverlayToEntityProperties(QVariantMap& overlayProps, const QString& type, bool add, const QUuid& id);
|
EntityItemProperties convertOverlayToEntityProperties(QVariantMap& overlayProps, const QString& type, bool add, const QUuid& id);
|
||||||
EntityItemProperties convertOverlayToEntityProperties(QVariantMap& overlayProps, glm::quat& rotationToSave, const QString& type, bool add, const QUuid& id = QUuid());
|
EntityItemProperties convertOverlayToEntityProperties(QVariantMap& overlayProps, std::pair<glm::quat, bool>& rotationToSave, const QString& type, bool add, const QUuid& id = QUuid());
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void mousePressPointerEvent(const QUuid& id, const PointerEvent& event);
|
void mousePressPointerEvent(const QUuid& id, const PointerEvent& event);
|
||||||
|
|
|
@ -1066,13 +1066,6 @@ void Rig::computeMotionAnimationState(float deltaTime, const glm::vec3& worldPos
|
||||||
|
|
||||||
if (_enableInverseKinematics) {
|
if (_enableInverseKinematics) {
|
||||||
_animVars.set("ikOverlayAlpha", 1.0f);
|
_animVars.set("ikOverlayAlpha", 1.0f);
|
||||||
_animVars.set("splineIKEnabled", true);
|
|
||||||
_animVars.set("leftHandIKEnabled", true);
|
|
||||||
_animVars.set("rightHandIKEnabled", true);
|
|
||||||
_animVars.set("leftFootIKEnabled", true);
|
|
||||||
_animVars.set("rightFootIKEnabled", true);
|
|
||||||
_animVars.set("leftFootPoleVectorEnabled", true);
|
|
||||||
_animVars.set("rightFootPoleVectorEnabled", true);
|
|
||||||
} else {
|
} else {
|
||||||
_animVars.set("ikOverlayAlpha", 0.0f);
|
_animVars.set("ikOverlayAlpha", 0.0f);
|
||||||
_animVars.set("splineIKEnabled", false);
|
_animVars.set("splineIKEnabled", false);
|
||||||
|
|
|
@ -53,7 +53,7 @@ bool ShapeEntityRenderer::needsRenderUpdate() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
auto mat = _materials.find("0");
|
auto mat = _materials.find("0");
|
||||||
if (mat != _materials.end() && (mat->second.needsUpdate() || mat->second.areTexturesLoading())) {
|
if (mat != _materials.end() && mat->second.shouldUpdate()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -188,7 +188,7 @@ bool ShapeEntityRenderer::useMaterialPipeline(const graphics::MultiMaterial& mat
|
||||||
|
|
||||||
ShapeKey ShapeEntityRenderer::getShapeKey() {
|
ShapeKey ShapeEntityRenderer::getShapeKey() {
|
||||||
auto mat = _materials.find("0");
|
auto mat = _materials.find("0");
|
||||||
if (mat != _materials.end() && (mat->second.needsUpdate() || mat->second.areTexturesLoading())) {
|
if (mat != _materials.end() && mat->second.shouldUpdate()) {
|
||||||
RenderPipelines::updateMultiMaterial(mat->second);
|
RenderPipelines::updateMultiMaterial(mat->second);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -101,21 +101,15 @@ bool WebEntityRenderer::isTransparent() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WebEntityRenderer::needsRenderUpdateFromTypedEntity(const TypedEntityPointer& entity) const {
|
bool WebEntityRenderer::needsRenderUpdateFromTypedEntity(const TypedEntityPointer& entity) const {
|
||||||
if (_contextPosition != entity->getWorldPosition()) {
|
if (resultWithReadLock<bool>([&] {
|
||||||
return true;
|
if (_webSurface && uvec2(getWindowSize(entity)) != toGlm(_webSurface->size())) {
|
||||||
}
|
return true;
|
||||||
|
}
|
||||||
{
|
|
||||||
QSharedPointer<OffscreenQmlSurface> webSurface;
|
if (_contextPosition != entity->getWorldPosition()) {
|
||||||
withReadLock([&] {
|
|
||||||
webSurface = _webSurface;
|
|
||||||
});
|
|
||||||
if (webSurface && uvec2(getWindowSize(entity)) != toGlm(webSurface->size())) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if(resultWithReadLock<bool>([&] {
|
|
||||||
if (_color != entity->getColor()) {
|
if (_color != entity->getColor()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -194,7 +188,7 @@ void WebEntityRenderer::doRenderUpdateSynchronousTyped(const ScenePointer& scene
|
||||||
auto newContentType = getContentType(newSourceURL);
|
auto newContentType = getContentType(newSourceURL);
|
||||||
ContentType currentContentType;
|
ContentType currentContentType;
|
||||||
withReadLock([&] {
|
withReadLock([&] {
|
||||||
urlChanged = _sourceURL != newSourceURL;
|
urlChanged = newSourceURL.isEmpty() || newSourceURL != _tryingToBuildURL;
|
||||||
});
|
});
|
||||||
currentContentType = _contentType;
|
currentContentType = _contentType;
|
||||||
|
|
||||||
|
@ -206,7 +200,6 @@ void WebEntityRenderer::doRenderUpdateSynchronousTyped(const ScenePointer& scene
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
withWriteLock([&] {
|
withWriteLock([&] {
|
||||||
_inputMode = entity->getInputMode();
|
_inputMode = entity->getInputMode();
|
||||||
_dpi = entity->getDPI();
|
_dpi = entity->getDPI();
|
||||||
|
@ -216,6 +209,8 @@ void WebEntityRenderer::doRenderUpdateSynchronousTyped(const ScenePointer& scene
|
||||||
_billboardMode = entity->getBillboardMode();
|
_billboardMode = entity->getBillboardMode();
|
||||||
|
|
||||||
if (_contentType == ContentType::NoContent) {
|
if (_contentType == ContentType::NoContent) {
|
||||||
|
_tryingToBuildURL = newSourceURL;
|
||||||
|
_sourceURL = newSourceURL;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -226,10 +221,12 @@ void WebEntityRenderer::doRenderUpdateSynchronousTyped(const ScenePointer& scene
|
||||||
|
|
||||||
if (_webSurface) {
|
if (_webSurface) {
|
||||||
if (_webSurface->getRootItem()) {
|
if (_webSurface->getRootItem()) {
|
||||||
if (_contentType == ContentType::HtmlContent && urlChanged) {
|
if (_contentType == ContentType::HtmlContent && _sourceURL != newSourceURL) {
|
||||||
_webSurface->getRootItem()->setProperty(URL_PROPERTY, newSourceURL);
|
_webSurface->getRootItem()->setProperty(URL_PROPERTY, newSourceURL);
|
||||||
|
_sourceURL = newSourceURL;
|
||||||
|
} else if (_contentType != ContentType::HtmlContent) {
|
||||||
|
_sourceURL = newSourceURL;
|
||||||
}
|
}
|
||||||
_sourceURL = newSourceURL;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
auto scriptURL = entity->getScriptURL();
|
auto scriptURL = entity->getScriptURL();
|
||||||
|
@ -294,20 +291,21 @@ void WebEntityRenderer::doRender(RenderArgs* args) {
|
||||||
});
|
});
|
||||||
|
|
||||||
// Try to update the texture
|
// Try to update the texture
|
||||||
{
|
OffscreenQmlSurface::TextureAndFence newTextureAndFence;
|
||||||
QSharedPointer<OffscreenQmlSurface> webSurface;
|
bool newTextureAvailable = false;
|
||||||
withReadLock([&] {
|
if (!resultWithReadLock<bool>([&] {
|
||||||
webSurface = _webSurface;
|
if (!_webSurface) {
|
||||||
});
|
return false;
|
||||||
if (!webSurface) {
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
OffscreenQmlSurface::TextureAndFence newTextureAndFence;
|
newTextureAvailable = _webSurface->fetchTexture(newTextureAndFence);
|
||||||
bool newTextureAvailable = webSurface->fetchTexture(newTextureAndFence);
|
return true;
|
||||||
if (newTextureAvailable) {
|
})) {
|
||||||
_texture->setExternalTexture(newTextureAndFence.first, newTextureAndFence.second);
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (newTextureAvailable) {
|
||||||
|
_texture->setExternalTexture(newTextureAndFence.first, newTextureAndFence.second);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const glm::vec2 texMin(0.0f), texMax(1.0f), topLeft(-0.5f), bottomRight(0.5f);
|
static const glm::vec2 texMin(0.0f), texMax(1.0f), topLeft(-0.5f), bottomRight(0.5f);
|
||||||
|
@ -351,6 +349,8 @@ void WebEntityRenderer::buildWebSurface(const EntityItemPointer& entity, const Q
|
||||||
_connections.push_back(QObject::connect(_webSurface.data(), &OffscreenQmlSurface::webEventReceived, this, [entityItemID](const QVariant& message) {
|
_connections.push_back(QObject::connect(_webSurface.data(), &OffscreenQmlSurface::webEventReceived, this, [entityItemID](const QVariant& message) {
|
||||||
emit DependencyManager::get<EntityScriptingInterface>()->webEventReceived(entityItemID, message);
|
emit DependencyManager::get<EntityScriptingInterface>()->webEventReceived(entityItemID, message);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
_tryingToBuildURL = newSourceURL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void WebEntityRenderer::destroyWebSurface() {
|
void WebEntityRenderer::destroyWebSurface() {
|
||||||
|
@ -383,11 +383,16 @@ glm::vec2 WebEntityRenderer::getWindowSize(const TypedEntityPointer& entity) con
|
||||||
void WebEntityRenderer::hoverEnterEntity(const PointerEvent& event) {
|
void WebEntityRenderer::hoverEnterEntity(const PointerEvent& event) {
|
||||||
if (_inputMode == WebInputMode::MOUSE) {
|
if (_inputMode == WebInputMode::MOUSE) {
|
||||||
handlePointerEvent(event);
|
handlePointerEvent(event);
|
||||||
} else if (_webSurface) {
|
return;
|
||||||
PointerEvent webEvent = event;
|
|
||||||
webEvent.setPos2D(event.getPos2D() * (METERS_TO_INCHES * _dpi));
|
|
||||||
_webSurface->hoverBeginEvent(webEvent, _touchDevice);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
withReadLock([&] {
|
||||||
|
if (_webSurface) {
|
||||||
|
PointerEvent webEvent = event;
|
||||||
|
webEvent.setPos2D(event.getPos2D() * (METERS_TO_INCHES * _dpi));
|
||||||
|
_webSurface->hoverBeginEvent(webEvent, _touchDevice);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void WebEntityRenderer::hoverLeaveEntity(const PointerEvent& event) {
|
void WebEntityRenderer::hoverLeaveEntity(const PointerEvent& event) {
|
||||||
|
@ -398,34 +403,39 @@ void WebEntityRenderer::hoverLeaveEntity(const PointerEvent& event) {
|
||||||
// QML onReleased is only triggered if a click has happened first. We need to send this "fake" mouse move event to properly trigger an onExited.
|
// QML onReleased is only triggered if a click has happened first. We need to send this "fake" mouse move event to properly trigger an onExited.
|
||||||
PointerEvent endMoveEvent(PointerEvent::Move, event.getID());
|
PointerEvent endMoveEvent(PointerEvent::Move, event.getID());
|
||||||
handlePointerEvent(endMoveEvent);
|
handlePointerEvent(endMoveEvent);
|
||||||
} else if (_webSurface) {
|
|
||||||
PointerEvent webEvent = event;
|
|
||||||
webEvent.setPos2D(event.getPos2D() * (METERS_TO_INCHES * _dpi));
|
|
||||||
_webSurface->hoverEndEvent(webEvent, _touchDevice);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void WebEntityRenderer::handlePointerEvent(const PointerEvent& event) {
|
|
||||||
if (_inputMode == WebInputMode::TOUCH) {
|
|
||||||
handlePointerEventAsTouch(event);
|
|
||||||
} else {
|
|
||||||
handlePointerEventAsMouse(event);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void WebEntityRenderer::handlePointerEventAsTouch(const PointerEvent& event) {
|
|
||||||
if (_webSurface) {
|
|
||||||
PointerEvent webEvent = event;
|
|
||||||
webEvent.setPos2D(event.getPos2D() * (METERS_TO_INCHES * _dpi));
|
|
||||||
_webSurface->handlePointerEvent(webEvent, _touchDevice);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void WebEntityRenderer::handlePointerEventAsMouse(const PointerEvent& event) {
|
|
||||||
if (!_webSurface) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
withReadLock([&] {
|
||||||
|
if (_webSurface) {
|
||||||
|
PointerEvent webEvent = event;
|
||||||
|
webEvent.setPos2D(event.getPos2D() * (METERS_TO_INCHES * _dpi));
|
||||||
|
_webSurface->hoverEndEvent(webEvent, _touchDevice);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void WebEntityRenderer::handlePointerEvent(const PointerEvent& event) {
|
||||||
|
withReadLock([&] {
|
||||||
|
if (!_webSurface) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_inputMode == WebInputMode::TOUCH) {
|
||||||
|
handlePointerEventAsTouch(event);
|
||||||
|
} else {
|
||||||
|
handlePointerEventAsMouse(event);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void WebEntityRenderer::handlePointerEventAsTouch(const PointerEvent& event) {
|
||||||
|
PointerEvent webEvent = event;
|
||||||
|
webEvent.setPos2D(event.getPos2D() * (METERS_TO_INCHES * _dpi));
|
||||||
|
_webSurface->handlePointerEvent(webEvent, _touchDevice);
|
||||||
|
}
|
||||||
|
|
||||||
|
void WebEntityRenderer::handlePointerEventAsMouse(const PointerEvent& event) {
|
||||||
glm::vec2 windowPos = event.getPos2D() * (METERS_TO_INCHES * _dpi);
|
glm::vec2 windowPos = event.getPos2D() * (METERS_TO_INCHES * _dpi);
|
||||||
QPointF windowPoint(windowPos.x, windowPos.y);
|
QPointF windowPoint(windowPos.x, windowPos.y);
|
||||||
|
|
||||||
|
@ -459,16 +469,20 @@ void WebEntityRenderer::handlePointerEventAsMouse(const PointerEvent& event) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void WebEntityRenderer::setProxyWindow(QWindow* proxyWindow) {
|
void WebEntityRenderer::setProxyWindow(QWindow* proxyWindow) {
|
||||||
if (_webSurface) {
|
withReadLock([&] {
|
||||||
_webSurface->setProxyWindow(proxyWindow);
|
if (_webSurface) {
|
||||||
}
|
_webSurface->setProxyWindow(proxyWindow);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
QObject* WebEntityRenderer::getEventHandler() {
|
QObject* WebEntityRenderer::getEventHandler() {
|
||||||
if (!_webSurface) {
|
return resultWithReadLock<QObject*>([&]() -> QObject* {
|
||||||
return nullptr;
|
if (!_webSurface) {
|
||||||
}
|
return nullptr;
|
||||||
return _webSurface->getEventHandler();
|
}
|
||||||
|
return _webSurface->getEventHandler();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void WebEntityRenderer::emitScriptEvent(const QVariant& message) {
|
void WebEntityRenderer::emitScriptEvent(const QVariant& message) {
|
||||||
|
|
|
@ -82,6 +82,7 @@ private:
|
||||||
QSharedPointer<OffscreenQmlSurface> _webSurface { nullptr };
|
QSharedPointer<OffscreenQmlSurface> _webSurface { nullptr };
|
||||||
bool _cachedWebSurface { false };
|
bool _cachedWebSurface { false };
|
||||||
gpu::TexturePointer _texture;
|
gpu::TexturePointer _texture;
|
||||||
|
QString _tryingToBuildURL;
|
||||||
|
|
||||||
glm::u8vec3 _color;
|
glm::u8vec3 _color;
|
||||||
float _alpha { 1.0f };
|
float _alpha { 1.0f };
|
||||||
|
|
|
@ -456,11 +456,11 @@ public:
|
||||||
graphics::MaterialKey getMaterialKey() const { return graphics::MaterialKey(_schemaBuffer.get<graphics::MultiMaterial::Schema>()._key); }
|
graphics::MaterialKey getMaterialKey() const { return graphics::MaterialKey(_schemaBuffer.get<graphics::MultiMaterial::Schema>()._key); }
|
||||||
const gpu::TextureTablePointer& getTextureTable() const { return _textureTable; }
|
const gpu::TextureTablePointer& getTextureTable() const { return _textureTable; }
|
||||||
|
|
||||||
bool needsUpdate() const { return _needsUpdate; }
|
|
||||||
void setNeedsUpdate(bool needsUpdate) { _needsUpdate = needsUpdate; }
|
void setNeedsUpdate(bool needsUpdate) { _needsUpdate = needsUpdate; }
|
||||||
|
|
||||||
void setTexturesLoading(bool value) { _texturesLoading = value; }
|
void setTexturesLoading(bool value) { _texturesLoading = value; }
|
||||||
bool areTexturesLoading() const { return _texturesLoading; }
|
void setInitialized() { _initialized = true; }
|
||||||
|
|
||||||
|
bool shouldUpdate() const { return !_initialized || _needsUpdate || _texturesLoading; }
|
||||||
|
|
||||||
int getTextureCount() const { calculateMaterialInfo(); return _textureCount; }
|
int getTextureCount() const { calculateMaterialInfo(); return _textureCount; }
|
||||||
size_t getTextureSize() const { calculateMaterialInfo(); return _textureSize; }
|
size_t getTextureSize() const { calculateMaterialInfo(); return _textureSize; }
|
||||||
|
@ -471,6 +471,7 @@ private:
|
||||||
gpu::TextureTablePointer _textureTable { std::make_shared<gpu::TextureTable>() };
|
gpu::TextureTablePointer _textureTable { std::make_shared<gpu::TextureTable>() };
|
||||||
bool _needsUpdate { false };
|
bool _needsUpdate { false };
|
||||||
bool _texturesLoading { false };
|
bool _texturesLoading { false };
|
||||||
|
bool _initialized { false };
|
||||||
|
|
||||||
mutable size_t _textureSize { 0 };
|
mutable size_t _textureSize { 0 };
|
||||||
mutable int _textureCount { 0 };
|
mutable int _textureCount { 0 };
|
||||||
|
|
|
@ -315,7 +315,9 @@ bool AddressManager::handleUrl(const QUrl& lookupUrl, LookupTrigger trigger) {
|
||||||
|
|
||||||
// wasn't an address - lookup the place name
|
// wasn't an address - lookup the place name
|
||||||
// we may have a path that defines a relative viewpoint - pass that through the lookup so we can go to it after
|
// we may have a path that defines a relative viewpoint - pass that through the lookup so we can go to it after
|
||||||
attemptPlaceNameLookup(lookupUrl.host(), lookupUrl.path(), trigger);
|
if (!lookupUrl.host().isNull() && !lookupUrl.host().isEmpty()) {
|
||||||
|
attemptPlaceNameLookup(lookupUrl.host(), lookupUrl.path(), trigger);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -337,7 +339,7 @@ bool AddressManager::handleUrl(const QUrl& lookupUrl, LookupTrigger trigger) {
|
||||||
// be loaded over http(s)
|
// be loaded over http(s)
|
||||||
// lookupUrl.scheme() == URL_SCHEME_HTTP ||
|
// lookupUrl.scheme() == URL_SCHEME_HTTP ||
|
||||||
// lookupUrl.scheme() == HIFI_URL_SCHEME_HTTPS ||
|
// lookupUrl.scheme() == HIFI_URL_SCHEME_HTTPS ||
|
||||||
// TODO once a file can return a connection refusal if there were to be some kind of load error, we'd
|
// TODO once a file can return a connection refusal if there were to be some kind of load error, we'd
|
||||||
// need to store the previous domain tried in _lastVisitedURL. For now , do not store it.
|
// need to store the previous domain tried in _lastVisitedURL. For now , do not store it.
|
||||||
|
|
||||||
_previousAPILookup.clear();
|
_previousAPILookup.clear();
|
||||||
|
|
|
@ -781,18 +781,18 @@ void CharacterController::updateState() {
|
||||||
const float jumpSpeed = sqrtf(2.0f * -DEFAULT_AVATAR_GRAVITY * jumpHeight);
|
const float jumpSpeed = sqrtf(2.0f * -DEFAULT_AVATAR_GRAVITY * jumpHeight);
|
||||||
if ((velocity.dot(_currentUp) <= (jumpSpeed / 2.0f)) && ((_floorDistance < FLY_TO_GROUND_THRESHOLD) || _hasSupport)) {
|
if ((velocity.dot(_currentUp) <= (jumpSpeed / 2.0f)) && ((_floorDistance < FLY_TO_GROUND_THRESHOLD) || _hasSupport)) {
|
||||||
SET_STATE(State::Ground, "hit ground");
|
SET_STATE(State::Ground, "hit ground");
|
||||||
} else if (_flyingAllowed) {
|
} else if (_zoneFlyingAllowed) {
|
||||||
btVector3 desiredVelocity = _targetVelocity;
|
btVector3 desiredVelocity = _targetVelocity;
|
||||||
if (desiredVelocity.length2() < MIN_TARGET_SPEED_SQUARED) {
|
if (desiredVelocity.length2() < MIN_TARGET_SPEED_SQUARED) {
|
||||||
desiredVelocity = btVector3(0.0f, 0.0f, 0.0f);
|
desiredVelocity = btVector3(0.0f, 0.0f, 0.0f);
|
||||||
}
|
}
|
||||||
bool vertTargetSpeedIsNonZero = desiredVelocity.dot(_currentUp) > MIN_TARGET_SPEED;
|
bool vertTargetSpeedIsNonZero = desiredVelocity.dot(_currentUp) > MIN_TARGET_SPEED;
|
||||||
if ((jumpButtonHeld || vertTargetSpeedIsNonZero) && (_takeoffJumpButtonID != _jumpButtonDownCount)) {
|
if (_comfortFlyingAllowed && (jumpButtonHeld || vertTargetSpeedIsNonZero) && (_takeoffJumpButtonID != _jumpButtonDownCount)) {
|
||||||
SET_STATE(State::Hover, "double jump button");
|
SET_STATE(State::Hover, "double jump button");
|
||||||
} else if ((jumpButtonHeld || vertTargetSpeedIsNonZero) && (now - _jumpButtonDownStartTime) > JUMP_TO_HOVER_PERIOD) {
|
} else if (_comfortFlyingAllowed && (jumpButtonHeld || vertTargetSpeedIsNonZero) && (now - _jumpButtonDownStartTime) > JUMP_TO_HOVER_PERIOD) {
|
||||||
SET_STATE(State::Hover, "jump button held");
|
SET_STATE(State::Hover, "jump button held");
|
||||||
} else if (_floorDistance > _scaleFactor * DEFAULT_AVATAR_FALL_HEIGHT) {
|
} else if ((!rayHasHit && !_hasSupport) || _floorDistance > _scaleFactor * DEFAULT_AVATAR_FALL_HEIGHT) {
|
||||||
// Transition to hover if we are above the fall threshold
|
// Transition to hover if there's no ground beneath us or we are above the fall threshold, regardless of _comfortFlyingAllowed
|
||||||
SET_STATE(State::Hover, "above fall threshold");
|
SET_STATE(State::Hover, "above fall threshold");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -801,8 +801,10 @@ void CharacterController::updateState() {
|
||||||
case State::Hover:
|
case State::Hover:
|
||||||
btScalar horizontalSpeed = (velocity - velocity.dot(_currentUp) * _currentUp).length();
|
btScalar horizontalSpeed = (velocity - velocity.dot(_currentUp) * _currentUp).length();
|
||||||
bool flyingFast = horizontalSpeed > (MAX_WALKING_SPEED * 0.75f);
|
bool flyingFast = horizontalSpeed > (MAX_WALKING_SPEED * 0.75f);
|
||||||
if (!_flyingAllowed) {
|
if (!_zoneFlyingAllowed) {
|
||||||
SET_STATE(State::InAir, "flying not allowed");
|
SET_STATE(State::InAir, "zone flying not allowed");
|
||||||
|
} else if (!_comfortFlyingAllowed && (rayHasHit || _hasSupport || _floorDistance < FLY_TO_GROUND_THRESHOLD)) {
|
||||||
|
SET_STATE(State::InAir, "comfort flying not allowed");
|
||||||
} else if ((_floorDistance < MIN_HOVER_HEIGHT) && !jumpButtonHeld && !flyingFast) {
|
} else if ((_floorDistance < MIN_HOVER_HEIGHT) && !jumpButtonHeld && !flyingFast) {
|
||||||
SET_STATE(State::InAir, "near ground");
|
SET_STATE(State::InAir, "near ground");
|
||||||
} else if (((_floorDistance < FLY_TO_GROUND_THRESHOLD) || _hasSupport) && !flyingFast) {
|
} else if (((_floorDistance < FLY_TO_GROUND_THRESHOLD) || _hasSupport) && !flyingFast) {
|
||||||
|
@ -847,12 +849,6 @@ bool CharacterController::getRigidBodyLocation(glm::vec3& avatarRigidBodyPositio
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CharacterController::setFlyingAllowed(bool value) {
|
|
||||||
if (value != _flyingAllowed) {
|
|
||||||
_flyingAllowed = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CharacterController::setCollisionlessAllowed(bool value) {
|
void CharacterController::setCollisionlessAllowed(bool value) {
|
||||||
if (value != _collisionlessAllowed) {
|
if (value != _collisionlessAllowed) {
|
||||||
_collisionlessAllowed = value;
|
_collisionlessAllowed = value;
|
||||||
|
|
|
@ -65,10 +65,10 @@ public:
|
||||||
// overrides from btCharacterControllerInterface
|
// overrides from btCharacterControllerInterface
|
||||||
virtual void setWalkDirection(const btVector3 &walkDirection) override { assert(false); }
|
virtual void setWalkDirection(const btVector3 &walkDirection) override { assert(false); }
|
||||||
virtual void setVelocityForTimeInterval(const btVector3 &velocity, btScalar timeInterval) override { assert(false); }
|
virtual void setVelocityForTimeInterval(const btVector3 &velocity, btScalar timeInterval) override { assert(false); }
|
||||||
virtual void reset(btCollisionWorld* collisionWorld) override { }
|
virtual void reset(btCollisionWorld* collisionWorld) override {}
|
||||||
virtual void warp(const btVector3& origin) override { }
|
virtual void warp(const btVector3& origin) override {}
|
||||||
virtual void debugDraw(btIDebugDraw* debugDrawer) override { }
|
virtual void debugDraw(btIDebugDraw* debugDrawer) override {}
|
||||||
virtual void setUpInterpolate(bool value) override { }
|
virtual void setUpInterpolate(bool value) override {}
|
||||||
virtual void updateAction(btCollisionWorld* collisionWorld, btScalar deltaTime) override;
|
virtual void updateAction(btCollisionWorld* collisionWorld, btScalar deltaTime) override;
|
||||||
virtual void preStep(btCollisionWorld *collisionWorld) override;
|
virtual void preStep(btCollisionWorld *collisionWorld) override;
|
||||||
virtual void playerStep(btCollisionWorld *collisionWorld, btScalar dt) override;
|
virtual void playerStep(btCollisionWorld *collisionWorld, btScalar dt) override;
|
||||||
|
@ -90,7 +90,7 @@ public:
|
||||||
void preSimulation();
|
void preSimulation();
|
||||||
void postSimulation();
|
void postSimulation();
|
||||||
|
|
||||||
void setPositionAndOrientation( const glm::vec3& position, const glm::quat& orientation);
|
void setPositionAndOrientation(const glm::vec3& position, const glm::quat& orientation);
|
||||||
void getPositionAndOrientation(glm::vec3& position, glm::quat& rotation) const;
|
void getPositionAndOrientation(glm::vec3& position, glm::quat& rotation) const;
|
||||||
|
|
||||||
void setParentVelocity(const glm::vec3& parentVelocity);
|
void setParentVelocity(const glm::vec3& parentVelocity);
|
||||||
|
@ -129,7 +129,8 @@ public:
|
||||||
|
|
||||||
bool getRigidBodyLocation(glm::vec3& avatarRigidBodyPosition, glm::quat& avatarRigidBodyRotation);
|
bool getRigidBodyLocation(glm::vec3& avatarRigidBodyPosition, glm::quat& avatarRigidBodyRotation);
|
||||||
|
|
||||||
void setFlyingAllowed(bool value);
|
void setZoneFlyingAllowed(bool value) { _zoneFlyingAllowed = value; }
|
||||||
|
void setComfortFlyingAllowed(bool value) { _comfortFlyingAllowed = value; }
|
||||||
void setCollisionlessAllowed(bool value);
|
void setCollisionlessAllowed(bool value);
|
||||||
|
|
||||||
void setPendingFlagsUpdateCollisionMask(){ _pendingFlags |= PENDING_FLAG_UPDATE_COLLISION_MASK; }
|
void setPendingFlagsUpdateCollisionMask(){ _pendingFlags |= PENDING_FLAG_UPDATE_COLLISION_MASK; }
|
||||||
|
@ -212,7 +213,8 @@ protected:
|
||||||
uint32_t _pendingFlags { 0 };
|
uint32_t _pendingFlags { 0 };
|
||||||
uint32_t _previousFlags { 0 };
|
uint32_t _previousFlags { 0 };
|
||||||
|
|
||||||
bool _flyingAllowed { true };
|
bool _zoneFlyingAllowed { true };
|
||||||
|
bool _comfortFlyingAllowed { true };
|
||||||
bool _collisionlessAllowed { true };
|
bool _collisionlessAllowed { true };
|
||||||
bool _collisionless { false };
|
bool _collisionless { false };
|
||||||
|
|
||||||
|
|
|
@ -83,7 +83,7 @@ void MeshPartPayload::updateKey(const render::ItemKey& key) {
|
||||||
ItemKey::Builder builder(key);
|
ItemKey::Builder builder(key);
|
||||||
builder.withTypeShape();
|
builder.withTypeShape();
|
||||||
|
|
||||||
if (_drawMaterials.needsUpdate() || _drawMaterials.areTexturesLoading()) {
|
if (_drawMaterials.shouldUpdate()) {
|
||||||
RenderPipelines::updateMultiMaterial(_drawMaterials);
|
RenderPipelines::updateMultiMaterial(_drawMaterials);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -329,7 +329,7 @@ void ModelMeshPartPayload::updateKey(const render::ItemKey& key) {
|
||||||
builder.withDeformed();
|
builder.withDeformed();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_drawMaterials.needsUpdate() || _drawMaterials.areTexturesLoading()) {
|
if (_drawMaterials.shouldUpdate()) {
|
||||||
RenderPipelines::updateMultiMaterial(_drawMaterials);
|
RenderPipelines::updateMultiMaterial(_drawMaterials);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -347,7 +347,7 @@ void ModelMeshPartPayload::setShapeKey(bool invalidateShapeKey, PrimitiveMode pr
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_drawMaterials.needsUpdate() || _drawMaterials.areTexturesLoading()) {
|
if (_drawMaterials.shouldUpdate()) {
|
||||||
RenderPipelines::updateMultiMaterial(_drawMaterials);
|
RenderPipelines::updateMultiMaterial(_drawMaterials);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -382,11 +382,6 @@ void RenderPipelines::bindMaterial(graphics::MaterialPointer& material, gpu::Bat
|
||||||
void RenderPipelines::updateMultiMaterial(graphics::MultiMaterial& multiMaterial) {
|
void RenderPipelines::updateMultiMaterial(graphics::MultiMaterial& multiMaterial) {
|
||||||
auto& schemaBuffer = multiMaterial.getSchemaBuffer();
|
auto& schemaBuffer = multiMaterial.getSchemaBuffer();
|
||||||
|
|
||||||
if (multiMaterial.size() == 0) {
|
|
||||||
schemaBuffer.edit<graphics::MultiMaterial::Schema>() = graphics::MultiMaterial::Schema();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto& drawMaterialTextures = multiMaterial.getTextureTable();
|
auto& drawMaterialTextures = multiMaterial.getTextureTable();
|
||||||
multiMaterial.setTexturesLoading(false);
|
multiMaterial.setTexturesLoading(false);
|
||||||
|
|
||||||
|
@ -732,14 +727,11 @@ void RenderPipelines::updateMultiMaterial(graphics::MultiMaterial& multiMaterial
|
||||||
schema._key = (uint32_t)schemaKey._flags.to_ulong();
|
schema._key = (uint32_t)schemaKey._flags.to_ulong();
|
||||||
schemaBuffer.edit<graphics::MultiMaterial::Schema>() = schema;
|
schemaBuffer.edit<graphics::MultiMaterial::Schema>() = schema;
|
||||||
multiMaterial.setNeedsUpdate(false);
|
multiMaterial.setNeedsUpdate(false);
|
||||||
|
multiMaterial.setInitialized();
|
||||||
}
|
}
|
||||||
|
|
||||||
void RenderPipelines::bindMaterials(graphics::MultiMaterial& multiMaterial, gpu::Batch& batch, bool enableTextures) {
|
void RenderPipelines::bindMaterials(graphics::MultiMaterial& multiMaterial, gpu::Batch& batch, bool enableTextures) {
|
||||||
if (multiMaterial.size() == 0) {
|
if (multiMaterial.shouldUpdate()) {
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (multiMaterial.needsUpdate() || multiMaterial.areTexturesLoading()) {
|
|
||||||
updateMultiMaterial(multiMaterial);
|
updateMultiMaterial(multiMaterial);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -325,6 +325,11 @@
|
||||||
leftMargin: domainNameLeftMargin
|
leftMargin: domainNameLeftMargin
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// check to be sure we are going to look for an actual domain
|
||||||
|
if (!domain) {
|
||||||
|
doRequest = false;
|
||||||
|
}
|
||||||
|
|
||||||
if (doRequest) {
|
if (doRequest) {
|
||||||
var url = Account.metaverseServerURL + '/api/v1/places/' + domain;
|
var url = Account.metaverseServerURL + '/api/v1/places/' + domain;
|
||||||
request({
|
request({
|
||||||
|
|
Loading…
Reference in a new issue