reduce dot scaling upon zoom (#963)

* remove obsolete code

* change point scaling with zoom distance
This commit is contained in:
Bruce Martin
2019-10-04 07:58:38 -07:00
committed by GitHub
parent f865187a5d
commit 700c871e6d
2 changed files with 2 additions and 6 deletions
@@ -31,7 +31,7 @@ export default function(regl) {
getFlags(flag, isNaN, isSelected, isHighlight);
float size = pointSize(nPoints, minViewportDimension, isSelected, isHighlight);
gl_PointSize = size * pow(distance, 1.2);
gl_PointSize = size * pow(distance, 0.5);
float z = isNaN ? zBottom : (isHighlight ? zTop : zMiddle);
vec3 xy = projView * vec3(position, 1.);
+1 -5
View File
@@ -194,11 +194,7 @@ class Graph extends React.Component {
componentDidMount() {
// setup canvas, webgl draw function and camera
const camera = _camera(this.reglCanvas, {
pan: true,
scale: true,
rotate: false
});
const camera = _camera(this.reglCanvas);
const regl = _regl(this.reglCanvas);
const drawPoints = _drawPoints(regl);