@aura3d/physics 2.0.0 → 2.0.1
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/package.json +2 -2
- package/dist/CharacterController.d.ts +0 -135
- package/dist/CharacterController.d.ts.map +0 -1
- package/dist/CharacterController.js +0 -609
- package/dist/CharacterController.js.map +0 -1
- package/dist/ClothFixtures.d.ts +0 -87
- package/dist/ClothFixtures.d.ts.map +0 -1
- package/dist/ClothFixtures.js +0 -264
- package/dist/ClothFixtures.js.map +0 -1
- package/dist/Crowd.d.ts +0 -64
- package/dist/Crowd.d.ts.map +0 -1
- package/dist/Crowd.js +0 -209
- package/dist/Crowd.js.map +0 -1
- package/dist/FireSmokeFixtures.d.ts +0 -103
- package/dist/FireSmokeFixtures.d.ts.map +0 -1
- package/dist/FireSmokeFixtures.js +0 -271
- package/dist/FireSmokeFixtures.js.map +0 -1
- package/dist/FluidFixtures.d.ts +0 -75
- package/dist/FluidFixtures.d.ts.map +0 -1
- package/dist/FluidFixtures.js +0 -219
- package/dist/FluidFixtures.js.map +0 -1
- package/dist/FractureFixtures.d.ts +0 -68
- package/dist/FractureFixtures.d.ts.map +0 -1
- package/dist/FractureFixtures.js +0 -199
- package/dist/FractureFixtures.js.map +0 -1
- package/dist/NarrowPhase.d.ts +0 -11
- package/dist/NarrowPhase.d.ts.map +0 -1
- package/dist/NarrowPhase.js +0 -565
- package/dist/NarrowPhase.js.map +0 -1
- package/dist/Navigation.d.ts +0 -67
- package/dist/Navigation.d.ts.map +0 -1
- package/dist/Navigation.js +0 -261
- package/dist/Navigation.js.map +0 -1
- package/dist/PathFollowDriver.d.ts +0 -162
- package/dist/PathFollowDriver.d.ts.map +0 -1
- package/dist/PathFollowDriver.js +0 -163
- package/dist/PathFollowDriver.js.map +0 -1
- package/dist/PhysicsSandboxFixtures.d.ts +0 -53
- package/dist/PhysicsSandboxFixtures.d.ts.map +0 -1
- package/dist/PhysicsSandboxFixtures.js +0 -280
- package/dist/PhysicsSandboxFixtures.js.map +0 -1
- package/dist/PlatformerFixtures.d.ts +0 -70
- package/dist/PlatformerFixtures.d.ts.map +0 -1
- package/dist/PlatformerFixtures.js +0 -120
- package/dist/PlatformerFixtures.js.map +0 -1
- package/dist/RacingLineProfile.d.ts +0 -116
- package/dist/RacingLineProfile.d.ts.map +0 -1
- package/dist/RacingLineProfile.js +0 -181
- package/dist/RacingLineProfile.js.map +0 -1
- package/dist/SoftBodyFixtures.d.ts +0 -70
- package/dist/SoftBodyFixtures.d.ts.map +0 -1
- package/dist/SoftBodyFixtures.js +0 -272
- package/dist/SoftBodyFixtures.js.map +0 -1
- package/dist/Steering.d.ts +0 -161
- package/dist/Steering.d.ts.map +0 -1
- package/dist/Steering.js +0 -347
- package/dist/Steering.js.map +0 -1
- package/dist/VehicleDynamics.d.ts +0 -162
- package/dist/VehicleDynamics.d.ts.map +0 -1
- package/dist/VehicleDynamics.js +0 -363
- package/dist/VehicleDynamics.js.map +0 -1
- package/dist/VehicleMotion.d.ts +0 -125
- package/dist/VehicleMotion.d.ts.map +0 -1
- package/dist/VehicleMotion.js +0 -373
- package/dist/VehicleMotion.js.map +0 -1
- package/dist/solverless-entry.d.ts +0 -41
- package/dist/solverless-entry.d.ts.map +0 -1
- package/dist/solverless-entry.js +0 -40
- package/dist/solverless-entry.js.map +0 -1
- package/dist/world-entry.d.ts +0 -31
- package/dist/world-entry.d.ts.map +0 -1
- package/dist/world-entry.js +0 -30
- package/dist/world-entry.js.map +0 -1
package/dist/Navigation.d.ts
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
export type NavigationCell = readonly [number, number];
|
|
2
|
-
export type NavigationPoint = readonly [number, number];
|
|
3
|
-
export type NavigationPathStatus = "success" | "partial" | "failed";
|
|
4
|
-
export interface NavigationPath {
|
|
5
|
-
readonly status: NavigationPathStatus;
|
|
6
|
-
readonly cells: readonly NavigationCell[];
|
|
7
|
-
readonly waypoints: readonly NavigationPoint[];
|
|
8
|
-
readonly length: number;
|
|
9
|
-
readonly cost: number;
|
|
10
|
-
readonly visitedCells: number;
|
|
11
|
-
}
|
|
12
|
-
export interface NavigationGridOptions {
|
|
13
|
-
readonly width: number;
|
|
14
|
-
readonly height: number;
|
|
15
|
-
readonly origin?: NavigationPoint;
|
|
16
|
-
readonly cellSize?: number;
|
|
17
|
-
readonly blocked?: readonly NavigationCell[];
|
|
18
|
-
readonly costs?: readonly {
|
|
19
|
-
readonly cell: NavigationCell;
|
|
20
|
-
readonly cost: number;
|
|
21
|
-
}[];
|
|
22
|
-
readonly allowDiagonal?: boolean;
|
|
23
|
-
}
|
|
24
|
-
export interface NavigationAgentOptions {
|
|
25
|
-
readonly position: NavigationPoint;
|
|
26
|
-
readonly speed?: number;
|
|
27
|
-
readonly waypointRadius?: number;
|
|
28
|
-
}
|
|
29
|
-
export interface NavigationAgentSnapshot {
|
|
30
|
-
readonly position: NavigationPoint;
|
|
31
|
-
readonly state: "idle" | "moving" | "arrived" | "blocked";
|
|
32
|
-
readonly waypointIndex: number;
|
|
33
|
-
readonly remainingWaypoints: number;
|
|
34
|
-
readonly pathLength: number;
|
|
35
|
-
readonly distanceTraveled: number;
|
|
36
|
-
}
|
|
37
|
-
export declare class NavigationGrid {
|
|
38
|
-
readonly width: number;
|
|
39
|
-
readonly height: number;
|
|
40
|
-
readonly origin: NavigationPoint;
|
|
41
|
-
readonly cellSize: number;
|
|
42
|
-
readonly allowDiagonal: boolean;
|
|
43
|
-
private readonly blocked;
|
|
44
|
-
private readonly costs;
|
|
45
|
-
constructor(options: NavigationGridOptions);
|
|
46
|
-
isBlocked(cell: NavigationCell): boolean;
|
|
47
|
-
cellCost(cell: NavigationCell): number;
|
|
48
|
-
containsCell(cell: NavigationCell): boolean;
|
|
49
|
-
worldToCell(point: NavigationPoint): NavigationCell;
|
|
50
|
-
cellToWorld(cell: NavigationCell): NavigationPoint;
|
|
51
|
-
findPath(start: NavigationPoint, goal: NavigationPoint): NavigationPath;
|
|
52
|
-
private search;
|
|
53
|
-
private nearestWalkableCell;
|
|
54
|
-
}
|
|
55
|
-
export declare class NavigationAgent {
|
|
56
|
-
private position;
|
|
57
|
-
private path;
|
|
58
|
-
private waypointIndex;
|
|
59
|
-
private distanceTraveled;
|
|
60
|
-
private readonly speed;
|
|
61
|
-
private readonly waypointRadius;
|
|
62
|
-
constructor(options: NavigationAgentOptions);
|
|
63
|
-
setPath(path: NavigationPath): void;
|
|
64
|
-
update(deltaSeconds: number): NavigationAgentSnapshot;
|
|
65
|
-
snapshot(state?: NavigationAgentSnapshot["state"]): NavigationAgentSnapshot;
|
|
66
|
-
}
|
|
67
|
-
//# sourceMappingURL=Navigation.d.ts.map
|
package/dist/Navigation.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Navigation.d.ts","sourceRoot":"","sources":["../../../../packages/physics/src/Navigation.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AACvD,MAAM,MAAM,eAAe,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAExD,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEpE,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,MAAM,EAAE,oBAAoB,CAAC;IACtC,QAAQ,CAAC,KAAK,EAAE,SAAS,cAAc,EAAE,CAAC;IAC1C,QAAQ,CAAC,SAAS,EAAE,SAAS,eAAe,EAAE,CAAC;IAC/C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,M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OAAO;IAIxC,QAAQ,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM;IAItC,YAAY,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO;IAI3C,WAAW,CAAC,KAAK,EAAE,eAAe,GAAG,cAAc;IAOnD,WAAW,CAAC,IAAI,EAAE,cAAc,GAAG,eAAe;IAOlD,QAAQ,CAAC,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,eAAe,GAAG,cAAc;IAwBvE,OAAO,CAAC,MAAM;IAiCd,OAAO,CAAC,mBAAmB;CAY5B;AAED,qBAAa,eAAe;IAC1B,OAAO,CAAC,QAAQ,CAAkB;IAClC,OAAO,CAAC,IAAI,CAAgC;IAC5C,OAAO,CAAC,aAAa,CAAK;IAC1B,OAAO,CAAC,gBAAgB,CAAK;IAC7B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAC/B,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAS;gBAE5B,OAAO,EAAE,sBAAsB;IAS3C,OAAO,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI;IAMnC,MAAM,CAAC,YAAY,EAAE,MAAM,GAAG,uBAAuB;IA2BrD,QAAQ,CAAC,KAAK,GAAE,uBAAuB,CAAC,OAAO,CAAsD,GAAG,uBAAuB;CAWhI"}
|
package/dist/Navigation.js
DELETED
|
@@ -1,261 +0,0 @@
|
|
|
1
|
-
export class NavigationGrid {
|
|
2
|
-
width;
|
|
3
|
-
height;
|
|
4
|
-
origin;
|
|
5
|
-
cellSize;
|
|
6
|
-
allowDiagonal;
|
|
7
|
-
blocked = new Set();
|
|
8
|
-
costs = new Map();
|
|
9
|
-
constructor(options) {
|
|
10
|
-
if (!Number.isInteger(options.width) || options.width < 2 || !Number.isInteger(options.height) || options.height < 2) {
|
|
11
|
-
throw new RangeError("NavigationGrid width and height must be integers >= 2.");
|
|
12
|
-
}
|
|
13
|
-
this.width = options.width;
|
|
14
|
-
this.height = options.height;
|
|
15
|
-
this.origin = options.origin ?? [0, 0];
|
|
16
|
-
this.cellSize = options.cellSize ?? 1;
|
|
17
|
-
this.allowDiagonal = options.allowDiagonal ?? false;
|
|
18
|
-
if (!Number.isFinite(this.cellSize) || this.cellSize <= 0) {
|
|
19
|
-
throw new RangeError("NavigationGrid cellSize must be a finite positive number.");
|
|
20
|
-
}
|
|
21
|
-
for (const cell of options.blocked ?? []) {
|
|
22
|
-
if (this.containsCell(cell))
|
|
23
|
-
this.blocked.add(cellKey(cell));
|
|
24
|
-
}
|
|
25
|
-
for (const entry of options.costs ?? []) {
|
|
26
|
-
if (!this.containsCell(entry.cell))
|
|
27
|
-
continue;
|
|
28
|
-
if (!Number.isFinite(entry.cost) || entry.cost <= 0) {
|
|
29
|
-
throw new RangeError("NavigationGrid traversal costs must be finite positive numbers.");
|
|
30
|
-
}
|
|
31
|
-
this.costs.set(cellKey(entry.cell), entry.cost);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
isBlocked(cell) {
|
|
35
|
-
return this.blocked.has(cellKey(cell));
|
|
36
|
-
}
|
|
37
|
-
cellCost(cell) {
|
|
38
|
-
return this.costs.get(cellKey(cell)) ?? 1;
|
|
39
|
-
}
|
|
40
|
-
containsCell(cell) {
|
|
41
|
-
return Number.isInteger(cell[0]) && Number.isInteger(cell[1]) && cell[0] >= 0 && cell[1] >= 0 && cell[0] < this.width && cell[1] < this.height;
|
|
42
|
-
}
|
|
43
|
-
worldToCell(point) {
|
|
44
|
-
return [
|
|
45
|
-
clampInt(Math.floor((point[0] - this.origin[0]) / this.cellSize), 0, this.width - 1),
|
|
46
|
-
clampInt(Math.floor((point[1] - this.origin[1]) / this.cellSize), 0, this.height - 1),
|
|
47
|
-
];
|
|
48
|
-
}
|
|
49
|
-
cellToWorld(cell) {
|
|
50
|
-
return [
|
|
51
|
-
this.origin[0] + (cell[0] + 0.5) * this.cellSize,
|
|
52
|
-
this.origin[1] + (cell[1] + 0.5) * this.cellSize,
|
|
53
|
-
];
|
|
54
|
-
}
|
|
55
|
-
findPath(start, goal) {
|
|
56
|
-
const startCell = this.nearestWalkableCell(this.worldToCell(start));
|
|
57
|
-
const goalCell = this.nearestWalkableCell(this.worldToCell(goal));
|
|
58
|
-
if (!startCell || !goalCell)
|
|
59
|
-
return failedPath();
|
|
60
|
-
const result = this.search(startCell, goalCell);
|
|
61
|
-
if (!result)
|
|
62
|
-
return failedPath();
|
|
63
|
-
const cells = reconstruct(result.node);
|
|
64
|
-
const waypoints = simplifyPath(cells).map((cell) => this.cellToWorld(cell));
|
|
65
|
-
const lastWaypoint = result.complete ? goal : this.cellToWorld(cells[cells.length - 1]);
|
|
66
|
-
const normalizedWaypoints = [
|
|
67
|
-
start,
|
|
68
|
-
...waypoints.slice(1, -1),
|
|
69
|
-
lastWaypoint
|
|
70
|
-
];
|
|
71
|
-
return {
|
|
72
|
-
status: result.complete ? "success" : "partial",
|
|
73
|
-
cells,
|
|
74
|
-
waypoints: normalizedWaypoints,
|
|
75
|
-
length: pathLength(normalizedWaypoints),
|
|
76
|
-
cost: round3(result.node.g),
|
|
77
|
-
visitedCells: result.visitedCells,
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
search(startCell, goalCell) {
|
|
81
|
-
const open = [node(startCell, undefined, 0, manhattan(startCell, goalCell))];
|
|
82
|
-
const bestByCell = new Map([[cellKey(startCell), open[0]]]);
|
|
83
|
-
const closed = new Set();
|
|
84
|
-
let best = open[0];
|
|
85
|
-
while (open.length > 0) {
|
|
86
|
-
open.sort((left, right) => left.f - right.f || left.h - right.h);
|
|
87
|
-
const current = open.shift();
|
|
88
|
-
if (closed.has(current.key))
|
|
89
|
-
continue;
|
|
90
|
-
closed.add(current.key);
|
|
91
|
-
if (current.h < best.h)
|
|
92
|
-
best = current;
|
|
93
|
-
if (sameCell(current.cell, goalCell)) {
|
|
94
|
-
return { node: current, complete: true, visitedCells: closed.size };
|
|
95
|
-
}
|
|
96
|
-
for (const nextCell of neighbors(current.cell, this.allowDiagonal)) {
|
|
97
|
-
if (!this.containsCell(nextCell) || this.isBlocked(nextCell))
|
|
98
|
-
continue;
|
|
99
|
-
const key = cellKey(nextCell);
|
|
100
|
-
if (closed.has(key))
|
|
101
|
-
continue;
|
|
102
|
-
const stepCost = current.cell[0] !== nextCell[0] && current.cell[1] !== nextCell[1] ? Math.SQRT2 : 1;
|
|
103
|
-
const g = current.g + stepCost * this.cellCost(nextCell);
|
|
104
|
-
const h = heuristic(nextCell, goalCell, this.allowDiagonal);
|
|
105
|
-
const existing = bestByCell.get(key);
|
|
106
|
-
if (existing && existing.g <= g)
|
|
107
|
-
continue;
|
|
108
|
-
const next = node(nextCell, current, g, h);
|
|
109
|
-
bestByCell.set(key, next);
|
|
110
|
-
open.push(next);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
return best ? { node: best, complete: false, visitedCells: closed.size } : undefined;
|
|
114
|
-
}
|
|
115
|
-
nearestWalkableCell(cell) {
|
|
116
|
-
if (this.containsCell(cell) && !this.isBlocked(cell))
|
|
117
|
-
return cell;
|
|
118
|
-
for (let radius = 1; radius < Math.max(this.width, this.height); radius += 1) {
|
|
119
|
-
for (let y = cell[1] - radius; y <= cell[1] + radius; y += 1) {
|
|
120
|
-
for (let x = cell[0] - radius; x <= cell[0] + radius; x += 1) {
|
|
121
|
-
const candidate = [x, y];
|
|
122
|
-
if (this.containsCell(candidate) && !this.isBlocked(candidate))
|
|
123
|
-
return candidate;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
return undefined;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
export class NavigationAgent {
|
|
131
|
-
position;
|
|
132
|
-
path = failedPath();
|
|
133
|
-
waypointIndex = 0;
|
|
134
|
-
distanceTraveled = 0;
|
|
135
|
-
speed;
|
|
136
|
-
waypointRadius;
|
|
137
|
-
constructor(options) {
|
|
138
|
-
this.position = options.position;
|
|
139
|
-
this.speed = options.speed ?? 1;
|
|
140
|
-
this.waypointRadius = options.waypointRadius ?? 0.05;
|
|
141
|
-
if (!Number.isFinite(this.speed) || this.speed <= 0 || !Number.isFinite(this.waypointRadius) || this.waypointRadius < 0) {
|
|
142
|
-
throw new RangeError("NavigationAgent speed must be positive and waypointRadius must be non-negative.");
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
setPath(path) {
|
|
146
|
-
this.path = path;
|
|
147
|
-
this.waypointIndex = path.waypoints.length > 1 ? 1 : 0;
|
|
148
|
-
this.distanceTraveled = 0;
|
|
149
|
-
}
|
|
150
|
-
update(deltaSeconds) {
|
|
151
|
-
if (this.path.status === "failed")
|
|
152
|
-
return this.snapshot("blocked");
|
|
153
|
-
if (this.waypointIndex >= this.path.waypoints.length)
|
|
154
|
-
return this.snapshot("arrived");
|
|
155
|
-
const target = this.path.waypoints[this.waypointIndex];
|
|
156
|
-
const dx = target[0] - this.position[0];
|
|
157
|
-
const dy = target[1] - this.position[1];
|
|
158
|
-
const distance = Math.hypot(dx, dy);
|
|
159
|
-
if (distance <= this.waypointRadius) {
|
|
160
|
-
this.position = target;
|
|
161
|
-
this.waypointIndex += 1;
|
|
162
|
-
return this.update(deltaSeconds);
|
|
163
|
-
}
|
|
164
|
-
const step = Math.min(distance, Math.max(0, deltaSeconds) * this.speed);
|
|
165
|
-
if (step >= distance) {
|
|
166
|
-
this.position = target;
|
|
167
|
-
this.distanceTraveled += distance;
|
|
168
|
-
this.waypointIndex += 1;
|
|
169
|
-
return this.snapshot("moving");
|
|
170
|
-
}
|
|
171
|
-
this.position = [
|
|
172
|
-
this.position[0] + (dx / distance) * step,
|
|
173
|
-
this.position[1] + (dy / distance) * step,
|
|
174
|
-
];
|
|
175
|
-
this.distanceTraveled += step;
|
|
176
|
-
return this.snapshot("moving");
|
|
177
|
-
}
|
|
178
|
-
snapshot(state = this.path.status === "failed" ? "blocked" : "idle") {
|
|
179
|
-
const resolvedState = this.path.status === "failed" ? "blocked" : this.waypointIndex >= this.path.waypoints.length ? "arrived" : state;
|
|
180
|
-
return {
|
|
181
|
-
position: [round3(this.position[0]), round3(this.position[1])],
|
|
182
|
-
state: resolvedState,
|
|
183
|
-
waypointIndex: this.waypointIndex,
|
|
184
|
-
remainingWaypoints: Math.max(0, this.path.waypoints.length - this.waypointIndex),
|
|
185
|
-
pathLength: round3(this.path.length),
|
|
186
|
-
distanceTraveled: round3(this.distanceTraveled),
|
|
187
|
-
};
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
function node(cell, parent, g, h) {
|
|
191
|
-
return { cell, key: cellKey(cell), parent, g, h, f: g + h };
|
|
192
|
-
}
|
|
193
|
-
function neighbors(cell, allowDiagonal) {
|
|
194
|
-
const cardinal = [[cell[0] + 1, cell[1]], [cell[0] - 1, cell[1]], [cell[0], cell[1] + 1], [cell[0], cell[1] - 1]];
|
|
195
|
-
return allowDiagonal
|
|
196
|
-
? [
|
|
197
|
-
...cardinal,
|
|
198
|
-
[cell[0] + 1, cell[1] + 1],
|
|
199
|
-
[cell[0] + 1, cell[1] - 1],
|
|
200
|
-
[cell[0] - 1, cell[1] + 1],
|
|
201
|
-
[cell[0] - 1, cell[1] - 1],
|
|
202
|
-
]
|
|
203
|
-
: cardinal;
|
|
204
|
-
}
|
|
205
|
-
function reconstruct(node) {
|
|
206
|
-
const cells = [];
|
|
207
|
-
let current = node;
|
|
208
|
-
while (current) {
|
|
209
|
-
cells.push(current.cell);
|
|
210
|
-
current = current.parent;
|
|
211
|
-
}
|
|
212
|
-
return cells.reverse();
|
|
213
|
-
}
|
|
214
|
-
function simplifyPath(cells) {
|
|
215
|
-
if (cells.length <= 2)
|
|
216
|
-
return cells;
|
|
217
|
-
const result = [cells[0]];
|
|
218
|
-
let previousDirection = [cells[1][0] - cells[0][0], cells[1][1] - cells[0][1]];
|
|
219
|
-
for (let index = 2; index < cells.length; index += 1) {
|
|
220
|
-
const direction = [cells[index][0] - cells[index - 1][0], cells[index][1] - cells[index - 1][1]];
|
|
221
|
-
if (!sameCell(direction, previousDirection)) {
|
|
222
|
-
result.push(cells[index - 1]);
|
|
223
|
-
previousDirection = direction;
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
result.push(cells[cells.length - 1]);
|
|
227
|
-
return result;
|
|
228
|
-
}
|
|
229
|
-
function failedPath() {
|
|
230
|
-
return { status: "failed", cells: [], waypoints: [], length: 0, cost: 0, visitedCells: 0 };
|
|
231
|
-
}
|
|
232
|
-
function pathLength(points) {
|
|
233
|
-
let length = 0;
|
|
234
|
-
for (let index = 1; index < points.length; index += 1) {
|
|
235
|
-
length += Math.hypot(points[index][0] - points[index - 1][0], points[index][1] - points[index - 1][1]);
|
|
236
|
-
}
|
|
237
|
-
return round3(length);
|
|
238
|
-
}
|
|
239
|
-
function cellKey(cell) {
|
|
240
|
-
return `${cell[0]}:${cell[1]}`;
|
|
241
|
-
}
|
|
242
|
-
function sameCell(left, right) {
|
|
243
|
-
return left[0] === right[0] && left[1] === right[1];
|
|
244
|
-
}
|
|
245
|
-
function manhattan(left, right) {
|
|
246
|
-
return Math.abs(left[0] - right[0]) + Math.abs(left[1] - right[1]);
|
|
247
|
-
}
|
|
248
|
-
function heuristic(left, right, allowDiagonal) {
|
|
249
|
-
if (!allowDiagonal)
|
|
250
|
-
return manhattan(left, right);
|
|
251
|
-
const dx = Math.abs(left[0] - right[0]);
|
|
252
|
-
const dy = Math.abs(left[1] - right[1]);
|
|
253
|
-
return Math.max(dx, dy) + (Math.SQRT2 - 1) * Math.min(dx, dy);
|
|
254
|
-
}
|
|
255
|
-
function clampInt(value, min, max) {
|
|
256
|
-
return Math.max(min, Math.min(max, value));
|
|
257
|
-
}
|
|
258
|
-
function round3(value) {
|
|
259
|
-
return Number(value.toFixed(3));
|
|
260
|
-
}
|
|
261
|
-
//# sourceMappingURL=Navigation.js.map
|
package/dist/Navigation.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Navigation.js","sourceRoot":"","sources":["../../../../packages/physics/src/Navigation.ts"],"names":[],"mappings":"AAgDA,MAAM,OAAO,c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AED,SAAS,SAAS,CAAC,IAAoB,EAAE,KAAqB,EAAE,aAAsB;IACpF,IAAI,CAAC,aAAa;QAAE,OAAO,SAAS,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAClD,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACxC,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACxC,OAAO,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAChE,CAAC;AAED,SAAS,QAAQ,CAAC,KAAa,EAAE,GAAW,EAAE,GAAW;IACvD,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;AAC7C,CAAC;AAED,SAAS,MAAM,CAAC,KAAa;IAC3B,OAAO,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AAClC,CAAC"}
|
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Turns a path plus a speed target into steering, throttle and brake for `createVehicleMotion`.
|
|
3
|
-
*
|
|
4
|
-
* ## Why this exists
|
|
5
|
-
*
|
|
6
|
-
* The library shipped the two hard halves of AI driving — `createVehicleMotion` for the tyre and
|
|
7
|
-
* yaw dynamics, `createRacingLineProfile` for the speed a corner can be taken at — and nothing to
|
|
8
|
-
* join them. Every racing route therefore hand-rolled its own driver, and hand-rolled drivers all
|
|
9
|
-
* fail the same way. The obvious formulation, a Stanley controller that steers on
|
|
10
|
-
* `headingError + atan2(crossTrack, speed)`, is stable on gentle curves and diverges on a hairpin:
|
|
11
|
-
*
|
|
12
|
-
* 1. Heading error grows faster than the car can rotate, so the steering command saturates.
|
|
13
|
-
* 2. Saturated at full lock, the controller has no authority left and the car runs wide.
|
|
14
|
-
* 3. Once outside the road the nearest point on the path stops advancing, so `progress` latches.
|
|
15
|
-
* A latched progress freezes the speed target and the curvature feedforward.
|
|
16
|
-
* 4. The now-constant cross-track term flips sign every frame as the car crosses the path
|
|
17
|
-
* centreline, and the car saws away from the track at full lock — measured on the certified
|
|
18
|
-
* circuit as progress stuck at 0.2789 for 8,700 consecutive frames while lateral offset grew to
|
|
19
|
-
* 43 units, i.e. 98 road widths from a 0.439-wide road.
|
|
20
|
-
*
|
|
21
|
-
* The failure is not the vehicle's. Held at a fixed speed, the same car corners at radius
|
|
22
|
-
* 0.32-0.55 against a hairpin that demands 0.80, so it has ~40% radius margin. It was the
|
|
23
|
-
* controller throwing that margin away.
|
|
24
|
-
*
|
|
25
|
-
* ## What this does instead
|
|
26
|
-
*
|
|
27
|
-
* Pure pursuit: aim at a point a lookahead distance *along the path* and solve the arc that reaches
|
|
28
|
-
* it. This is bounded by construction — the arc to a point at a known distance has a known
|
|
29
|
-
* curvature, so the command cannot run away the way an unbounded error term can. Three properties
|
|
30
|
-
* matter for the hairpin case:
|
|
31
|
-
*
|
|
32
|
-
* - **Lookahead scales with speed** (`lookaheadTime * speed`, clamped to `[minLookahead,
|
|
33
|
-
* maxLookahead]`). Time-based lookahead means the car looks a fixed duration ahead rather than a
|
|
34
|
-
* fixed distance, which is what makes one gain work at both 2 and 12 units/second.
|
|
35
|
-
* - **The target is measured along arc length, not straight-line distance.** On a hairpin the point
|
|
36
|
-
* 0.8 units ahead along the road is nearly behind the car in a straight line; chord-based
|
|
37
|
-
* lookahead skips the corner entirely and cuts to the exit.
|
|
38
|
-
* - **Progress advances monotonically** from the driver's own integrated distance, so being off the
|
|
39
|
-
* road cannot latch it. This is the direct fix for failure 3 above: the driver keeps a running
|
|
40
|
-
* distance and only accepts a measured progress that is ahead of it, within a rejoin window.
|
|
41
|
-
*
|
|
42
|
-
* Speed control is a PI-free proportional law with an explicit brake/throttle split, because a
|
|
43
|
-
* single signed axis fed to a vehicle that has separate `driveForce` and `brakeForce` produces
|
|
44
|
-
* asymmetric response that reads as the car refusing to slow for corners.
|
|
45
|
-
*
|
|
46
|
-
* The driver is pure and allocation-free per step: no `three`, no renderer, no route names, no
|
|
47
|
-
* game-specific branch. Any path that can answer "where am I along you" and "what is your point at
|
|
48
|
-
* distance d" can be driven, which is why the input is two callbacks rather than a route type.
|
|
49
|
-
*/
|
|
50
|
-
export interface PathFollowSample {
|
|
51
|
-
/** Path point at the requested distance. */
|
|
52
|
-
readonly x: number;
|
|
53
|
-
readonly y: number;
|
|
54
|
-
/** Tangent heading at that point, radians, atan2(dy, dx) convention. */
|
|
55
|
-
readonly heading: number;
|
|
56
|
-
/** Signed curvature at that point, 1/radius. Positive turns left. */
|
|
57
|
-
readonly curvature: number;
|
|
58
|
-
}
|
|
59
|
-
export interface PathFollowContact {
|
|
60
|
-
/** Distance along the path of the closest point to the car. */
|
|
61
|
-
readonly distance: number;
|
|
62
|
-
/** Signed lateral offset of the car from the path, positive to the left of travel. */
|
|
63
|
-
readonly signedOffset: number;
|
|
64
|
-
}
|
|
65
|
-
export interface PathFollowDriverOptions {
|
|
66
|
-
/** Total path length in world units. */
|
|
67
|
-
readonly length: number;
|
|
68
|
-
/** True when the path loops. Defaults to true. */
|
|
69
|
-
readonly closed?: boolean | undefined;
|
|
70
|
-
/** Path point at an absolute distance along the path. Must handle wrap on a closed path. */
|
|
71
|
-
sampleAt(distance: number): PathFollowSample;
|
|
72
|
-
/** Closest point on the path to a world position. */
|
|
73
|
-
contactAt(x: number, y: number): PathFollowContact;
|
|
74
|
-
/** Target speed at a distance along the path, world units per second. */
|
|
75
|
-
speedAt(distance: number): number;
|
|
76
|
-
/** Vehicle wheelbase, world units. Sets how much steer angle a given arc needs. */
|
|
77
|
-
readonly wheelbase: number;
|
|
78
|
-
/** Vehicle maximum steer angle, radians, matching `createVehicleMotion`. */
|
|
79
|
-
readonly maxSteerAngle: number;
|
|
80
|
-
/**
|
|
81
|
-
* Seconds of travel to look ahead. Larger is smoother and cuts corners more; smaller tracks the
|
|
82
|
-
* line tighter and saturates sooner.
|
|
83
|
-
*
|
|
84
|
-
* The default is measured, not guessed. Swept over the certified circuit at 5,400 frames per
|
|
85
|
-
* cell, off-track time is dominated by this parameter and barely moves with grip margin, which is
|
|
86
|
-
* what identifies the original failure as tracking geometry rather than tyre grip:
|
|
87
|
-
*
|
|
88
|
-
* ```text
|
|
89
|
-
* lookaheadTime 0.12 0.18 0.25 0.30 0.35 0.45 0.55 0.70 0.90
|
|
90
|
-
* off-track % 5.4 4.3 3.3 3.5 5.4 12.8 20.3 33.6 44.0
|
|
91
|
-
* saturated % 8.5 5.0 3.2 1.4 0.7 1.7 4.6 5.4 4.7
|
|
92
|
-
* ```
|
|
93
|
-
*
|
|
94
|
-
* 0.25 is the minimum. Below it the car tracks so tightly that it saturates on corner entry
|
|
95
|
-
* (8.5% of frames at full lock); above it the aim point cuts inside the apex and the car runs
|
|
96
|
-
* wide. Full sweep in `tests/unit/physics/racing-line-profile.test.ts`.
|
|
97
|
-
*/
|
|
98
|
-
readonly lookaheadTime?: number | undefined;
|
|
99
|
-
/** Lookahead floor, world units, so a stopped car still has a target. */
|
|
100
|
-
readonly minLookahead?: number | undefined;
|
|
101
|
-
/** Lookahead ceiling, world units, so a fast straight does not aim past the next corner. */
|
|
102
|
-
readonly maxLookahead?: number | undefined;
|
|
103
|
-
/**
|
|
104
|
-
* Extra steer per unit of lateral offset, used only to close a standing offset that pure pursuit
|
|
105
|
-
* alone converges on slowly. Applied through `atan2` against speed so it fades as speed rises.
|
|
106
|
-
*
|
|
107
|
-
* 2.5 measured best on the certified circuit (3.3% off-track versus 4.2% at 0.6), and unlike a
|
|
108
|
-
* Stanley cross-track gain it cannot destabilise the loop on its own because the `atan2` bounds
|
|
109
|
-
* its contribution to under a quarter turn regardless of how large the offset grows.
|
|
110
|
-
*/
|
|
111
|
-
readonly crossTrackGain?: number | undefined;
|
|
112
|
-
/** Throttle/brake proportional gain on speed error, per world unit per second. */
|
|
113
|
-
readonly speedGain?: number | undefined;
|
|
114
|
-
/**
|
|
115
|
-
* How far ahead of the car the speed target is read, in seconds of travel. Braking has to start
|
|
116
|
-
* before the corner, so a driver that reads the target at its own position always enters too
|
|
117
|
-
* fast. Defaults to 0.35.
|
|
118
|
-
*/
|
|
119
|
-
readonly speedPreviewTime?: number | undefined;
|
|
120
|
-
/**
|
|
121
|
-
* How far the measured progress may sit behind the driver's integrated distance before the driver
|
|
122
|
-
* accepts it as a genuine rejoin rather than a stale nearest-point match. World units.
|
|
123
|
-
* Defaults to 8% of `length`.
|
|
124
|
-
*/
|
|
125
|
-
readonly rejoinWindow?: number | undefined;
|
|
126
|
-
}
|
|
127
|
-
export interface PathFollowCommand {
|
|
128
|
-
/** 0..1, feed straight to `VehicleMotion.step`. */
|
|
129
|
-
readonly throttle: number;
|
|
130
|
-
/** 0..1. */
|
|
131
|
-
readonly brake: number;
|
|
132
|
-
/** -1..1. */
|
|
133
|
-
readonly steer: number;
|
|
134
|
-
/** Distance along the path the driver believes it is at. Monotonic on a closed path. */
|
|
135
|
-
readonly distance: number;
|
|
136
|
-
/** Progress 0..1 derived from `distance`. */
|
|
137
|
-
readonly progress: number;
|
|
138
|
-
/** Signed lateral offset used for this command. */
|
|
139
|
-
readonly signedOffset: number;
|
|
140
|
-
/** Speed the driver is currently asking for. */
|
|
141
|
-
readonly targetSpeed: number;
|
|
142
|
-
/** Lookahead distance used, world units. Exposed for tuning and for tests. */
|
|
143
|
-
readonly lookahead: number;
|
|
144
|
-
/** True while the steering command is at full lock, which means the driver is out of authority. */
|
|
145
|
-
readonly saturated: boolean;
|
|
146
|
-
}
|
|
147
|
-
export interface PathFollowDriver {
|
|
148
|
-
readonly kind: "aura-path-follow-driver";
|
|
149
|
-
/** Compute the command for the current vehicle state. Does not mutate the vehicle. */
|
|
150
|
-
step(state: {
|
|
151
|
-
readonly x: number;
|
|
152
|
-
readonly z: number;
|
|
153
|
-
readonly heading: number;
|
|
154
|
-
readonly speed: number;
|
|
155
|
-
}): PathFollowCommand;
|
|
156
|
-
/** Reset the integrated distance, e.g. after placing the car on the grid. */
|
|
157
|
-
reset(distance?: number): void;
|
|
158
|
-
/** Laps completed since reset, counted from monotonic distance rather than progress wrap. */
|
|
159
|
-
readonly lapsCompleted: number;
|
|
160
|
-
}
|
|
161
|
-
export declare function createPathFollowDriver(options: PathFollowDriverOptions): PathFollowDriver;
|
|
162
|
-
//# sourceMappingURL=PathFollowDriver.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PathFollowDriver.d.ts","sourceRoot":"","sources":["../../../../packages/physics/src/PathFollowDriver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAEH,MAAM,WAAW,gBAAgB;IAC/B,4CAA4C;IAC5C,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,wEAAwE;IACxE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,qEAAqE;IACrE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,iBAAiB;IAChC,+DAA+D;IAC/D,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,sFAAsF;IACtF,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,uBAAuB;IACtC,wCAAwC;IACxC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,kDAAkD;IAClD,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACtC,4FAA4F;IAC5F,QAAQ,CAAC,QAAQ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