mirror of
https://github.com/lubosz/overte.git
synced 2025-04-16 09:29:16 +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
|
||||
SHA512 927742db29867517283d45e475f0c534a9a57e165cae221f26e08e88057253a1682ac9919b2dc547b9cf388ba0b931b175623461d44f28c9184796ba90b1ed55
|
||||
HEAD_REF master
|
||||
PATCHES "bullet-git-fix-build-clang-8.patch"
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
|
|
|
@ -33,6 +33,12 @@ Item {
|
|||
property var item: null
|
||||
|
||||
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) {
|
||||
root.item = newItem
|
||||
root.item.url = url
|
||||
|
|
|
@ -152,7 +152,7 @@ static int triggerReactionNameToIndex(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);
|
||||
}
|
||||
|
||||
|
|
|
@ -92,15 +92,19 @@ public:
|
|||
ToolbarProxy(QObject* qmlObject, QObject* parent = nullptr);
|
||||
|
||||
/**jsdoc
|
||||
* <em>Currently doesn't work.</em>
|
||||
* @function ToolbarProxy#addButton
|
||||
* @param {object} properties
|
||||
* @returns {ToolbarButtonProxy}
|
||||
* @param {object} properties - Button properties
|
||||
* @returns {object} The button added.
|
||||
* @deprecated This method is deprecated and will be removed.
|
||||
*/
|
||||
Q_INVOKABLE ToolbarButtonProxy* addButton(const QVariant& properties);
|
||||
|
||||
/**jsdoc
|
||||
* <em>Currently doesn't work.</em>
|
||||
* @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);
|
||||
|
||||
|
|
|
@ -1,117 +1,38 @@
|
|||
var isActive = false;
|
||||
(function () {
|
||||
|
||||
var toolBar = (function() {
|
||||
var that = {},
|
||||
toolBar,
|
||||
activeButton,
|
||||
newModelButton,
|
||||
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();
|
||||
// Get the system toolbar.
|
||||
var toolbar = Toolbars.getToolbar("com.highfidelity.interface.toolbar.system");
|
||||
if (!toolbar) {
|
||||
print("ERROR: Couldn't get system toolbar.");
|
||||
return;
|
||||
}
|
||||
|
||||
that.setActive = function(active) {
|
||||
if (active != isActive) {
|
||||
isActive = active;
|
||||
that.showTools(isActive);
|
||||
}
|
||||
};
|
||||
Script.setTimeout(function () {
|
||||
// Report the system toolbar visibility.
|
||||
var isToolbarVisible = toolbar.readProperty("visible");
|
||||
print("Toolbar visible: " + isToolbarVisible);
|
||||
|
||||
// Sets visibility of tool buttons, excluding the power button
|
||||
that.showTools = function(doShow) {
|
||||
newModelButton.writeProperty('visible', doShow);
|
||||
newShapeButton.writeProperty('visible', doShow);
|
||||
newLightButton.writeProperty('visible', doShow);
|
||||
newTextButton.writeProperty('visible', doShow);
|
||||
newWebButton.writeProperty('visible', doShow);
|
||||
newZoneButton.writeProperty('visible', doShow);
|
||||
newParticleButton.writeProperty('visible', doShow);
|
||||
newMaterialButton.writeProperty('visible', doShow);
|
||||
};
|
||||
// Briefly toggle the system toolbar visibility.
|
||||
print("Toggle toolbar");
|
||||
toolbar.writeProperty("visible", !isToolbarVisible);
|
||||
Script.setTimeout(function () {
|
||||
print("Toggle toolbar");
|
||||
toolbar.writeProperty("visible", isToolbarVisible);
|
||||
}, 2000);
|
||||
}, 2000);
|
||||
|
||||
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 OUTPUT_DEVICE_MUTED_OVERLAY_DEFAULT_DIMS_PX = 300;
|
||||
var OUTPUT_DEVICE_MUTED_MARGIN_BOTTOM_PX = 20;
|
||||
var OUTPUT_DEVICE_MUTED_MARGIN_LEFT_RIGHT_PX = 20;
|
||||
var OUTPUT_DEVICE_MUTED_OVERLAY_DEFAULT_MARGINS_PX = 20;
|
||||
var OUTPUT_DEVICE_MUTED_DIMS_RATIO_TO_WINDOW_SIZE = 0.8;
|
||||
function updateOutputDeviceMutedOverlay(isMuted) {
|
||||
if (isMuted) {
|
||||
var props = {
|
||||
imageURL: Script.resolvePath("images/outputDeviceMuted.svg"),
|
||||
alpha: 0.5
|
||||
};
|
||||
|
||||
var overlayDims = OUTPUT_DEVICE_MUTED_OVERLAY_DEFAULT_DIMS_PX;
|
||||
props.x = Window.innerWidth / 2 - overlayDims / 2;
|
||||
props.y = Window.innerHeight / 2 - overlayDims / 2;
|
||||
var overlayWithMarginsDims = overlayDims + 2 * OUTPUT_DEVICE_MUTED_OVERLAY_DEFAULT_MARGINS_PX;
|
||||
|
||||
var outputDeviceMutedOverlayBottomY = props.y + overlayDims;
|
||||
var inputDeviceMutedOverlayTopY = INPUT_DEVICE_MUTED_MARGIN_TOP_PX;
|
||||
if (outputDeviceMutedOverlayBottomY + OUTPUT_DEVICE_MUTED_MARGIN_BOTTOM_PX > inputDeviceMutedOverlayTopY) {
|
||||
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);
|
||||
if (overlayWithMarginsDims > Window.innerHeight || overlayWithMarginsDims > Window.innerWidth) {
|
||||
var minWindowDims = Math.min(Window.innerHeight, Window.innerWidth);
|
||||
overlayDims = Math.round(minWindowDims * OUTPUT_DEVICE_MUTED_DIMS_RATIO_TO_WINDOW_SIZE);
|
||||
}
|
||||
|
||||
props.width = overlayDims;
|
||||
|
|
Loading…
Reference in a new issue