PIXI.State.blend is reset to 'true' upon PIXI.Mesh creation
See original GitHub issueAfter 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
pixi.js
version: 5.2.1- Browser & Version: Chrome 80.0.3987.163
- OS & Version: Windows 10.0.18362 Build 18362
- Running Example: _https://jsfiddle.net/0b1nvrzt/51/_
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@GoodBoyDigital made this API.
Workaround:
blendMode
check overridesblend
settingThis 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.