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.

PIXI.State.blend is reset to 'true' upon PIXI.Mesh creation

See original GitHub issue

After playing around with meshes a bit, I noticed that I was only able to disable GL blending after creating a Mesh. However, the Mesh takes as a parameter a PIXI.State argument, in which one can already disable blending. This change is lost upon Mesh creation, which doesn’t seem like good library ergonomics to me.

Expected Behavior

The mesh renders correctly with blending disabled.

Current Behavior

The mesh renders with blending enabled, despite disabling blending in the PIXI.State object.

Possible Solution


Steps to Reproduce

Here, I create a fiddle: https://jsfiddle.net/0b1nvrzt/51/ You’ll need to scroll down a bit past all the setup preamble, to the part with a lot of whitespace at the bottom. There you will find more instructions in comments.

Environment

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
ivanpopelyshevcommented, Apr 15, 2020

@GoodBoyDigital made this API.

Workaround:

state.blendMode = PIXI.BLEND_MODES.NONE;

blendMode check overrides blend setting

0reactions
stale[bot]commented, Jul 14, 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

PIXI.State.blend is reset to 'true' upon PIXI.Mesh creation #6558
After playing around with meshes a bit, I noticed that I was only able to disable GL blending after creating a Mesh. However,...
Read more >
new PIXI.Mesh (geometry, shader, state, drawMode) - PixiJS
Represents the WebGL state the Mesh required to render, excludes shader and geometry. E.g., blend mode, culling, depth testing, direction of rendering triangles ......
Read more >
blend mode not changing (PIXI.Mesh state) - Pixi.js
It seems like PIXI isn't applying the blend function changes to the webgl state. I created a Mesh object const state: State =...
Read more >
PIXI.Renderer
This manages shaders, programs that run on the GPU to calculate 'em pixels. PIXI.StateSystem, This manages the WebGL state variables like blend mode,...
Read more >
PIXI.WebGLRenderer - PixiJS API Documentation
This sets if the renderer will clear the canvas or not before the new render pass. If you wish to set this to...
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