aframe-react
aframe-react copied to clipboard
AltspaceVR React app is always 2D
I am using aframe-react in a React App that then I import in AltspaceVR as an Enclosure. The problem is that AltspaceVR always renders the shapes in 2D. Here is my react app:
Import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
import 'aframe';
import 'aframe-particle-system-component';
import {Entity, Scene} from 'aframe-react';
import ReactDOM from 'react-dom';
class App extends Component {
render () {
return (
<Scene >
<Entity geometry={{primitive: 'box'}} material={{color: 'red'}} position={{x: 0, y: 0, z: -5}}/>
<Entity particle-system={{preset: 'snow'}}/>
<Entity light={{type: 'point'}}/>
<Entity gltf-model={{src: 'virtualcity.gltf'}}/>
<Entity text={{value: 'Hello, WebVR!'}}/>
</Scene>
);
}
}
export default App;