pol2095
#1
Hello, I try to use BlenMode.ERASE but it’s not working
var sprite:Sprite = new Sprite();
sprite.graphics.beginFill(0x00FF00);
sprite.graphics.drawRect(0, 0, 100, 100);
sprite.graphics.endFill();
sprite.blendMode = BlendMode.LAYER;
var shape:Shape = new Shape();
shape.graphics.beginFill(0x000000);
shape.graphics.drawRect(10, 10, 80, 80);
shape.graphics.endFill();
sprite.addChild( shape );
shape.blendMode = BlendMode.ERASE;
this.addChild(sprite);
Thanks
I don’t think we can do this in GL, or even canvas, I think.
We should have a way to get better documentation on what’s implemented, and what’s a polyfill
pol2095
#3
How to use BlendMode.ERASE ?
Can you use a scrollRect or mask to achieve a similar effect?
pol2095
#5
I need to use an inverted mask, for this it’s necessary to use BlendMode.ERASE, a year ago it working on html ?
I’m not aware of that, but perhaps it would be possible to implement (internally) by rendering as a mask instead
Hi. Is it possible to invert a mask/use a mask inverted without writing a custom shader or hacking the framework?
Perhaps there may be a way to make BlendMode.ERASE
trigger one – this would require work internally to OpenFL, but could make a good pull request
I installed Starling/OpenFL for BlendMode.ERASE (Lemmings digging into the ground). Wanted to try it anyways.
But maybe it really should be possible in OpenFL alone too.