Jump to content

Blurred Lines


JAA
 Share

Recommended Posts

I want to draw a polygon, for simplicity let's make it a triangle.

var graphics = new PIXI.Graphics();
graphics.lineStyle(5, 0xFFFFFF, 1);
graphics.moveTo(10, 10);
graphics.lineTo(100, 10);
graphics.lineTo(50, 100);
graphics.lineTo(10, 10);
container.addChild(graphics);

The question is this: How is the best way to add a black shadow to both sides on the lines, so it is pure black just to the left and right of the line, then fades by alpha out to about 5 pixels either side of the line?

Effectively I want a blurred black line of about 15 pixels (with a solid center which fades in alpha at the outer edges) with a solid white line of 5 pixels right in the middle of the black blurred line.

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