Skip to content

Commit

Permalink
Add example js code to README #16
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianK13 committed Aug 16, 2024
1 parent 34d8566 commit 218f552
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,37 @@
![Tests](https://github.com/open-pv/simshady/actions/workflows/tests.yml/badge.svg) ![Docs](https://github.com/open-pv/simshady/actions/workflows/typedoc.yml/badge.svg) [![NPM Version](https://img.shields.io/npm/v/@openpv/simshady)](https://www.npmjs.com/package/@openpv/simshady) [![NPM Downloads](https://img.shields.io/npm/dm/@openpv/simshady)](https://npmtrends.com/@openpv/simshady)

# SimShady

SimShady is a package for shading simulation and PV yield estimation based on 3D meshes. It runs on the GPU using WebGL. See it in action at [openpv.de](https://openpv.de).

## Installation

To install the package, run

```
npm i @openpv/simshady
```

## Usage

We publish our documentation at https://open-pv.github.io/simshady/. Additionally, we have built a minimal vite webapp to showcase the most relevant features. Check out its source code [here](https://github.com/open-pv/minimalApp).

The basic usage of the package works as follows:

```javascript
import ShadingScene from '@openpv/simshady';

const lat = 50.0;
const lon = 11.0;
const scene = new ShadingScene(lat, lon);
scene.addShadingGeometry(someShadingGeometry);
scene.addSimulationGeometry(someSimulationGeometry);
const mesh = await scene.calculate(100);
showThreeJS(mesh);
```

## Team

<table>
<tr>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
Expand Down Expand Up @@ -47,6 +66,7 @@ We publish our documentation at https://open-pv.github.io/simshady/. Additionall
</table>

## Sponsors

We thank our sponsors.

<a href="https://prototypefund.de/">
Expand Down

0 comments on commit 218f552

Please sign in to comment.