royibernthal Posted August 10, 2018 Share Posted August 10, 2018 I feel like I already brought it up somewhere but I can't find where. Would it be possible to add a mask feature to GUI? https://pixijs.io/examples/#/demos/masking.js It'd be extremely useful for scrollable containers, bars, etc. Quote Link to comment Share on other sites More sharing options...
Sebavan Posted August 10, 2018 Share Posted August 10, 2018 It is a pretty cool idea. Would you be willing to contribute it by creating a PR ? Quote Link to comment Share on other sites More sharing options...
royibernthal Posted August 10, 2018 Author Share Posted August 10, 2018 I don't think I have the necessary skill and understanding of that feature to do that, otherwise I would've created a PR instead of posting this. I was hoping DK might be able to do this Quote Link to comment Share on other sites More sharing options...
Sebavan Posted August 10, 2018 Share Posted August 10, 2018 Able to, for sure but will require time to code it It looks similar in some ways to this (It contains masking with the similar scaling tiling and so on questions) Pixi seems to rely on shape but we do not have such support so far I am wondering how could we simulate that ? Once found we could open a Gihub issue to see when it could be done. Quote Link to comment Share on other sites More sharing options...
royibernthal Posted August 11, 2018 Author Share Posted August 11, 2018 I suppose it has similarities, but I'm not sure if it's the right direction given the bigger scope of the feature I'm talking about. If I recall correctly we need to use stencil buffer in order to achieve the mask. Here's how PIXI handles graphics & shapes: https://github.com/pixijs/pixi.js/tree/dev/src/core/graphics It would be a nice addition to GUI as well, but it is a big feature in itself. Otherwise I suppose we could have very basic and less flexible data structures for common shapes such as rectangle, circle and triangle, and use their data in the masking process. Maybe even just use the existing Rectangle and Ellipse containers for now if it'd make sense. Needless to say, nested scale, position and rotation will need to be taken into account - GUI already knows how to handle these, need to see how it can be integrated into the masking process. Quote Link to comment Share on other sites More sharing options...
Sebavan Posted August 12, 2018 Share Posted August 12, 2018 Thanks, I ll create the Github issue in the afternoon royibernthal 1 Quote Link to comment Share on other sites More sharing options...
Sebavan Posted August 12, 2018 Share Posted August 12, 2018 Issue created with flag help wanted if somebody is interested to give it a shot ? https://github.com/BabylonJS/Babylon.js/issues/4924 royibernthal 1 Quote Link to comment Share on other sites More sharing options...
aWeirdo Posted August 12, 2018 Share Posted August 12, 2018 Hi @Sebavan & @royibernthal Isn't this the same? ( or almost ) https://github.com/BabylonJS/Babylon.js/issues/3897 Quote Link to comment Share on other sites More sharing options...
Sebavan Posted August 12, 2018 Share Posted August 12, 2018 This seems to be mainly for selection while the other looks more like rendering. I agree some of the functionallities could be shared, I will link the 2 issues on Github. 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.