Valery Posted January 30, 2018 Share Posted January 30, 2018 Hi, I just want to ask if PIXI developers going to support pattern fill style and gradient/pattern strokeStyle. Canvas API supports it. context.strokeStyle=color|gradient|pattern; context.fillStyle=color|gradient|pattern; also multi stroke will be nice to have. Maybe somebody can recommend me a lib with such text effects for PIXI Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted January 30, 2018 Share Posted January 30, 2018 Look at all those gradient-related PRs: https://github.com/pixijs/pixi.js/pulls?utf8=✓&q=is%3Apr+gradient Adopt one and take it to valhalla. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted January 30, 2018 Share Posted January 30, 2018 Oh, right, those PR's are about Text. Well, you have the answer: no one wants to help with Gradient. Make your PR, but beware that Pixi is hybrid webgl-canvas renderer and features that work only for canvas always will be second-class citizens. Or even third, take a look at v5 branch `next`, it has separate Canvas renderer, called "Legacy". UPD. Outdated, I thought you want Graphics Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted January 30, 2018 Share Posted January 30, 2018 You can also try to find gradient issue with "feature request" mark, or create one: https://github.com/pixijs/pixi.js/issues?utf8=✓&q=is%3Aissue+gradient May be someone will have free time and implements gradient both for canvas and webgl. UPD. Outdated, dont read. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted January 30, 2018 Share Posted January 30, 2018 I thought pixi-animate supports gradients, but no luck, only placeholders: https://github.com/jiborobot/pixi-animate/blob/master/src/mixins/Graphics.js Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted January 30, 2018 Share Posted January 30, 2018 Oh wait you need TEXTSTYLE . Sorry, I have a cold, I'm not ok Yeah, you should adopt that PR https://github.com/pixijs/pixi.js/pull/4331 or fork pixi, apply changes to the files and build it, and voila, you can use gradient in textStyle! Quote Link to comment Share on other sites More sharing options...
Valery Posted January 30, 2018 Author Share Posted January 30, 2018 Yes, I want it only for TextStyle ))) Quote Link to comment Share on other sites More sharing options...
Valery Posted January 30, 2018 Author Share Posted January 30, 2018 https://github.com/pixijs/pixi.js/tree/text-gradient-additions This branch is what I need. Quote Link to comment Share on other sites More sharing options...
themoonrat Posted January 30, 2018 Share Posted January 30, 2018 When I saw the title I thought I'd done a pr for it at some stage! It wasn't accepted into pixi official because there were worries about the text api becoming a bit crazy. The hope in the future is that you could pass perhaps a PIXI.Gradient into the fill properties, and thus no need for separate stop point and gradient type settings every time it's an option. But I use the contents of that PR in my games on my own pixi fork 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.