backface for Group
- Dominant language
- JavaScript
- Stars
- 10.7k
- Forks
- 407
- PR merge metrics
- No merged PRs in 30d
Description
Currently, let's say your model is a wall: a `Group` with 5 `Rect`s, 1 for the wall and 4 for windows. Currently if you want to use `backface` for this wall, you have to set it for all 5 `Rect`s.
``` js
let wallGroup = new Group(...);
// wall
new Rect({
addTo: wallGroup,
backface: false,
// ...
});
let wallWindow = new Rect({
addTo: wallGroup,
backface: false,
// ...
});
wallWindow.copy(...);
wallWindow.copy(...);
wallWindow.copy(...);
```
Instead, `Group` should have `backface` that sets visibility for all of its descendant graph.
``` js
let wallGroup = new Group({
backface: false,
// ...
});
// wall
new Rect({
addTo: wallGroup,
// ...
});
let wallWindow = new Rect({
addTo: wallGroup,
// ...
});
wallWindow.copy(...);
wallWindow.copy(...);
wallWindow.copy(...);
```
---
**Add a 👍 reaction** to this issue if you would like to see this feature added. Do not add +1 comments — [They will be deleted](https://metafizzy.co/blog/use-github-reactions-delete-plus-1-comments/).
Contributor guide
Research direction
Start by reading the Group and Rect entry points and tracing how backface visibility is applied to descendants. Check the descendant graph behavior described in the issue and determine how Group-level backface should affect nested Rects and copies. Done means setting backface on a Group controls all descendant shapes without repeating the option on each Rect.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- computer-graphics
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100