Alpha mask
- Dominant language
- JavaScript
- Stars
- 10.7k
- Forks
- 407
- PR merge metrics
- No merged PRs in 30d
Description
Please can you add the ability to create alpha masks, like:
new Zdog.Mask({
new Zdog.Shape({
addTo: illo,
stroke: 20,
...
}),
linkedTo: [shape1, shape2...]
});
Essentially, this would hide any objects behind the mask and that are linked to the mask.
At the moment, you can make a pseudo mask by creating a blocking shape of the same colour as the background shape, but when you rotate the scene, it is possible to see the blocking shape.
It would be great to be able hide any parts of objects that are behind the mask, that are linked to the mask, so I have added a:
linkedTo:
Attribute to the mask.
Contributor guide
Research direction
Start by reviewing the proposed Zdog.Mask API, its Zdog.Shape usage, the linkedTo relationship, and the existing canvas and SVG rendering behavior. Done means linked objects are hidden wherever they fall behind the mask while the scene rotates, without relying on a background-colored blocking shape.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- computer-graphics
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100