mirror of
https://github.com/overte-org/overte.git
synced 2025-06-20 01:40:01 +02:00
Merge branch 'master' into change_away_animation
This commit is contained in:
commit
e757a6fd86
7 changed files with 90 additions and 129 deletions
36
cmake/ports/bullet3/bullet-git-fix-build-clang-8.patch
Normal file
36
cmake/ports/bullet3/bullet-git-fix-build-clang-8.patch
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
From 7638b7c5a659dceb4e580ae87d4d60b00847ef94 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Emil=20Nord=C3=A9n?= <emilnorden@yahoo.se>
|
||||||
|
Date: Sat, 4 May 2019 08:38:53 +0200
|
||||||
|
Subject: [PATCH] fixed build on latest version of clang
|
||||||
|
|
||||||
|
---
|
||||||
|
src/Bullet3Common/b3Vector3.h | 2 +-
|
||||||
|
src/LinearMath/btVector3.h | 2 +-
|
||||||
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/Bullet3Common/b3Vector3.h b/src/Bullet3Common/b3Vector3.h
|
||||||
|
index 56e6c13311..a70d68d6e1 100644
|
||||||
|
--- a/src/Bullet3Common/b3Vector3.h
|
||||||
|
+++ b/src/Bullet3Common/b3Vector3.h
|
||||||
|
@@ -36,7 +36,7 @@ subject to the following restrictions:
|
||||||
|
#pragma warning(disable : 4556) // value of intrinsic immediate argument '4294967239' is out of range '0 - 255'
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-#define B3_SHUFFLE(x, y, z, w) ((w) << 6 | (z) << 4 | (y) << 2 | (x))
|
||||||
|
+#define B3_SHUFFLE(x, y, z, w) (((w) << 6 | (z) << 4 | (y) << 2 | (x)) & 0xff)
|
||||||
|
//#define b3_pshufd_ps( _a, _mask ) (__m128) _mm_shuffle_epi32((__m128i)(_a), (_mask) )
|
||||||
|
#define b3_pshufd_ps(_a, _mask) _mm_shuffle_ps((_a), (_a), (_mask))
|
||||||
|
#define b3_splat3_ps(_a, _i) b3_pshufd_ps((_a), B3_SHUFFLE(_i, _i, _i, 3))
|
||||||
|
diff --git a/src/LinearMath/btVector3.h b/src/LinearMath/btVector3.h
|
||||||
|
index 61fd8d1e46..d65ed9808d 100644
|
||||||
|
--- a/src/LinearMath/btVector3.h
|
||||||
|
+++ b/src/LinearMath/btVector3.h
|
||||||
|
@@ -36,7 +36,7 @@ subject to the following restrictions:
|
||||||
|
#pragma warning(disable : 4556) // value of intrinsic immediate argument '4294967239' is out of range '0 - 255'
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-#define BT_SHUFFLE(x, y, z, w) ((w) << 6 | (z) << 4 | (y) << 2 | (x))
|
||||||
|
+#define BT_SHUFFLE(x, y, z, w) (((w) << 6 | (z) << 4 | (y) << 2 | (x)) & 0xff)
|
||||||
|
//#define bt_pshufd_ps( _a, _mask ) (__m128) _mm_shuffle_epi32((__m128i)(_a), (_mask) )
|
||||||
|
#define bt_pshufd_ps(_a, _mask) _mm_shuffle_ps((_a), (_a), (_mask))
|
||||||
|
#define bt_splat3_ps(_a, _i) bt_pshufd_ps((_a), BT_SHUFFLE(_i, _i, _i, 3))
|
|
@ -27,6 +27,7 @@ vcpkg_from_github(
|
||||||
REF ab8f16961e19a86ee20c6a1d61f662392524cc77
|
REF ab8f16961e19a86ee20c6a1d61f662392524cc77
|
||||||
SHA512 927742db29867517283d45e475f0c534a9a57e165cae221f26e08e88057253a1682ac9919b2dc547b9cf388ba0b931b175623461d44f28c9184796ba90b1ed55
|
SHA512 927742db29867517283d45e475f0c534a9a57e165cae221f26e08e88057253a1682ac9919b2dc547b9cf388ba0b931b175623461d44f28c9184796ba90b1ed55
|
||||||
HEAD_REF master
|
HEAD_REF master
|
||||||
|
PATCHES "bullet-git-fix-build-clang-8.patch"
|
||||||
)
|
)
|
||||||
|
|
||||||
vcpkg_configure_cmake(
|
vcpkg_configure_cmake(
|
||||||
|
|
|
@ -33,6 +33,12 @@ Item {
|
||||||
property var item: null
|
property var item: null
|
||||||
|
|
||||||
function load(url, scriptUrl) {
|
function load(url, scriptUrl) {
|
||||||
|
// Ensure we reset any existing item to "about:blank" to ensure web audio stops: DEV-2375
|
||||||
|
if (root.item != null) {
|
||||||
|
root.item.url = "about:blank"
|
||||||
|
root.item.destroy()
|
||||||
|
root.item = null
|
||||||
|
}
|
||||||
QmlSurface.load("./controls/WebView.qml", root, function(newItem) {
|
QmlSurface.load("./controls/WebView.qml", root, function(newItem) {
|
||||||
root.item = newItem
|
root.item = newItem
|
||||||
root.item.url = url
|
root.item.url = url
|
||||||
|
|
|
@ -152,7 +152,7 @@ static int triggerReactionNameToIndex(const QString& reactionName) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static int beginEndReactionNameToIndex(const QString& reactionName) {
|
static int beginEndReactionNameToIndex(const QString& reactionName) {
|
||||||
assert(NUM_AVATAR_BEGIN_END_REACTIONS == TRIGGER_REACTION_NAMES.size());
|
assert(NUM_AVATAR_BEGIN_END_REACTIONS == BEGIN_END_REACTION_NAMES.size());
|
||||||
return BEGIN_END_REACTION_NAMES.indexOf(reactionName);
|
return BEGIN_END_REACTION_NAMES.indexOf(reactionName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -92,15 +92,19 @@ public:
|
||||||
ToolbarProxy(QObject* qmlObject, QObject* parent = nullptr);
|
ToolbarProxy(QObject* qmlObject, QObject* parent = nullptr);
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
|
* <em>Currently doesn't work.</em>
|
||||||
* @function ToolbarProxy#addButton
|
* @function ToolbarProxy#addButton
|
||||||
* @param {object} properties
|
* @param {object} properties - Button properties
|
||||||
* @returns {ToolbarButtonProxy}
|
* @returns {object} The button added.
|
||||||
|
* @deprecated This method is deprecated and will be removed.
|
||||||
*/
|
*/
|
||||||
Q_INVOKABLE ToolbarButtonProxy* addButton(const QVariant& properties);
|
Q_INVOKABLE ToolbarButtonProxy* addButton(const QVariant& properties);
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
|
* <em>Currently doesn't work.</em>
|
||||||
* @function ToolbarProxy#removeButton
|
* @function ToolbarProxy#removeButton
|
||||||
* @param {string} name
|
* @param {string} name - Button name.
|
||||||
|
* @deprecated This method is deprecated and will be removed.
|
||||||
*/
|
*/
|
||||||
Q_INVOKABLE void removeButton(const QVariant& name);
|
Q_INVOKABLE void removeButton(const QVariant& name);
|
||||||
|
|
||||||
|
|
|
@ -1,117 +1,38 @@
|
||||||
var isActive = false;
|
(function () {
|
||||||
|
|
||||||
var toolBar = (function() {
|
// Get the system toolbar.
|
||||||
var that = {},
|
var toolbar = Toolbars.getToolbar("com.highfidelity.interface.toolbar.system");
|
||||||
toolBar,
|
if (!toolbar) {
|
||||||
activeButton,
|
print("ERROR: Couldn't get system toolbar.");
|
||||||
newModelButton,
|
return;
|
||||||
newShapeButton,
|
|
||||||
newLightButton,
|
|
||||||
newTextButton,
|
|
||||||
newWebButton,
|
|
||||||
newZoneButton,
|
|
||||||
newParticleButton,
|
|
||||||
newMaterialButton
|
|
||||||
|
|
||||||
var toolIconUrl = Script.resolvePath("../../system/assets/images/tools/");
|
|
||||||
|
|
||||||
function initialize() {
|
|
||||||
print("Toolbars: " + Toolbars);
|
|
||||||
toolBar = Toolbars.getToolbar("highfidelity.edit.toolbar");
|
|
||||||
print("Toolbar: " + toolBar);
|
|
||||||
activeButton = toolBar.addButton({
|
|
||||||
objectName: "activeButton",
|
|
||||||
imageURL: toolIconUrl + "edit-01.svg",
|
|
||||||
visible: true,
|
|
||||||
alpha: 0.9,
|
|
||||||
});
|
|
||||||
|
|
||||||
print("Button " + activeButton);
|
|
||||||
print("Button signal " + activeButton.clicked);
|
|
||||||
activeButton.clicked.connect(function(){
|
|
||||||
print("Clicked on button " + isActive);
|
|
||||||
that.setActive(!isActive);
|
|
||||||
});
|
|
||||||
|
|
||||||
newModelButton = toolBar.addButton({
|
|
||||||
objectName: "newModelButton",
|
|
||||||
imageURL: toolIconUrl + "model-01.svg",
|
|
||||||
alpha: 0.9,
|
|
||||||
visible: false
|
|
||||||
});
|
|
||||||
|
|
||||||
newShapeButton = toolBar.addButton({
|
|
||||||
objectName: "newShapeButton",
|
|
||||||
imageURL: toolIconUrl + "cube-01.svg",
|
|
||||||
alpha: 0.9,
|
|
||||||
visible: false
|
|
||||||
});
|
|
||||||
|
|
||||||
newLightButton = toolBar.addButton({
|
|
||||||
objectName: "newLightButton",
|
|
||||||
imageURL: toolIconUrl + "light-01.svg",
|
|
||||||
alpha: 0.9,
|
|
||||||
visible: false
|
|
||||||
});
|
|
||||||
|
|
||||||
newTextButton = toolBar.addButton({
|
|
||||||
objectName: "newTextButton",
|
|
||||||
imageURL: toolIconUrl + "text-01.svg",
|
|
||||||
alpha: 0.9,
|
|
||||||
visible: false
|
|
||||||
});
|
|
||||||
|
|
||||||
newWebButton = toolBar.addButton({
|
|
||||||
objectName: "newWebButton",
|
|
||||||
imageURL: toolIconUrl + "web-01.svg",
|
|
||||||
alpha: 0.9,
|
|
||||||
visible: false
|
|
||||||
});
|
|
||||||
|
|
||||||
newZoneButton = toolBar.addButton({
|
|
||||||
objectName: "newZoneButton",
|
|
||||||
imageURL: toolIconUrl + "zone-01.svg",
|
|
||||||
alpha: 0.9,
|
|
||||||
visible: false
|
|
||||||
});
|
|
||||||
|
|
||||||
newParticleButton = toolBar.addButton({
|
|
||||||
objectName: "newParticleButton",
|
|
||||||
imageURL: toolIconUrl + "particle-01.svg",
|
|
||||||
alpha: 0.9,
|
|
||||||
visible: false
|
|
||||||
});
|
|
||||||
|
|
||||||
newMaterialButton = toolBar.addButton({
|
|
||||||
objectName: "newMaterialButton",
|
|
||||||
imageURL: toolIconUrl + "material-01.svg",
|
|
||||||
alpha: 0.9,
|
|
||||||
visible: false
|
|
||||||
});
|
|
||||||
|
|
||||||
that.setActive(false);
|
|
||||||
newModelButton.clicked();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
that.setActive = function(active) {
|
Script.setTimeout(function () {
|
||||||
if (active != isActive) {
|
// Report the system toolbar visibility.
|
||||||
isActive = active;
|
var isToolbarVisible = toolbar.readProperty("visible");
|
||||||
that.showTools(isActive);
|
print("Toolbar visible: " + isToolbarVisible);
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// Sets visibility of tool buttons, excluding the power button
|
// Briefly toggle the system toolbar visibility.
|
||||||
that.showTools = function(doShow) {
|
print("Toggle toolbar");
|
||||||
newModelButton.writeProperty('visible', doShow);
|
toolbar.writeProperty("visible", !isToolbarVisible);
|
||||||
newShapeButton.writeProperty('visible', doShow);
|
Script.setTimeout(function () {
|
||||||
newLightButton.writeProperty('visible', doShow);
|
print("Toggle toolbar");
|
||||||
newTextButton.writeProperty('visible', doShow);
|
toolbar.writeProperty("visible", isToolbarVisible);
|
||||||
newWebButton.writeProperty('visible', doShow);
|
}, 2000);
|
||||||
newZoneButton.writeProperty('visible', doShow);
|
}, 2000);
|
||||||
newParticleButton.writeProperty('visible', doShow);
|
|
||||||
newMaterialButton.writeProperty('visible', doShow);
|
Script.setTimeout(function () {
|
||||||
};
|
// Report the system toolbar visibility alternative method.
|
||||||
|
isToolbarVisible = toolbar.readProperties(["visible"]).visible;
|
||||||
|
print("Toolbar visible: " + isToolbarVisible);
|
||||||
|
|
||||||
|
// Briefly toggle the system toolbar visibility.
|
||||||
|
print("Toggle toolbar");
|
||||||
|
toolbar.writeProperties({ visible: !isToolbarVisible });
|
||||||
|
Script.setTimeout(function () {
|
||||||
|
print("Toggle toolbar");
|
||||||
|
toolbar.writeProperties({ visible: isToolbarVisible });
|
||||||
|
}, 2000);
|
||||||
|
}, 6000);
|
||||||
|
|
||||||
initialize();
|
|
||||||
return that;
|
|
||||||
}());
|
}());
|
||||||
|
|
|
@ -284,28 +284,21 @@ function maybeDeleteOutputDeviceMutedOverlay() {
|
||||||
|
|
||||||
var outputDeviceMutedOverlay = false;
|
var outputDeviceMutedOverlay = false;
|
||||||
var OUTPUT_DEVICE_MUTED_OVERLAY_DEFAULT_DIMS_PX = 300;
|
var OUTPUT_DEVICE_MUTED_OVERLAY_DEFAULT_DIMS_PX = 300;
|
||||||
var OUTPUT_DEVICE_MUTED_MARGIN_BOTTOM_PX = 20;
|
var OUTPUT_DEVICE_MUTED_OVERLAY_DEFAULT_MARGINS_PX = 20;
|
||||||
var OUTPUT_DEVICE_MUTED_MARGIN_LEFT_RIGHT_PX = 20;
|
var OUTPUT_DEVICE_MUTED_DIMS_RATIO_TO_WINDOW_SIZE = 0.8;
|
||||||
function updateOutputDeviceMutedOverlay(isMuted) {
|
function updateOutputDeviceMutedOverlay(isMuted) {
|
||||||
if (isMuted) {
|
if (isMuted) {
|
||||||
var props = {
|
var props = {
|
||||||
imageURL: Script.resolvePath("images/outputDeviceMuted.svg"),
|
imageURL: Script.resolvePath("images/outputDeviceMuted.svg"),
|
||||||
alpha: 0.5
|
alpha: 0.5
|
||||||
};
|
};
|
||||||
|
|
||||||
var overlayDims = OUTPUT_DEVICE_MUTED_OVERLAY_DEFAULT_DIMS_PX;
|
var overlayDims = OUTPUT_DEVICE_MUTED_OVERLAY_DEFAULT_DIMS_PX;
|
||||||
props.x = Window.innerWidth / 2 - overlayDims / 2;
|
var overlayWithMarginsDims = overlayDims + 2 * OUTPUT_DEVICE_MUTED_OVERLAY_DEFAULT_MARGINS_PX;
|
||||||
props.y = Window.innerHeight / 2 - overlayDims / 2;
|
|
||||||
|
|
||||||
var outputDeviceMutedOverlayBottomY = props.y + overlayDims;
|
if (overlayWithMarginsDims > Window.innerHeight || overlayWithMarginsDims > Window.innerWidth) {
|
||||||
var inputDeviceMutedOverlayTopY = INPUT_DEVICE_MUTED_MARGIN_TOP_PX;
|
var minWindowDims = Math.min(Window.innerHeight, Window.innerWidth);
|
||||||
if (outputDeviceMutedOverlayBottomY + OUTPUT_DEVICE_MUTED_MARGIN_BOTTOM_PX > inputDeviceMutedOverlayTopY) {
|
overlayDims = Math.round(minWindowDims * OUTPUT_DEVICE_MUTED_DIMS_RATIO_TO_WINDOW_SIZE);
|
||||||
overlayDims = 2 * (inputDeviceMutedOverlayTopY - Window.innerHeight / 2 - OUTPUT_DEVICE_MUTED_MARGIN_BOTTOM_PX);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (overlayDims + OUTPUT_DEVICE_MUTED_MARGIN_LEFT_RIGHT_PX > Window.innerWidth) {
|
|
||||||
overlayDims = Math.min(Window.innerWidth - OUTPUT_DEVICE_MUTED_MARGIN_LEFT_RIGHT_PX, overlayDims);
|
|
||||||
} else {
|
|
||||||
overlayDims = Math.min(OUTPUT_DEVICE_MUTED_OVERLAY_DEFAULT_DIMS_PX, overlayDims);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
props.width = overlayDims;
|
props.width = overlayDims;
|
||||||
|
|
Loading…
Reference in a new issue