File tree Expand file tree Collapse file tree 9 files changed +18
-36
lines changed Expand file tree Collapse file tree 9 files changed +18
-36
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " spacesvr" ,
3- "version" : " 2.0.0 " ,
3+ "version" : " 2.0.1 " ,
44 "private" : true ,
55 "description" : " A standardized reality for future of the 3D Web" ,
66 "keywords" : [
6161 "peerDependencies" : {
6262 "react" : " >=18.1" ,
6363 "react-dom" : " >=18.1" ,
64- "three" : " >=0.139.2" ,
65- "three-stdlib" : " >=2.0"
64+ "three" : " >=0.139.2"
6665 },
6766 "devDependencies" : {
6867 "@babel/core" : " ^7.18.2" ,
Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ import { Props as ContainerProps } from "@react-three/fiber/dist/declarations/sr
99import { VRCanvas } from "@react-three/xr" ;
1010import { defaultCanvasProps } from "./logic/canvas" ;
1111import { EnvironmentContext , useEnvironmentState } from "./logic/environment" ;
12- import KillEnterVRButton from "./ui/KillEnterVRButton" ;
1312export * from "./logic/environment" ;
1413
1514export type EnvironmentProps = {
@@ -46,7 +45,6 @@ export function Environment(props: EnvironmentLayerProps) {
4645 < Crosshair />
4746 </ EnvironmentContext . Provider >
4847 < VRCanvas { ...defaultCanvasProps } { ...canvasProps } >
49- < KillEnterVRButton />
5048 < EnvironmentContext . Provider value = { state } >
5149 < RegisterMenuItems />
5250 { children }
Original file line number Diff line number Diff line change @@ -6,9 +6,10 @@ import {
66 useRef ,
77 useState ,
88} from "react" ;
9- import { MenuItem } from "./menu" ;
109import { Device , DeviceState , useDevice } from "./device" ;
1110
11+ export type MenuItem = { text : string ; action : ( ) => void } ;
12+
1213export type PauseEvent = ( p : boolean ) => void ;
1314export type EnvironmentState = {
1415 paused : boolean ;
Original file line number Diff line number Diff line change 1- import { useEnvironment } from "../logic/environment" ;
1+ import { MenuItem , useEnvironment } from "../logic/environment" ;
22import { useThree } from "@react-three/fiber" ;
33import { XRSession } from "three" ;
44import { useEffect , useRef , useState } from "react" ;
55import { isMobile } from "react-device-detect" ;
66
7- export type MenuItem = { text : string ; action : ( ) => void } ;
8-
97/**
108 * Component to register menu items to the environment.
119 * Needs to be a component because it needs access to the three context to run
@@ -17,8 +15,6 @@ export function RegisterMenuItems() {
1715 const vrMenu = useVRMenuItem ( ) ;
1816 const fsMenu = useFsMenuItem ( ) ;
1917
20- //TODO: too many re-renders
21-
2218 useEffect ( ( ) => {
2319 const arr : MenuItem [ ] = [ ] ;
2420
Original file line number Diff line number Diff line change @@ -28,6 +28,13 @@ const globalStyles = css`
2828 font-size : 24px ;
2929 }
3030 }
31+
32+ // used to remove the "enter vr" button from react-xr
33+ body > button ,
34+ body > a {
35+ display : none;
36+ pointer-events : none;
37+ }
3138` ;
3239
3340export default function GlobalStyles ( ) {
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -10,9 +10,8 @@ import {
1010 Title ,
1111 Window ,
1212} from "./components/components" ;
13- import { MenuItem } from "../../logic/menu" ;
14- import { useKeyboardLayout } from "./logic/keyboard" ;
15- import { useEnvironment } from "../../logic/environment" ;
13+ import { useKeyboardLayout } from "../../../../logic/keyboard" ;
14+ import { MenuItem , useEnvironment } from "../../logic/environment" ;
1615import { Idea } from "../../../basis" ;
1716
1817type PauseItem = Omit < MenuItem , "action" > & {
@@ -49,7 +48,7 @@ export default function PauseMenu(props: PauseMenuProps) {
4948 const PAUSE_ITEMS : PauseItem [ ] = [
5049 ...pauseMenuItems ,
5150 {
52- text : "v2.0.0 " ,
51+ text : "v2.0.1 " ,
5352 link : "https://www.npmjs.com/package/spacesvr" ,
5453 } ,
5554 ...menuItems ,
Original file line number Diff line number Diff line change 11export * from "./collision" ;
2+ export * from "./dom" ;
3+ export * from "./keyboard" ;
4+ export * from "./keys" ;
25export * from "./limiter" ;
File renamed without changes.
You can’t perform that action at this time.
0 commit comments