Salmakis Posted October 18, 2016 Share Posted October 18, 2016 Hey, im using PixiJS 4 in a plattform that uses a java WebView on some plattfroms to display the Game. It all seeems to work fine ,i allready made some small games and they are all working well. But when i try to use the blend Mode "ADD" for some effects, then the rendering is broken anyhow, i made some images of the cases: Anyone ever had this problem? anyone knows a solution? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted October 22, 2016 Share Posted October 22, 2016 May be update JDK to latest version? Why do you need it in webview anyway? What do you use from JavaFX? Quote Link to comment Share on other sites More sharing options...
Salmakis Posted October 22, 2016 Author Share Posted October 22, 2016 I cant update JDK or change anything, because the plattform where my game is running at is not made by myself. I can only derploy the html content that is being displayed in that view. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted October 22, 2016 Share Posted October 22, 2016 does it work if you write something without pixi for that platform? context.globalCompositeOperation = 'lighter'; Quote Link to comment Share on other sites More sharing options...
Salmakis Posted October 24, 2016 Author Share Posted October 24, 2016 hi, thanks for you effort i testet it with this little modified w3schools sample: without the lighter blend the image is blue, with the ligther its than purple (red+blue) and this variant is working in the java view thingy (its purple there) <!DOCTYPE html> <html> <body> <canvas id="myCanvas" width="200" height="100" style="border:1px solid #d3d3d3;"> Your browser does not support the HTML5 canvas tag.</canvas> <script> var c = document.getElementById("myCanvas"); var ctx = c.getContext("2d"); ctx.globalCompositeOperation = 'lighter'; // Create gradient var grd = ctx.createRadialGradient(75,50,5,90,60,100); grd.addColorStop(0,"red"); grd.addColorStop(1,"black"); var grd2 = ctx.createRadialGradient(75,50,5,90,60,100); grd2.addColorStop(0,"blue"); grd2.addColorStop(1,"black"); // Fill with gradient ctx.fillStyle = grd; ctx.fillRect(10,10,150,80); ctx.fillStyle = grd2; ctx.fillRect(10,10,150,80); </script> </body> </html> Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted October 24, 2016 Share Posted October 24, 2016 Its strange. That's the only thing that is changed when you switch to ADD blendMode. Is there any kind of console? What if you add that thing after you create a renderer? renderer.blendModes[1] = 'lighter'; Quote Link to comment Share on other sites More sharing options...
Salmakis Posted October 24, 2016 Author Share Posted October 24, 2016 6 hours ago, ivan.popelyshev said: Its strange. That's the only thing that is changed when you switch to ADD blendMode. Is there any kind of console? What if you add that thing after you create a renderer? renderer.blendModes[1] = 'lighter'; i just tried that, but changed nothing yes i can hack some console style stuff into it, the value of renderer.blendModes[1] was "lighter" from begin Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted October 25, 2016 Share Posted October 25, 2016 Now I've got it. Try this one: https://dl.dropboxusercontent.com/u/46636530/pixijs/blendMode/pixi.js If it works, I'll merge this PR: https://github.com/pixijs/pixi.js/pull/3189 Quote Link to comment Share on other sites More sharing options...
Salmakis Posted October 31, 2016 Author Share Posted October 31, 2016 okay let me check it out once i arrive @ home tomorow Quote Link to comment Share on other sites More sharing options...
Salmakis Posted November 3, 2016 Author Share Posted November 3, 2016 Hey, thanks for your effort. i tried it out now a few times, but its still the same behavior. maybe the java thingy is just not able to use any blend modes? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted November 5, 2016 Share Posted November 5, 2016 No, that was real bug in pixi . You can reproduce it in chrome just by using CanvasRenderer. What about pixijs.download/dev/pixi.js ? still same issue? I didnt make special tests for this bug, may be its still there. If it doesnt work for you, I'll dig further ) Quote Link to comment Share on other sites More sharing options...
Salmakis Posted November 14, 2016 Author Share Posted November 14, 2016 let me try it out when im at my workstation next week, here i got no acces to that environment. i will keep you updated Quote Link to comment Share on other sites More sharing options...
Salmakis Posted December 29, 2016 Author Share Posted December 29, 2016 hey, finally i had time to test this out. i just used the latest pixijs.download/dev/pixi.js (28 dec) but still the same issue all grey as soon as something with ADD blending (and also a few others) blend has ben drawn (like the pictures above) Quote Link to comment Share on other sites More sharing options...
Salmakis Posted February 22, 2018 Author Share Posted February 22, 2018 Any update on this issue? tried the newest release, problem still occurs in that java environment. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted February 23, 2018 Share Posted February 23, 2018 Do you still need it? wow. Yeah, i have so many serious issues for v4, for next v5, and webgl, i cant focus on canvas. You can wait one more year when I have free time to setup Java environment like yours (or half-yeah, i already got intellij idea ultimate). Or you can provide more information to my telepathic abilities adn there's a chance i get you one-liner answer. Or you can just take pixi sources and fix them, if its ok , make PR More info, zip-file with environment and stuff => more chances that I can help you. And I think I'm the only one here with java background. Quote Link to comment Share on other sites More sharing options...
a_[w] Posted September 14, 2020 Share Posted September 14, 2020 Hello, if anyone like me finds this topic in search of answer to very same question, here are some links for you: https://github.com/javafxports/openjdk-jfx/issues/552 and https://bugs.openjdk.java.net/browse/JDK-8229264 This issue wasn't created by me but reflects my experience with Canvas + WebView -- none of blend modes works. ivan.popelyshev 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.