Skip to content

v1.8.3 #65

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Sep 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 1 addition & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Sleek, powerful front-end framework for quickly creating cross-platform VR Websites.
</h5>
<p align="center">
<a href="https://muse.place/muse">muse.place/muse</a> · <a href="https://discord.gg/nFHrmUbaz5">discord</a>
<a href="https://muse.place?utm_source=npmjs">muse.place</a> · <a href="https://discord.gg/nFHrmUbaz5">discord</a>
<p>
<br/>
<br/>
Expand Down Expand Up @@ -338,30 +338,6 @@ Makes its children react to onclick and on hover methods
</Interactable>
```

#### Overlay

Allows for raw html to be placed inside an `Environment` component for access to
environment state, player state, and renderer state.

```jsx
function Stuff() {
const { size } = useThree();
const { position } = usePlayer();

return (
<div>
<h1>Current player position is {position.velocity.get()}</h1>
</div>
);
}

<StandardEnvironment>
<Overlay>
<Stuff />
</Overlay>
</StandardEnvironment>;
```

#### Spinning

Makes its children spin
Expand Down
36 changes: 18 additions & 18 deletions examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,6 @@
"name": "spacesvr-examples",
"version": "0.1.0",
"private": true,
"dependencies": {
"@react-three/drei": "^4.3.3",
"@react-three/fiber": "^6.0.14",
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"@types/three": "^0.127.1",
"customize-cra": "^1.0.0",
"peer": "^0.6.1",
"react": "0.0.0-experimental-10cc40018",
"react-dom": "0.0.0-experimental-10cc40018",
"react-router-dom": "^5.2.0",
"react-scripts": "4.0.0",
"three": "^0.127.0",
"web-vitals": "^0.2.4"
},
"scripts": {
"start": "react-app-rewired start",
"start-ssl": "HTTPS=true SSL_CRT_FILE=cert.crt SSL_KEY_FILE=cert.key react-app-rewired start",
Expand All @@ -43,8 +27,24 @@
"last 1 safari version"
]
},
"peerDependencies": {
"spacesvr": ">0"
},
"dependencies": {
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"@types/three": "^0.127.1",
"customize-cra": "^1.0.0",
"peer": "^0.6.1",
"react": "^17.0.0",
"react-dom": "^17.0.0",
"react-router-dom": "^5.2.0",
"react-scripts": "4.0.0",
"three": "^0.127.0",
"web-vitals": "^0.2.4"
},
"devDependencies": {
"react-app-rewired": "^2.1.6",
"spacesvr": "^1.6.5"
"react-app-rewired": "^2.1.6"
}
}
4 changes: 0 additions & 4 deletions examples/src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
import { BrowserRouter as Router, Route, Switch } from "react-router-dom";
import Starter from "./scenes/Starter";
import Keyframes from "./scenes/Keyframes";
import Multiplayer from "./scenes/Multiplayer";
import Styled from "./scenes/Styled";
import ManyModels from "./scenes/ManyModels";
import Shop from "./scenes/Shop";

export default () => {
return (
<Router>
<Switch>
<Route exact path="/" component={Starter} />
<Route exact path="/keyframes" component={Keyframes} />
<Route exact path="/multiplayer" component={Multiplayer} />
<Route exact path="/styled" component={Styled} />
<Route exact path="/models" component={ManyModels} />
<Route exact path="/shop" component={Shop} />
</Switch>
</Router>
);
Expand Down
2 changes: 2 additions & 0 deletions examples/src/models/MichaelModel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ const MichaelModel = (props) => {
DRACO_URL
);

gltf.scene.traverse((child) => (child.frustumCulled = false));

return (
<group {...props}>
<primitive object={gltf.scene} />
Expand Down
3 changes: 3 additions & 0 deletions examples/src/models/ShoppingCart.jsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import { DRACO_URL } from "../../../src/utils";
import { useGLTF } from "@react-three/drei";
import { useTrimeshCollision } from "../../../src/utils/";

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

useTrimeshCollision(gltf.nodes.Metal.geometry.clone());

return <primitive object={gltf.scene} />;
};

Expand Down
60 changes: 0 additions & 60 deletions examples/src/scenes/Keyframes.jsx

This file was deleted.

40 changes: 0 additions & 40 deletions examples/src/scenes/Shop.jsx

This file was deleted.

2 changes: 1 addition & 1 deletion examples/src/scenes/Starter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default () => {
}, []);

return (
<StandardEnvironment signup="https://bit.ly/3wgMNGO">
<StandardEnvironment playerProps={{ pos: [0, 2, 0] }}>
<Background color={0xffffff} />
<Interactable
onClick={handleClick}
Expand Down
Loading