I want to create a scratch card effect, as there are in games with luck and all where you scratch on some image and in the scratched area you can see the image below it.
I think this can be done by manipulating pixels somehow, but i am not experienced with pixi and don,t know how to do it exactly.
It will be a great help if you point out a way or tutorial to do it, or give a basic code snippet here to help me figure this mechanism out.
Yeah, I know just a hack for it. Hope you understand that im not posting al the code, only the essential parts.
Use a renderTexture, then try to clear it with this one:
(renderer.state as any).blendModes = [0, WebGLRenderingContext.ONE_MINUS_SRC_ALPHA];
//put a card inside a renderTexture
var rt = PIXI.RenderTexture.create(200,200);
//add it to stage
//and that's how you can clear a pattern, for example if you