mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-05-09 00:48:19 +02:00
Merge branch 'master' of github.com:highfidelity/hifi into tablet-ui
This commit is contained in:
commit
0b51b1d566
5 changed files with 36 additions and 21 deletions
|
@ -38,7 +38,7 @@
|
||||||
|
|
||||||
static const float LOUDNESS_TO_DISTANCE_RATIO = 0.00001f;
|
static const float LOUDNESS_TO_DISTANCE_RATIO = 0.00001f;
|
||||||
static const float DEFAULT_ATTENUATION_PER_DOUBLING_IN_DISTANCE = 0.5f; // attenuation = -6dB * log2(distance)
|
static const float DEFAULT_ATTENUATION_PER_DOUBLING_IN_DISTANCE = 0.5f; // attenuation = -6dB * log2(distance)
|
||||||
static const float DEFAULT_NOISE_MUTING_THRESHOLD = 0.003f;
|
static const float DEFAULT_NOISE_MUTING_THRESHOLD = 1.0f;
|
||||||
static const QString AUDIO_MIXER_LOGGING_TARGET_NAME = "audio-mixer";
|
static const QString AUDIO_MIXER_LOGGING_TARGET_NAME = "audio-mixer";
|
||||||
static const QString AUDIO_ENV_GROUP_KEY = "audio_env";
|
static const QString AUDIO_ENV_GROUP_KEY = "audio_env";
|
||||||
static const QString AUDIO_BUFFER_GROUP_KEY = "audio_buffer";
|
static const QString AUDIO_BUFFER_GROUP_KEY = "audio_buffer";
|
||||||
|
|
|
@ -1089,9 +1089,9 @@
|
||||||
{
|
{
|
||||||
"name": "noise_muting_threshold",
|
"name": "noise_muting_threshold",
|
||||||
"label": "Noise Muting Threshold",
|
"label": "Noise Muting Threshold",
|
||||||
"help": "Loudness value for noise background between 0 and 1.0 (0: mute everyone, 1.0: never mute)",
|
"help": "Loudness value for noise background between 0 and 1.0 (0: mute everyone, 1.0: never mute). 0.003 is a typical setting to mute loud people.",
|
||||||
"placeholder": "0.003",
|
"placeholder": "1.0",
|
||||||
"default": "0.003",
|
"default": "1.0",
|
||||||
"advanced": false
|
"advanced": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -255,6 +255,16 @@ int WindowScriptingInterface::createMessageBox(QString title, QString text, int
|
||||||
void WindowScriptingInterface::updateMessageBox(int id, QString title, QString text, int buttons, int defaultButton) {
|
void WindowScriptingInterface::updateMessageBox(int id, QString title, QString text, int buttons, int defaultButton) {
|
||||||
auto messageBox = _messageBoxes.value(id);
|
auto messageBox = _messageBoxes.value(id);
|
||||||
if (messageBox) {
|
if (messageBox) {
|
||||||
|
if (QThread::currentThread() != thread()) {
|
||||||
|
QMetaObject::invokeMethod(this, "updateMessageBox",
|
||||||
|
Q_ARG(int, id),
|
||||||
|
Q_ARG(QString, title),
|
||||||
|
Q_ARG(QString, text),
|
||||||
|
Q_ARG(int, buttons),
|
||||||
|
Q_ARG(int, defaultButton));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
messageBox->setProperty("title", title);
|
messageBox->setProperty("title", title);
|
||||||
messageBox->setProperty("text", text);
|
messageBox->setProperty("text", text);
|
||||||
messageBox->setProperty("buttons", buttons);
|
messageBox->setProperty("buttons", buttons);
|
||||||
|
@ -265,6 +275,12 @@ void WindowScriptingInterface::updateMessageBox(int id, QString title, QString t
|
||||||
void WindowScriptingInterface::closeMessageBox(int id) {
|
void WindowScriptingInterface::closeMessageBox(int id) {
|
||||||
auto messageBox = _messageBoxes.value(id);
|
auto messageBox = _messageBoxes.value(id);
|
||||||
if (messageBox) {
|
if (messageBox) {
|
||||||
|
if (QThread::currentThread() != thread()) {
|
||||||
|
QMetaObject::invokeMethod(this, "closeMessageBox",
|
||||||
|
Q_ARG(int, id));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
disconnect(messageBox);
|
disconnect(messageBox);
|
||||||
messageBox->setVisible(false);
|
messageBox->setVisible(false);
|
||||||
messageBox->deleteLater();
|
messageBox->deleteLater();
|
||||||
|
|
|
@ -26,6 +26,8 @@ using SpatiallyNestableWeakConstPointer = std::weak_ptr<const SpatiallyNestable>
|
||||||
using SpatiallyNestablePointer = std::shared_ptr<SpatiallyNestable>;
|
using SpatiallyNestablePointer = std::shared_ptr<SpatiallyNestable>;
|
||||||
using SpatiallyNestableConstPointer = std::shared_ptr<const SpatiallyNestable>;
|
using SpatiallyNestableConstPointer = std::shared_ptr<const SpatiallyNestable>;
|
||||||
|
|
||||||
|
static const uint16_t INVALID_JOINT_INDEX = -1;
|
||||||
|
|
||||||
enum class NestableType {
|
enum class NestableType {
|
||||||
Entity,
|
Entity,
|
||||||
Avatar,
|
Avatar,
|
||||||
|
@ -181,7 +183,7 @@ protected:
|
||||||
const NestableType _nestableType; // EntityItem or an AvatarData
|
const NestableType _nestableType; // EntityItem or an AvatarData
|
||||||
QUuid _id;
|
QUuid _id;
|
||||||
QUuid _parentID; // what is this thing's transform relative to?
|
QUuid _parentID; // what is this thing's transform relative to?
|
||||||
quint16 _parentJointIndex { 0 }; // which joint of the parent is this relative to?
|
quint16 _parentJointIndex { INVALID_JOINT_INDEX }; // which joint of the parent is this relative to?
|
||||||
|
|
||||||
mutable SpatiallyNestableWeakPointer _parent;
|
mutable SpatiallyNestableWeakPointer _parent;
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
var canWriteAssets = false;
|
var canWriteAssets = false;
|
||||||
var xmlHttpRequest = null;
|
var xmlHttpRequest = null;
|
||||||
var isDownloading = false; // Explicitly track download request status.
|
var isPreparing = false; // Explicitly track download request status.
|
||||||
|
|
||||||
function injectCommonCode(isDirectoryPage) {
|
function injectCommonCode(isDirectoryPage) {
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@
|
||||||
function startAutoDownload() {
|
function startAutoDownload() {
|
||||||
|
|
||||||
// One file request at a time.
|
// One file request at a time.
|
||||||
if (isDownloading) {
|
if (isPreparing) {
|
||||||
console.log("WARNIKNG: Clara.io FBX: Prepare only one download at a time");
|
console.log("WARNIKNG: Clara.io FBX: Prepare only one download at a time");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -178,7 +178,7 @@
|
||||||
var message = this.responseText.slice(responseTextIndex);
|
var message = this.responseText.slice(responseTextIndex);
|
||||||
var statusMessage = "";
|
var statusMessage = "";
|
||||||
|
|
||||||
if (isDownloading) { // Ignore messages in flight after finished/cancelled.
|
if (isPreparing) { // Ignore messages in flight after finished/cancelled.
|
||||||
var lines = message.split(/[\n\r]+/);
|
var lines = message.split(/[\n\r]+/);
|
||||||
|
|
||||||
for (var i = 0, length = lines.length; i < length; i++) {
|
for (var i = 0, length = lines.length; i < length; i++) {
|
||||||
|
@ -222,33 +222,30 @@
|
||||||
xmlHttpRequest.onload = function () {
|
xmlHttpRequest.onload = function () {
|
||||||
var statusMessage = "";
|
var statusMessage = "";
|
||||||
|
|
||||||
if (!isDownloading) {
|
if (!isPreparing) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isPreparing = false;
|
||||||
|
|
||||||
var HTTP_OK = 200;
|
var HTTP_OK = 200;
|
||||||
if (this.status !== HTTP_OK) {
|
if (this.status !== HTTP_OK) {
|
||||||
statusMessage = "Zip file request terminated with " + this.status + " " + this.statusText;
|
statusMessage = "Zip file request terminated with " + this.status + " " + this.statusText;
|
||||||
console.log("ERROR: Clara.io FBX: " + statusMessage);
|
console.log("ERROR: Clara.io FBX: " + statusMessage);
|
||||||
EventBridge.emitWebEvent(CLARA_IO_STATUS + " " + statusMessage);
|
EventBridge.emitWebEvent(CLARA_IO_STATUS + " " + statusMessage);
|
||||||
return;
|
} else if (zipFileURL.slice(-4) !== ".zip") {
|
||||||
}
|
|
||||||
|
|
||||||
if (zipFileURL.slice(-4) !== ".zip") {
|
|
||||||
statusMessage = "Error creating zip file for download.";
|
statusMessage = "Error creating zip file for download.";
|
||||||
console.log("ERROR: Clara.io FBX: " + statusMessage + ": " + zipFileURL);
|
console.log("ERROR: Clara.io FBX: " + statusMessage + ": " + zipFileURL);
|
||||||
EventBridge.emitWebEvent(CLARA_IO_STATUS + " " + statusMessage);
|
EventBridge.emitWebEvent(CLARA_IO_STATUS + " " + statusMessage);
|
||||||
return;
|
} else {
|
||||||
|
EventBridge.emitWebEvent(CLARA_IO_DOWNLOAD + " " + zipFileURL);
|
||||||
|
console.log("Clara.io FBX: File download initiated for " + zipFileURL);
|
||||||
}
|
}
|
||||||
|
|
||||||
EventBridge.emitWebEvent(CLARA_IO_DOWNLOAD + " " + zipFileURL);
|
|
||||||
console.log("Clara.io FBX: File download initiated for " + zipFileURL);
|
|
||||||
|
|
||||||
xmlHttpRequest = null;
|
xmlHttpRequest = null;
|
||||||
isDownloading = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
isDownloading = true;
|
isPreparing = true;
|
||||||
|
|
||||||
console.log("Clara.io FBX: Request zip file for " + uuid);
|
console.log("Clara.io FBX: Request zip file for " + uuid);
|
||||||
EventBridge.emitWebEvent(CLARA_IO_STATUS + " Initiating download");
|
EventBridge.emitWebEvent(CLARA_IO_STATUS + " Initiating download");
|
||||||
|
@ -301,7 +298,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function cancelClaraDownload() {
|
function cancelClaraDownload() {
|
||||||
isDownloading = false;
|
isPreparing = false;
|
||||||
|
|
||||||
if (xmlHttpRequest) {
|
if (xmlHttpRequest) {
|
||||||
xmlHttpRequest.abort();
|
xmlHttpRequest.abort();
|
||||||
|
|
Loading…
Reference in a new issue