jorgeliecer Posted December 16, 2013 Share Posted December 16, 2013 Hi, I want to render a texture on this area, i do it using line to or polygon on graphics object, but sprites just offer me a square option. i need to change that (top, left), (top, right), (bottom, left), (bottom, right) in order to render a imagen inside it. Quote Link to comment Share on other sites More sharing options...
jorgeliecer Posted December 19, 2013 Author Share Posted December 19, 2013 Aparently there's no way to do it on pixi i found this http://www.goodboydigital.com/pixi-js-brings-canvas-and-webgl-masking/ but not work for me. any other suggest? Quote Link to comment Share on other sites More sharing options...
Tom W Hall Posted January 22, 2014 Share Posted January 22, 2014 Do you mean that the rectangular texture should be skewed and stretched to fit exactly into the bounds of the polygon? Or just that the polygon bounds should act as a clip region on the texture, which remains non-deformed? If you mean the second, simpler case, I got that to work in my p2Pixi example: https://github.com/TomWHall/p2Pixi But I don't know how to achieve the more complex case, if anyone else does I would love to know how too. Teemu-Tor 1 Quote Link to comment Share on other sites More sharing options...
Mat Groves Posted January 23, 2014 Share Posted January 23, 2014 Hi, I want to render a texture on this area, i do it using line to or polygon on graphics object, but sprites just offer me a square option. i need to change that (top, left), (top, right), (bottom, left), (bottom, right) in order to render a imagen inside it. Hi there! to Achieve this effect you would need to "pop the hood" on pixi and create a custom sprite.You can then override the _renderWebGL and _renderCanvas and draw the sprite however you fancy. Will require some webGL knowledge to get that done mind Let me know how you get on and I will help if I can! 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.