Jump to content

Go Board and eraser for lines


anton.proskurin
 Share

Recommended Posts

Hello!

I'm creating board for playing Go Game using PIXI. I'm noob in PIXI.

So, i have problem to place a label on board and erase part of board's lines under label. Like this:

image.thumb.png.a1533e8d924a820e0c25b52da4ffa387.png

I spent several days, try solve this problem. What is the best solution? addHole? mask? I tested it, but dont understad how it works completely.

Here a simple code of Go Board: https://jsfiddle.net/AntonProskurin/gov3L1xm/1/

Please, help me to solve this problem.

Можно по-русски.

Link to comment
Share on other sites

Put that part in renderTexture or in filter (its like you are making a layer).

Inside, itts either special blendMode that exists in v5 that can be ported to v4 via method described in link in gotchas in pixi.js github wiki: 

 

With this blendmode you can erase stuff with circles, and since its all inside renderTexture/filter . actual background wont be erased.

It requires understanding of renderTexture example or filters examples, like how to apply AlphaFilter on screen. 

If you have experience with Flash - that'll help :)

Link to comment
Share on other sites

Put that part in renderTexture or in filter (its like you are making a layer).

Inside, itts either special blendMode that exists in v5 that can be ported to v4 via method described in link in gotchas in pixi.js github wiki: 

 

With this blendmode you can erase stuff with circles, and since its all inside renderTexture/filter . actual background wont be erased.

It requires understanding of renderTexture example or filters examples, like how to apply AlphaFilter to make lighting.

Of course there are countless other ways to do this, I just dont know what else to describe.

Link to comment
Share on other sites

There are easier ways like "bake part of texture into the number" or "save crosshairs and draw only ones that needed" but you asked for something like masks, and I gave the answer :)

IF you have experience with canvas2d composition modes that can help too. Concepts are the same but more difficult to reproduce because some blending modes we added only in pixi-v5.

 

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