geojs 1.9.2 → 1.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -269,6 +269,7 @@ var webgl_lineFeature = function (arg) {
269
269
  closedVal = closed[i];
270
270
  firstPosIdx3 = posIdx3;
271
271
  maxj = lineItem.length + (closedVal === 2 ? 1 : 0);
272
+ let skipped = 0;
272
273
  for (j = 0; j < maxj; j += 1, posIdx3 += 3) {
273
274
  lidx = j;
274
275
  if (j === lineItem.length) {
@@ -329,9 +330,17 @@ var webgl_lineFeature = function (arg) {
329
330
  }
330
331
 
331
332
  if (j) {
333
+ if (uniform === 'drop' && j > 1 && position[vert[0].pos] === position[vert[1].pos] && position[vert[0].pos + 1] === position[vert[1].pos + 1]) {
334
+ skipped += 1;
335
+ continue;
336
+ }
332
337
  /* zero out the z position. This can be changed if we handle it in
333
338
  * the shader. */
334
339
  for (k = 0; k < orderLen; k += 1, dest += 1, dest3 += 3) {
340
+ if (uniform === 'drop' && vert[0].strokeOpacity <= 0 && vert[1].strokeOpacity <= 0) {
341
+ strokeOpacityBuf[dest] = -1;
342
+ continue;
343
+ }
335
344
  orderk0 = order[k][0];
336
345
  v1 = vert[orderk0];
337
346
  v2 = vert[1 - orderk0];
@@ -370,6 +379,11 @@ var webgl_lineFeature = function (arg) {
370
379
  }
371
380
  }
372
381
  }
382
+ if (skipped) {
383
+ for (k = 0; k < skipped * orderLen; k += 1, dest += 1, dest3 += 3) {
384
+ strokeOpacityBuf[dest] = -1;
385
+ }
386
+ }
373
387
  }
374
388
 
375
389
  if (!onlyStyle) {