Jump to content

[Solved] Pixi Sprite using OutlineFilter, outline is cropped by bound


vimcaw
 Share

Recommended Posts

I'm a newbie on Pixi.js, recently met a problem, I want to show the outline of a sprite by using OutlineFilter, but a part of the outline was cropped by bound.

image.thumb.png.fb6dd38a43920d03875b14181a3eca2b.png

The pixi example page looks same: https://pixijs.io/examples/#/plugin-filters/outline.js

image.png.0477db5aff904b61938074efaef10f0b.png

But pixi filter demo is good: http://pixijs.io/pixi-filters/tools/demo/

Source Code: https://github.com/pixijs/pixi-filters

image.png.020ca16f6394686f7b3f96b1f026af33.png

I wonder what magic is used, Thanks.

Link to comment
Share on other sites

Just don't forget that Outline is really slow, and its better to precalculate outline in photoshop and put it as a sprite.

Its also possible to do with physicsEditor + pixi-poly: https://github.com/eXponenta/pixi-poly 

It will generate outline Graphics element.

Edited by ivan.popelyshev
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...