anvaka / anvaka/ngraph.forcelayout
Layout 2D along X,Z
- Dominant language
- JavaScript
- Stars
- 215
- Forks
- 33
- PR merge metrics
- No merged PRs in 30d
Description
This lib is genius. A gem on GitHub.
Quick question on the physics settings:
```
this.physicsSettings = {
dimensions: 2,
timeStep: 0.5,
gravity: -12,
theta: 0.8,
springLength: 20,
springCoefficient: 0.8,
dragCoefficient: 0.9,
};
```
I noticed that starting nodes in a flat plane, initial positions scattered on X and Z plane, everything lays out flat as expected. ( like on a table top ). But adding nodes at run-time everything goes 3D.
Is there a way to set dimensions:2 and have the constraint be the X and Z axis instead of the X and Y axis?
It appears they capability is already in the lib. Just not sure how to access it.
Setting dimensions to 2 seems to constrain it along X and Y. Would love to constrain it to X and Z.
Cheers and Thanks You!
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing the physicsSettings dimensions option and the path used when nodes are added at runtime. Verify whether the existing two-dimensional constraint can be configured for X and Z instead of X and Y; done means newly added nodes remain on the X,Z plane with dimensions set to 2.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100