diff --git a/examples/layer-browser/src/data-samples.js b/examples/layer-browser/src/data-samples.js index 4498237a701..adaca69d38e 100644 --- a/examples/layer-browser/src/data-samples.js +++ b/examples/layer-browser/src/data-samples.js @@ -104,9 +104,11 @@ export const zigzag = [ ]) }, { + // A-B-A path: [ [positionOrigin[0] - 0.005, positionOrigin[1] + 0.005], - [positionOrigin[0] - 0.005, positionOrigin[1] - 0.005] + [positionOrigin[0] - 0.005, positionOrigin[1] - 0.005], + [positionOrigin[0] - 0.005, positionOrigin[1] + 0.005] ] } ]; diff --git a/modules/layers/src/path-layer/path-layer-vertex.glsl.js b/modules/layers/src/path-layer/path-layer-vertex.glsl.js index 76738bf0007..7e81f47177e 100644 --- a/modules/layers/src/path-layer/path-layer-vertex.glsl.js +++ b/modules/layers/src/path-layer/path-layer-vertex.glsl.js @@ -97,7 +97,7 @@ vec3 lineJoin( float cosHalfA = abs(dot(dirA, miterVec)); // -1: right, 1: left - float turnDirection = flipIfTrue(dirA.x * dirB.y > dirA.y * dirB.x); + float turnDirection = flipIfTrue(dirA.x * dirB.y >= dirA.y * dirB.x); // relative position to the corner: // -1: inside (smaller side of the angle) diff --git a/test/render/golden-images/path-lnglat.png b/test/render/golden-images/path-lnglat.png index b23e3a3a6c2..6886849642f 100644 Binary files a/test/render/golden-images/path-lnglat.png and b/test/render/golden-images/path-lnglat.png differ diff --git a/test/render/golden-images/path-rounded.png b/test/render/golden-images/path-rounded.png index 959a980bc0c..72e6bcae7e1 100644 Binary files a/test/render/golden-images/path-rounded.png and b/test/render/golden-images/path-rounded.png differ