Jump to content

rotate sprite with filter


thekayaker33
 Share

Recommended Posts

  • 1 month later...

Filters are rendered on screen so you need use sprite.toGlobal() on your sprite and normalise values because filters use webgl values, and it normalized on screen coord and then add a tiker or listener to your filter to fellow your sprite coord.

https://pixijs.io/pixi-filters/docs/PIXI.filters.BulgePinchFilter.html

ex: bulgepinch.center = [1,1] mean the filter is at 100% right and 100% bottom of screen.

so you will need to spritepos/screensize to get normalized position of your sprite from screen.

Edited by jonforum
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...