Feat: Add support for spline repeaters in runtime paths

This commit is contained in:
2026-05-13 03:46:08 +02:00
parent efab46edfa
commit 2b7bedfa23
2 changed files with 10 additions and 0 deletions

View File

@@ -4398,6 +4398,13 @@ export class RuntimeHost {
this.applyShadowState();
}
private rebuildSplineRepeaters(runtimeScene: RuntimeSceneDefinition) {
this.splineRepeaterRenderer.sync({
paths: runtimeScene.paths,
terrains: runtimeScene.foliage.terrains
});
}
private createFogMaterialSet(
brush: RuntimeBoxBrushInstance,
volumeRenderPaths: {

View File

@@ -62,6 +62,7 @@ import {
resolveScenePath,
type ScenePath,
type ScenePathCurveMode,
type ScenePathRepeater,
type ScenePathRoadEdgeSettings,
type ScenePathRoadSettings,
type ScenePathPoint
@@ -527,6 +528,7 @@ export interface RuntimePath {
right: RuntimePathRoadEdgeSettings;
};
};
repeaters: ScenePathRepeater[];
points: RuntimePathPoint[];
segments: RuntimePathSegment[];
totalLength: number;
@@ -1048,6 +1050,7 @@ function buildRuntimePath(
}
}
},
repeaters: path.repeaters.map((repeater) => ({ ...repeater })),
points: resolvedPath.points.map(buildRuntimePathPoint),
segments: resolvedPath.segments.map((segment) => ({
index: segment.index,