Skip to content

Commit 0fc2afd

Browse files
authored
Merge pull request #65 from spacesvr/dev
v1.8.3
2 parents 0e27024 + 7cc6adf commit 0fc2afd

File tree

17 files changed

+96
-784
lines changed

17 files changed

+96
-784
lines changed

README.md

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
Sleek, powerful front-end framework for quickly creating cross-platform VR Websites.
1111
</h5>
1212
<p align="center">
13-
<a href="https://muse.place/muse">muse.place/muse</a> · <a href="https://discord.gg/nFHrmUbaz5">discord</a>
13+
<a href="https://muse.place?utm_source=npmjs">muse.place</a> · <a href="https://discord.gg/nFHrmUbaz5">discord</a>
1414
<p>
1515
<br/>
1616
<br/>
@@ -338,30 +338,6 @@ Makes its children react to onclick and on hover methods
338338
</Interactable>
339339
```
340340

341-
#### Overlay
342-
343-
Allows for raw html to be placed inside an `Environment` component for access to
344-
environment state, player state, and renderer state.
345-
346-
```jsx
347-
function Stuff() {
348-
const { size } = useThree();
349-
const { position } = usePlayer();
350-
351-
return (
352-
<div>
353-
<h1>Current player position is {position.velocity.get()}</h1>
354-
</div>
355-
);
356-
}
357-
358-
<StandardEnvironment>
359-
<Overlay>
360-
<Stuff />
361-
</Overlay>
362-
</StandardEnvironment>;
363-
```
364-
365341
#### Spinning
366342

367343
Makes its children spin

examples/package.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,6 @@
22
"name": "spacesvr-examples",
33
"version": "0.1.0",
44
"private": true,
5-
"dependencies": {
6-
"@react-three/drei": "^4.3.3",
7-
"@react-three/fiber": "^6.0.14",
8-
"@testing-library/jest-dom": "^5.11.4",
9-
"@testing-library/react": "^11.1.0",
10-
"@testing-library/user-event": "^12.1.10",
11-
"@types/three": "^0.127.1",
12-
"customize-cra": "^1.0.0",
13-
"peer": "^0.6.1",
14-
"react": "0.0.0-experimental-10cc40018",
15-
"react-dom": "0.0.0-experimental-10cc40018",
16-
"react-router-dom": "^5.2.0",
17-
"react-scripts": "4.0.0",
18-
"three": "^0.127.0",
19-
"web-vitals": "^0.2.4"
20-
},
215
"scripts": {
226
"start": "react-app-rewired start",
237
"start-ssl": "HTTPS=true SSL_CRT_FILE=cert.crt SSL_KEY_FILE=cert.key react-app-rewired start",
@@ -43,8 +27,24 @@
4327
"last 1 safari version"
4428
]
4529
},
30+
"peerDependencies": {
31+
"spacesvr": ">0"
32+
},
33+
"dependencies": {
34+
"@testing-library/jest-dom": "^5.11.4",
35+
"@testing-library/react": "^11.1.0",
36+
"@testing-library/user-event": "^12.1.10",
37+
"@types/three": "^0.127.1",
38+
"customize-cra": "^1.0.0",
39+
"peer": "^0.6.1",
40+
"react": "^17.0.0",
41+
"react-dom": "^17.0.0",
42+
"react-router-dom": "^5.2.0",
43+
"react-scripts": "4.0.0",
44+
"three": "^0.127.0",
45+
"web-vitals": "^0.2.4"
46+
},
4647
"devDependencies": {
47-
"react-app-rewired": "^2.1.6",
48-
"spacesvr": "^1.6.5"
48+
"react-app-rewired": "^2.1.6"
4949
}
5050
}

examples/src/App.jsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,17 @@
11
import { BrowserRouter as Router, Route, Switch } from "react-router-dom";
22
import Starter from "./scenes/Starter";
3-
import Keyframes from "./scenes/Keyframes";
43
import Multiplayer from "./scenes/Multiplayer";
54
import Styled from "./scenes/Styled";
65
import ManyModels from "./scenes/ManyModels";
7-
import Shop from "./scenes/Shop";
86

97
export default () => {
108
return (
119
<Router>
1210
<Switch>
1311
<Route exact path="/" component={Starter} />
14-
<Route exact path="/keyframes" component={Keyframes} />
1512
<Route exact path="/multiplayer" component={Multiplayer} />
1613
<Route exact path="/styled" component={Styled} />
1714
<Route exact path="/models" component={ManyModels} />
18-
<Route exact path="/shop" component={Shop} />
1915
</Switch>
2016
</Router>
2117
);

examples/src/models/MichaelModel.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ const MichaelModel = (props) => {
77
DRACO_URL
88
);
99

10+
gltf.scene.traverse((child) => (child.frustumCulled = false));
11+
1012
return (
1113
<group {...props}>
1214
<primitive object={gltf.scene} />

examples/src/models/ShoppingCart.jsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
import { DRACO_URL } from "../../../src/utils";
22
import { useGLTF } from "@react-three/drei";
3+
import { useTrimeshCollision } from "../../../src/utils/";
34

45
const Building = () => {
56
const gltf = useGLTF(
67
"https://d27rt3a60hh1lx.cloudfront.net/models/ShoppingCart-1613286474/cart2.glb",
78
DRACO_URL
89
);
910

11+
useTrimeshCollision(gltf.nodes.Metal.geometry.clone());
12+
1013
return <primitive object={gltf.scene} />;
1114
};
1215

examples/src/scenes/Keyframes.jsx

Lines changed: 0 additions & 60 deletions
This file was deleted.

examples/src/scenes/Shop.jsx

Lines changed: 0 additions & 40 deletions
This file was deleted.

examples/src/scenes/Starter.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export default () => {
3939
}, []);
4040

4141
return (
42-
<StandardEnvironment signup="https://bit.ly/3wgMNGO">
42+
<StandardEnvironment playerProps={{ pos: [0, 2, 0] }}>
4343
<Background color={0xffffff} />
4444
<Interactable
4545
onClick={handleClick}

0 commit comments

Comments
 (0)