summaryrefslogtreecommitdiff
path: root/app/components/graph/3d.tsx
diff options
context:
space:
mode:
authorThomas F. K. Jorna <[email protected]>2021-07-18 21:25:14 +0200
committerThomas F. K. Jorna <[email protected]>2021-07-18 21:25:14 +0200
commitfdfb0e4e7a145b2b4dfd6abe3200f9d9c9650763 (patch)
tree4d188893f400d353ae48c68b3a03fdaaef34079b /app/components/graph/3d.tsx
parent75a0973d017f86020ea05255b87bcc0eaf962896 (diff)
include build
Diffstat (limited to 'app/components/graph/3d.tsx')
-rw-r--r--app/components/graph/3d.tsx62
1 files changed, 0 insertions, 62 deletions
diff --git a/app/components/graph/3d.tsx b/app/components/graph/3d.tsx
deleted file mode 100644
index a539d8c..0000000
--- a/app/components/graph/3d.tsx
+++ /dev/null
@@ -1,62 +0,0 @@
-
- ref={fgRef}
- //graphData={!physics.local ? gData : localGraphData }
- graphData={gData}
- nodeAutoColorBy={physics.colorful ? "id" : undefined}
- nodeColor={
- !physics.colorful
- ? (node) => {
- if (highlightNodes.size === 0) {
- return "rgb(100, 100, 100, 1)"
- } else {
- return highlightNodes.has(node) ? "purple" : "rgb(50, 50, 50, 0.5)"
- }
- }
- : undefined
- }
- linkAutoColorBy={physics.colorful ? "target" : undefined}
- //linkAutoColorBy={(d) => gData.nodes[d.source].id % GROUPS}
- linkColor={
- !physics.colorful
- ? (link) => {
- if (highlightLinks.size === 0) {
- return "rgb(50, 50, 50, 0.8)"
- } else {
- return highlightLinks.has(link) ? "purple" : "rgb(50, 50, 50, 0.2)"
- }
- }
- : undefined
- }
- linkDirectionalParticles={physics.particles}
- nodeLabel={(node) => node.title}
- linkWidth={(link) =>
- highlightLinks.has(link) ? 3 * physics.linkWidth : physics.linkWidth
- }
- linkOpacity={physics.linkOpacity}
- nodeRelSize={physics.nodeRel}
- nodeVal={(node) =>
- highlightNodes.has(node) ? node.neighbors.length + 5 : node.neighbors.length + 3
- }
- linkDirectionalParticleWidth={physics.particleWidth}
- onNodeHover={physics.hover ? handleNodeHover : null}
- d3AlphaDecay={physics.alphaDecay}
- d3AlphaMin={physics.alphaTarget}
- d3VelocityDecay={physics.velocityDecay}
- nodeThreeObject={
- !physics.labels
- ? undefined
- : (node) => {
- if (highlightNodes.has(node)) {
- console.log(node.title)
- const sprite = new SpriteText(node.title.substring(0, 30))
- console.log("didnt crash here 2")
- sprite.color = "#ffffff"
- sprite.textHeight = 8
- return sprite
- } else {
- return undefined
- }
- }
- }
- nodeThreeObjectExtend={true}
- onNodeClick={selectClick}