i'm using pixijs library. want create holes in graphics object. have search , tried loads of way not come solution.
initially thinking library have support non 0 winding rule can accomplish goal not support winding rule fail on attempt.
meanwhile found strange behavior drawing. have posted bug @ github. don't know whether related adding hole mentioned here because 1 interested me out might helpful investigate case better way.
other solution have come can using called opposite of masking. have tried 1 don't know how graphics objects , worry work complex objects thousands of cut.
below simple test i'm trying reproduce. there 3 rectangles on top of each other , top (red rectangle) has 2 holes. simple test round hole taken in shape.
i'm stuck @ stage , invested loads of time still have no result. appreciable.
as of pixi.js v3, can use sprite mask sprite, can create alpha transparent png white rectangle , black circles , use create 'holes' in other sprite.
Comments
Post a Comment