From 3426173d1d1bb311dc05e9ca9e018b089fa30152 Mon Sep 17 00:00:00 2001 From: "Anthony J. Thibault" Date: Wed, 17 Feb 2016 11:44:11 -0800 Subject: [PATCH 01/24] AnimInverseKinematics: open up shoulder swing constraint. --- libraries/animation/src/AnimInverseKinematics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/animation/src/AnimInverseKinematics.cpp b/libraries/animation/src/AnimInverseKinematics.cpp index ff1dea3d48..48ad9b852d 100644 --- a/libraries/animation/src/AnimInverseKinematics.cpp +++ b/libraries/animation/src/AnimInverseKinematics.cpp @@ -670,7 +670,7 @@ void AnimInverseKinematics::initConstraints() { stConstraint->setTwistLimits(-MAX_SHOULDER_TWIST, MAX_SHOULDER_TWIST); std::vector minDots; - const float MAX_SHOULDER_SWING = PI / 20.0f; + const float MAX_SHOULDER_SWING = PI / 6.0f; minDots.push_back(cosf(MAX_SHOULDER_SWING)); stConstraint->setSwingLimits(minDots); From 73ac47724af70abf2fd7a3739f20adbd1701133b Mon Sep 17 00:00:00 2001 From: "Anthony J. Thibault" Date: Wed, 17 Feb 2016 16:23:18 -0800 Subject: [PATCH 02/24] Rig: Prevent the hand IK targets from entering the body. Use a 2d circle/circle intersection test to keep the hands outside of the body. --- interface/src/avatar/SkeletonModel.cpp | 1 + libraries/animation/src/Rig.cpp | 39 +++++++++++++++++++-- libraries/animation/src/Rig.h | 1 + libraries/physics/src/CharacterController.h | 2 ++ 4 files changed, 41 insertions(+), 2 deletions(-) diff --git a/interface/src/avatar/SkeletonModel.cpp b/interface/src/avatar/SkeletonModel.cpp index c77c4fdd78..e4c98215c2 100644 --- a/interface/src/avatar/SkeletonModel.cpp +++ b/interface/src/avatar/SkeletonModel.cpp @@ -144,6 +144,7 @@ void SkeletonModel::updateRig(float deltaTime, glm::mat4 parentTransform) { } else { handParams.isRightEnabled = false; } + handParams.bodyCapsuleRadius = myAvatar->getCharacterController()->getCapsuleRadius(); _rig->updateFromHandParameters(handParams, deltaTime); diff --git a/libraries/animation/src/Rig.cpp b/libraries/animation/src/Rig.cpp index 817054a9f5..718ae9bb79 100644 --- a/libraries/animation/src/Rig.cpp +++ b/libraries/animation/src/Rig.cpp @@ -1080,8 +1080,29 @@ void Rig::updateEyeJoint(int index, const glm::vec3& modelTranslation, const glm void Rig::updateFromHandParameters(const HandParameters& params, float dt) { if (_animSkeleton && _animNode) { + + const float HAND_RADIUS = 0.05f; + const float BODY_RADIUS = params.bodyCapsuleRadius; + + // project the hips onto the xz plane. + auto hipsTrans = _internalPoseSet._absolutePoses[_animSkeleton->nameToJointIndex("Hips")].trans; + const glm::vec2 bodyCircleCenter(hipsTrans.x, hipsTrans.z); + if (params.isLeftEnabled) { - _animVars.set("leftHandPosition", params.leftPosition); + + // project the hand position onto the xz plane. + glm::vec2 handCircleCenter(params.leftPosition.x, params.leftPosition.z); + auto d = handCircleCenter - bodyCircleCenter; + + // check for 2d overlap of the hand and body circles. + float penetrationDistance = HAND_RADIUS + BODY_RADIUS - glm::length(d); + if (penetrationDistance > 0) { + // push the hands out of the body + handCircleCenter += penetrationDistance * glm::normalize(d); + } + + glm::vec3 handPosition(handCircleCenter.x, params.leftPosition.y, handCircleCenter.y); + _animVars.set("leftHandPosition", handPosition); _animVars.set("leftHandRotation", params.leftOrientation); _animVars.set("leftHandType", (int)IKTarget::Type::RotationAndPosition); } else { @@ -1089,8 +1110,22 @@ void Rig::updateFromHandParameters(const HandParameters& params, float dt) { _animVars.unset("leftHandRotation"); _animVars.set("leftHandType", (int)IKTarget::Type::HipsRelativeRotationAndPosition); } + if (params.isRightEnabled) { - _animVars.set("rightHandPosition", params.rightPosition); + + // project the hand position onto the xz plane. + glm::vec2 handCircleCenter(params.rightPosition.x, params.rightPosition.z); + auto d = handCircleCenter - bodyCircleCenter; + + // check for 2d overlap of the hand and body circles. + float penetrationDistance = HAND_RADIUS + BODY_RADIUS - glm::length(d); + if (penetrationDistance > 0) { + // push the hands out of the body + handCircleCenter += penetrationDistance * glm::normalize(d); + } + + glm::vec3 handPosition(handCircleCenter.x, params.rightPosition.y, handCircleCenter.y); + _animVars.set("rightHandPosition", handPosition); _animVars.set("rightHandRotation", params.rightOrientation); _animVars.set("rightHandType", (int)IKTarget::Type::RotationAndPosition); } else { diff --git a/libraries/animation/src/Rig.h b/libraries/animation/src/Rig.h index e4668d6c2a..9c5b014d55 100644 --- a/libraries/animation/src/Rig.h +++ b/libraries/animation/src/Rig.h @@ -67,6 +67,7 @@ public: struct HandParameters { bool isLeftEnabled; bool isRightEnabled; + float bodyCapsuleRadius; glm::vec3 leftPosition = glm::vec3(); // rig space glm::quat leftOrientation = glm::quat(); // rig space (z forward) glm::vec3 rightPosition = glm::vec3(); // rig space diff --git a/libraries/physics/src/CharacterController.h b/libraries/physics/src/CharacterController.h index 5362ca52e4..a8543d6070 100644 --- a/libraries/physics/src/CharacterController.h +++ b/libraries/physics/src/CharacterController.h @@ -78,6 +78,8 @@ public: glm::vec3 getLinearVelocity() const; + float getCapsuleRadius() const { return _radius; } + enum class State { Ground = 0, Takeoff, From 613b60658ec716f772bc6163cec58e75738e9518 Mon Sep 17 00:00:00 2001 From: "Anthony J. Thibault" Date: Thu, 18 Feb 2016 10:24:36 -0800 Subject: [PATCH 03/24] Rig: prevent normalization of a zero vector --- libraries/animation/src/Rig.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/libraries/animation/src/Rig.cpp b/libraries/animation/src/Rig.cpp index 718ae9bb79..3952dc5b40 100644 --- a/libraries/animation/src/Rig.cpp +++ b/libraries/animation/src/Rig.cpp @@ -1083,6 +1083,7 @@ void Rig::updateFromHandParameters(const HandParameters& params, float dt) { const float HAND_RADIUS = 0.05f; const float BODY_RADIUS = params.bodyCapsuleRadius; + const float MIN_LENGTH = 1.0e-4f; // project the hips onto the xz plane. auto hipsTrans = _internalPoseSet._absolutePoses[_animSkeleton->nameToJointIndex("Hips")].trans; @@ -1092,13 +1093,14 @@ void Rig::updateFromHandParameters(const HandParameters& params, float dt) { // project the hand position onto the xz plane. glm::vec2 handCircleCenter(params.leftPosition.x, params.leftPosition.z); - auto d = handCircleCenter - bodyCircleCenter; // check for 2d overlap of the hand and body circles. - float penetrationDistance = HAND_RADIUS + BODY_RADIUS - glm::length(d); - if (penetrationDistance > 0) { + auto circleToCircle = handCircleCenter - bodyCircleCenter; + const float circleToCircleLength = glm::length(circleToCircle); + const float penetrationDistance = HAND_RADIUS + BODY_RADIUS - circleToCircleLength; + if (penetrationDistance > 0.0f && circleToCircleLength > MIN_LENGTH) { // push the hands out of the body - handCircleCenter += penetrationDistance * glm::normalize(d); + handCircleCenter += penetrationDistance * glm::normalize(circleToCircle); } glm::vec3 handPosition(handCircleCenter.x, params.leftPosition.y, handCircleCenter.y); @@ -1115,13 +1117,14 @@ void Rig::updateFromHandParameters(const HandParameters& params, float dt) { // project the hand position onto the xz plane. glm::vec2 handCircleCenter(params.rightPosition.x, params.rightPosition.z); - auto d = handCircleCenter - bodyCircleCenter; // check for 2d overlap of the hand and body circles. - float penetrationDistance = HAND_RADIUS + BODY_RADIUS - glm::length(d); - if (penetrationDistance > 0) { + auto circleToCircle = handCircleCenter - bodyCircleCenter; + const float circleToCircleLength = glm::length(circleToCircle); + const float penetrationDistance = HAND_RADIUS + BODY_RADIUS - circleToCircleLength; + if (penetrationDistance > 0.0f && circleToCircleLength > MIN_LENGTH) { // push the hands out of the body - handCircleCenter += penetrationDistance * glm::normalize(d); + handCircleCenter += penetrationDistance * glm::normalize(circleToCircle); } glm::vec3 handPosition(handCircleCenter.x, params.rightPosition.y, handCircleCenter.y); From eabeb9807671d3fd1cd3040adfdae3af0e8ddcc9 Mon Sep 17 00:00:00 2001 From: ericrius1 Date: Thu, 18 Feb 2016 11:50:26 -0800 Subject: [PATCH 04/24] injector load --- examples/audioExamples/injectorLoadTest.js | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 examples/audioExamples/injectorLoadTest.js diff --git a/examples/audioExamples/injectorLoadTest.js b/examples/audioExamples/injectorLoadTest.js new file mode 100644 index 0000000000..e25e964f3c --- /dev/null +++ b/examples/audioExamples/injectorLoadTest.js @@ -0,0 +1,55 @@ +// +// injectorLoadTest.js +// audio +// +// Created by Eric Levin 2/1/2016 +// Copyright 2016 High Fidelity, Inc. + +// This script tests what happens when many audio injectors are created and played +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html + + +Script.include("../libraries/utils.js"); + +// A green box represents an injector that is playing + +var basePosition = { + x: 0, + y: 0, + z: 0 +}; + +var soundBoxes = []; + +var testSound = SoundCache.getSound("https://s3-us-west-1.amazonaws.com/hifi-content/eric/Sounds/dove.wav"); + +var numSounds = 45; +for (var i = 0; i < numSounds; i++) { + playSound(); +} + +function playSound() { + var position = Vec3.sum(basePosition, {x: randFloat(-.1, .1), y: randFloat(-1, 1), z: randFloat(-3, -.1)}); + var injector = Audio.playSound(testSound, { + position: position, + volume: 0.3 + }); + + var soundBox = Entities.addEntity({ + type: "Box", + color: {red: 200, green: 10, blue: 200}, + dimensions: {x: 0.1, y: 0.1, z: 0.1}, + position: position + }); + + soundBoxes.push(soundBox); +} + +function cleanup() { + soundBoxes.forEach( function(soundBox) { + Entities.deleteEntity(soundBox); + }); +} + +Script.scriptEnding.connect(cleanup); \ No newline at end of file From 1d9b3fadaf19e1213616c2c166e0865cf1a37f06 Mon Sep 17 00:00:00 2001 From: ericrius1 Date: Thu, 18 Feb 2016 12:00:24 -0800 Subject: [PATCH 05/24] more logging --- examples/audioExamples/injectorLoadTest.js | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/examples/audioExamples/injectorLoadTest.js b/examples/audioExamples/injectorLoadTest.js index e25e964f3c..d394e3a49b 100644 --- a/examples/audioExamples/injectorLoadTest.js +++ b/examples/audioExamples/injectorLoadTest.js @@ -24,11 +24,26 @@ var soundBoxes = []; var testSound = SoundCache.getSound("https://s3-us-west-1.amazonaws.com/hifi-content/eric/Sounds/dove.wav"); -var numSounds = 45; -for (var i = 0; i < numSounds; i++) { - playSound(); +if(!testSound.downloaded) { + + print("EBL SOUND IS NOT READY YET") + testSound.ready.connect(function() { + playSounds(); + }); +} else { + // otherwise play sounds right away + playSounds(); } +function playSounds() { + print("EBL PLAY SOUNDS!") + var numSounds = 45; + for (var i = 0; i < numSounds; i++) { + playSound(); + } +} + + function playSound() { var position = Vec3.sum(basePosition, {x: randFloat(-.1, .1), y: randFloat(-1, 1), z: randFloat(-3, -.1)}); var injector = Audio.playSound(testSound, { From ec1c7925c04c55c657e8f2ff603e871d0775172d Mon Sep 17 00:00:00 2001 From: ericrius1 Date: Thu, 18 Feb 2016 12:02:22 -0800 Subject: [PATCH 06/24] updated logging --- examples/audioExamples/injectorLoadTest.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/audioExamples/injectorLoadTest.js b/examples/audioExamples/injectorLoadTest.js index d394e3a49b..35e3e07868 100644 --- a/examples/audioExamples/injectorLoadTest.js +++ b/examples/audioExamples/injectorLoadTest.js @@ -26,7 +26,7 @@ var testSound = SoundCache.getSound("https://s3-us-west-1.amazonaws.com/hifi-con if(!testSound.downloaded) { - print("EBL SOUND IS NOT READY YET") + print("SOUND IS NOT READY YET") testSound.ready.connect(function() { playSounds(); }); @@ -36,7 +36,7 @@ if(!testSound.downloaded) { } function playSounds() { - print("EBL PLAY SOUNDS!") + print("PLAY SOUNDS!") var numSounds = 45; for (var i = 0; i < numSounds; i++) { playSound(); From efbb5ec9670a3955912c10de1d1abd4d6c0899f0 Mon Sep 17 00:00:00 2001 From: ericrius1 Date: Thu, 18 Feb 2016 12:14:30 -0800 Subject: [PATCH 07/24] updated test --- examples/audioExamples/injectorLoadTest.js | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/examples/audioExamples/injectorLoadTest.js b/examples/audioExamples/injectorLoadTest.js index 35e3e07868..3842678590 100644 --- a/examples/audioExamples/injectorLoadTest.js +++ b/examples/audioExamples/injectorLoadTest.js @@ -12,6 +12,9 @@ Script.include("../libraries/utils.js"); + +var numSoundsToPlayPerBatch = 1; +var timeBetweenBatch = 100; // A green box represents an injector that is playing var basePosition = { @@ -23,6 +26,7 @@ var basePosition = { var soundBoxes = []; var testSound = SoundCache.getSound("https://s3-us-west-1.amazonaws.com/hifi-content/eric/Sounds/dove.wav"); +var totalInjectors = 0; if(!testSound.downloaded) { @@ -37,10 +41,14 @@ if(!testSound.downloaded) { function playSounds() { print("PLAY SOUNDS!") - var numSounds = 45; - for (var i = 0; i < numSounds; i++) { + for (var i = 0; i < numSoundsToPlayPerBatch; i++) { playSound(); - } + } + print("EBL Total Number of Injectors: " + totalInjectors); + + Script.setTimeout(function() { + playSounds(); + }, timeBetweenBatch); } @@ -48,8 +56,9 @@ function playSound() { var position = Vec3.sum(basePosition, {x: randFloat(-.1, .1), y: randFloat(-1, 1), z: randFloat(-3, -.1)}); var injector = Audio.playSound(testSound, { position: position, - volume: 0.3 + volume: 0.1 }); + totalInjectors++; var soundBox = Entities.addEntity({ type: "Box", From b0664b587f52dbaa312dc8dc8ccf2429642361ed Mon Sep 17 00:00:00 2001 From: ericrius1 Date: Thu, 18 Feb 2016 15:39:38 -0800 Subject: [PATCH 08/24] bumped injector count --- examples/audioExamples/injectorLoadTest.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/audioExamples/injectorLoadTest.js b/examples/audioExamples/injectorLoadTest.js index 3842678590..3af54c4c48 100644 --- a/examples/audioExamples/injectorLoadTest.js +++ b/examples/audioExamples/injectorLoadTest.js @@ -13,8 +13,9 @@ Script.include("../libraries/utils.js"); -var numSoundsToPlayPerBatch = 1; -var timeBetweenBatch = 100; +var numSoundsToPlayPerBatch = 41 +var numSoundsPlaying = 0; +var timeBetweenBatch = 10000; // A green box represents an injector that is playing var basePosition = { @@ -58,6 +59,9 @@ function playSound() { position: position, volume: 0.1 }); + + print("INJECTOR VALUE: " + JSON.stringify(injector)); + totalInjectors++; var soundBox = Entities.addEntity({ From c3a687e294aa475dfbba0257d5e538186c7aeb0d Mon Sep 17 00:00:00 2001 From: ericrius1 Date: Thu, 18 Feb 2016 16:06:53 -0800 Subject: [PATCH 09/24] ac test --- examples/audioExamples/injectorLoadTest.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/examples/audioExamples/injectorLoadTest.js b/examples/audioExamples/injectorLoadTest.js index 3af54c4c48..af4dcaecf7 100644 --- a/examples/audioExamples/injectorLoadTest.js +++ b/examples/audioExamples/injectorLoadTest.js @@ -15,7 +15,7 @@ Script.include("../libraries/utils.js"); var numSoundsToPlayPerBatch = 41 var numSoundsPlaying = 0; -var timeBetweenBatch = 10000; +var timeBetweenBatch = 100000; // A green box represents an injector that is playing var basePosition = { @@ -45,6 +45,10 @@ function playSounds() { for (var i = 0; i < numSoundsToPlayPerBatch; i++) { playSound(); } + + Script.setTimeout(function() { + numSoundsPlaying = 0; + }, 1500); print("EBL Total Number of Injectors: " + totalInjectors); Script.setTimeout(function() { @@ -57,11 +61,13 @@ function playSound() { var position = Vec3.sum(basePosition, {x: randFloat(-.1, .1), y: randFloat(-1, 1), z: randFloat(-3, -.1)}); var injector = Audio.playSound(testSound, { position: position, - volume: 0.1 + volume: 0.2 }); + numSoundsPlaying++; + print("NUM SOUNDS PLAYING: " + numSoundsPlaying); + print("*******************************************"); print("INJECTOR VALUE: " + JSON.stringify(injector)); - totalInjectors++; var soundBox = Entities.addEntity({ From bc0216633e45deab2e27246fca289a8c6ecc0db6 Mon Sep 17 00:00:00 2001 From: ericrius1 Date: Thu, 18 Feb 2016 16:10:12 -0800 Subject: [PATCH 10/24] more logging --- examples/audioExamples/injectorLoadTest.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/audioExamples/injectorLoadTest.js b/examples/audioExamples/injectorLoadTest.js index af4dcaecf7..cc9d47e17e 100644 --- a/examples/audioExamples/injectorLoadTest.js +++ b/examples/audioExamples/injectorLoadTest.js @@ -13,7 +13,7 @@ Script.include("../libraries/utils.js"); -var numSoundsToPlayPerBatch = 41 +var numSoundsToPlayPerBatch = 60 var numSoundsPlaying = 0; var timeBetweenBatch = 100000; // A green box represents an injector that is playing From d0660fc90a01893a0ac7a116f258ed917db91cde Mon Sep 17 00:00:00 2001 From: ericrius1 Date: Thu, 18 Feb 2016 16:17:22 -0800 Subject: [PATCH 11/24] logging --- examples/audioExamples/injectorLoadTest.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/audioExamples/injectorLoadTest.js b/examples/audioExamples/injectorLoadTest.js index cc9d47e17e..d34117f56c 100644 --- a/examples/audioExamples/injectorLoadTest.js +++ b/examples/audioExamples/injectorLoadTest.js @@ -13,9 +13,9 @@ Script.include("../libraries/utils.js"); -var numSoundsToPlayPerBatch = 60 +var numSoundsToPlayPerBatch = 50 var numSoundsPlaying = 0; -var timeBetweenBatch = 100000; +var timeBetweenBatch = 30000; // A green box represents an injector that is playing var basePosition = { @@ -67,7 +67,8 @@ function playSound() { numSoundsPlaying++; print("NUM SOUNDS PLAYING: " + numSoundsPlaying); print("*******************************************"); - print("INJECTOR VALUE: " + JSON.stringify(injector)); + print("INJECTOR VALUE: ") + print(JSON.stringify(injector)); totalInjectors++; var soundBox = Entities.addEntity({ From 4b29921e639423e87b09d9dc29915de4fde3d76d Mon Sep 17 00:00:00 2001 From: "James B. Pollack" Date: Thu, 18 Feb 2016 16:41:29 -0800 Subject: [PATCH 12/24] media! --- interface/resources/qml/controls/WebView.qml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/interface/resources/qml/controls/WebView.qml b/interface/resources/qml/controls/WebView.qml index c7ae322cba..6ff66d6192 100644 --- a/interface/resources/qml/controls/WebView.qml +++ b/interface/resources/qml/controls/WebView.qml @@ -11,6 +11,7 @@ WebEngineView { root.javaScriptConsoleMessage.connect(function(level, message, lineNumber, sourceID) { console.log("Web Window JS message: " + sourceID + " " + lineNumber + " " + message); }); + } // FIXME hack to get the URL with the auth token included. Remove when we move to Qt 5.6 @@ -36,6 +37,10 @@ WebEngineView { } } + onFeaturePermissionRequested: { + grantFeaturePermission(securityOrigin, feature, true); + } + onLoadingChanged: { // Required to support clicking on "hifi://" links if (WebEngineView.LoadStartedStatus == loadRequest.status) { From d73728ae78bf36d3f9598319a1a1fb016b24b356 Mon Sep 17 00:00:00 2001 From: "James B. Pollack" Date: Thu, 18 Feb 2016 16:58:34 -0800 Subject: [PATCH 13/24] add to browser --- interface/resources/qml/Browser.qml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/interface/resources/qml/Browser.qml b/interface/resources/qml/Browser.qml index 382acc237c..110011d2c0 100644 --- a/interface/resources/qml/Browser.qml +++ b/interface/resources/qml/Browser.qml @@ -129,6 +129,10 @@ Window { id: webviewProfile storageName: "qmlUserBrowser" } + + onFeaturePermissionRequested: { + grantFeaturePermission(securityOrigin, feature, true); + } } } // item From 981d4d37cad84f0de243ea62a2f65c5fd547c20f Mon Sep 17 00:00:00 2001 From: Zach Pomerantz Date: Thu, 18 Feb 2016 17:45:52 -0800 Subject: [PATCH 14/24] Update render/debug.js - Add a toggle for the entire UI - Set items sliders minimums to -1 - Fix off-by-one with debug buffer radios --- examples/utilities/tools/render/debug.js | 3 - examples/utilities/tools/render/main.qml | 169 ++++++++++++----------- 2 files changed, 90 insertions(+), 82 deletions(-) diff --git a/examples/utilities/tools/render/debug.js b/examples/utilities/tools/render/debug.js index f195c607a4..8aac9c270e 100644 --- a/examples/utilities/tools/render/debug.js +++ b/examples/utilities/tools/render/debug.js @@ -14,9 +14,6 @@ Render.RenderShadowTask.enabled = true; var RDT = Render.RenderDeferredTask; RDT.AmbientOcclusion.enabled = true; RDT.DebugDeferredBuffer.enabled = false; -["DrawOpaqueDeferred", "DrawTransparentDeferred", "DrawOverlay3DOpaque", "DrawOverlay3DTransparent"] - .map(function(name) { return RDT[name]; }) - .forEach(function(job) { job.maxDrawn = job.numDrawn; }); // Set up the qml ui var qml = Script.resolvePath('main.qml'); diff --git a/examples/utilities/tools/render/main.qml b/examples/utilities/tools/render/main.qml index 9e825ad4df..22f263b2d0 100644 --- a/examples/utilities/tools/render/main.qml +++ b/examples/utilities/tools/render/main.qml @@ -12,98 +12,109 @@ import QtQuick 2.5 import QtQuick.Controls 1.4 Column { - spacing: 8 - - Repeater { - model: [ "Opaque:DrawOpaqueDeferred", "Transparent:DrawTransparentDeferred", - "Opaque Overlays:DrawOverlay3DOpaque", "Transparent Overlays:DrawOverlay3DTransparent" ] - ConfigSlider { - label: qsTr(modelData.split(":")[0]) - integral: true - config: Render.getConfig(modelData.split(":")[1]) - property: "maxDrawn" - max: config.numDrawn - } - } - - Row { - CheckBox { - text: qsTr("Display Status") - onCheckedChanged: { Render.getConfig("DrawStatus").showDisplay = checked } - } - CheckBox { - text: qsTr("Network/Physics Status") - onCheckedChanged: { Render.getConfig("DrawStatus").showNetwork = checked } - } - } - - ConfigSlider { - label: qsTr("Tone Mapping Exposure") - config: Render.getConfig("ToneMapping") - property: "exposure" - min: -10; max: 10 + id: root + spacing: 16 + Switch { + checked: true + onClicked: ui.visible = checked } Column { - id: ambientOcclusion - property var config: Render.getConfig("AmbientOcclusion") + id: ui + spacing: 8 - Label { text: qsTr("Ambient Occlusion") } - // TODO: Add gpuTimer - CheckBox { text: qsTr("Dithering"); checked: ambientOcclusion.config.ditheringEnabled } Repeater { - model: [ - "Resolution Level:resolutionLevel:4", - "Obscurance Level:obscuranceLevel:1", - "Radius:radius:2", - "Falloff Bias:falloffBias:0.2", - "Edge Sharpness:edgeSharpness:1", - "Blur Radius:blurRadius:6", - "Blur Deviation:blurDeviation:3" - ] - ConfigSlider { - label: qsTr(modelData.split(":")[0]) - config: ambientOcclusion.config - property: modelData.split(":")[1] - max: modelData.split(":")[2] - } - } - Repeater { - model: [ - "Samples:numSamples:32", - "Spiral Turns:numSpiralTurns:30:" - ] + model: [ "Opaque:DrawOpaqueDeferred", "Transparent:DrawTransparentDeferred", + "Opaque Overlays:DrawOverlay3DOpaque", "Transparent Overlays:DrawOverlay3DTransparent" ] ConfigSlider { label: qsTr(modelData.split(":")[0]) integral: true - config: ambientOcclusion.config - property: modelData.split(":")[1] - max: modelData.split(":")[2] + config: Render.getConfig(modelData.split(":")[1]) + property: "maxDrawn" + max: config.numDrawn + min: -1 } } - } - Column { - id: debug - property var config: Render.getConfig("DebugDeferredBuffer") - - function setDebugMode(mode) { - debug.config.enabled = (mode != 0); - debug.config.mode = mode; + Row { + CheckBox { + text: qsTr("Display Status") + onCheckedChanged: { Render.getConfig("DrawStatus").showDisplay = checked } + } + CheckBox { + text: qsTr("Network/Physics Status") + onCheckedChanged: { Render.getConfig("DrawStatus").showNetwork = checked } + } } - Label { text: qsTr("Debug Buffer") } - ExclusiveGroup { id: bufferGroup } - Repeater { - model: [ - "Off", "Diffuse", "Metallic", "Roughness", "Normal", "Depth", - "Lighting", "Shadow", "Pyramid Depth", "Ambient Occlusion", "Custom Shader" - ] - RadioButton { - text: qsTr(modelData) - exclusiveGroup: bufferGroup - checked: index == 0 - onCheckedChanged: if (checked) debug.setDebugMode(index); + ConfigSlider { + label: qsTr("Tone Mapping Exposure") + config: Render.getConfig("ToneMapping") + property: "exposure" + min: -10; max: 10 + } + + Column { + id: ambientOcclusion + property var config: Render.getConfig("AmbientOcclusion") + + Label { text: qsTr("Ambient Occlusion") } + // TODO: Add gpuTimer + CheckBox { text: qsTr("Dithering"); checked: ambientOcclusion.config.ditheringEnabled } + Repeater { + model: [ + "Resolution Level:resolutionLevel:4", + "Obscurance Level:obscuranceLevel:1", + "Radius:radius:2", + "Falloff Bias:falloffBias:0.2", + "Edge Sharpness:edgeSharpness:1", + "Blur Radius:blurRadius:6", + "Blur Deviation:blurDeviation:3" + ] + ConfigSlider { + label: qsTr(modelData.split(":")[0]) + config: ambientOcclusion.config + property: modelData.split(":")[1] + max: modelData.split(":")[2] + } + } + Repeater { + model: [ + "Samples:numSamples:32", + "Spiral Turns:numSpiralTurns:30:" + ] + ConfigSlider { + label: qsTr(modelData.split(":")[0]) + integral: true + config: ambientOcclusion.config + property: modelData.split(":")[1] + max: modelData.split(":")[2] + } + } + } + + Column { + id: debug + property var config: Render.getConfig("DebugDeferredBuffer") + + function setDebugMode(mode) { + debug.config.enabled = (mode != 0); + debug.config.mode = mode; + } + + Label { text: qsTr("Debug Buffer") } + ExclusiveGroup { id: bufferGroup } + Repeater { + model: [ + "Off", "Diffuse", "Metallic", "Roughness", "Normal", "Depth", + "Lighting", "Shadow", "Pyramid Depth", "Ambient Occlusion", "Custom Shader" + ] + RadioButton { + text: qsTr(modelData) + exclusiveGroup: bufferGroup + checked: index == 0 + onCheckedChanged: if (checked && index > 0) debug.setDebugMode(index - 1); + } } } } From 93f61fce7aa0f36f0e6bc2427dbf7bd953c7451a Mon Sep 17 00:00:00 2001 From: Anthony Thibault Date: Thu, 18 Feb 2016 18:00:04 -0800 Subject: [PATCH 15/24] OpenVRDisplayPlugin: predict poses for better tracking Extrapolate the next set of poses for HMD and hand controllers. Currently we predict 44ms into the future, this seems too high, however it was discovered by inspection to be the best value. Obviously there is a source of latency that we need to track down, however even with this latency, it is a much improved experience. --- plugins/openvr/src/OpenVrDisplayPlugin.cpp | 48 ++++++++++++---------- plugins/openvr/src/OpenVrDisplayPlugin.h | 2 +- 2 files changed, 28 insertions(+), 22 deletions(-) diff --git a/plugins/openvr/src/OpenVrDisplayPlugin.cpp b/plugins/openvr/src/OpenVrDisplayPlugin.cpp index 7575cc83e7..353b248302 100644 --- a/plugins/openvr/src/OpenVrDisplayPlugin.cpp +++ b/plugins/openvr/src/OpenVrDisplayPlugin.cpp @@ -30,7 +30,6 @@ const QString OpenVrDisplayPlugin::NAME("OpenVR (Vive)"); const QString StandingHMDSensorMode = "Standing HMD Sensor Mode"; // this probably shouldn't be hardcoded here static vr::IVRCompositor* _compositor{ nullptr }; -static vr::TrackedDevicePose_t _presentThreadTrackedDevicePose[vr::k_unMaxTrackedDeviceCount]; vr::TrackedDevicePose_t _trackedDevicePose[vr::k_unMaxTrackedDeviceCount]; mat4 _trackedDevicePoseMat4[vr::k_unMaxTrackedDeviceCount]; static mat4 _sensorResetMat; @@ -43,12 +42,12 @@ bool OpenVrDisplayPlugin::isSupported() const { void OpenVrDisplayPlugin::activate() { _container->setIsOptionChecked(StandingHMDSensorMode, true); - if (!_hmd) { - _hmd = acquireOpenVrSystem(); + if (!_system) { + _system = acquireOpenVrSystem(); } - Q_ASSERT(_hmd); + Q_ASSERT(_system); - _hmd->GetRecommendedRenderTargetSize(&_renderTargetSize.x, &_renderTargetSize.y); + _system->GetRecommendedRenderTargetSize(&_renderTargetSize.x, &_renderTargetSize.y); // Recommended render target size is per-eye, so double the X size for // left + right eyes _renderTargetSize.x *= 2; @@ -56,8 +55,8 @@ void OpenVrDisplayPlugin::activate() { { Lock lock(_poseMutex); openvr_for_each_eye([&](vr::Hmd_Eye eye) { - _eyeOffsets[eye] = toGlm(_hmd->GetEyeToHeadTransform(eye)); - _eyeProjections[eye] = toGlm(_hmd->GetProjectionMatrix(eye, DEFAULT_NEAR_CLIP, DEFAULT_FAR_CLIP, vr::API_OpenGL)); + _eyeOffsets[eye] = toGlm(_system->GetEyeToHeadTransform(eye)); + _eyeProjections[eye] = toGlm(_system->GetProjectionMatrix(eye, DEFAULT_NEAR_CLIP, DEFAULT_FAR_CLIP, vr::API_OpenGL)); }); // FIXME Calculate the proper combined projection by using GetProjectionRaw values from both eyes _cullingProjection = _eyeProjections[0]; @@ -71,9 +70,9 @@ void OpenVrDisplayPlugin::activate() { void OpenVrDisplayPlugin::deactivate() { _container->setIsOptionChecked(StandingHMDSensorMode, false); - if (_hmd) { + if (_system) { releaseOpenVrSystem(); - _hmd = nullptr; + _system = nullptr; } _compositor = nullptr; HmdDisplayPlugin::deactivate(); @@ -96,9 +95,24 @@ void OpenVrDisplayPlugin::resetSensors() { _sensorResetMat = glm::inverse(cancelOutRollAndPitch(m)); } - glm::mat4 OpenVrDisplayPlugin::getHeadPose(uint32_t frameIndex) const { - Lock lock(_poseMutex); + + float displayFrequency = _system->GetFloatTrackedDeviceProperty(vr::k_unTrackedDeviceIndex_Hmd, vr::Prop_DisplayFrequency_Float); + float frameDuration = 1.f / displayFrequency; + float vsyncToPhotons = _system->GetFloatTrackedDeviceProperty(vr::k_unTrackedDeviceIndex_Hmd, vr::Prop_SecondsFromVsyncToPhotons_Float); + + // TODO: this seems awfuly long, 44ms total, but it produced the best results. + const float NUM_PREDICTION_FRAMES = 3.0f; + float predictedSecondsFromNow = NUM_PREDICTION_FRAMES * frameDuration + vsyncToPhotons; + + vr::TrackedDevicePose_t predictedTrackedDevicePose[vr::k_unMaxTrackedDeviceCount]; + _system->GetDeviceToAbsoluteTrackingPose(vr::TrackingUniverseSeated, predictedSecondsFromNow, predictedTrackedDevicePose, vr::k_unMaxTrackedDeviceCount); + + // copy and process predictedTrackedDevicePoses + for (int i = 0; i < vr::k_unMaxTrackedDeviceCount; i++) { + _trackedDevicePose[i] = predictedTrackedDevicePose[i]; + _trackedDevicePoseMat4[i] = _sensorResetMat * toGlm(_trackedDevicePose[i].mDeviceToAbsoluteTracking); + } return _trackedDevicePoseMat4[0]; } @@ -114,16 +128,8 @@ void OpenVrDisplayPlugin::internalPresent() { glFinish(); - _compositor->WaitGetPoses(_presentThreadTrackedDevicePose, vr::k_unMaxTrackedDeviceCount, nullptr, 0); - - { - // copy and process _presentThreadTrackedDevicePoses - Lock lock(_poseMutex); - for (int i = 0; i < vr::k_unMaxTrackedDeviceCount; i++) { - _trackedDevicePose[i] = _presentThreadTrackedDevicePose[i]; - _trackedDevicePoseMat4[i] = _sensorResetMat * toGlm(_trackedDevicePose[i].mDeviceToAbsoluteTracking); - } - } + vr::TrackedDevicePose_t currentTrackedDevicePose[vr::k_unMaxTrackedDeviceCount]; + _compositor->WaitGetPoses(currentTrackedDevicePose, vr::k_unMaxTrackedDeviceCount, nullptr, 0); // Handle the mirroring in the base class HmdDisplayPlugin::internalPresent(); diff --git a/plugins/openvr/src/OpenVrDisplayPlugin.h b/plugins/openvr/src/OpenVrDisplayPlugin.h index 9c480e48f7..4344c3c48f 100644 --- a/plugins/openvr/src/OpenVrDisplayPlugin.h +++ b/plugins/openvr/src/OpenVrDisplayPlugin.h @@ -35,7 +35,7 @@ protected: virtual void internalPresent() override; private: - vr::IVRSystem* _hmd { nullptr }; + vr::IVRSystem* _system { nullptr }; static const QString NAME; mutable Mutex _poseMutex; }; From 33a232edde27abbdf91483ecb6f03af8f965dcd8 Mon Sep 17 00:00:00 2001 From: ericrius1 Date: Thu, 18 Feb 2016 18:17:37 -0800 Subject: [PATCH 16/24] got rid of magic numbers --- examples/audioExamples/injectorLoadTest.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/audioExamples/injectorLoadTest.js b/examples/audioExamples/injectorLoadTest.js index d34117f56c..59ddea6a3c 100644 --- a/examples/audioExamples/injectorLoadTest.js +++ b/examples/audioExamples/injectorLoadTest.js @@ -13,7 +13,7 @@ Script.include("../libraries/utils.js"); -var numSoundsToPlayPerBatch = 50 +var numSoundsToPlayPerBatch = 35 var numSoundsPlaying = 0; var timeBetweenBatch = 30000; // A green box represents an injector that is playing @@ -28,16 +28,19 @@ var soundBoxes = []; var testSound = SoundCache.getSound("https://s3-us-west-1.amazonaws.com/hifi-content/eric/Sounds/dove.wav"); var totalInjectors = 0; +var clipDuration; if(!testSound.downloaded) { print("SOUND IS NOT READY YET") testSound.ready.connect(function() { playSounds(); + clipDuration = testSound.duration; }); } else { // otherwise play sounds right away playSounds(); + clipDuration = testSound.duration; } function playSounds() { @@ -48,7 +51,7 @@ function playSounds() { Script.setTimeout(function() { numSoundsPlaying = 0; - }, 1500); + }, clipDuration); print("EBL Total Number of Injectors: " + totalInjectors); Script.setTimeout(function() { From 2dd1cf2f15677e07214cefad20fa98200b1bffb4 Mon Sep 17 00:00:00 2001 From: Zach Pomerantz Date: Thu, 18 Feb 2016 18:21:26 -0800 Subject: [PATCH 17/24] Update Render.fromJSON to Render.load --- examples/utilities/tools/render/debug.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/utilities/tools/render/debug.js b/examples/utilities/tools/render/debug.js index 8aac9c270e..eba967491b 100644 --- a/examples/utilities/tools/render/debug.js +++ b/examples/utilities/tools/render/debug.js @@ -36,4 +36,4 @@ function setDebugBufferSize(x) { Render.RenderDeferredTask.DebugDeferredBuffer.size = {x: x, y: -1, z: 1, w: 1}; } -Script.scriptEnding.connect(function() { Render.fromJSON(oldConfig); } ); +Script.scriptEnding.connect(function() { Render.load(oldConfig); } ); From fcdc6dd6fa34de97552a8d1a03272862832ae0ad Mon Sep 17 00:00:00 2001 From: Howard Stearns Date: Fri, 19 Feb 2016 10:54:53 -0800 Subject: [PATCH 18/24] When we don't make an audo injector (because we're at a limit), make sure the value returned to scripts is null. --- libraries/script-engine/src/AudioScriptingInterface.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libraries/script-engine/src/AudioScriptingInterface.cpp b/libraries/script-engine/src/AudioScriptingInterface.cpp index a660e918a9..7e7ca77b88 100644 --- a/libraries/script-engine/src/AudioScriptingInterface.cpp +++ b/libraries/script-engine/src/AudioScriptingInterface.cpp @@ -45,8 +45,11 @@ ScriptAudioInjector* AudioScriptingInterface::playSound(Sound* sound, const Audi // stereo option isn't set from script, this comes from sound metadata or filename AudioInjectorOptions optionsCopy = injectorOptions; optionsCopy.stereo = sound->isStereo(); - - return new ScriptAudioInjector(AudioInjector::playSound(sound->getByteArray(), optionsCopy, _localAudioInterface)); + auto injector = AudioInjector::playSound(sound->getByteArray(), optionsCopy, _localAudioInterface); + if (!injector) { + return NULL; + } + return new ScriptAudioInjector(injector); } else { qCDebug(scriptengine) << "AudioScriptingInterface::playSound called with null Sound object."; From e4508e1d3466e5ab1c430c17d6910d71cd720d52 Mon Sep 17 00:00:00 2001 From: ericrius1 Date: Fri, 19 Feb 2016 12:06:08 -0800 Subject: [PATCH 19/24] added comment and name --- examples/audioExamples/injectorLoadTest.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/audioExamples/injectorLoadTest.js b/examples/audioExamples/injectorLoadTest.js index 59ddea6a3c..3df2d873c7 100644 --- a/examples/audioExamples/injectorLoadTest.js +++ b/examples/audioExamples/injectorLoadTest.js @@ -13,7 +13,7 @@ Script.include("../libraries/utils.js"); -var numSoundsToPlayPerBatch = 35 +var numSoundsToPlayPerBatch = 35 // Number of simultaneously playing sounds var numSoundsPlaying = 0; var timeBetweenBatch = 30000; // A green box represents an injector that is playing @@ -76,6 +76,7 @@ function playSound() { var soundBox = Entities.addEntity({ type: "Box", + name: "Debug Sound Box", color: {red: 200, green: 10, blue: 200}, dimensions: {x: 0.1, y: 0.1, z: 0.1}, position: position From 66e8f070e42c37bc39750326cdf9bc4f4cd1f550 Mon Sep 17 00:00:00 2001 From: "James B. Pollack" Date: Fri, 19 Feb 2016 13:48:54 -0800 Subject: [PATCH 20/24] popup windows --- interface/resources/qml/Browser.qml | 12 ++++++------ interface/resources/qml/controls/WebView.qml | 17 +++++++++++++---- interface/resources/qml/hifi/Desktop.qml | 10 ++++++++-- 3 files changed, 27 insertions(+), 12 deletions(-) diff --git a/interface/resources/qml/Browser.qml b/interface/resources/qml/Browser.qml index 382acc237c..89ab333a0d 100644 --- a/interface/resources/qml/Browser.qml +++ b/interface/resources/qml/Browser.qml @@ -14,7 +14,8 @@ Window { destroyOnInvisible: true width: 800 height: 600 - + property alias webView: webview + Component.onCompleted: { visible = true addressBar.text = webview.url @@ -28,6 +29,7 @@ Window { } Item { + id:item anchors.fill: parent Rectangle { anchors.left: parent.left @@ -125,12 +127,10 @@ Window { console.log("New icon: " + icon) } - profile: WebEngineProfile { - id: webviewProfile - storageName: "qmlUserBrowser" - } - + profile: desktop.browserProfile + } + } // item Keys.onPressed: { diff --git a/interface/resources/qml/controls/WebView.qml b/interface/resources/qml/controls/WebView.qml index c7ae322cba..90454d48c2 100644 --- a/interface/resources/qml/controls/WebView.qml +++ b/interface/resources/qml/controls/WebView.qml @@ -11,6 +11,7 @@ WebEngineView { root.javaScriptConsoleMessage.connect(function(level, message, lineNumber, sourceID) { console.log("Web Window JS message: " + sourceID + " " + lineNumber + " " + message); }); + } // FIXME hack to get the URL with the auth token included. Remove when we move to Qt 5.6 @@ -36,6 +37,11 @@ WebEngineView { } } + onFeaturePermissionRequested: { + console.log('permission requested',securityOrigin, feature) + grantFeaturePermission(securityOrigin, feature, true); + } + onLoadingChanged: { // Required to support clicking on "hifi://" links if (WebEngineView.LoadStartedStatus == loadRequest.status) { @@ -48,9 +54,12 @@ WebEngineView { } } - profile: WebEngineProfile { - id: webviewProfile - httpUserAgent: "Mozilla/5.0 (HighFidelityInterface)" - storageName: "qmlWebEngine" + onNewViewRequested:{ + var component = Qt.createComponent("../Browser.qml"); + var newWindow = component.createObject(desktop); + request.openIn(newWindow.webView) } + + + profile: desktop.browserProfile } diff --git a/interface/resources/qml/hifi/Desktop.qml b/interface/resources/qml/hifi/Desktop.qml index 5951101194..25eabcb158 100644 --- a/interface/resources/qml/hifi/Desktop.qml +++ b/interface/resources/qml/hifi/Desktop.qml @@ -9,8 +9,8 @@ Desktop { id: desktop Component.onCompleted: { - WebEngine.settings.javascriptCanOpenWindows = false; - WebEngine.settings.javascriptCanAccessClipboard = false; + WebEngine.settings.javascriptCanOpenWindows = true; + WebEngine.settings.javascriptCanAccessClipboard = true; WebEngine.settings.spatialNavigationEnabled = true; WebEngine.settings.localContentCanAccessRemoteUrls = true; } @@ -18,6 +18,12 @@ Desktop { // The tool window, one instance property alias toolWindow: toolWindow ToolWindow { id: toolWindow } + + property var browserProfile: WebEngineProfile { + id: webviewProfile + httpUserAgent: "Chrome/48.0 (HighFidelityInterface)" + storageName: "qmlWebEngine" + } Action { text: "Open Browser" From afb6f1fe840b90d02fc22a3f2f175bf4b3b9ae0c Mon Sep 17 00:00:00 2001 From: "James B. Pollack" Date: Fri, 19 Feb 2016 13:50:30 -0800 Subject: [PATCH 21/24] no clipboard --- interface/resources/qml/hifi/Desktop.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/resources/qml/hifi/Desktop.qml b/interface/resources/qml/hifi/Desktop.qml index 25eabcb158..5227d3cb2e 100644 --- a/interface/resources/qml/hifi/Desktop.qml +++ b/interface/resources/qml/hifi/Desktop.qml @@ -10,7 +10,7 @@ Desktop { Component.onCompleted: { WebEngine.settings.javascriptCanOpenWindows = true; - WebEngine.settings.javascriptCanAccessClipboard = true; + WebEngine.settings.javascriptCanAccessClipboard = false; WebEngine.settings.spatialNavigationEnabled = true; WebEngine.settings.localContentCanAccessRemoteUrls = true; } @@ -18,7 +18,7 @@ Desktop { // The tool window, one instance property alias toolWindow: toolWindow ToolWindow { id: toolWindow } - + property var browserProfile: WebEngineProfile { id: webviewProfile httpUserAgent: "Chrome/48.0 (HighFidelityInterface)" From 7ec09c49f3d8f34989c0945409ea19b89f9f6cd8 Mon Sep 17 00:00:00 2001 From: "James B. Pollack" Date: Fri, 19 Feb 2016 13:53:22 -0800 Subject: [PATCH 22/24] feature request is in another pull --- interface/resources/qml/controls/WebView.qml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/interface/resources/qml/controls/WebView.qml b/interface/resources/qml/controls/WebView.qml index 90454d48c2..bb74e6a07d 100644 --- a/interface/resources/qml/controls/WebView.qml +++ b/interface/resources/qml/controls/WebView.qml @@ -37,11 +37,6 @@ WebEngineView { } } - onFeaturePermissionRequested: { - console.log('permission requested',securityOrigin, feature) - grantFeaturePermission(securityOrigin, feature, true); - } - onLoadingChanged: { // Required to support clicking on "hifi://" links if (WebEngineView.LoadStartedStatus == loadRequest.status) { From 56f8282607619d5a5125323d4a9b715b99547603 Mon Sep 17 00:00:00 2001 From: "James B. Pollack" Date: Fri, 19 Feb 2016 13:54:31 -0800 Subject: [PATCH 23/24] dont need this code here --- interface/resources/qml/Browser.qml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/interface/resources/qml/Browser.qml b/interface/resources/qml/Browser.qml index 110011d2c0..382acc237c 100644 --- a/interface/resources/qml/Browser.qml +++ b/interface/resources/qml/Browser.qml @@ -129,10 +129,6 @@ Window { id: webviewProfile storageName: "qmlUserBrowser" } - - onFeaturePermissionRequested: { - grantFeaturePermission(securityOrigin, feature, true); - } } } // item From b94410a32311b4ca2e6eeae00175dbcc9fe4b087 Mon Sep 17 00:00:00 2001 From: "Anthony J. Thibault" Date: Fri, 19 Feb 2016 14:39:46 -0800 Subject: [PATCH 24/24] MyAvatar: fix for turning with arrow keys on start up --- interface/src/avatar/MyAvatar.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/src/avatar/MyAvatar.h b/interface/src/avatar/MyAvatar.h index 98d25a64c8..8c84299e08 100644 --- a/interface/src/avatar/MyAvatar.h +++ b/interface/src/avatar/MyAvatar.h @@ -421,8 +421,8 @@ private: AtRestDetector _hmdAtRestDetector; bool _lastIsMoving { false }; bool _hoverReferenceCameraFacingIsCaptured { false }; - glm::vec3 _hoverReferenceCameraFacing; // hmd sensor space - + glm::vec3 _hoverReferenceCameraFacing { 0.0f, 0.0f, -1.0f }; // hmd sensor space + float AVATAR_MOVEMENT_ENERGY_CONSTANT { 0.001f }; float AUDIO_ENERGY_CONSTANT { 0.000001f }; float MAX_AVATAR_MOVEMENT_PER_FRAME { 30.0f };