@quenty/pathfindingutils 7.0.0 → 7.0.1-canary.433.80025dc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [7.0.1-canary.433.80025dc.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/pathfindingutils@7.0.0...@quenty/pathfindingutils@7.0.1-canary.433.80025dc.0) (2023-12-14)
7
+
8
+
9
+ ### Features
10
+
11
+ * Draw lines when calling `PathfindingUtils.visualizePath` which helps diagnose the path better ([5f3e21e](https://github.com/Quenty/NevermoreEngine/commit/5f3e21ea63c5d652904d28233f2a1ad65cd4ab66))
12
+
13
+
14
+
15
+
16
+
6
17
  # [7.0.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/pathfindingutils@6.9.0...@quenty/pathfindingutils@7.0.0) (2023-10-11)
7
18
 
8
19
  **Note:** Version bump only for package @quenty/pathfindingutils
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/pathfindingutils",
3
- "version": "7.0.0",
3
+ "version": "7.0.1-canary.433.80025dc.0",
4
4
  "description": "Utilities involving pathfinding in Roblox",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -26,13 +26,13 @@
26
26
  "Quenty"
27
27
  ],
28
28
  "dependencies": {
29
- "@quenty/draw": "^4.3.0",
30
- "@quenty/loader": "^7.0.0",
31
- "@quenty/maid": "^2.6.0",
32
- "@quenty/promise": "^7.0.0"
29
+ "@quenty/draw": "4.3.0",
30
+ "@quenty/loader": "7.0.1-canary.433.80025dc.0",
31
+ "@quenty/maid": "2.6.0",
32
+ "@quenty/promise": "7.0.1-canary.433.80025dc.0"
33
33
  },
34
34
  "publishConfig": {
35
35
  "access": "public"
36
36
  },
37
- "gitHead": "fdeae46099587019ec5fc15317dc673aed379400"
37
+ "gitHead": "80025dcd926765b502d322bb84e013b973409d8c"
38
38
  }
@@ -63,16 +63,24 @@ function PathfindingUtils.visualizePath(path)
63
63
  parent.Name = "PathVisualization"
64
64
  maid:GiveTask(parent)
65
65
 
66
+ local lastWaypoint
67
+
66
68
  for index, waypoint in pairs(path:GetWaypoints()) do
69
+
67
70
  if waypoint.Action == Enum.PathWaypointAction.Walk then
68
- local point = Draw.point(waypoint.Position, Color3.new(0.5, 1, 0.5), parent)
69
- point.Name = ("%03d_WalkPoint"):format(index)
70
- maid:GiveTask(point)
71
+ local point = maid:Add(Draw.point(waypoint.Position, Color3.new(0.5, 1, 0.5), parent))
72
+ point.Name = string.format("%03d_WalkPoint", index)
71
73
  elseif waypoint.Action == Enum.PathWaypointAction.Jump then
72
- local point = Draw.point(waypoint.Position, Color3.new(0.5, 0.5, 1), parent)
73
- point.Name = ("%03d_JumpPoint"):format(index)
74
- maid:GiveTask(point)
74
+ local point = maid:Add(Draw.point(waypoint.Position, Color3.new(0.5, 0.5, 1), parent))
75
+ point.Name = string.format("%03d_JumpPoint", index)
76
+ end
77
+
78
+ if lastWaypoint then
79
+ local line = maid:Add(Draw.line(waypoint.Position, lastWaypoint.Position))
80
+ line.Name = string.format("%03d_Line", index)
81
+ line.Parent = parent
75
82
  end
83
+ lastWaypoint = waypoint
76
84
  end
77
85
 
78
86
  parent.Parent = Draw.getDefaultParent()