Skip to content

Commit

Permalink
Add solarIrradiance data via url #47
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianK13 committed Nov 8, 2024
1 parent 9837526 commit ba6cd58
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@ export class ShadingScene {
this.solarIrradiance = irradiance;
}

async addSolarIrradianceFromURL(url: string): Promise<void> {
const response = await fetch(url);
const data = await response.json();
this.addSolarIrradiance(data);
}

/**
* Change the Color Map that is used for the colors of the simulated Three.js mesh. This is
* optional, the default colorMap is viridis (blue to green to yellow)
Expand Down

0 comments on commit ba6cd58

Please sign in to comment.