vehicle-path2 4.0.1 → 4.0.3
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/README.md +17 -19
- package/dist/core/algorithms/pathFinding.d.ts +2 -0
- package/dist/core/engine.d.ts +50 -10
- package/dist/core/types/geometry.d.ts +1 -0
- package/dist/core.cjs +1 -1
- package/dist/core.js +73 -141
- package/dist/index-BObuJxsC.js +840 -0
- package/dist/index-BpTZXV22.cjs +1 -0
- package/dist/vehicle-path.cjs +1 -1
- package/dist/vehicle-path.js +9 -9
- package/package.json +1 -1
- package/dist/index-BQoeJKCj.cjs +0 -1
- package/dist/index-DUYG8fxI.js +0 -699
package/README.md
CHANGED
|
@@ -68,39 +68,37 @@ Curve menghubungkan **ujung satu line** ke **awal line lain**. Tidak bisa berdir
|
|
|
68
68
|
```typescript
|
|
69
69
|
import type { Curve } from 'vehicle-path2/core'
|
|
70
70
|
|
|
71
|
-
// Tambah curve
|
|
72
|
-
engine.addCurve({
|
|
71
|
+
// Tambah curve (returns curve id — auto-generated if not provided)
|
|
72
|
+
const curveId = engine.addCurve({
|
|
73
|
+
id: 'c1', // optional — auto-generated if omitted
|
|
73
74
|
fromLineId: 'L1',
|
|
74
75
|
toLineId: 'L2',
|
|
75
76
|
fromOffset: 380, // posisi di L1 (px dari start)
|
|
76
77
|
fromIsPercentage: false,
|
|
77
78
|
toOffset: 20, // posisi di L2 (px dari start)
|
|
78
79
|
toIsPercentage: false,
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
// Atau dengan offset persentase (0–1)
|
|
82
|
-
engine.addCurve({
|
|
83
|
-
fromLineId: 'L1',
|
|
84
|
-
toLineId: 'L2',
|
|
85
|
-
fromOffset: 0.95,
|
|
86
|
-
fromIsPercentage: true,
|
|
87
|
-
toOffset: 0.05,
|
|
88
|
-
toIsPercentage: true,
|
|
89
|
-
} as Curve)
|
|
80
|
+
})
|
|
90
81
|
|
|
91
|
-
// Update curve berdasarkan
|
|
92
|
-
engine.updateCurve(
|
|
82
|
+
// Update curve berdasarkan id
|
|
83
|
+
engine.updateCurve('c1', { fromOffset: 100 })
|
|
93
84
|
|
|
94
|
-
// Hapus curve berdasarkan
|
|
95
|
-
engine.removeCurve(
|
|
85
|
+
// Hapus curve berdasarkan id
|
|
86
|
+
engine.removeCurve('c1')
|
|
96
87
|
|
|
97
88
|
// Baca semua curves
|
|
98
89
|
engine.getCurves() // → Curve[]
|
|
90
|
+
|
|
91
|
+
// Dapatkan computed bezier untuk rendering
|
|
92
|
+
engine.getCurveBeziers() // → Map<string, BezierCurve>
|
|
99
93
|
```
|
|
100
94
|
|
|
101
|
-
> **Catatan:** Curve diidentifikasi via
|
|
95
|
+
> **Catatan:** Curve diidentifikasi via `id` (string). Jika tidak diberikan saat `addCurve`, id otomatis di-generate.
|
|
96
|
+
|
|
97
|
+
> **Konsekuensi `removeLine`:** Curve yang terhubung ke line yang dihapus otomatis ikut terhapus. `removeLine` mengembalikan `{ success, removedCurveIds }`.
|
|
98
|
+
|
|
99
|
+
> **Path validation:** Gunakan `engine.canReach(fromLineId, fromOffset, toLineId, toOffset)` untuk mengecek apakah path ada tanpa membuat execution plan.
|
|
102
100
|
|
|
103
|
-
> **
|
|
101
|
+
> **Acceleration:** Gunakan `engine.moveVehicleWithAcceleration(state, exec, accelState, config, deltaTime)` untuk movement dengan physics-based acceleration/deceleration.
|
|
104
102
|
|
|
105
103
|
---
|
|
106
104
|
|
|
@@ -2,11 +2,13 @@ import type { Line, Curve, BezierCurve } from '../types/geometry';
|
|
|
2
2
|
import type { MovementConfig } from '../types/movement';
|
|
3
3
|
export interface GraphEdge {
|
|
4
4
|
curveIndex: number;
|
|
5
|
+
curveId?: string;
|
|
5
6
|
fromLineId: string;
|
|
6
7
|
toLineId: string;
|
|
7
8
|
fromOffset: number;
|
|
8
9
|
toOffset: number;
|
|
9
10
|
curveLength: number;
|
|
11
|
+
bezier: BezierCurve;
|
|
10
12
|
}
|
|
11
13
|
export interface Graph {
|
|
12
14
|
adjacency: Map<string, GraphEdge[]>;
|
package/dist/core/engine.d.ts
CHANGED
|
@@ -25,11 +25,12 @@
|
|
|
25
25
|
* }
|
|
26
26
|
* ```
|
|
27
27
|
*/
|
|
28
|
-
import type { Line, Curve, Point } from './types/geometry';
|
|
28
|
+
import type { Line, Curve, BezierCurve, Point } from './types/geometry';
|
|
29
29
|
import type { VehicleDefinition } from './types/vehicle';
|
|
30
30
|
import type { MovementConfig, CurveData } from './types/movement';
|
|
31
|
-
import type { PathResult } from './algorithms/pathFinding';
|
|
31
|
+
import type { PathResult, Graph } from './algorithms/pathFinding';
|
|
32
32
|
import type { TangentMode } from './types/config';
|
|
33
|
+
import { type AccelerationConfig, type AccelerationState } from './algorithms/acceleration';
|
|
33
34
|
export interface PathEngineConfig {
|
|
34
35
|
tangentMode: TangentMode;
|
|
35
36
|
}
|
|
@@ -71,15 +72,29 @@ export { moveVehicle } from './algorithms/vehicleMovement';
|
|
|
71
72
|
*/
|
|
72
73
|
export declare class PathEngine {
|
|
73
74
|
private graph;
|
|
75
|
+
private graphDirty;
|
|
74
76
|
private linesMap;
|
|
75
|
-
private
|
|
77
|
+
private curvesMap;
|
|
78
|
+
private curveSeq;
|
|
76
79
|
private config;
|
|
77
80
|
constructor(engineConfig: PathEngineConfig);
|
|
81
|
+
private ensureGraph;
|
|
78
82
|
get movementConfig(): MovementConfig;
|
|
79
83
|
get lines(): Line[];
|
|
80
84
|
getCurves(): Curve[];
|
|
81
85
|
/**
|
|
82
|
-
*
|
|
86
|
+
* Expose the graph (lazily built) for consumers that need it
|
|
87
|
+
* (e.g., scene stats, custom pathfinding).
|
|
88
|
+
*/
|
|
89
|
+
getGraph(): Graph;
|
|
90
|
+
/**
|
|
91
|
+
* Returns computed bezier for each curve by id.
|
|
92
|
+
* Internally calls ensureGraph() to guarantee beziers are computed,
|
|
93
|
+
* then iterates graph edges to build the return map.
|
|
94
|
+
*/
|
|
95
|
+
getCurveBeziers(): Map<string, BezierCurve>;
|
|
96
|
+
/**
|
|
97
|
+
* Replace the entire scene. Graph is rebuilt lazily on first access.
|
|
83
98
|
*/
|
|
84
99
|
setScene(lines: Line[], curves: Curve[]): void;
|
|
85
100
|
/**
|
|
@@ -88,6 +103,7 @@ export declare class PathEngine {
|
|
|
88
103
|
addLine(line: Line): boolean;
|
|
89
104
|
/**
|
|
90
105
|
* Update start and/or end coordinates of an existing line.
|
|
106
|
+
* Immutable — does not mutate the original line object.
|
|
91
107
|
*/
|
|
92
108
|
updateLine(lineId: string, updates: {
|
|
93
109
|
start?: Point;
|
|
@@ -99,27 +115,39 @@ export declare class PathEngine {
|
|
|
99
115
|
updateLineEndpoint(lineId: string, endpoint: 'start' | 'end', point: Point): boolean;
|
|
100
116
|
/**
|
|
101
117
|
* Rename a line ID and cascade the change to all connected curves.
|
|
118
|
+
* Immutable — does not mutate original objects.
|
|
102
119
|
*/
|
|
103
120
|
renameLine(oldId: string, newId: string): {
|
|
104
121
|
success: boolean;
|
|
105
122
|
error?: string;
|
|
123
|
+
renamedCurveIds?: string[];
|
|
106
124
|
};
|
|
107
125
|
/**
|
|
108
126
|
* Remove a line and all curves connected to it.
|
|
127
|
+
* Returns which curves were also removed.
|
|
109
128
|
*/
|
|
110
|
-
removeLine(lineId: string):
|
|
129
|
+
removeLine(lineId: string): {
|
|
130
|
+
success: boolean;
|
|
131
|
+
removedCurveIds: string[];
|
|
132
|
+
};
|
|
111
133
|
/**
|
|
112
134
|
* Add a directional curve (connection) from one line to another.
|
|
135
|
+
* Returns the curve id (auto-generated if not provided).
|
|
136
|
+
*/
|
|
137
|
+
addCurve(curve: Curve): string;
|
|
138
|
+
/**
|
|
139
|
+
* Update a curve by id. Returns false if curve not found.
|
|
113
140
|
*/
|
|
114
|
-
|
|
141
|
+
updateCurve(curveId: string, updates: Partial<Curve>): boolean;
|
|
115
142
|
/**
|
|
116
|
-
*
|
|
143
|
+
* Remove a curve by id. Returns false if curve not found.
|
|
117
144
|
*/
|
|
118
|
-
|
|
145
|
+
removeCurve(curveId: string): boolean;
|
|
119
146
|
/**
|
|
120
|
-
*
|
|
147
|
+
* Check if a path exists from one position to another.
|
|
148
|
+
* Both offsets are absolute pixel values.
|
|
121
149
|
*/
|
|
122
|
-
|
|
150
|
+
canReach(fromLineId: string, fromOffset: number, toLineId: string, toOffset: number): boolean;
|
|
123
151
|
/**
|
|
124
152
|
* Initialize a vehicle's N-axle position on a line.
|
|
125
153
|
*
|
|
@@ -156,4 +184,16 @@ export declare class PathEngine {
|
|
|
156
184
|
execution: PathExecution;
|
|
157
185
|
arrived: boolean;
|
|
158
186
|
};
|
|
187
|
+
/**
|
|
188
|
+
* Advance a vehicle with physics-based acceleration/deceleration.
|
|
189
|
+
*
|
|
190
|
+
* Thin wrapper — internally calls the standalone moveVehicleWithAcceleration()
|
|
191
|
+
* function from acceleration.ts, injecting this.linesMap as the 6th argument.
|
|
192
|
+
*/
|
|
193
|
+
moveVehicleWithAcceleration(state: VehiclePathState, execution: PathExecution, accelState: AccelerationState, config: AccelerationConfig, deltaTime: number): {
|
|
194
|
+
state: VehiclePathState;
|
|
195
|
+
execution: PathExecution;
|
|
196
|
+
accelState: AccelerationState;
|
|
197
|
+
arrived: boolean;
|
|
198
|
+
};
|
|
159
199
|
}
|
package/dist/core.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BpTZXV22.cjs");function f(r,i){const n={lines:r,curves:i.map(t=>({id:t.id,fromLineId:t.fromLineId,toLineId:t.toLineId,fromOffset:t.fromOffset,fromIsPercentage:t.fromIsPercentage??!1,toOffset:t.toOffset,toIsPercentage:t.toIsPercentage??!1}))};return JSON.stringify(n,null,2)}function g(r){let i;try{i=JSON.parse(r)}catch{throw new Error("deserializeScene: invalid JSON")}if(!i||typeof i!="object"||Array.isArray(i))throw new Error("deserializeScene: expected a JSON object");const n=i;if(!Array.isArray(n.lines))throw new Error('deserializeScene: missing "lines"');if(!Array.isArray(n.curves))throw new Error('deserializeScene: missing "curves"');return{lines:n.lines,curves:n.curves}}function u(r,i){const n=i.end.x-i.start.x,t=i.end.y-i.start.y,a=n*n+t*t;if(a===0)return{offset:0,distance:Math.sqrt((r.x-i.start.x)**2+(r.y-i.start.y)**2)};const o=Math.max(0,Math.min(1,((r.x-i.start.x)*n+(r.y-i.start.y)*t)/a)),s=i.start.x+o*n,c=i.start.y+o*t,l=Math.sqrt((r.x-s)**2+(r.y-c)**2);return{offset:o*Math.sqrt(a),distance:l}}function h(r,i){const n=e.getLineLength(r),t=i.reduce((o,s)=>o+s,0);return[0,Math.max(0,n-t)]}function m(r,i){let n=0;for(const t of i)t.fromLineId===r&&!t.fromIsPercentage&&t.fromOffset!==void 0&&(n=Math.max(n,t.fromOffset)),t.toLineId===r&&!t.toIsPercentage&&t.toOffset!==void 0&&(n=Math.max(n,t.toOffset));return n}exports.PathEngine=e.PathEngine;exports.approachSpeed=e.approachSpeed;exports.arcLengthToSegmentPosition=e.arcLengthToSegmentPosition;exports.buildArcLengthTable=e.buildArcLengthTable;exports.buildGraph=e.buildGraph;exports.calculateBezierArcLength=e.calculateBezierArcLength;exports.calculateFrontAxlePosition=e.calculateFrontAxlePosition;exports.calculateInitialAxlePositions=e.calculateInitialAxlePositions;exports.calculatePositionOnCurve=e.calculatePositionOnCurve;exports.calculatePositionOnLine=e.calculatePositionOnLine;exports.calculateTangentLength=e.calculateTangentLength;exports.computeDistToNextCurve=e.computeDistToNextCurve;exports.computeRemainingToArrival=e.computeRemainingToArrival;exports.computeTargetSpeed=e.computeTargetSpeed;exports.createBezierCurve=e.createBezierCurve;exports.createInitialMovementState=e.createInitialMovementState;exports.distance=e.distance;exports.distanceToT=e.distanceToT;exports.findPath=e.findPath;exports.getArcLength=e.getArcLength;exports.getCumulativeArcLength=e.getCumulativeArcLength;exports.getLineLength=e.getLineLength;exports.getPointOnBezier=e.getPointOnBezier;exports.getPointOnLine=e.getPointOnLine;exports.getPointOnLineByOffset=e.getPointOnLineByOffset;exports.getPositionFromOffset=e.getPositionFromOffset;exports.handleArrival=e.handleArrival;exports.initializeAllVehicles=e.initializeAllVehicles;exports.initializeMovingVehicle=e.initializeMovingVehicle;exports.isPointNearPoint=e.isPointNearPoint;exports.moveVehicle=e.moveVehicle;exports.moveVehicleWithAcceleration=e.moveVehicleWithAcceleration;exports.normalize=e.normalize;exports.prepareCommandPath=e.prepareCommandPath;exports.resolveFromLineOffset=e.resolveFromLineOffset;exports.resolveToLineOffset=e.resolveToLineOffset;exports.updateAxlePosition=e.updateAxlePosition;exports.computeMinLineLength=m;exports.deserializeScene=g;exports.getValidRearOffsetRange=h;exports.projectPointOnLine=u;exports.serializeScene=f;
|
package/dist/core.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { g as
|
|
2
|
-
import { P as
|
|
3
|
-
function
|
|
1
|
+
import { g as f } from "./index-BObuJxsC.js";
|
|
2
|
+
import { P as v, a as p, b as y, c as A, d as S, e as I, f as z, h as M, i as w, j as T, k as b, l as j, m as C, n as E, o as N, p as q, q as B, r as J, s as V, t as F, u as R, v as D, w as G, x as k, y as H, z as W, A as X, B as Y, C as K, D as Q, E as U, F as Z, G as _, H as $, I as ee, J as te } from "./index-BObuJxsC.js";
|
|
3
|
+
function d(s, t) {
|
|
4
4
|
const a = {
|
|
5
|
-
lines:
|
|
6
|
-
curves:
|
|
7
|
-
id:
|
|
8
|
-
fromLineId:
|
|
9
|
-
toLineId:
|
|
10
|
-
fromOffset:
|
|
11
|
-
fromIsPercentage:
|
|
12
|
-
toOffset:
|
|
13
|
-
toIsPercentage:
|
|
5
|
+
lines: s,
|
|
6
|
+
curves: t.map((e) => ({
|
|
7
|
+
id: e.id,
|
|
8
|
+
fromLineId: e.fromLineId,
|
|
9
|
+
toLineId: e.toLineId,
|
|
10
|
+
fromOffset: e.fromOffset,
|
|
11
|
+
fromIsPercentage: e.fromIsPercentage ?? !1,
|
|
12
|
+
toOffset: e.toOffset,
|
|
13
|
+
toIsPercentage: e.toIsPercentage ?? !1
|
|
14
14
|
}))
|
|
15
15
|
};
|
|
16
16
|
return JSON.stringify(a, null, 2);
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
let
|
|
18
|
+
function g(s) {
|
|
19
|
+
let t;
|
|
20
20
|
try {
|
|
21
|
-
|
|
21
|
+
t = JSON.parse(s);
|
|
22
22
|
} catch {
|
|
23
23
|
throw new Error("deserializeScene: invalid JSON");
|
|
24
24
|
}
|
|
25
|
-
if (!
|
|
25
|
+
if (!t || typeof t != "object" || Array.isArray(t))
|
|
26
26
|
throw new Error("deserializeScene: expected a JSON object");
|
|
27
|
-
const a =
|
|
27
|
+
const a = t;
|
|
28
28
|
if (!Array.isArray(a.lines)) throw new Error('deserializeScene: missing "lines"');
|
|
29
29
|
if (!Array.isArray(a.curves)) throw new Error('deserializeScene: missing "curves"');
|
|
30
30
|
return {
|
|
@@ -32,140 +32,72 @@ function M(n) {
|
|
|
32
32
|
curves: a.curves
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
|
-
function
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
e.segmentIndex,
|
|
39
|
-
e.segmentDistance
|
|
40
|
-
);
|
|
41
|
-
return Math.max(0, n.path.totalDistance - a);
|
|
42
|
-
}
|
|
43
|
-
function S(n) {
|
|
44
|
-
const e = n.axleExecutions[0], a = u(
|
|
45
|
-
n.path,
|
|
46
|
-
e.segmentIndex,
|
|
47
|
-
e.segmentDistance
|
|
48
|
-
);
|
|
49
|
-
let t = 0;
|
|
50
|
-
for (let s = 0; s < n.path.segments.length; s++) {
|
|
51
|
-
const i = n.path.segments[s];
|
|
52
|
-
if (s >= e.segmentIndex && i.type === "curve")
|
|
53
|
-
return Math.max(0, t - a);
|
|
54
|
-
t += i.length;
|
|
55
|
-
}
|
|
56
|
-
return null;
|
|
57
|
-
}
|
|
58
|
-
function L(n, e, a) {
|
|
59
|
-
let t = a.maxSpeed;
|
|
60
|
-
const s = Math.sqrt(2 * a.deceleration * Math.max(0, n));
|
|
61
|
-
if (t = Math.min(t, s), e !== null) {
|
|
62
|
-
const i = Math.sqrt(
|
|
63
|
-
a.minCurveSpeed ** 2 + 2 * a.deceleration * e
|
|
64
|
-
);
|
|
65
|
-
t = Math.min(t, i);
|
|
66
|
-
}
|
|
67
|
-
return Math.max(0, t);
|
|
68
|
-
}
|
|
69
|
-
function O(n, e, a, t, s) {
|
|
70
|
-
return n < e ? Math.min(e, n + a * s) : n > e ? Math.max(e, n - t * s) : n;
|
|
71
|
-
}
|
|
72
|
-
function y(n, e, a, t, s, i) {
|
|
73
|
-
const o = v(e), c = S(e), l = L(o, c, t), f = O(
|
|
74
|
-
a.currentSpeed,
|
|
75
|
-
l,
|
|
76
|
-
t.acceleration,
|
|
77
|
-
t.deceleration,
|
|
78
|
-
s
|
|
79
|
-
), d = f * s, h = n.axles.map((r) => ({
|
|
80
|
-
lineId: r.lineId,
|
|
81
|
-
position: r.position,
|
|
82
|
-
absoluteOffset: r.offset
|
|
83
|
-
})), g = e.axleExecutions.map((r) => ({
|
|
84
|
-
currentSegmentIndex: r.segmentIndex,
|
|
85
|
-
segmentDistance: r.segmentDistance
|
|
86
|
-
})), m = x(h, g, e.path, d, i, e.curveDataMap);
|
|
87
|
-
return {
|
|
88
|
-
state: {
|
|
89
|
-
axles: m.axles.map((r) => ({ lineId: r.lineId, offset: r.absoluteOffset, position: r.position })),
|
|
90
|
-
axleSpacings: n.axleSpacings
|
|
91
|
-
},
|
|
92
|
-
execution: {
|
|
93
|
-
...e,
|
|
94
|
-
axleExecutions: m.axleExecutions.map((r) => ({
|
|
95
|
-
segmentIndex: r.currentSegmentIndex,
|
|
96
|
-
segmentDistance: r.segmentDistance
|
|
97
|
-
}))
|
|
98
|
-
},
|
|
99
|
-
accelState: { currentSpeed: f },
|
|
100
|
-
arrived: m.arrived
|
|
101
|
-
};
|
|
102
|
-
}
|
|
103
|
-
function A(n, e) {
|
|
104
|
-
const a = e.end.x - e.start.x, t = e.end.y - e.start.y, s = a * a + t * t;
|
|
105
|
-
if (s === 0)
|
|
35
|
+
function h(s, t) {
|
|
36
|
+
const a = t.end.x - t.start.x, e = t.end.y - t.start.y, n = a * a + e * e;
|
|
37
|
+
if (n === 0)
|
|
106
38
|
return { offset: 0, distance: Math.sqrt(
|
|
107
|
-
(
|
|
39
|
+
(s.x - t.start.x) ** 2 + (s.y - t.start.y) ** 2
|
|
108
40
|
) };
|
|
109
|
-
const
|
|
41
|
+
const r = Math.max(
|
|
110
42
|
0,
|
|
111
43
|
Math.min(
|
|
112
44
|
1,
|
|
113
|
-
((
|
|
45
|
+
((s.x - t.start.x) * a + (s.y - t.start.y) * e) / n
|
|
114
46
|
)
|
|
115
|
-
),
|
|
116
|
-
return { offset:
|
|
47
|
+
), i = t.start.x + r * a, o = t.start.y + r * e, c = Math.sqrt((s.x - i) ** 2 + (s.y - o) ** 2);
|
|
48
|
+
return { offset: r * Math.sqrt(n), distance: c };
|
|
117
49
|
}
|
|
118
|
-
function
|
|
119
|
-
const a =
|
|
120
|
-
return [0, Math.max(0, a -
|
|
50
|
+
function x(s, t) {
|
|
51
|
+
const a = f(s), e = t.reduce((r, i) => r + i, 0);
|
|
52
|
+
return [0, Math.max(0, a - e)];
|
|
121
53
|
}
|
|
122
|
-
function
|
|
54
|
+
function L(s, t) {
|
|
123
55
|
let a = 0;
|
|
124
|
-
for (const
|
|
125
|
-
|
|
56
|
+
for (const e of t)
|
|
57
|
+
e.fromLineId === s && !e.fromIsPercentage && e.fromOffset !== void 0 && (a = Math.max(a, e.fromOffset)), e.toLineId === s && !e.toIsPercentage && e.toOffset !== void 0 && (a = Math.max(a, e.toOffset));
|
|
126
58
|
return a;
|
|
127
59
|
}
|
|
128
60
|
export {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
61
|
+
v as PathEngine,
|
|
62
|
+
p as approachSpeed,
|
|
63
|
+
y as arcLengthToSegmentPosition,
|
|
64
|
+
A as buildArcLengthTable,
|
|
65
|
+
S as buildGraph,
|
|
66
|
+
I as calculateBezierArcLength,
|
|
67
|
+
z as calculateFrontAxlePosition,
|
|
68
|
+
M as calculateInitialAxlePositions,
|
|
69
|
+
w as calculatePositionOnCurve,
|
|
70
|
+
T as calculatePositionOnLine,
|
|
71
|
+
b as calculateTangentLength,
|
|
72
|
+
j as computeDistToNextCurve,
|
|
73
|
+
L as computeMinLineLength,
|
|
74
|
+
C as computeRemainingToArrival,
|
|
75
|
+
E as computeTargetSpeed,
|
|
76
|
+
N as createBezierCurve,
|
|
77
|
+
q as createInitialMovementState,
|
|
78
|
+
g as deserializeScene,
|
|
79
|
+
B as distance,
|
|
80
|
+
J as distanceToT,
|
|
81
|
+
V as findPath,
|
|
82
|
+
F as getArcLength,
|
|
83
|
+
R as getCumulativeArcLength,
|
|
84
|
+
f as getLineLength,
|
|
85
|
+
D as getPointOnBezier,
|
|
86
|
+
G as getPointOnLine,
|
|
87
|
+
k as getPointOnLineByOffset,
|
|
88
|
+
H as getPositionFromOffset,
|
|
89
|
+
x as getValidRearOffsetRange,
|
|
90
|
+
W as handleArrival,
|
|
91
|
+
X as initializeAllVehicles,
|
|
92
|
+
Y as initializeMovingVehicle,
|
|
93
|
+
K as isPointNearPoint,
|
|
94
|
+
Q as moveVehicle,
|
|
95
|
+
U as moveVehicleWithAcceleration,
|
|
96
|
+
Z as normalize,
|
|
97
|
+
_ as prepareCommandPath,
|
|
98
|
+
h as projectPointOnLine,
|
|
99
|
+
$ as resolveFromLineOffset,
|
|
100
|
+
ee as resolveToLineOffset,
|
|
101
|
+
d as serializeScene,
|
|
102
|
+
te as updateAxlePosition
|
|
171
103
|
};
|