resolve conflicts on merge with upstream master

This commit is contained in:
Stephen Birarda 2014-10-08 09:27:16 -07:00
commit 7773a94df7
14 changed files with 3920 additions and 31 deletions

View file

@ -1,4 +1,4 @@
The project embraces distributed development and if you'd like to help, we'll pay you -- find out more at Worklist.net. If you find a small bug and have a fix, pull requests are welcome. If you'd like to get paid for your work, make sure you report the bug via a job on Worklist.net.
The project embraces distributed development and if you'd like to help, we'll pay you -- find out more at [Worklist.net](https://worklist.net). If you find a small bug and have a fix, pull requests are welcome. If you'd like to get paid for your work, make sure you report the bug via a job on Worklist.net.
We're hiring! We're looking for skilled developers; send your resume to hiring@highfidelity.io
@ -16,7 +16,7 @@ Contributing
git checkout -b new_branch_name
```
4. Code
* Follow the [coding standard](https://github.com/highfidelity/hifi/wiki/Coding-Standard)
* Follow the [coding standard](http://docs.highfidelity.io/v1.0/docs/coding-standard)
5. Commit
* Use [well formed commit messages](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
6. Update your branch
@ -38,11 +38,11 @@ Contributing
Reporting Bugs
===
1. Always update to the latest code on master, it is possible the bug has already been fixed!
2. Search the [repository issues](https://github.com/highfidelity/hifi/issues) to make sure that somebody has not already reported the same bug.
3. Open an [issue on GitHub](https://github.com/highfidelity/hifi/issues) including information about your system and how to reproduce the bug.
1. Always update to the latest code on master, we make many merges every day and it is possible the bug has already been fixed!
2. Search jobs [on Worklist](https://worklist.net) to make sure that somebody has not already reported the same bug.
3. Add a [job on Worklist](https://worklist.net/job/add) including information about your system and how to reproduce the bug.
Requesting a feature
===
1. Search the [repository issues](https://github.com/highfidelity/hifi/issues) to make sure that somebody has not already requested the same feature. If you find a matching request, feel free to add any additional comments to the existing issue.
2. Submit an [issue on GitHub](https://github.com/highfidelity/hifi/issues) that is tagged as a feature.
1. Search the [the Worklist](https://worklist.net) to make sure that somebody has not already requested the same feature. If you find a matching request, feel free to add any additional comments to the existing issue.
2. Add a [job on Worklist](https://worklist.net/job/add) that is labeled as a Feature (and select any other appropriate Labels) and includes a detailed description of your request.

View file

@ -3,10 +3,10 @@ lab experimenting with Virtual Worlds and VR.
In this repository you'll find the source to many of the components in our
alpha-stage virtual world. The project embraces distributed development
and if you'd like to help, we'll pay you -- find out more at Worklist.net.
and if you'd like to help, we'll pay you -- find out more at [Worklist.net](https://worklist.net).
If you find a small bug and have a fix, pull requests are welcome. If you'd
like to get paid for your work, make sure you report the bug via a job on
Worklist.net.
[Worklist.net](https://worklist.net).
We're hiring! We're looking for skilled developers;
send your resume to hiring@highfidelity.io
@ -14,6 +14,10 @@ send your resume to hiring@highfidelity.io
##### Chat with us
Come chat with us in [our Gitter](http://gitter.im/highfidelity/hifi) if you have any questions or just want to say hi!
Documentation
=========
Documentation is available at [docs.highfidelity.io](http://docs.highfidelity.io), if something is missing, please suggest it via a new job on Worklist (add to the hifi-docs project).
Build Instructions
=========
All information required to build is found in the [build guide](BUILD.md).

View file

@ -364,7 +364,6 @@ int AudioMixer::addStreamToMixForListeningNodeWithStream(AudioMixerClientData* l
const float ZERO_DB = 1.0f;
const float NEGATIVE_ONE_DB = 0.891f;
const float NEGATIVE_THREE_DB = 0.708f;
const float NEGATIVE_SIX_DB = 0.501f;
const float FILTER_GAIN_AT_0 = ZERO_DB; // source is in front
const float FILTER_GAIN_AT_90 = NEGATIVE_ONE_DB; // source is incident to left or right ear

View file

@ -297,7 +297,7 @@ function chooseFromHighFidelityDomains(clickedButton) {
modal_buttons["success"] = {
label: 'Create new domain',
callback: function() {
window.open("https://data.highfidelity.io/domains", '_blank');
window.open("https://data.highfidelity.io/user/domains", '_blank');
}
}
modal_body = "<p>You do not have any domains in your High Fidelity account." +

View file

@ -1215,19 +1215,44 @@ var toolBar = (function () {
Overlays.editOverlay(loadFileMenuItem, { visible: active });
}
var RESIZE_INTERVAL = 50;
var RESIZE_TIMEOUT = 20000;
var RESIZE_MAX_CHECKS = RESIZE_TIMEOUT / RESIZE_INTERVAL;
function addModel(url) {
var position;
position = Vec3.sum(MyAvatar.position, Vec3.multiply(Quat.getFront(MyAvatar.orientation), SPAWN_DISTANCE));
if (position.x > 0 && position.y > 0 && position.z > 0) {
Entities.addEntity({
var entityId = Entities.addEntity({
type: "Model",
position: position,
dimensions: { x: DEFAULT_DIMENSION, y: DEFAULT_DIMENSION, z: DEFAULT_DIMENSION },
modelURL: url
});
print("Model added: " + url);
var checkCount = 0;
function resize() {
var entityProperties = Entities.getEntityProperties(entityId);
var naturalDimensions = entityProperties.naturalDimensions;
checkCount++;
if (naturalDimensions.x == 0 && naturalDimensions.y == 0 && naturalDimensions.z == 0) {
if (checkCount < RESIZE_MAX_CHECKS) {
Script.setTimeout(resize, RESIZE_INTERVAL);
} else {
print("Resize failed: timed out waiting for model (" + url + ") to load");
}
} else {
entityProperties.dimensions = naturalDimensions;
Entities.editEntity(entityId, entityProperties);
}
}
Script.setTimeout(resize, RESIZE_INTERVAL);
} else {
print("Can't add model: Model would be out of bounds.");
}

View file

@ -64,8 +64,8 @@ var text = Overlays.addOverlay("text", {
y: 100,
width: 150,
height: 50,
color: { red: 0, green: 0, blue: 0},
textColor: { red: 255, green: 0, blue: 0},
backgroundColor: { red: 255, green: 255, blue: 255},
color: { red: 255, green: 0, blue: 0},
topMargin: 4,
leftMargin: 4,
text: "Here is some text.\nAnd a second line."

3851
examples/walk.js Normal file

File diff suppressed because it is too large Load diff

View file

@ -1234,7 +1234,7 @@ void Menu::toggleLocationList() {
if (!_userLocationsDialog) {
JavascriptObjectMap locationObjectMap;
locationObjectMap.insert("InterfaceLocation", LocationScriptingInterface::getInstance());
_userLocationsDialog = DataWebDialog::dialogForPath("/locations", locationObjectMap);
_userLocationsDialog = DataWebDialog::dialogForPath("/user/locations", locationObjectMap);
}
if (!_userLocationsDialog->isVisible()) {
@ -1278,7 +1278,7 @@ void Menu::nameLocation() {
if (!_newLocationDialog) {
JavascriptObjectMap locationObjectMap;
locationObjectMap.insert("InterfaceLocation", LocationScriptingInterface::getInstance());
_newLocationDialog = DataWebDialog::dialogForPath("/locations/new", locationObjectMap);
_newLocationDialog = DataWebDialog::dialogForPath("/user/locations/new", locationObjectMap);
}
if (!_newLocationDialog->isVisible()) {

View file

@ -49,8 +49,8 @@ const float PITCH_SPEED = 100.0f; // degrees/sec
const float COLLISION_RADIUS_SCALAR = 1.2f; // pertains to avatar-to-avatar collisions
const float COLLISION_RADIUS_SCALE = 0.125f;
const float MIN_KEYBOARD_CONTROL_SPEED = 1.5f;
const float MAX_WALKING_SPEED = 3.0f * MIN_KEYBOARD_CONTROL_SPEED;
const float MIN_KEYBOARD_CONTROL_SPEED = 0.50f;
const float MAX_WALKING_SPEED = 4.5f;
// TODO: normalize avatar speed for standard avatar size, then scale all motion logic
// to properly follow avatar size.
@ -1262,21 +1262,19 @@ glm::vec3 MyAvatar::applyKeyboardMotor(float deltaTime, const glm::vec3& localVe
// Compute the target keyboard velocity (which ramps up slowly, and damps very quickly)
// the max magnitude of which depends on what we're doing:
float finalMaxMotorSpeed = hasFloor ? _scale * MAX_WALKING_SPEED : _scale * MAX_KEYBOARD_MOTOR_SPEED;
float motorLength = glm::length(_keyboardMotorVelocity);
float finalMaxMotorSpeed = hasFloor ? _scale * MAX_WALKING_SPEED : _scale * MAX_KEYBOARD_MOTOR_SPEED;
float speedGrowthTimescale = 2.0f;
float speedIncreaseFactor = 1.8f;
motorLength *= 1.0f + glm::clamp(deltaTime / speedGrowthTimescale , 0.0f, 1.0f) * speedIncreaseFactor;
if (motorLength < _scale * MIN_KEYBOARD_CONTROL_SPEED) {
// an active keyboard motor should never be slower than this
_keyboardMotorVelocity = _scale * MIN_KEYBOARD_CONTROL_SPEED * direction;
motorLength = _scale * MIN_KEYBOARD_CONTROL_SPEED;
motorEfficiency = 1.0f;
} else {
float KEYBOARD_MOTOR_LENGTH_TIMESCALE = 2.0f;
float INCREASE_FACTOR = 1.8f;
motorLength *= 1.0f + glm::clamp(deltaTime / KEYBOARD_MOTOR_LENGTH_TIMESCALE, 0.0f, 1.0f) * INCREASE_FACTOR;
if (motorLength > finalMaxMotorSpeed) {
motorLength = finalMaxMotorSpeed;
}
_keyboardMotorVelocity = motorLength * direction;
} else if (motorLength > finalMaxMotorSpeed) {
motorLength = finalMaxMotorSpeed;
}
_keyboardMotorVelocity = motorLength * direction;
_isPushing = true;
}
} else {

View file

@ -26,7 +26,7 @@ AddressBarDialog::AddressBarDialog() :
void AddressBarDialog::setupUI() {
const QString DIALOG_STYLESHEET = "font-family: Helvetica, Arial, sans-serif;";
const QString ADDRESSBAR_PLACEHOLDER = "Go to: domain, @user, #location";
const QString ADDRESSBAR_PLACEHOLDER = "Go to: domain, location, @user, /x,y,z";
const QString ADDRESSBAR_STYLESHEET = "padding: 5px 10px; font-size: 20px;";
const int ADDRESSBAR_MIN_WIDTH = 200;

View file

@ -586,6 +586,13 @@ void LimitedNodeList::sendSTUNRequest() {
stunSockAddr.getAddress(), stunSockAddr.getPort());
}
void LimitedNodeList::rebindNodeSocket() {
quint16 oldPort = _nodeSocket.localPort();
_nodeSocket.close();
_nodeSocket.bind(QHostAddress::AnyIPv4, oldPort);
}
bool LimitedNodeList::processSTUNResponse(const QByteArray& packet) {
// check the cookie to make sure this is actually a STUN response
// and read the first attribute and make sure it is a XOR_MAPPED_ADDRESS

View file

@ -69,6 +69,8 @@ public:
const QUuid& getSessionUUID() const { return _sessionUUID; }
void setSessionUUID(const QUuid& sessionUUID);
void rebindNodeSocket();
QUdpSocket& getNodeSocket() { return _nodeSocket; }
QUdpSocket& getDTLSSocket();

View file

@ -59,6 +59,9 @@ void ThreadedAssignment::commonInit(const QString& targetName, NodeType_t nodeTy
NodeList* nodeList = NodeList::getInstance();
nodeList->setOwnerType(nodeType);
// this is a temp fix for Qt 5.3 - rebinding the node socket gives us readyRead for the socket on this thread
nodeList->rebindNodeSocket();
QTimer* domainServerTimer = new QTimer(this);
connect(domainServerTimer, SIGNAL(timeout()), this, SLOT(checkInWithDomainServerOrExit()));
domainServerTimer->start(DOMAIN_SERVER_CHECK_IN_MSECS);

View file

@ -681,8 +681,8 @@ void ScriptEngine::include(const QString& includeFile) {
QUrl url = resolveInclude(includeFile);
QString includeContents;
if (url.scheme() == "http" || url.scheme() == "ftp") {
QNetworkAccessManager& networkAccessManager = NetworkAccessManager::getInstance();
if (url.scheme() == "http" || url.scheme() == "https" || url.scheme() == "ftp") {
NetworkAccessManager& networkAccessManager = NetworkAccessManager::getInstance();
QNetworkReply* reply = networkAccessManager.get(QNetworkRequest(url));
qDebug() << "Downloading included script at" << includeFile;
QEventLoop loop;