Release Healer Man 0.1.11
This commit is contained in:
1 parent
5f1a14d8de
commit
13970d03c8
18 files changed
+514
-19
No files matched your search
@@ -48,6 +48,8 @@ export interface PartyNavigationGraph {
|
||||
|
||||
export interface PartyNavigationBuildOptions {
|
||||
readonly weldTolerance?: number;
|
||||
/** Defensive runtime ceiling; checked before graph allocations begin. */
|
||||
readonly maxSourceTriangles?: number;
|
||||
readonly offMeshLinks?: readonly {
|
||||
readonly start: PartyNavigationPosition;
|
||||
readonly end: PartyNavigationPosition;
|
||||
@@ -241,6 +243,24 @@ export function buildPartyNavigationGraph(
|
||||
if (indexCount < 3 || indexCount % 3 !== 0) {
|
||||
throw new Error("Party navigation geometry must contain complete triangles.");
|
||||
}
|
||||
const sourceTriangleCount = indexCount / 3;
|
||||
if (
|
||||
options.maxSourceTriangles !== undefined
|
||||
&& (
|
||||
!Number.isInteger(options.maxSourceTriangles)
|
||||
|| options.maxSourceTriangles <= 0
|
||||
)
|
||||
) {
|
||||
throw new Error("Party navigation maximum source triangles must be a positive integer.");
|
||||
}
|
||||
if (
|
||||
options.maxSourceTriangles !== undefined
|
||||
&& sourceTriangleCount > options.maxSourceTriangles
|
||||
) {
|
||||
throw new Error(
|
||||
`Party navigation geometry has ${sourceTriangleCount} triangles; maximum is ${options.maxSourceTriangles}.`,
|
||||
);
|
||||
}
|
||||
|
||||
const sourceToWelded = new Int32Array(position.count);
|
||||
const welded: MutableWeldedNode[] = [];
|
||||
@@ -418,7 +438,7 @@ export function buildPartyNavigationGraph(
|
||||
}),
|
||||
weldTolerance: tolerance,
|
||||
sourceVertexCount: position.count,
|
||||
sourceTriangleCount: indexCount / 3,
|
||||
sourceTriangleCount,
|
||||
weldedNodeCount: welded.length,
|
||||
componentCount: components.length,
|
||||
discardedNodeCount: welded.length - nodes.length,
|
||||
|
||||
Reference in new issue
Block a user