ptsans Posted October 5, 2019 Share Posted October 5, 2019 Hello. How to cut shapes in a rectangle as in the example? https://www.pixiplayground.com/#/edit/0lLp139ZI9bp8WxbxZdww The shapes must necessarily overlap each other, forming one hole. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted October 5, 2019 Share Posted October 5, 2019 Hello! Welcome to the forums! > The shapes must necessarily overlap each other, forming one hole. Not possible directly. Make a graphics rectangle, another graphics with holes but ERASE blendMode, render it into renderTexture, use it for a Sprite or wherever you need. Quote Link to comment Share on other sites More sharing options...
ptsans Posted October 6, 2019 Author Share Posted October 6, 2019 Thanks for the reply! It works! But is it possible to divide the graphics into several sprites if size exceeds the BaseRenderTexture limit? Or how to set position to render the sprite? Quote Link to comment Share on other sites More sharing options...
Khudiiash Posted October 12, 2022 Share Posted October 12, 2022 it's quite simple with a little bit of shadershttps://codesandbox.io/s/pixi-js-hole-q0m1yn Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.