Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

Pixi render texture on polygon


jorgeliecer
 Share

Recommended Posts

  • 1 month later...

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.

Link to comment
Share on other sites

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.

 

Screen%20Shot%202013-12-16%20at%203.11.0

 

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!

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...