From f2dcacffd025a465333efdd4fd818b1af3767cef Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Tue, 28 Apr 2015 09:47:19 -0700 Subject: [PATCH 1/9] show avatar data receive rate by default with display name --- interface/src/avatar/Avatar.cpp | 16 ++++++++++++++-- libraries/avatars/src/AvatarData.cpp | 17 ++++++++++++----- libraries/avatars/src/AvatarData.h | 13 ++++++++----- libraries/avatars/src/AvatarHashMap.cpp | 4 ++-- libraries/shared/src/SimpleMovingAverage.cpp | 6 +++--- libraries/shared/src/SimpleMovingAverage.h | 7 +++++-- 6 files changed, 44 insertions(+), 19 deletions(-) diff --git a/interface/src/avatar/Avatar.cpp b/interface/src/avatar/Avatar.cpp index b3439317d8..94589623bf 100644 --- a/interface/src/avatar/Avatar.cpp +++ b/interface/src/avatar/Avatar.cpp @@ -581,7 +581,8 @@ void Avatar::renderBillboard() { glm::vec2 texCoordTopLeft(0.0f, 0.0f); glm::vec2 texCoordBottomRight(1.0f, 1.0f); - DependencyManager::get()->renderQuad(topLeft, bottomRight, texCoordTopLeft, texCoordBottomRight, glm::vec4(1.0f, 1.0f, 1.0f, 1.0f)); + DependencyManager::get()->renderQuad(topLeft, bottomRight, texCoordTopLeft, texCoordBottomRight, + glm::vec4(1.0f, 1.0f, 1.0f, 1.0f)); glPopMatrix(); @@ -709,11 +710,22 @@ void Avatar::renderDisplayName() { glm::vec4(0.2f, 0.2f, 0.2f, _displayNameAlpha * DISPLAYNAME_BACKGROUND_ALPHA / DISPLAYNAME_ALPHA)); glm::vec4 color(0.93f, 0.93f, 0.93f, _displayNameAlpha); + + // optionally render timing stats for this avatar with the display name + QString renderedDisplayName = _displayName; + + const float BYTES_PER_KILOBYTE = 1000.0f; + float kilobytesPerSecond = getAverageBytesReceivedPerSecond() / BYTES_PER_KILOBYTE; + + renderedDisplayName += QString(" - (%1 KBps, %2 Hz)") + .arg(QString::number(kilobytesPerSecond, 'f', 2)) + .arg(getReceiveRate()); + QByteArray ba = _displayName.toLocal8Bit(); const char* text = ba.data(); glDisable(GL_POLYGON_OFFSET_FILL); - textRenderer(DISPLAYNAME)->draw(text_x, text_y, text, color); + textRenderer(DISPLAYNAME)->draw(text_x, text_y, renderedDisplayName, color); glPopMatrix(); diff --git a/libraries/avatars/src/AvatarData.cpp b/libraries/avatars/src/AvatarData.cpp index a8d2c209c3..f0e4eb118b 100644 --- a/libraries/avatars/src/AvatarData.cpp +++ b/libraries/avatars/src/AvatarData.cpp @@ -58,11 +58,11 @@ AvatarData::AvatarData() : _billboard(), _errorLogExpiry(0), _owningAvatarMixer(), - _lastUpdateTimer(), _velocity(0.0f), _targetVelocity(0.0f), _localAABox(DEFAULT_LOCAL_AABOX_CORNER, DEFAULT_LOCAL_AABOX_SCALE) { + } AvatarData::~AvatarData() { @@ -268,9 +268,6 @@ bool AvatarData::shouldLogError(const quint64& now) { // read data in packet starting at byte offset and return number of bytes parsed int AvatarData::parseDataAtOffset(const QByteArray& packet, int offset) { - // reset the last heard timer since we have new data for this AvatarData - _lastUpdateTimer.restart(); - // lazily allocate memory for HeadData in case we're not an Avatar instance if (!_headData) { _headData = new HeadData(this); @@ -555,7 +552,17 @@ int AvatarData::parseDataAtOffset(const QByteArray& packet, int offset) { } } // numJoints * 8 bytes - return sourceBuffer - startPosition; + int numBytesRead = sourceBuffer - startPosition; + _averageBytesReceived.updateAverage(numBytesRead); + return numBytesRead; +} + +int AvatarData::getAverageBytesReceivedPerSecond() const { + return lrint(_averageBytesReceived.getAverageSampleValuePerSecond()); +} + +int AvatarData::getReceiveRate() const { + return lrint(1.0f / _averageBytesReceived.getEventDeltaAverage()); } bool AvatarData::hasReferential() { diff --git a/libraries/avatars/src/AvatarData.h b/libraries/avatars/src/AvatarData.h index 58e9c42c3c..0aa911112a 100644 --- a/libraries/avatars/src/AvatarData.h +++ b/libraries/avatars/src/AvatarData.h @@ -46,9 +46,9 @@ typedef unsigned long long quint64; #include #include -#include - #include +#include +#include #include "AABox.h" #include "HandData.h" @@ -293,11 +293,13 @@ public: Node* getOwningAvatarMixer() { return _owningAvatarMixer.data(); } void setOwningAvatarMixer(const QWeakPointer& owningAvatarMixer) { _owningAvatarMixer = owningAvatarMixer; } - QElapsedTimer& getLastUpdateTimer() { return _lastUpdateTimer; } - const AABox& getLocalAABox() const { return _localAABox; } const Referential* getReferential() const { return _referential; } + int getUsecsSinceLastUpdate() const { return _averageBytesReceived.getUsecsSinceLastEvent(); } + int getAverageBytesReceivedPerSecond() const; + int getReceiveRate() const; + void setVelocity(const glm::vec3 velocity) { _velocity = velocity; } Q_INVOKABLE glm::vec3 getVelocity() const { return _velocity; } glm::vec3 getTargetVelocity() const { return _targetVelocity; } @@ -382,7 +384,6 @@ protected: quint64 _errorLogExpiry; ///< time in future when to log an error QWeakPointer _owningAvatarMixer; - QElapsedTimer _lastUpdateTimer; PlayerPointer _player; @@ -395,6 +396,8 @@ protected: AABox _localAABox; + SimpleMovingAverage _averageBytesReceived {}; + private: // privatize the copy constructor and assignment operator so they cannot be called AvatarData(const AvatarData&); diff --git a/libraries/avatars/src/AvatarHashMap.cpp b/libraries/avatars/src/AvatarHashMap.cpp index ae3a8c3e5c..3e913acbd7 100644 --- a/libraries/avatars/src/AvatarHashMap.cpp +++ b/libraries/avatars/src/AvatarHashMap.cpp @@ -25,11 +25,11 @@ AvatarHash::iterator AvatarHashMap::erase(const AvatarHash::iterator& iterator) return _avatarHash.erase(iterator); } -const qint64 AVATAR_SILENCE_THRESHOLD_MSECS = 5 * 1000; +const qint64 AVATAR_SILENCE_THRESHOLD_USECS = 5 * 1000 * 1000; bool AvatarHashMap::shouldKillAvatar(const AvatarSharedPointer& sharedAvatar) { return (sharedAvatar->getOwningAvatarMixer() == NULL - || sharedAvatar->getLastUpdateTimer().elapsed() > AVATAR_SILENCE_THRESHOLD_MSECS); + || sharedAvatar->getUsecsSinceLastUpdate() > AVATAR_SILENCE_THRESHOLD_USECS); } void AvatarHashMap::processAvatarMixerDatagram(const QByteArray& datagram, const QWeakPointer& mixerWeakPointer) { diff --git a/libraries/shared/src/SimpleMovingAverage.cpp b/libraries/shared/src/SimpleMovingAverage.cpp index 90a9509c91..1d2574ecbf 100644 --- a/libraries/shared/src/SimpleMovingAverage.cpp +++ b/libraries/shared/src/SimpleMovingAverage.cpp @@ -52,9 +52,9 @@ void SimpleMovingAverage::reset() { float SimpleMovingAverage::getEventDeltaAverage() const { return (ONE_MINUS_WEIGHTING * _eventDeltaAverage) + - (WEIGHTING * ((usecTimestampNow() - _lastEventTimestamp) / 1000000.0f)); + (WEIGHTING * ((usecTimestampNow() - _lastEventTimestamp) / 1000000.0f )); } -float SimpleMovingAverage::getAverageSampleValuePerSecond() const { - return _average * (1.0f / getEventDeltaAverage()); +uint64_t SimpleMovingAverage::getUsecsSinceLastEvent() const { + return usecTimestampNow() - _lastEventTimestamp; } diff --git a/libraries/shared/src/SimpleMovingAverage.h b/libraries/shared/src/SimpleMovingAverage.h index 3eec9d5be8..4233411466 100644 --- a/libraries/shared/src/SimpleMovingAverage.h +++ b/libraries/shared/src/SimpleMovingAverage.h @@ -25,8 +25,11 @@ public: int getSampleCount() const { return _numSamples; }; float getAverage() const { return _average; }; - float getEventDeltaAverage() const; - float getAverageSampleValuePerSecond() const; + float getEventDeltaAverage() const; // returned in microseconds + float getAverageSampleValuePerSecond() const { return _average * (1.0f / getEventDeltaAverage()); } + + uint64_t getUsecsSinceLastEvent() const; + private: int _numSamples; uint64_t _lastEventTimestamp; From f9a25d7089483b0ff5804a058d757df80556a355 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Tue, 28 Apr 2015 10:13:18 -0700 Subject: [PATCH 2/9] add Menu option to toggle Avatar receive stats --- interface/src/Menu.cpp | 7 ++++--- interface/src/Menu.h | 1 + interface/src/avatar/Avatar.cpp | 16 +++++++++------- interface/src/avatar/AvatarManager.h | 11 +++++++++-- 4 files changed, 23 insertions(+), 12 deletions(-) diff --git a/interface/src/Menu.cpp b/interface/src/Menu.cpp index 868fa9270c..23f69b5e5b 100644 --- a/interface/src/Menu.cpp +++ b/interface/src/Menu.cpp @@ -285,9 +285,6 @@ Menu::Menu() { addCheckableActionToQMenuAndActionHash(viewMenu, MenuOption::OffAxisProjection, 0, false); addCheckableActionToQMenuAndActionHash(viewMenu, MenuOption::TurnWithHead, 0, false); - - addCheckableActionToQMenuAndActionHash(viewMenu, MenuOption::Stats, - 0); // QML Qt::Key_Slash); addCheckableActionToQMenuAndActionHash(viewMenu, MenuOption::Stats); addActionToQMenuAndActionHash(viewMenu, MenuOption::Log, Qt::CTRL | Qt::SHIFT | Qt::Key_L, @@ -397,6 +394,10 @@ Menu::Menu() { QAction* ddeFiltering = addCheckableActionToQMenuAndActionHash(faceTrackingMenu, MenuOption::VelocityFilter, 0, true); ddeFiltering->setVisible(false); #endif + + auto avatarManager = DependencyManager::get(); + addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::AvatarReceiveStats, 0, false, + avatarManager.data(), SLOT(setShouldShowReceiveStats(bool))); addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::RenderSkeletonCollisionShapes); addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::RenderHeadCollisionShapes); diff --git a/interface/src/Menu.h b/interface/src/Menu.h index 5b2d1430a6..62b6ac5656 100644 --- a/interface/src/Menu.h +++ b/interface/src/Menu.h @@ -147,6 +147,7 @@ namespace MenuOption { const QString AudioScopeTwentyFrames = "Twenty"; const QString AudioStats = "Audio Stats"; const QString AudioStatsShowInjectedStreams = "Audio Stats Show Injected Streams"; + const QString AvatarReceiveStats = "Show Receive Stats"; const QString BandwidthDetails = "Bandwidth Details"; const QString BlueSpeechSphere = "Blue Sphere While Speaking"; const QString BookmarkLocation = "Bookmark Location"; diff --git a/interface/src/avatar/Avatar.cpp b/interface/src/avatar/Avatar.cpp index 94589623bf..05f834255c 100644 --- a/interface/src/avatar/Avatar.cpp +++ b/interface/src/avatar/Avatar.cpp @@ -713,14 +713,16 @@ void Avatar::renderDisplayName() { // optionally render timing stats for this avatar with the display name QString renderedDisplayName = _displayName; - - const float BYTES_PER_KILOBYTE = 1000.0f; - float kilobytesPerSecond = getAverageBytesReceivedPerSecond() / BYTES_PER_KILOBYTE; - renderedDisplayName += QString(" - (%1 KBps, %2 Hz)") - .arg(QString::number(kilobytesPerSecond, 'f', 2)) - .arg(getReceiveRate()); - + if (DependencyManager::get()->shouldShowReceiveStats()) { + const float BYTES_PER_KILOBYTE = 1000.0f; + float kilobytesPerSecond = getAverageBytesReceivedPerSecond() / BYTES_PER_KILOBYTE; + + renderedDisplayName += QString(" - (%1 KBps, %2 Hz)") + .arg(QString::number(kilobytesPerSecond, 'f', 2)) + .arg(getReceiveRate()); + } + QByteArray ba = _displayName.toLocal8Bit(); const char* text = ba.data(); diff --git a/interface/src/avatar/AvatarManager.h b/interface/src/avatar/AvatarManager.h index 1a833c5106..3c7f7296fe 100644 --- a/interface/src/avatar/AvatarManager.h +++ b/interface/src/avatar/AvatarManager.h @@ -40,7 +40,9 @@ public: void renderAvatars(RenderArgs::RenderMode renderMode, bool postLighting = false, bool selfAvatarOnly = false); void clearOtherAvatars(); - + + bool shouldShowReceiveStats() const { return _shouldShowReceiveStats; } + class LocalLight { public: glm::vec3 color; @@ -49,7 +51,10 @@ public: Q_INVOKABLE void setLocalLights(const QVector& localLights); Q_INVOKABLE QVector getLocalLights() const; - + +public slots: + void setShouldShowReceiveStats(bool shouldShowReceiveStats) { _shouldShowReceiveStats = shouldShowReceiveStats; } + private: AvatarManager(QObject* parent = 0); AvatarManager(const AvatarManager& other); @@ -67,6 +72,8 @@ private: quint64 _lastSendAvatarDataTime = 0; // Controls MyAvatar send data rate. QVector _localLights; + + bool _shouldShowReceiveStats = false; }; Q_DECLARE_METATYPE(AvatarManager::LocalLight) From c52426385dbfd8252891b4842296d2363f9f5eaa Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Tue, 28 Apr 2015 18:20:54 -0700 Subject: [PATCH 3/9] code review comments for #4713 --- libraries/avatars/src/AvatarHashMap.cpp | 3 ++- libraries/shared/src/SimpleMovingAverage.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/libraries/avatars/src/AvatarHashMap.cpp b/libraries/avatars/src/AvatarHashMap.cpp index 3e913acbd7..a78d91fc43 100644 --- a/libraries/avatars/src/AvatarHashMap.cpp +++ b/libraries/avatars/src/AvatarHashMap.cpp @@ -11,6 +11,7 @@ #include #include +#include #include "AvatarLogging.h" #include "AvatarHashMap.h" @@ -25,7 +26,7 @@ AvatarHash::iterator AvatarHashMap::erase(const AvatarHash::iterator& iterator) return _avatarHash.erase(iterator); } -const qint64 AVATAR_SILENCE_THRESHOLD_USECS = 5 * 1000 * 1000; +const qint64 AVATAR_SILENCE_THRESHOLD_USECS = 5 * USECS_PER_SECOND; bool AvatarHashMap::shouldKillAvatar(const AvatarSharedPointer& sharedAvatar) { return (sharedAvatar->getOwningAvatarMixer() == NULL diff --git a/libraries/shared/src/SimpleMovingAverage.cpp b/libraries/shared/src/SimpleMovingAverage.cpp index 1d2574ecbf..e1c9a27390 100644 --- a/libraries/shared/src/SimpleMovingAverage.cpp +++ b/libraries/shared/src/SimpleMovingAverage.cpp @@ -52,7 +52,7 @@ void SimpleMovingAverage::reset() { float SimpleMovingAverage::getEventDeltaAverage() const { return (ONE_MINUS_WEIGHTING * _eventDeltaAverage) + - (WEIGHTING * ((usecTimestampNow() - _lastEventTimestamp) / 1000000.0f )); + (WEIGHTING * ((usecTimestampNow() - _lastEventTimestamp) / 1000000.0f)); } uint64_t SimpleMovingAverage::getUsecsSinceLastEvent() const { From 1995fa6a5ee53fe3d58e8cb8179372334114f811 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Tue, 28 Apr 2015 18:21:15 -0700 Subject: [PATCH 4/9] fix return value comment in SimpleMovingAverage --- libraries/shared/src/SimpleMovingAverage.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/shared/src/SimpleMovingAverage.h b/libraries/shared/src/SimpleMovingAverage.h index 4233411466..194a078194 100644 --- a/libraries/shared/src/SimpleMovingAverage.h +++ b/libraries/shared/src/SimpleMovingAverage.h @@ -25,7 +25,7 @@ public: int getSampleCount() const { return _numSamples; }; float getAverage() const { return _average; }; - float getEventDeltaAverage() const; // returned in microseconds + float getEventDeltaAverage() const; // returned in seconds float getAverageSampleValuePerSecond() const { return _average * (1.0f / getEventDeltaAverage()); } uint64_t getUsecsSinceLastEvent() const; From 61b4025526e798318f226912f26e5bbff46832fb Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Wed, 29 Apr 2015 09:33:23 -0700 Subject: [PATCH 5/9] remove the uneeded curly braces for default ctor --- libraries/avatars/src/AvatarData.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/avatars/src/AvatarData.h b/libraries/avatars/src/AvatarData.h index 0aa911112a..6a11f94cb6 100644 --- a/libraries/avatars/src/AvatarData.h +++ b/libraries/avatars/src/AvatarData.h @@ -396,7 +396,7 @@ protected: AABox _localAABox; - SimpleMovingAverage _averageBytesReceived {}; + SimpleMovingAverage _averageBytesReceived; private: // privatize the copy constructor and assignment operator so they cannot be called From 8b9236a18dee96ffdc1c22d67c762231aa5661ff Mon Sep 17 00:00:00 2001 From: Eric Levin Date: Wed, 29 Apr 2015 09:44:22 -0700 Subject: [PATCH 6/9] added grab.js script, which allows users to grab and fling physical objects --- examples/grab.js | 223 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 223 insertions(+) create mode 100644 examples/grab.js diff --git a/examples/grab.js b/examples/grab.js new file mode 100644 index 0000000000..eca457f0b2 --- /dev/null +++ b/examples/grab.js @@ -0,0 +1,223 @@ +var isGrabbing = false; +var grabbedEntity = null; +var prevMouse = {}; +var deltaMouse = { + z: 0 +} +var entityProps; +var box, box2, ground; +var baseMoveFactor = .001; +var finalMoveMultiplier; +var avatarEntityDistance; +var camYaw, dv; +var prevPosition; +var newPosition; +var flingVelocity; +var flingMultiplier = 10; +var moveUpDown = false; +var savedGravity; + +var DROP_DISTANCE = 5.0; +var DROP_COLOR = { + red: 200, + green: 200, + blue: 200 +}; +var DROP_WIDTH = 4; + + +var autoBox = false; +if (autoBox) { + setUpTestObjects(); +} + +var dropLine = Overlays.addOverlay("line3d", { + start: { + x: 0, + y: 0, + z: 0 + }, + end: { + x: 0, + y: 0, + z: 0 + }, + color: DROP_COLOR, + alpha: 1, + visible: false, + lineWidth: DROP_WIDTH +}); + + +function mousePressEvent(event) { + var pickRay = Camera.computePickRay(event.x, event.y); + var intersection = Entities.findRayIntersection(pickRay); + if (intersection.intersects && intersection.properties.collisionsWillMove) { + grabbedEntity = intersection.entityID; + var props = Entities.getEntityProperties(grabbedEntity) + prevPosition = props.position; + isGrabbing = true; + savedGravity = props.gravity; + Overlays.editOverlay(dropLine, { + visible: true + }); + Entities.editEntity(grabbedEntity, { + gravity: { + x: 0, + y: 0, + z: 0 + } + }); + //We need to store entity's current gravity, and then disable it while we move + + } + +} + + +function mouseReleaseEvent() { + if (isGrabbing) { + flingObject(); + Entities.editEntity(grabbedEntity, { + gravity: savedGravity + }); + } + isGrabbing = false; + Overlays.editOverlay(dropLine, { + visible: false + }); +} + +function flingObject() { + //calculate velocity to give object base on current and previous position + entityProps = Entities.getEntityProperties(grabbedEntity); + + flingVelocity = Vec3.subtract(entityProps.position, prevPosition); + flingVelocity = Vec3.multiply(flingMultiplier, flingVelocity); + flingVelocity.y = 0; + Entities.editEntity(grabbedEntity, { + velocity: flingVelocity + }); +} + +function mouseMoveEvent(event) { + if (isGrabbing) { + entityProps = Entities.getEntityProperties(grabbedEntity); + prevPosition = entityProps.position; + avatarEntityDistance = Vec3.distance(MyAvatar.position, entityProps.position); + finalMoveMultiplier = baseMoveFactor * Math.pow(avatarEntityDistance, 1.5); + deltaMouse.x = event.x - prevMouse.x; + if (!moveUpDown) { + deltaMouse.z = event.y - prevMouse.y; + } else { + deltaMouse.y = (event.y - prevMouse.y) * -1; + } + finalMoveMultiplier = baseMoveFactor * Math.pow(avatarEntityDistance, 1.5); + deltaMouse = Vec3.multiply(deltaMouse, finalMoveMultiplier); + camYaw = Quat.safeEulerAngles(Camera.getOrientation()).y; + dv = Vec3.multiplyQbyV(Quat.fromPitchYawRollDegrees(0, camYaw, 0), deltaMouse); + newPosition = Vec3.sum(entityProps.position, dv); + Entities.editEntity(grabbedEntity, { + position: newPosition + }); + Overlays.editOverlay(dropLine, { + start: newPosition, + end: Vec3.sum(newPosition, { + x: 0, + y: -DROP_DISTANCE, + z: 0 + }) + }); + } + prevMouse.x = event.x; + prevMouse.y = event.y; +} + +function keyReleaseEvent(event) { + if (event.text === "SHIFT") { + moveUpDown = false; + } +} + +function keyPressEvent(event) { + if (event.text === "SHIFT") { + moveUpDown = true; + } +} + +function cleanup() { + Entities.deleteEntity(box); + Entities.deleteEntity(box2); + Entities.deleteEntity(ground); +} + +function setUpTestObjects() { + var distance = 4; + box = Entities.addEntity({ + type: 'Box', + position: Vec3.sum(MyAvatar.position, Vec3.multiply(distance, Quat.getFront(Camera.getOrientation()))), + dimensions: { + x: .5, + y: .5, + z: .5 + }, + color: { + red: 200, + green: 50, + blue: 192 + }, + collisionsWillMove: true, + gravity: { + x: 0, + y: -1, + z: 0 + } + }); + + box2 = Entities.addEntity({ + type: 'Box', + position: Vec3.sum(MyAvatar.position, Vec3.multiply(distance + 1, Quat.getFront(Camera.getOrientation()))), + dimensions: { + x: .5, + y: .5, + z: .5 + }, + color: { + red: 200, + green: 50, + blue: 192 + }, + collisionsWillMove: true, + gravity: { + x: 0, + y: -1, + z: 0 + } + }); + + ground = Entities.addEntity({ + type: 'Box', + position: { + x: MyAvatar.position.x, + y: MyAvatar.position.y - 5, + z: MyAvatar.position.z + }, + dimensions: { + x: 100, + y: 2, + z: 100 + }, + color: { + red: 20, + green: 200, + blue: 50 + } + }); +} + +Controller.mouseMoveEvent.connect(mouseMoveEvent); +Controller.mousePressEvent.connect(mousePressEvent); +Controller.mouseReleaseEvent.connect(mouseReleaseEvent); +Controller.keyPressEvent.connect(keyPressEvent); +Controller.keyReleaseEvent.connect(keyReleaseEvent); +Script.scriptEnding.connect(cleanup); \ No newline at end of file From 489fbaac5765e6b68e821a6b40557b361df02dfa Mon Sep 17 00:00:00 2001 From: Eric Levin Date: Wed, 29 Apr 2015 09:45:58 -0700 Subject: [PATCH 7/9] added grab.js to defaultScripts.js --- examples/defaultScripts.js | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/defaultScripts.js b/examples/defaultScripts.js index 05ffb0bd3f..a5c086fc44 100644 --- a/examples/defaultScripts.js +++ b/examples/defaultScripts.js @@ -18,3 +18,4 @@ Script.load("lobby.js"); Script.load("notifications.js"); Script.load("look.js"); Script.load("users.js"); +Script.load("grab.js"); From 36a26ad416077bfae082f50cd5224a7a1d6bd6ea Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Wed, 29 Apr 2015 09:58:54 -0700 Subject: [PATCH 8/9] update BUILD.md for new OpenSSL req --- BUILD.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BUILD.md b/BUILD.md index 0de8d32b82..a5ee32262f 100644 --- a/BUILD.md +++ b/BUILD.md @@ -2,8 +2,8 @@ * [cmake](http://www.cmake.org/cmake/resources/software.html) ~> 2.8.12.2 * [Qt](http://www.qt.io/download-open-source) ~> 5.4.1 -* [OpenSSL](https://www.openssl.org/related/binaries.html) ~> 1.0.1g - * IMPORTANT: OpenSSL 1.0.1g is critical to avoid a security vulnerability. +* [OpenSSL](https://www.openssl.org/related/binaries.html) ~> 1.0.1m + * IMPORTANT: Using the recommended version of OpenSSL is critical to avoid security vulnerabilities. * [VHACD](https://github.com/virneo/v-hacd)(clone this repository)(Optional) ####CMake External Project Dependencies From e933ab2e84d3a59eae9bca0deca33170133e9d65 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Wed, 29 Apr 2015 09:59:20 -0700 Subject: [PATCH 9/9] update win required version of OpenSSL --- BUILD_WIN.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BUILD_WIN.md b/BUILD_WIN.md index 80b8c35502..169077ed78 100644 --- a/BUILD_WIN.md +++ b/BUILD_WIN.md @@ -71,7 +71,7 @@ Your system may already have several versions of the OpenSSL DLL's (ssleay32.dll To prevent these problems, install OpenSSL yourself. Download the following binary packages [from this website](http://slproweb.com/products/Win32OpenSSL.html): * Visual C++ 2008 Redistributables -* Win32 OpenSSL v1.0.1L +* Win32 OpenSSL v1.0.1m Install OpenSSL into the Windows system directory, to make sure that Qt uses the version that you've just installed, and not some other version.