Skip to content

Commit

Permalink
change Sunlight to SunLight
Browse files Browse the repository at this point in the history
  • Loading branch information
jianhuang01 committed Apr 12, 2019
1 parent 1acfe88 commit 3b35ed6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 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

0 comments on commit 3b35ed6

Please sign in to comment.