Skip to content

Commit 023c421

Browse files
committed
Enhance zero-marker look
1 parent 1a4a57a commit 023c421

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

circle-vert.glsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,6 @@ void main() {
5454

5555
fragBorderRadius = 1. - 2. * borderSize / (size + borderSize);
5656
fragColor = color;
57-
fragBorderColor = borderColor.a == 0. ? vec4(color.rgb, 0.) : borderColor;
57+
fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor;
5858
fragWidth = 1. / gl_PointSize;
5959
}

scatter.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,13 @@ function Scatter (regl, options) {
186186
offset: 4
187187
}
188188
},
189-
size: (ctx, prop) => prop.size.length ? {
189+
size: (ctx, prop) => {
190+
return prop.size.length ? {
190191
buffer: sizeBuffer,
191192
stride: 2,
192193
offset: 0
193-
} : {constant: [Math.round(prop.size * 255 / maxSize)]},
194+
} : {constant: [Math.round(prop.size * 255 / maxSize)]}
195+
},
194196
borderSize: (ctx, prop) => prop.borderSize.length ? {
195197
buffer: sizeBuffer,
196198
stride: 2,

0 commit comments

Comments
 (0)