A Swift library for graph visualization and efficient force simulation.
Full Changelog: https://github.com/li3zhen1/Grape/compare/0.7.3-beta...0.7.3
initialViewportTransform
by @li3zhen1 in https://github.com/li3zhen1/Grape/pull/53
Full Changelog: https://github.com/li3zhen1/Grape/compare/0.7.1...0.7.3-beta
Full Changelog: https://github.com/li3zhen1/Grape/compare/0.7.0...0.7.1
This version introduces Observation
based state management API. This enables a bi-direction state control for running state and canvas transformation, and reduces re-render times.
https://github.com/li3zhen1/Grape/assets/45376537/e667e0b3-6d88-4310-b13d-0e9b983b5d75
All the examples are updated with the new API.
Full Changelog: https://github.com/li3zhen1/Grape/compare/0.6.2...0.7.0
Full Changelog: https://github.com/li3zhen1/Grape/compare/0.6.1...0.6.2
Check out Grape | Documentation.
onGraphMagnified(perform:)
onNodeDragChanged(perform:)
onNodeDragEnded(shouldBeFixed:)
onNodeTapped(perform:)
MermaidVisualization.swift
to explain these features.https://github.com/li3zhen1/Grape/assets/45376537/80d933c1-8b5b-4b1a-9062-9628577bd2e0
Source code: MermaidVisualization.swift
Full Changelog: https://github.com/li3zhen1/Grape/compare/0.5.8...0.6.0
onGraphMagnified(perform:)
onNodeDragChanged(perform:)
onNodeDragEnded(shouldBeFixed:)
onNodeTapped(perform:)
MermaidVisualization.swift
to explain these features.https://github.com/li3zhen1/Grape/assets/45376537/80d933c1-8b5b-4b1a-9062-9628577bd2e0
Source code: MermaidVisualization.swift
Full Changelog: https://github.com/li3zhen1/Grape/compare/0.5.8...0.6.0
BufferedKDTree
. It reuses a managed buffer as forces tick (so there won't be frequent allocation/deallocation). This approach improves performance by ~40%.