dannycochran / windable

Add a wind visualization to your map.
MIT License
40 stars 14 forks source link

Support for scalar data type #10

Open Thammada opened 8 years ago

Thammada commented 8 years ago

I'm working on a project that has to visualize both vector and scalar data types. Windable obviously already support vector data types for wind data, but I'm looking for a way to implement a layer with scalar data. Since windable reuses rendering logic from earth.nullschool, and I see that earth.nullschool supports temperature, which is scalar, It should be possible to implement a layer for scalar data.

Can you please point me out where I should start if I want to make windable work with scalar data?

dannycochran commented 8 years ago

It's doable but Windable stripped out as much as I could from the original implementation to just support wind, so it's likely we'd need to rework the API to abstract it for other products. You can see cambecc's original abstraction of products here, including the one for temperature:

https://github.com/cambecc/earth/blob/master/public/libs/earth/1.0.0/products.js#L151

I suppose if we defined an API like:

const earth = new Earth();
// show wind stuff
earth.start('wind', {...existingWindConfigObject})

// show temp stuff (wipes screen of wind stuff)
earth.start('temperature', {...temperatureConfigObject})

At that point, it may make more sense to reach out to @cambecc and work with him to define a more configurable API for earth.nullschool, which I found unusable as an API for existing maps, which is why I made windable to begin with. I'll tweet at him or something.

lynnetab commented 7 years ago

Thammada, Have you made any progress on adding scalar data to Windable? I need to do the same thing. Have you been in contact with @cambecc?