https://linen.dev logo
masks: openfl DisplayObjects have a `mask` propert...
# openfl
b
masks: openfl DisplayObjects have a
mask
property that allows only showing a portion of an object, specified by a filled shape:
Copy code
hx
var m = new Shape();
m.graphics.beginFill(0xFFFFFF);
m.graphics.drawCircle(100, 100, 100);
m.graphics.endFill();
displayObject.mask = m;
// a circle in 100, 100 with a radius of 100 will be the only visible portion of displayObject