Skip to content

Commit

Permalink
docs: Add sun module (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibgreen committed Oct 3, 2019
1 parent f9c1766 commit b0b24da
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
13 changes: 13 additions & 0 deletions docs/table-of-contents.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@
{"entry": "modules/geospatial/docs/developer-guide/geospatial-guide"}
]
},
{
"title": "@math.gl/sun",
"entries": [
{"entry": "modules/sun/docs/developer-guide/sun-guide"}
]
},
{
"title": "viewport-mercator-project",
"entries": [
Expand Down Expand Up @@ -84,6 +90,13 @@
{"entry": "modules/geospatial/docs/api-reference/helpers"}
]
},
{
"title": "@math.gl/sun",
"entries": [
{"entry": "modules/sun/docs/api-reference/get-sun"},
{"entry": "modules/sun/docs/api-reference/get-sun-direction"}
]
},
{
"title": "viewport-mercator-project",
"entries": [
Expand Down
3 changes: 3 additions & 0 deletions modules/sun/docs/api-reference/get-sun-direction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# getSunDirection

> TBA
3 changes: 3 additions & 0 deletions modules/sun/docs/api-reference/get-sun.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# getSun

> TBA
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sun
# Overview

`@math.gl/sun` is a tiny JavaScript library for calculating sun position for the given location and time.

Expand All @@ -8,7 +8,6 @@
npm install @math.gl/sun
```


## Usage

```js
Expand All @@ -20,4 +19,4 @@ const sunDir = getSunDirection(Date.now(), latitude, longitude);

## Attribution

This class was ported from [SunCalc](https://github.com/mourner/suncalc) under BSD-license.
This module is a fork of @mourner's [SunCalc](https://github.com/mourner/suncalc) under BSD 2-clause license.

0 comments on commit b0b24da

Please sign in to comment.