felixpalmer / procedural-gl-js

Mobile-first 3D mapping engine with emphasis on user experience
https://www.procedural.eu/map
Mozilla Public License 2.0
1.29k stars 84 forks source link

Environment parameters are being reset #39

Open jellehak opened 3 years ago

jellehak commented 3 years ago

First of all really nice library, much faster and easier to use than the other globe libraries 👍

Describe the bug The environment parameters are being reset after sometime when using Procedural.displayLocation

To Reproduce Steps to reproduce the behaviour:

     // Environment
    const environment = {
      title: 'custom',
      parameters: {
        inclination: 0.6,
        fogDropoff: 0
      }
    }
    Procedural.setEnvironment(environment)
    const location1 = { latitude: 52.3676, longitude: 4.9041 }
    const location2 = { latitude: 45.8326364, longitude: 6.8564201 }
    Procedural.displayLocation(location2);
    setTimeout(()=> {
      Procedural.displayLocation(location1);
// Fog comes back in play here
    }, 5000)

Expected behaviour Expected is that the environment parameters would stay the same.