Jump to content

Pixi plugin issues


pstrejczek
 Share

Recommended Posts

I was playing with pixi plugin, with the intention to add some filters to my game. I noticed two problems:

1. When I add a filter to my Container which only has one circle shape (rotating in update function). The filter is just a square,  with the width of the circle radius, rotating inside the circle.

2. I have two progress bars in my game, which are simply rectangles changing their width in update function by MyContainer.shapes[0].shape.width. After adding pixi plugin rectangle width no longer updates. The width values are correct but there is no update on the screen.

I'm using latest pixi plugin version with 2.8.2dev

Link to comment
Share on other sites

These should be now fixed.

Update PixiJS plugin to 1.2.4 and engine to latest dev.

Note that in WebGL, Graphics shapes doesn't get updated if you just change the dimensions of a shape. Instead you need to clear the graphics object and draw the shape again. In your case, better solution would be to draw the shape with it's max width, and then just change the x scale of the graphics object. Just like in this loader tutorial:

https://www.panda2.io/tutorials/loader

 

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...