From eed3050736bc22330b3a132a35c3758db2a32cc6 Mon Sep 17 00:00:00 2001 From: Alex Shortt Date: Tue, 29 Mar 2022 18:19:27 -0700 Subject: [PATCH 1/3] unpause environment on xr session start (#78) --- src/layers/reality/utils/menu.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/layers/reality/utils/menu.tsx b/src/layers/reality/utils/menu.tsx index f3d1b645..f40c90c1 100644 --- a/src/layers/reality/utils/menu.tsx +++ b/src/layers/reality/utils/menu.tsx @@ -34,7 +34,7 @@ export function RegisterMenuItems() { export const useVRMenuItem = (): MenuItem | undefined => { const gl = useThree((state) => state.gl); - const { setDevice } = useEnvironment(); + const { setDevice, setPaused } = useEnvironment(); // @ts-ignore const xr = navigator.xr; @@ -67,6 +67,7 @@ export const useVRMenuItem = (): MenuItem | undefined => { await gl.xr.setSession(sesh); setText("Exit VR"); setDevice("xr"); + setPaused(false); session.current = sesh; } @@ -74,6 +75,7 @@ export const useVRMenuItem = (): MenuItem | undefined => { session.current?.removeEventListener("end", onSessionEnded); setDevice(isMobile ? "mobile" : "desktop"); setText("Enter VR"); + setPaused(true); session.current = undefined; } From 59dd196a98833530af18206000b453908e2b0913 Mon Sep 17 00:00:00 2001 From: Alex Shortt Date: Tue, 29 Mar 2022 18:24:29 -0700 Subject: [PATCH 2/3] disable option for removing back panel on transparent images (#79) --- src/ideas/components/Image.tsx | 1 - src/ideas/misc/Frame.tsx | 10 ++-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/ideas/components/Image.tsx b/src/ideas/components/Image.tsx index 557edb8d..3122eb6d 100644 --- a/src/ideas/components/Image.tsx +++ b/src/ideas/components/Image.tsx @@ -51,7 +51,6 @@ function UnsuspensedImage(props: ImageProps) { thickness={frameWidth} material={frameMaterial} innerFrameMaterial={innerFrameMaterial} - transparent={transparent} /> )} diff --git a/src/ideas/misc/Frame.tsx b/src/ideas/misc/Frame.tsx index 81979309..dd521592 100644 --- a/src/ideas/misc/Frame.tsx +++ b/src/ideas/misc/Frame.tsx @@ -13,7 +13,6 @@ type FrameProps = { thickness?: number; material?: Material; innerFrameMaterial?: Material; - transparent?: boolean; }; /** @@ -33,7 +32,6 @@ export default function Frame(props: FrameProps) { height, thickness = 1, material: passedMaterial, - transparent = false, innerFrameMaterial, } = props; @@ -102,11 +100,7 @@ export default function Frame(props: FrameProps) { 0 ); - const geos = [topFrame, bottomFrame, leftFrame, rightFrame]; - - if (!innerFrameMaterial && !transparent) { - geos.unshift(backPanel); - } + const geos = [backPanel, topFrame, bottomFrame, leftFrame, rightFrame]; const geo = BufferGeometryUtils.mergeBufferGeometries(geos); @@ -117,7 +111,7 @@ export default function Frame(props: FrameProps) { rightFrame.dispose(); return geo; - }, [innerFrameMaterial, transparent, borderThickness, width, height]); + }, [innerFrameMaterial, borderThickness, width, height]); const backFrameGeometry = useMemo(() => { if (!innerFrameMaterial) return undefined; From 8845a51cc454fd177dd62766f9c7b0e8ec438228 Mon Sep 17 00:00:00 2001 From: Alex Shortt Date: Tue, 29 Mar 2022 18:28:35 -0700 Subject: [PATCH 3/3] v1.9.1 --- package.json | 2 +- src/layers/reality/ui/PauseMenu/index.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 39420bb8..08da3245 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "spacesvr", - "version": "1.9.0", + "version": "1.9.1", "private": true, "description": "An Environment for WebXR Spaces", "keywords": [ diff --git a/src/layers/reality/ui/PauseMenu/index.tsx b/src/layers/reality/ui/PauseMenu/index.tsx index 0be2e2e2..2d9d9d49 100644 --- a/src/layers/reality/ui/PauseMenu/index.tsx +++ b/src/layers/reality/ui/PauseMenu/index.tsx @@ -53,7 +53,7 @@ export default function PauseMenu(props: PauseMenuProps) { const PAUSE_ITEMS: PauseItem[] = [ ...pauseMenuItems, { - text: "v1.9.0", + text: "v1.9.1", link: "https://www.npmjs.com/package/spacesvr", }, ...menuItems,