Custom Scenes
You can customize the ThreeJS scene by passing props to the Canvas
component.
This is useful if you want to add custom lighting, shadows, or other effects.
Usage
The example below shows how to add custom lighting to the scene which gives it a nice 3d effect.
<GraphCanvas
nodes={simpleNodes}
edges={simpleEdges}
layoutType="forceDirected3d"
>
<directionalLight position={[0, 5, -4]} intensity={1} />
</GraphCanvas>
The edge result will look something like:
Last updated on