anton.proskurin

Go Board and eraser for lines

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.

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

Share this post


Link to post
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 :)

Share this post


Link to post
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.

Share this post


Link to post
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.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.