Merge branch 'master' of https://github.com/highfidelity/hifi into LODUITweaks

This commit is contained in:
ZappoMan 2015-03-25 12:51:21 -07:00
commit 0c2a630a59
16 changed files with 2240 additions and 2059 deletions

View file

@ -6,7 +6,7 @@
{
"name": "access_token",
"label": "Access Token",
"help": "This is an access token generated on the <a href='https://metaverse.highfidelity.io/user/security' target='_blank'>My Security</a> page of your High Fidelity account.<br/>Generate a token with the 'domains' scope and paste it here.<br/>This is required to associate this domain-server with a domain in your account."
"help": "This is an access token generated on the <a href='https://metaverse.highfidelity.com/user/security' target='_blank'>My Security</a> page of your High Fidelity account.<br/>Generate a token with the 'domains' scope and paste it here.<br/>This is required to associate this domain-server with a domain in your account."
},
{
"name": "id",
@ -30,7 +30,7 @@
},
{
"value": "disabled",
"label": "None: use the network information I have entered for this domain at metaverse.highfidelity.io"
"label": "None: use the network information I have entered for this domain at metaverse.highfidelity.com"
}
]
},

View file

@ -652,7 +652,7 @@ function chooseFromHighFidelityDomains(clickedButton) {
clickedButton.attr('disabled', 'disabled')
// get a list of user domains from data-web
data_web_domains_url = "https://metaverse.highfidelity.io/api/v1/domains?access_token="
data_web_domains_url = "https://metaverse.highfidelity.com/api/v1/domains?access_token="
$.getJSON(data_web_domains_url + Settings.initialValues.metaverse.access_token, function(data){
modal_buttons = {
@ -682,7 +682,7 @@ function chooseFromHighFidelityDomains(clickedButton) {
modal_buttons["success"] = {
label: 'Create new domain',
callback: function() {
window.open("https://metaverse.highfidelity.io/user/domains", '_blank');
window.open("https://metaverse.highfidelity.com/user/domains", '_blank');
}
}
modal_body = "<p>You do not have any domains in your High Fidelity account." +
@ -708,4 +708,4 @@ function chooseFromHighFidelityDomains(clickedButton) {
title: "Access token required"
})
}
}
}

View file

@ -130,7 +130,7 @@ var importingSVOTextOverlay = Overlays.addOverlay("text", {
visible: false,
});
var MARKETPLACE_URL = "https://metaverse.highfidelity.io/marketplace";
var MARKETPLACE_URL = "https://metaverse.highfidelity.com/marketplace";
var marketplaceWindow = new WebWindow('Marketplace', MARKETPLACE_URL, 900, 700, false);
marketplaceWindow.setVisible(false);

View file

@ -0,0 +1,157 @@
//
// makeHouses.js
//
//
// Created by Stojce Slavkovski on March 14, 2015
// Copyright 2015 High Fidelity, Inc.
//
// This sample script that creates house entities based on parameters.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
(function () {
/** options **/
var numHouses = 100;
var xRange = 300;
var yRange = 300;
var sizeOfTheHouse = {
x: 10,
y: 15,
z: 10
};
var randomizeModels = false;
/**/
var modelUrlPrefix = "http://public.highfidelity.io/load_testing/3-Buildings-2-SanFranciscoHouse-";
var modelurlExt = ".fbx";
var modelVariations = 100;
var houses = [];
function addHouseAt(position, rotation) {
// get house model
var modelNumber = randomizeModels ?
1 + Math.floor(Math.random() * (modelVariations - 1)) :
(houses.length + 1) % modelVariations;
if (modelNumber == 0) {
modelNumber = modelVariations;
}
var modelUrl = modelUrlPrefix + (modelNumber + "") + modelurlExt;
print("Model ID:" + modelNumber);
print("Model URL:" + modelUrl);
var properties = {
type: "Model",
position: position,
rotation: rotation,
dimensions: sizeOfTheHouse,
modelURL: modelUrl
};
return Entities.addEntity(properties);
}
// calculate initial position
var posX = MyAvatar.position.x - (xRange / 2);
var measures = calculateParcels(numHouses, xRange, yRange);
var dd = 0;
// avatar facing rotation
var rotEven = Quat.fromPitchYawRollDegrees(0, 270.0 + MyAvatar.bodyYaw, 0.0);
// avatar opposite rotation
var rotOdd = Quat.fromPitchYawRollDegrees(0, 90.0 + MyAvatar.bodyYaw, 0.0);
var housePos = Vec3.sum(MyAvatar.position, Quat.getFront(Camera.getOrientation()));
for (var j = 0; j < measures.rows; j++) {
var posX1 = 0 - (xRange / 2);
dd += measures.parcelLength;
for (var i = 0; i < measures.cols; i++) {
// skip reminder of houses
if (houses.length > numHouses) {
break;
}
var posShift = {
x: posX1,
y: 0,
z: dd
};
print("House nr.:" + (houses.length + 1));
houses.push(
addHouseAt(Vec3.sum(housePos, posShift), (j % 2 == 0) ? rotEven : rotOdd)
);
posX1 += measures.parcelWidth;
}
}
// calculate rows and columns in area, and dimension of single parcel
function calculateParcels(items, areaWidth, areaLength) {
var idealSize = Math.min(Math.sqrt(areaWidth * areaLength / items), areaWidth, areaLength);
var baseWidth = Math.min(Math.floor(areaWidth / idealSize), items);
var baseLength = Math.min(Math.floor(areaLength / idealSize), items);
var sirRows = baseWidth;
var sirCols = Math.ceil(items / sirRows);
var sirW = areaWidth / sirRows;
var sirL = areaLength / sirCols;
var visCols = baseLength;
var visRows = Math.ceil(items / visCols);
var visW = areaWidth / visRows;
var visL = areaLength / visCols;
var rows = 0;
var cols = 0;
var parcelWidth = 0;
var parcelLength = 0;
if (Math.min(sirW, sirL) > Math.min(visW, visL)) {
rows = sirRows;
cols = sirCols;
parcelWidth = sirW;
parcelLength = sirL;
} else {
rows = visRows;
cols = visCols;
parcelWidth = visW;
parcelLength = visL;
}
print("rows:" + rows);
print("cols:" + cols);
print("parcelWidth:" + parcelWidth);
print("parcelLength:" + parcelLength);
return {
rows: rows,
cols: cols,
parcelWidth: parcelWidth,
parcelLength: parcelLength
};
}
function cleanup() {
while (houses.length > 0) {
if (!houses[0].isKnownID) {
houses[0] = Entities.identifyEntity(houses[0]);
}
Entities.deleteEntity(houses.shift());
}
}
Script.scriptEnding.connect(cleanup);
})();

View file

@ -21,8 +21,8 @@ modelUploader = (function () {
//svoBuffer,
mapping,
geometry,
API_URL = "https://metaverse.highfidelity.io/api/v1/models",
MODEL_URL = "http://public.highfidelity.io/models/content",
API_URL = "https://metaverse.highfidelity.com/api/v1/models",
MODEL_URL = "http://public.highfidelity.com/models/content",
NAME_FIELD = "name",
SCALE_FIELD = "scale",
FILENAME_FIELD = "filename",
@ -690,4 +690,4 @@ modelUploader = (function () {
};
return that;
}());
}());

