This new version carries a complete rewrite of the programs system, initially to address various depth or opacity related issues, but that ended up covering much more (styles and primitives APIs, better node shapes and edge paths support...). Please read the "Migrating from v3 to v4" guide to know more.
Rendering engine
- Migrates nodes and edges labels to WebGL using Signed Distance Fields
- Merges all WebGL layers into one single layer
- Drops WebGL 1 support in favor of WebGL 2
New programs system
- Replaces multi-programs support with primitives (node shapes, edge paths and extremities...) based single-program compilation
- Implements declarative styles API, to link graph data and state to the primitives (should replace
nodeReducerandedgeReducerin most cases) - Implements
depthlayers, to allow rendering any type of items at any depth - Adds various styles and primitives, to render label attachments, label backdrops and label backgrounds
- Adds various built-in edge paths (
pathLine,pathCurved,pathCurvedS,pathStep,pathStepCurved,pathLoop) - Adds
layerDashedfor edges (#1497) - Adds
opacityfor nodes and edges (#1426) - Removes
@sigma/edge-curveand@sigma/node-square, replaced with built-in path and shape primitives
New features
- Adds internal state for nodes, edges and graph
- Adds internal logic in sigma to handle parallel edges and self-loops natively
- Adds built-in node dragging support
- Adds node and edge label events
- Adds right-click drag camera rotation
- Adds picking padding settings to increase hit box sizes (#1493)
- Upgrades
@sigma/layer-leafletand@sigma/layer-maplibre, with one-way sync from sigma to the map - Upgrades
@sigma/layer-webgl, with simple color layer, and more complex heatmap layer
Other breaking changes
- Replaces
hiddenandforceLabeldata attributes with newvisibilityandlabelVisibilitystyle properties - Switches
itemSizesReferencedefault setting value fromscreentopositions
Documentation
- Rewrites website and examples on Astro Starlight, with a
starlight-typedoc-generated API reference (and drops Storybook at the same time)