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.

beginTextureFill color option only works if texture is not set

See original GitHub issue

Expected Behavior

When calling beginTextureFill() with a transparent texture and color, the Graphics should be drawn with the color visible in the background.

Current Behavior

If a texture contains transparency and a color is specified, the color is ignored.

Steps to Reproduce

// red background specified by 'color' is ignored, the fill contains transparency set by texture
beginTextureFill({ color: 0xff0000, texture:texture });

// red background is drawn correctly
beginTextureFill({ color: 0xff0000 });

Environment

  • pixi.js version: 5.2.1
  • Browser & Version: Chrome 80.0.3987.163
  • OS & Version: macOS Catalina 10.15.4 (19E266)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

1reaction
ivanpopelyshevcommented, Apr 14, 2020

Not sure if that’s as common of a use case in the rendering world.

I believe it should be good for a demo 😃 one more case for pixi-batch-renderer, @SukantPal you hear that?

0reactions
stale[bot]commented, Aug 2, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

beginTextureFill color option only works if texture is not set
When calling beginTextureFill() with a transparent texture and color, the Graphics should be drawn with the color visible in the background.
Read more >
PIXI.Graphics - PixiJS API Documentation
The Graphics class is primarily used to render primitive shapes such as lines, circles and rectangles to the display, and to color and...
Read more >
PIXI.Graphics
The Graphics class is primarily used to render primitive shapes such as lines, circles and rectangles to the display, and to color and...
Read more >
Why doesn't binding to the default texture with GL_REPLACE ...
When GL_TEXTURE_ENV_MODE is set to GL_REPLACE , drawing a vertex will use the color of the current texture coordinate in the currently bound ......
Read more >
PIXI beginTextureFill issue - Pixi.js - HTML5 Game Devs Forum
What is the alternative of beginTextureFill after PIXI 5.2.0? ... I fixed it and with the version from dev works for both Canvas...
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