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.

Opacity on lines borked

See original GitHub issue

Expected Behavior

Should be able to add opacity to a line

Current Behavior

Where the line overlaps in a curve streaks appear in it.

image

Possible workaround

Draw the line solid, render to a texture and then apply opacity (can be seen by applying circle.cacheAsBitmap = true to the attached pixiplayground). This suffers a loss of fidelity in the curve though.

Steps to Reproduce

Create an ellipse or curve and put a line on it

Environment

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
bigtimebuddycommented, Apr 15, 2020

@ivanpopelyshev introduced multisampling in dev (will be in 5.3.0). You will be able to do something like this which is rendering your graphics to a RenderTexture.

https://jsfiddle.net/bigtimebuddy/6tzyv91j/

Disclaimer: Ignore the issue with ellipse stroke in the middle, we have a fix for that in the queue.

1reaction
ShukantPalcommented, Apr 15, 2020

@georeith Come over to our slack workspace so you can ping me when you need: https://join.slack.com/t/pixijs/shared_invite/zt-dcem1map-uVuVGC7pZ0trF8SrcA2p9g, 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Opacity on lines borked · Issue #6560 · pixijs/pixijs - GitHub
Where the line overlaps in a curve streaks appear in it. image. Possible workaround. Draw the line solid, render to a texture and...
Read more >
opacity - CSS: Cascading Style Sheets - MDN Web Docs
The opacity CSS property sets the opacity of an element. Opacity is the degree to which content behind an element is hidden, and...
Read more >
How can I make the 'plot' function markers and lines ...
I want to make a plot with semi-transparent markers and lines using 'plot' and 'alpha', but it's not working. Why? Sign in to...
Read more >
pgf's and pstricks's opacity is not working - TeX
I've recently upgraded (on Ubuntu 18.04 LTS) TexLive 2016 to 2017. The problem that came up is that the opacity of tikz (pgf)...
Read more >
Can you set a border opacity in CSS? - Stack Overflow
Having alternating groups of pixels between the foreground color and the background color isn't the same as a continuous line of partially ...
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