question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Mitering bug: PathLayer produces uneven strokes if the path has acute angles

See original GitHub issue

Deck.gl verson: 46add427dd7d2f132f5699e38edcc90802f3fc30 (dev branch)

image

Steps to reproduce

  • Create a PathLayer as follows:
const path = [[-81.29868341618506,41.1053559416184],[-80.97694,41.10014],[-80.82915,41.10922],[-80.84265,41.11511],[-80.76570077085131,41.05483762281574]]

const layer = new PathLayer({
      data: [{path}],
      opacity: 1,
      miterLimit: 1,
      strokeWidth: 6e3
})
  • Zoom in on Ohio

Expected result

Smooth path.

Actual result

Uneven-width path. See screenshot above.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:16 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
Pessimistresscommented, Feb 8, 2017

@dcposch the PathLayer is already using pre-allocated typed arrays.

Unfortunately the current deck.gl layers are designed to be projection-agnostic, which means we do not know which side of the vertex is going to be an acute angle when we generate the attributes. I’m doing some experiments on this.

I can see your third suggestion having cool use cases, though utilizing depth test will disable opacity blending, thus breaking some other scenarios. Seems like this could be done easily by subclassing the layer and overriding the shader.

1reaction
ibgreencommented, Feb 16, 2017

I think this issue is closed based on fixes from @Pessimistress

Read more comments on GitHub >

github_iconTop Results From Across the Web

Mitering bug: PathLayer produces uneven strokes if the path ...
It's meant to limit super long corners created by sharp angles. In other words any corner with angle smaller than asin(1 / miterLimit)...
Read more >
What's New - deck.gl
Layer instances now expose a new member isLoaded . PathLayer 's joint calculation is improved when using with short line segments and extreme...
Read more >
mapdeck: Interactive Maps Using 'Mapbox GL JS' and 'Deck.gl'
Description Provides a mechanism to plot an interactive map using 'Mapbox GL' ... code will error as there will be an uneven number...
Read more >
Download the latest Sketch software updates
Find all the latest releases, updates and bug fixes for the Sketch Mac App here. See what's new and download older builds.
Read more >
Enhanced Stylized Line Art for Pattern Design in Adobe ...
What I'm finding is that the offset path is too heavy for the line, which tells me that probably these little swirly lines...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found