A 3D Graph for Obsidian with dozen of features!
see the demo: https://www.youtube.com/watch?v=w1H-pcM8nOU
You can install this on community plugin store 😎
- install the BRAT plugin
- go to the plugin option, add beta plugin, copy and paste the link of this repo.
- the plugin will automatically appear in the list of installed community plugins, enabled this plugin
- cd to
.obsidian/plugins
- git clone this repo
cd obsidian-3d-graph && bun install && bun run build
- there you go 🎉
Use ribbon button or command to open the global graph.
You can do zooming (scroll you wheel), rotating (drag the scene) and panning (ctrl
/cmd
and drag the scene) in the graph.
⚠️ The underly 3D graph has Performance issue that I don't know how to fix. You can set the max node number limit on the plugin setting. If the total node number on the graph beyond the limit, the graph will not be rendered to protect your computer from hanging.
In a note, you can run command Open local 3D graph
to open a local graph. A local graph will only show nodes that connect to this nodes.
In local graph you will have all the features of global graph, plus:
- depth: you can control the depth of maximum distance of the nodes away from the center node
- link type: show only inlinks, outlinks or both.
✨ Tips: I set the
cmd + L
to open local 3D graph.
- filter by query
- filter attachment
- definition of attachment: any files which are not markdown files
- filter orphans
- definition of orphans: any node that has no links IN THE CURRENT GRAPH
you can use query to create groups and color nodes on a global graph.
When you are closer to the node, the label will appear. When you move away from the node, the node will fade away.
You can change the following:
- Node size
- Node size also scale with degree of connection. The more links a node has, the bigger it is.
- Link thickness
- Link distance
- Node repulsion
- Distance from Focal. This will affect the label fade. When distance from focal is smaller, node further away from what you are look at will have label with lower opacity.
- node hover color, node hover neighbour color, link hover color
- show file extension, show full path on label
- show center coordination
- show link arrow
- don't node move on drag
- dag mode. See more on DAG Mode.
- embedding graph into note through
3d-graph
code block post processor (working in progress)
[!CAUTION] The
3d-graph
code block post processor is still in working progress. It is definitely not stable yet, use it in your own risk.
hold Ctrl
/cmd
and click on a node will fly and focus on a node. It is the perfect way to navigate on large graph.
You can search and focus on a node in the graph
hold shift
and click on nodes to select multiple nodes. Then right click on one of the selected nodes to open commands. You can run batched commands on the selected nodes.
You can see DAG(Directed acyclic graph) orientation on a graph. This only has effect when the graph is acyclic.
You can save, update and restore previous settings.
You can change the style of the graphview by css snippet.
- open your setting > appearance
- create a css snippet
- add the following
body {
/* change the default node color */
--graph-node: #00ff00;
/* change the default link color */
--graph-line: #ff0000;
}
.graph-3d-view canvas {
/* change the background color */
background: white;
}
.graph-3d-view .node-label {
/* change the default node label color */
color: #00ff00;
}
- Use dataview as search engine.
- expose API to make it even more easier for other plugin to integrate.
some other uncertain features are will sit in the github issues but I work on them base on ICE (Impact, confidence, effort)
- cd to
.obsidian/plugins
- git clone this repo
cd obsidian-3d-graph && bun install && bun run dev
- there you go 🎉
for release, just run bun release
to release patch. You can also add --minor
or --major
to change update version.
- I have been developing this for free. I try to prioritize the functions before fanciness. I also prioritize my tasks base on ICE (Impact, Confidence, Effort).
- I have other on-going projects. I need open source helpers. Sponsorship will give me motivation and code contributors are very appreciate. I am open for discussion through https://cal.com/manlung.
- If you have an question or feature request, please open Github issues.
If you are enjoying this plugin then please support my work and enthusiasm by sponsoring me on Github or buying me a coffee on https://www.buymeacoffee.com/yomaru.
Just want to say thanks to those people. Without them, this repo will not be here.
- The original repo: https://github.com/AlexW00/obsidian-3d-graph
- The 3d force graph by @vasturiano: https://github.com/vasturiano/3d-force-graph