bryik/aframe-terrain-model-component

bryik

Closed this issue · 2 comments

I'm considering adding two more features: color scaling and opacity scaling based on elevation height.

As you saw in my example, I'm using this component for data visualization. I have precalculated the color map and opacity map and supply them as images, per my earlier pull request. In fact, the peak coloring and opacity are purely a function of elevation, so in my case performance and bandwith usage would be improved by calculating these at runtime, rather than precalculating and sending these data as image files.

specifically, I'd add a 'palette' attribute, so the user can specify a color palette to use for height mapping (if this is specified then 'texture' is ignored), and a 'opacityScaling', 'opacityMin', and 'opacityMax' values to let the user control opacity as a function of Z.

Any thoughts before I proceed on this? I hope it's Ok to contribute this to your component rather than starting my own?

thanks!
dan

bryik commented

Hey Dan,

Those changes sound great! Color scaling would be very useful, how are you thinking of implementing it? My first thought would be to hack something together with D3 scale, but maybe you've got better ideas.

It's definitely OK to build on my component! Feel free to send PRs or file issues for feature ideas.

Ben

See my comment in the closed PR :)