Skip to content

Instantly share code, notes, and snippets.

@adamTrz
Last active February 24, 2018 14:24
Show Gist options
  • Select an option

  • Save adamTrz/2c7d5ee0cb39f1b5771a4050d5d4890b to your computer and use it in GitHub Desktop.

Select an option

Save adamTrz/2c7d5ee0cb39f1b5771a4050d5d4890b to your computer and use it in GitHub Desktop.
import * as React from 'react'
import { View, Scene, PointLight, Animated } from 'react-vr'
import Planet from './Planet'
import Sun from './Sun'
class App extends React.Component {
render() {
return (
<Scene
style={{
transform: [
{translateZ: 35},
{translateY: 35},
{ rotateX: -45 },
],
}}
>
<Planet
texture="earth.jpg"
yearDuration={20000}
dayDuration={2000}
radius={1}
elipsisRadius={20}
inclination={7.2}
/>
<Sun />
</Scene>
)
}
}
export default App
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment