opentraffic / tangram-viz-experiments

OTv2: work-in-progress to visualize anonymized and aggregated traffic statics using Tangram
http://opentraffic.io/tangram-viz-experiments/
MIT License
4 stars 1 forks source link

add demo timerange presets to DAT gui #15

Closed nvkelso closed 7 years ago

nvkelso commented 7 years ago

Partial work towards #9 with preset list.

patriciogonzalezvivo commented 7 years ago

On JS we encode the speed to a red channel (over 0~1, everything above gets clamp)

(feature.speed || feature.speeds[0].average_speed)/100

On the shader is a linear mapping to the texture (very cheap)

color = texture2D(u_palette, vec2(clamp(v_color.r,0.,1.),.5));