Skip to content

Commit

Permalink
Merge 3b35ed6 into 7a9745f
Browse files Browse the repository at this point in the history
  • Loading branch information
jianhuang01 committed Apr 12, 2019
2 parents 7a9745f + 3b35ed6 commit b62b94c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 13 deletions.
14 changes: 7 additions & 7 deletions docs/api-reference/lights/sun-light.md
@@ -1,15 +1,15 @@
# Sunlight (Experimental)
# SunLight (Experimental)

Sunlight is a directional light source simulating the sun. Sun position calculations are based on [article](http://aa.quae.nl/en/reken/zonpositie.html) and inspired by [SunCalc](https://www.npmjs.com/package/suncalc).
SunLight is a directional light source simulating the sun. Sun position calculations are based on [article](http://aa.quae.nl/en/reken/zonpositie.html) and inspired by [SunCalc](https://www.npmjs.com/package/suncalc).

## Usage

Create an sun light source.
Create a sun light source.

```js
import {_Sunlight as Sunlight} from '@deck.gl/core';
import {_SunLight as SunLight} from '@deck.gl/core';

new Sunlight({
new SunLight({
timestamp: 1554927200000,
color: [255, 0, 0],
intensity: 1
Expand All @@ -18,10 +18,10 @@ new Sunlight({

## constructor

The constructor for the `Sunlight` class. Use this to create a new `Sunlight`.
The constructor for the `SunLight` class. Use this to create a new `SunLight`.

```js
const sunlight = new Sunlight({timestamp, color, intensity});
const sunLight = new SunLight({timestamp, color, intensity});
```

* `timestamp` - (*number*) - Unix timestamp in milliseconds.
Expand Down
2 changes: 1 addition & 1 deletion modules/core/src/effects/lighting/sun-light.js
@@ -1,7 +1,7 @@
import {DirectionalLight} from '@luma.gl/core';
import {getSunlightDirection} from './suncalc';

export default class Sunlight extends DirectionalLight {
export default class SunLight extends DirectionalLight {
constructor({timestamp, ...others}) {
super(others);

Expand Down
2 changes: 1 addition & 1 deletion modules/core/src/index.js
Expand Up @@ -33,7 +33,7 @@ export {default as LightingEffect} from './effects/lighting/lighting-effect';
export {default as PointLight} from './effects/lighting/point-light';
export {default as DirectionalLight} from './effects/lighting/directional-light';
export {default as _CameraLight} from './effects/lighting/camera-light';
export {default as _Sunlight} from './effects/lighting/sun-light';
export {default as _SunLight} from './effects/lighting/sun-light';

// Experimental Pure JS (non-React) bindings
export {default as Deck} from './lib/deck';
Expand Down
4 changes: 0 additions & 4 deletions website/contents/pages.js
Expand Up @@ -519,10 +519,6 @@ export const docPages = generatePath([
{
name: 'project64',
content: getDocUrl('shader-modules/project64.md')
},
{
name: 'lighting',
content: getDocUrl('shader-modules/lighting.md')
}
]
},
Expand Down

0 comments on commit b62b94c

Please sign in to comment.