geojs 1.15.2 → 1.15.3
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.
- package/geo.js +14 -8
- package/geo.lean.js +14 -8
- package/geo.lean.min.js +3 -3
- package/geo.min.js +3 -3
- package/package.json +1 -1
- package/src/webgl/lineFeature.js +9 -6
package/package.json
CHANGED
package/src/webgl/lineFeature.js
CHANGED
|
@@ -147,6 +147,7 @@ var webgl_lineFeature = function (arg) {
|
|
|
147
147
|
miterLimit = m_this.style.get('miterLimit')(data),
|
|
148
148
|
antialiasing = m_this.style.get('antialiasing')(data) || 0,
|
|
149
149
|
uniformFunc = m_this.style.get('uniformLine'), uniformVal, uniform,
|
|
150
|
+
drop, skipped,
|
|
150
151
|
order = m_this.featureVertices(), orderk0,
|
|
151
152
|
orderLen = order.length,
|
|
152
153
|
// webgl buffers; see _init for details
|
|
@@ -216,10 +217,11 @@ var webgl_lineFeature = function (arg) {
|
|
|
216
217
|
position = transform.transformCoordinates(target_gcs, map_gcs, position, 3);
|
|
217
218
|
m_origin = new Float32Array(m_this.style.get('origin')(position));
|
|
218
219
|
if (m_origin[0] || m_origin[1] || m_origin[2]) {
|
|
220
|
+
const o0 = m_origin[0], o1 = m_origin[1], o2 = m_origin[2];
|
|
219
221
|
for (i = 0; i < position.length; i += 3) {
|
|
220
|
-
position[i] -=
|
|
221
|
-
position[i + 1] -=
|
|
222
|
-
position[i + 2] -=
|
|
222
|
+
position[i] -= o0;
|
|
223
|
+
position[i + 1] -= o1;
|
|
224
|
+
position[i + 2] -= o2;
|
|
223
225
|
}
|
|
224
226
|
}
|
|
225
227
|
m_modelViewUniform.setOrigin(m_origin);
|
|
@@ -265,11 +267,12 @@ var webgl_lineFeature = function (arg) {
|
|
|
265
267
|
continue;
|
|
266
268
|
}
|
|
267
269
|
uniform = uniformVal === undefined ? uniformFunc(lineItem, i) : uniformVal;
|
|
270
|
+
drop = uniform === 'drop';
|
|
268
271
|
d = data[i];
|
|
269
272
|
closedVal = closed[i];
|
|
270
273
|
firstPosIdx3 = posIdx3;
|
|
271
274
|
maxj = lineItem.length + (closedVal === 2 ? 1 : 0);
|
|
272
|
-
|
|
275
|
+
skipped = 0;
|
|
273
276
|
for (j = 0; j < maxj; j += 1, posIdx3 += 3) {
|
|
274
277
|
lidx = j;
|
|
275
278
|
if (j === lineItem.length) {
|
|
@@ -330,14 +333,14 @@ var webgl_lineFeature = function (arg) {
|
|
|
330
333
|
}
|
|
331
334
|
|
|
332
335
|
if (j) {
|
|
333
|
-
if (
|
|
336
|
+
if (drop && j > 1 && position[vert[0].pos] === position[vert[1].pos] && position[vert[0].pos + 1] === position[vert[1].pos + 1]) {
|
|
334
337
|
skipped += 1;
|
|
335
338
|
continue;
|
|
336
339
|
}
|
|
337
340
|
/* zero out the z position. This can be changed if we handle it in
|
|
338
341
|
* the shader. */
|
|
339
342
|
for (k = 0; k < orderLen; k += 1, dest += 1, dest3 += 3) {
|
|
340
|
-
if (
|
|
343
|
+
if (drop && vert[0].strokeOpacity <= 0 && vert[1].strokeOpacity <= 0) {
|
|
341
344
|
strokeOpacityBuf[dest] = -1;
|
|
342
345
|
continue;
|
|
343
346
|
}
|