Jump to content

Draw lines and add gradient


Ricky
 Share

Recommended Posts

Dears all, i've develop a slot with the winline animations, my main problem right now is related to the style.

So, i'm showing flat winlines but i would like to add some gradient (not texture).

this.lines[lineNumber].clear();
            this.lines[lineNumber].beginFill();
            this.lines[lineNumber].lineStyle({
                width: this.data.uiConfigVO.winLineWidth,
                color: color,
                join: 'round',
                cap: 'round',
                // texture: PIXI.Texture.fromImage('assets/images/winline-test.png'),
            });

            this.lines[lineNumber].lineStyle.cap = 'round';
            this.lines[lineNumber].moveTo(line[0][0], line[0][1]);
            for (let j = 1; j < totalPoints; j++) {
                this.lines[lineNumber].lineTo(line[j][0], line[j][1]);
            }
            this.lines[lineNumber].endFill();

there's no way to add gradient to fillstyle or something like this?

TIA

Rick

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