# Web Generator

## 🏗️ WebGenerator Class

Runtime procedural Web generator.

> Namespace: `Esper.SkillWeb.Procedural`\
> Type: `static class`

***

### 🧰 Methods

| Access          | Method                                                                                                              | Returns    | Description                                                       |
| --------------- | ------------------------------------------------------------------------------------------------------------------- | ---------- | ----------------------------------------------------------------- |
| `public static` | `CreateFromRandomExisting()`                                                                                        | `Web`      | Creates a Web from a randomly selected existing WebGraph.         |
| `public static` | `GenerateRandom(float, float, int, int)`                                                                            | `WebGraph` | Generates a random WebGraph with default web generation settings. |
| `public static` | `GenerateRandom(WebGenerationSettings)`                                                                             | `WebGraph` | Generates a random WebGraph based on the web generation settings. |
| `public static` | `SelectRandomBySize(List<Skill>, Skill.Size)`                                                                       | `Skill`    | Selects a random skill closest to the target size.                |
| `public static` | `GenerateNodePosition(WebGenerationSettings.PositionSearch, Vector2, float, float, List<Vector2>, List<Vector2[]>)` | `Vector2`  | Generates a node position.                                        |
| `public static` | `DistanceFromPointToLineSegment(Vector2, Vector2, Vector2)`                                                         | `float`    | Gets the shortest distance from a point to a line segment.        |
| `public static` | `LineSegmentsIntersect(Vector2, Vector2, Vector2, Vector2)`                                                         | `bool`     | Determines if two line segments intersect.                        |