View file

@ -158,7 +158,7 @@ var places = {};
function changeLobbyTextures() {
var req = new XMLHttpRequest();
req.open("GET", "https://metaverse.highfidelity.io/api/v1/places?limit=21", false);
req.open("GET", "https://metaverse.highfidelity.com/api/v1/places?limit=21", false);
req.send();
places = JSON.parse(req.responseText).data.places;

View file

@ -34,7 +34,7 @@ var usersWindow = (function () {
usersOnline, // Raw users data
linesOfUsers = [], // Array of indexes pointing into usersOnline
API_URL = "https://metaverse.highfidelity.io/api/v1/users?status=online",
API_URL = "https://metaverse.highfidelity.com/api/v1/users?status=online",
HTTP_GET_TIMEOUT = 60000, // ms = 1 minute
usersRequest,
processUsers,

File diff suppressed because it is too large Load diff

After

Width:  |  Height:  |  Size: 197 KiB

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 193 KiB

View file

@ -382,6 +382,10 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) :
auto discoverabilityManager = DependencyManager::get<DiscoverabilityManager>();
connect(locationUpdateTimer, &QTimer::timeout, discoverabilityManager.data(), &DiscoverabilityManager::updateLocation);
locationUpdateTimer->start(DATA_SERVER_LOCATION_CHANGE_UPDATE_MSECS);
// if we get a domain change, immediately attempt update location in metaverse server
connect(&nodeList->getDomainHandler(), &DomainHandler::connectedToDomain,
discoverabilityManager.data(), &DiscoverabilityManager::updateLocation);
connect(nodeList.data(), &NodeList::nodeAdded, this, &Application::nodeAdded);
connect(nodeList.data(), &NodeList::nodeKilled, this, &Application::nodeKilled);
@ -3297,11 +3301,6 @@ void Application::connectedToDomain(const QString& hostname) {
const QUuid& domainID = DependencyManager::get<NodeList>()->getDomainHandler().getUUID();
if (accountManager.isLoggedIn() && !domainID.isNull()) {
// update our data-server with the domain-server we're logged in with
QString domainPutJsonString = "{\"location\":{\"domain_id\":\"" + uuidStringWithoutCurlyBraces(domainID) + "\"}}";
accountManager.authenticatedRequest("/api/v1/user/location", QNetworkAccessManager::PutOperation,
JSONCallbackParameters(), domainPutJsonString.toUtf8());
_notifiedPacketVersionMismatchThisDomain = false;
}
}

View file

@ -113,7 +113,7 @@ static const float MIRROR_FIELD_OF_VIEW = 30.0f;
static const quint64 TOO_LONG_SINCE_LAST_SEND_DOWNSTREAM_AUDIO_STATS = 1 * USECS_PER_SECOND;
static const QString INFO_HELP_PATH = "html/interface-welcome.html";
static const QString INFO_EDIT_ENTITIES_PATH = "html/edit-entities-commands.html";
static const QString INFO_EDIT_ENTITIES_PATH = "html/edit-commands.html";
#ifdef Q_OS_WIN
static const UINT UWM_IDENTIFY_INSTANCES =

View file

@ -23,7 +23,7 @@
#include "LoginDialog.h"
#include "UIUtil.h"
const QString FORGOT_PASSWORD_URL = "https://metaverse.highfidelity.io/users/password/new";
const QString FORGOT_PASSWORD_URL = "https://metaverse.highfidelity.com/users/password/new";
LoginDialog::LoginDialog(QWidget* parent) :
FramelessDialog(parent, 0, FramelessDialog::POSITION_TOP),

View file

@ -136,7 +136,7 @@
<string>&lt;style type=&quot;text/css&quot;&gt;
a { text-decoration: none; color: #267077;}
&lt;/style&gt;
Invalid username or password. &lt;a href=&quot;https://metaverse.highfidelity.io/password/new&quot;&gt;Recover?&lt;/a&gt;</string>
Invalid username or password. &lt;a href=&quot;https://metaverse.highfidelity.com/password/new&quot;&gt;Recover?&lt;/a&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
@ -458,7 +458,7 @@ border-radius: 4px; padding-top: 1px;</string>
<string>&lt;style type=&quot;text/css&quot;&gt;
a { text-decoration: none; color: #267077;}
&lt;/style&gt;
&lt;a href=&quot;https://metaverse.highfidelity.io/password/new&quot;&gt;Recover password?&lt;/a&gt;</string>
&lt;a href=&quot;https://metaverse.highfidelity.com/password/new&quot;&gt;Recover password?&lt;/a&gt;</string>
</property>
<property name="openExternalLinks">
<bool>true</bool>

View file

@ -49,7 +49,10 @@ static const GLenum _elementTypeToGLType[NUM_TYPES]= {
GL_UNSIGNED_BYTE
};
#if _DEBUG
#define CHECK_GL_ERROR() ::gpu::GLBackend::checkGLError()
//#define CHECK_GL_ERROR()
#else
#define CHECK_GL_ERROR()
#endif
#endif

View file

@ -36,7 +36,7 @@ const char SOLO_NODE_TYPES[2] = {
NodeType::AudioMixer
};
const QUrl DEFAULT_NODE_AUTH_URL = QUrl("https://metaverse.highfidelity.io");
const QUrl DEFAULT_NODE_AUTH_URL = QUrl("https://metaverse.highfidelity.com");
LimitedNodeList::LimitedNodeList(unsigned short socketListenPort, unsigned short dtlsListenPort) :
linkedDataCreateCallback(NULL),

View file

@ -207,7 +207,7 @@ void XMLHttpRequestClass::open(const QString& method, const QString& url, bool a
notImplemented();
}
} else {
if (url.toLower().left(33) == "https://metaverse.highfidelity.io/api/") {
if (url.toLower().left(33) == "https://metaverse.highfidelity.com/api/") {
AccountManager& accountManager = AccountManager::getInstance();
if (accountManager.hasValidAccessToken()) {