From 6775ce1b48de8b01357e70ef6d4bda466db7452f Mon Sep 17 00:00:00 2001 From: netpro2k Date: Mon, 10 May 2021 15:33:38 -0700 Subject: [PATCH 1/2] When we clone a light we need to update its target --- src/utils/three-utils.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/utils/three-utils.js b/src/utils/three-utils.js index 0a4d87d64b..b27fcde942 100644 --- a/src/utils/three-utils.js +++ b/src/utils/three-utils.js @@ -166,6 +166,10 @@ export function cloneObject3D(source, preserveUUIDs) { clonedNode.geometry.boundsTree = sourceNode.geometry.boundsTree; } + if ((clonedNode.isDirectionalLight || clonedNode.isSpotLight) && sourceNode.target) { + clonedNode.target = cloneLookup.get(sourceNode.target); + } + if (!sourceNode.isSkinnedMesh) return; const sourceBones = sourceNode.skeleton.bones; From 8a31e869059b122602c6aa8c0e08cab764a55066 Mon Sep 17 00:00:00 2001 From: netpro2k Date: Mon, 10 May 2021 16:23:31 -0700 Subject: [PATCH 2/2] Unrelated delint --- src/components/avatar-audio-source.js | 6 +++--- src/react-components/preferences-screen.js | 6 ++++-- src/react-components/room/ContentMenu.js | 3 +++ src/react-components/room/TipContainer.js | 3 ++- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/components/avatar-audio-source.js b/src/components/avatar-audio-source.js index f06d6bf6d2..86cc294b02 100644 --- a/src/components/avatar-audio-source.js +++ b/src/components/avatar-audio-source.js @@ -151,14 +151,14 @@ AFRAME.registerComponent("avatar-audio-source", { }); function createWhiteNoise(audioContext, gain) { - var bufferSize = 2 * audioContext.sampleRate, + const bufferSize = 2 * audioContext.sampleRate, noiseBuffer = audioContext.createBuffer(1, bufferSize, audioContext.sampleRate), output = noiseBuffer.getChannelData(0); - for (var i = 0; i < bufferSize; i++) { + for (let i = 0; i < bufferSize; i++) { output[i] = (Math.random() * 2 - 1) * gain; } - var whiteNoise = audioContext.createBufferSource(); + const whiteNoise = audioContext.createBufferSource(); whiteNoise.buffer = noiseBuffer; whiteNoise.loop = true; whiteNoise.start(0); diff --git a/src/react-components/preferences-screen.js b/src/react-components/preferences-screen.js index 7c65ad41bd..98ff35b142 100644 --- a/src/react-components/preferences-screen.js +++ b/src/react-components/preferences-screen.js @@ -350,7 +350,9 @@ function ListItem({ children, disabled, indent }) { return
{children}
; } ListItem.propTypes = { - children: PropTypes.node.isRequired + children: PropTypes.node.isRequired, + disabled: PropTypes.bool, + indent: PropTypes.bool }; const preferenceLabels = defineMessages({ @@ -384,7 +386,7 @@ const preferenceLabels = defineMessages({ }, enableAECHack: { id: "preferences-screen.preference.enable-echo-cancellation-hack", - defaultMessage: "Enable agressive echo cancellation (significantly reduces audio quality)" + defaultMessage: "Enable aggressive echo cancellation (significantly reduces audio quality)" }, disableNoiseSuppression: { id: "preferences-screen.preference.disable-noise-suppression", diff --git a/src/react-components/room/ContentMenu.js b/src/react-components/room/ContentMenu.js index 6ffaf8bc9f..28f421b0d6 100644 --- a/src/react-components/room/ContentMenu.js +++ b/src/react-components/room/ContentMenu.js @@ -41,6 +41,9 @@ export function PeopleMenuButton(props) { ); } +PeopleMenuButton.propTypes = { + presenceCount: PropTypes.number +}; export function ContentMenu({ children }) { return
{joinChildren(children, () =>
)}
; diff --git a/src/react-components/room/TipContainer.js b/src/react-components/room/TipContainer.js index e26ae58514..cc1dbda79a 100644 --- a/src/react-components/room/TipContainer.js +++ b/src/react-components/room/TipContainer.js @@ -15,7 +15,8 @@ let turnRightKey = "E"; // implimentation we may want to cook up our own polyfill based on observing key inputs if (window.navigator.keyboard !== undefined && window.navigator.keyboard.getLayoutMap) { window.navigator.keyboard.getLayoutMap().then(function(map) { - moveKeys = `${map.get("KeyW") || "W"} ${map.get("KeyA") || "A"} ${map.get("KeyS") || "S"} ${map.get("KeyD") || "D"}`.toUpperCase() + moveKeys = `${map.get("KeyW") || "W"} ${map.get("KeyA") || "A"} ${map.get("KeyS") || "S"} ${map.get("KeyD") || + "D"}`.toUpperCase(); turnLeftKey = map.get("KeyQ")?.toUpperCase(); turnRightKey = map.get("KeyE")?.toUpperCase(); });