Skip to content

Commit

Permalink
make landing page globe auto rotate
Browse files Browse the repository at this point in the history
  • Loading branch information
Kit-p committed Oct 19, 2022
1 parent 181df1d commit dc69ff6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion client/src/components/globe/Globe.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ function Globe() {
const ringMaxRadius = 3 // deg
const ringPropagationSpeed = 2 // deg/sec
const ringRepeatPeriod = (arcFlightTime * arcRelativeLength) / numRings
const autoRotate = true

const backgroundColor = '#121916' // should sync with background-color in "src/pages/landing/Landing.css"
// transparent globe
Expand Down Expand Up @@ -105,7 +106,9 @@ function Globe() {
}

globeRef.current.pointOfView(initialCoordinates)
}, [])
globeRef.current.controls().autoRotateSpeed = 0.5
globeRef.current.controls().autoRotate = autoRotate
}, [autoRotate])

return (
<ReactGlobe
Expand Down

0 comments on commit dc69ff6

Please sign in to comment.