react-virtual-sky
v0.1.12
Published
React planetarium component
Downloads
12
Readme
React VirtualSky
Its react version of VirtualSky.
Basic Demo
Getting Started
Install using npm or npm
$ npm install --save react-virtual-sky
or
$ npm add react-virtual-sky
Usage
export default class App extends React.Component {
const config={
azOff: 0,
height: 500,
width: 500,
latitude: 51.746449,
longitude: 19.620693,
time: new Date(),
skyColors: [ "#000", "#100050" ],
gridAzColor: "#100050",
gridEqColor: "#105000",
gridGalColor: "#500020",
language: 'en',
visibility:{
starMag: 6,
showStarLabels: false,
showPlanets: true,
showPlanetsOrbit: true,
showPlanetsLabels: false,
showSunMoon: true,
showConstellations: true,
showConstellationBoundaries: false,
showConstellationLabels: false,
showAzLabels: true,
showAzGrid: true,
showEqGrid: true,
showGalGrid: false,
showGalaxy: true,
showInfo: true
}
}
render() {
return <VirtualSky id="startmap" config={config}/>
}
}
Available languages
- ar - العربية
- cs - Čeština
- de - Deutsch
- en - English
- es - Español
- fr - Français
- gl - Galego
- it - Italiano
- nl - Nederlands
- pl - Polski
- pt - Português
Development
npm install
npm run storybook
Scripts
npm run lint
: Lint all js filesnpm run lintfix
: fix linting errors of all js filesnpm run semantic-release
: make a release. Leave it for CI to do.npm run storybook
: Start developing by using storybooknpm run test
: Run tests. tests file should be written as*.test.js
and using ES2015npm run test:watch
: Watch tests while writingnpm run test:cover
: Show coverage report of your testsnpm run test:report
: Report test coverage to codecov.io. Leave this for CInpm run build
: transpile all ES6 component files into ES5(commonjs) and put it indist
directorynpm run docs
: create static build of storybook indocs
directory that can be used for github pages
Learn how to write stories here