auto-git:
[change] src/spline-corridor/spline-repeaters.ts
This commit is contained in:
@@ -16,6 +16,10 @@ import {
|
||||
BUNDLED_SPLINE_CORRIDOR_ASSET_REGISTRY,
|
||||
type BundledSplineCorridorAsset
|
||||
} from "./bundled-spline-corridor-assets";
|
||||
import {
|
||||
isDistanceInSplineCorridorClipIntervals,
|
||||
type SplineCorridorPathClipInterval
|
||||
} from "./spline-corridor-clips";
|
||||
|
||||
export interface SplineRepeaterPathPointLike {
|
||||
id?: string;
|
||||
@@ -149,6 +153,7 @@ function resolvePlacementOffset(repeater: ScenePathRepeater): number {
|
||||
export function deriveSplineRepeaterInstances(options: {
|
||||
path: SplineRepeaterPathLike;
|
||||
terrains?: readonly Terrain[];
|
||||
clipIntervals?: readonly SplineCorridorPathClipInterval[];
|
||||
}): SplineRepeaterInstance[] {
|
||||
const { path } = options;
|
||||
const terrains = options.terrains ?? [];
|
||||
@@ -208,6 +213,15 @@ export function deriveSplineRepeaterInstances(options: {
|
||||
break;
|
||||
}
|
||||
|
||||
if (
|
||||
isDistanceInSplineCorridorClipIntervals(
|
||||
distance,
|
||||
options.clipIntervals
|
||||
)
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const progress = distance / resolvedPath.totalLength;
|
||||
const center = sampleResolvedScenePathPosition(resolvedPath, progress);
|
||||
const tangent = normalizeHorizontal(
|
||||
|
||||
Reference in New Issue
Block a user