diff --git a/src/main.ts b/src/main.ts index 87f921d..6710758 100644 --- a/src/main.ts +++ b/src/main.ts @@ -105,6 +105,12 @@ export class ShadingScene { this.solarIrradiance = irradiance; } + async addSolarIrradianceFromURL(url: string): Promise { + 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)