Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
li3zhen1 authored Jan 17, 2024
1 parent 86adf79 commit f3604eb
Showing 1 changed file with 38 additions and 8 deletions.
46 changes: 38 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,47 @@ https://github.com/li3zhen1/Grape/assets/45376537/5b76fddc-dd5c-4d35-bced-29c012

Source code: [Lattice.swift](https://github.com/li3zhen1/Grape/blob/main/Examples/ForceDirectedGraphExample/ForceDirectedGraphExample/Lattice.swift)

<details>
<summary>
Here is another <a href="https://github.com/li3zhen1/Grape/blob/main/Examples/ForceDirectedGraphExample/ForceDirectedGraphExample/MyRing.swift">example</a> rendering a ring with 60 vertices, with out-of-the-box dragging support.

</summary>

https://github.com/li3zhen1/Grape/assets/45376537/73213e7f-73ee-44f3-9b3e-7e58355045d2

</details>

<br/>

<br/>


## Installation

To use Grape in an Xcode project by adding it to your project as a package:

```
https://github.com/li3zhen1/Grape
```

To use Grape in a [SwiftPM](https://swift.org/package-manager/) project, add this to your `Package.swift`:

``` swift
dependencies: [
.package(url: "https://github.com/li3zhen1/Grape", from: "0.6.1")
]
```

Add to products, and then adding the product to any target that needs access to the library.

```swift
.product(name: "Grape", package: "Grape"),
```

<br/>

<br/>

## Get started

Grape ships 2 modules:
Expand All @@ -95,8 +131,8 @@ Grape ships 2 modules:

### The `Grape` module

> [!TIP]
> For detailed usage, please refer to [documentation](https://li3zhen1.github.io/Grape/Grape/documentation/grape) to get started.

For detailed usage, please refer to [documentation](https://li3zhen1.github.io/Grape/Grape/documentation/grape). A quick example here:

```swift
import Grape
Expand Down Expand Up @@ -125,12 +161,6 @@ struct MyGraph: View {
}
```

Below is another [example](https://github.com/li3zhen1/Grape/blob/main/Examples/ForceDirectedGraphExample/ForceDirectedGraphExample/MyRing.swift) rendering a ring with 60 vertices, with out-of-the-box dragging support:

https://github.com/li3zhen1/Grape/assets/45376537/73213e7f-73ee-44f3-9b3e-7e58355045d2




<br/>

Expand Down

0 comments on commit f3604eb

Please sign in to comment.