Hubs-Foundation / Hubs-Foundation/Spoke
Magnet Snapping
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 679
- Forks
- 260
- PR merge metrics
- No merged PRs in 30d
Description
Snapping on the grid works ok for the architecture kit, however placing wall or roof pieces on top of another piece can be somewhat challenging. I added the adjustable grid height feature to help with that, but it's still somewhat cumbersome in my opinion.
A better system would be to have magnet snapping or snapping to anchors. These anchors would be placed manually by kit/asset authors on each piece. They could also be programmatically added to the sides of the model's bounding box when the asset does not define any magnets. When these magnets are close to one another they snap to each other. So while placing a model the object can be snapped to the magnets of nearby models.
This sort of system can be seen in Halo's Forge editor and seems to work pretty well. Grid snapping still has it's place, but magnets could be a better general purpose snapping system.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points. Start by tracing the editor's existing grid-snapping and adjustable-grid-height behavior, then clarify how authors define anchors, how bounding-box fallback anchors work, and how nearby anchors should snap. Done means the proposed behavior and acceptance criteria are agreed before implementation begins.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, threejs
- Domain
- design, devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100