Search the Community
Showing results for tags 'outlinefilter'.
-
Hi I've been developing a "sticker mockup generator" using pixijs and here is the result so far: (I used simple plane mesh to bend the png picture on the ground) As you may know stickers come with a white (or transparent) stroke to get die cut. something like this: but my problem is, OutlineFilter from npm packages "pixi-filters" or "@pixi/filter-outline" doesn't work at all and throws this error: cannot read property of undefined: (reading thickness) I use Pixijs 6.0.2 and WEBGL 2 (without html canvas) and here is my code which works just before adding the broken line : import * as PIXI from "pixi.js"; import { OutlineFilter } from "@pixi/filter-outline"; let app = new PIXI.Application({ backgroundColor: 0xdddddd, }); document.body.appendChild(app.view); const loader = PIXI.Loader.shared; const container = new PIXI.Container(); loader.add("images/react.png"); loader.load((ldr, resources) => { const bg = new PIXI.Sprite(resources["images/react.png"].texture); bg.width = 300; bg.height = 300; const outlineFilter = new OutlineFilter(2, 0x002200, 2); bg.filters = [outlineFilter]; // broken line container.addChild(bg); app.stage.addChild(container); }); I also have tried this filter in multiple situations but it didn't work..:(
- 1 reply
-
- pixi-filters
- outlinefilter
-
(and 1 more)
Tagged with:
-
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. The pixi example page looks same: https://pixijs.io/examples/#/plugin-filters/outline.js But pixi filter demo is good: http://pixijs.io/pixi-filters/tools/demo/ Source Code: https://github.com/pixijs/pixi-filters I wonder what magic is used, Thanks.
-
hi. i'm updating 4.1.1 from 3.1.1 but i can't find outlineFilter with 4.1.1. pixi-filter doesn't have it.. where can i find it? thx