Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DO NOT MERGE] Dynamic PointSize for cluster animation #279

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions js/app/Visualization/Animation/ClusterAnimation-vertex.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ uniform float zoom;

uniform mat4 googleMercator2webglMatrix;

uniform float ps;

varying float vWeight;

float latLonDistanceToWebGL(float distance, vec2 lonlat, mat4 googleMercator2webglMatrix) {
Expand All @@ -28,8 +30,6 @@ void main() {
gl_PointSize = 0.0;
vWeight = 0.0;
} else {
float ps = 0.01; // In WebGL units

float webglSigma = latLonDistanceToWebGL(_sigma, lonlat, googleMercator2webglMatrix);

float radius = ps + 2.5 * webglSigma;
Expand Down
4 changes: 4 additions & 0 deletions js/app/Visualization/Animation/ClusterAnimation.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ define(["require", "app/Class", "app/Visualization/Shader", "app/Visualization/A
filter: {type: "Float32", source: {_: null, timerange: -1.0, active_category: -1.0}}
},

uniforms: {
ps: {min: 0.001, max: 0.05, value: 0.01}
},

selections: $.extend(
{active_category: {sortcols: ["category"], max_range_count: 3, data: {category: [-1.0/0.0, 1.0/0.0]}, header: {length: 2}}},
Animation.prototype.selections
Expand Down