Hubs-Foundation / Hubs-Foundation/Spoke

Magnet Snapping

Open
#832 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.