Enhance path definitions with curve mode and sampled resolution support

This commit is contained in:
2026-05-12 22:46:59 +02:00
parent 638fd1d433
commit 0c5cf8c1d5
2 changed files with 9 additions and 1 deletions

View File

@@ -1,7 +1,8 @@
import type { Vec3 } from "../core/vector";
import {
sampleResolvedScenePathPosition,
sampleResolvedScenePathTangent
sampleResolvedScenePathTangent,
type ScenePathCurveMode
} from "../document/paths";
import {
applyControlEffectToResolvedState,
@@ -69,6 +70,8 @@ export interface RuntimeProjectSchedulePathSegment {
export interface RuntimeProjectSchedulePathDefinition {
id: string;
loop: boolean;
curveMode?: ScenePathCurveMode;
sampledResolution?: number;
points: RuntimeProjectSchedulePathPoint[];
segments: RuntimeProjectSchedulePathSegment[];
totalLength: number;

View File

@@ -61,6 +61,7 @@ import {
getScenePaths,
resolveScenePath,
type ScenePath,
type ScenePathCurveMode,
type ScenePathPoint
} from "../document/paths";
import {
@@ -508,6 +509,8 @@ export interface RuntimePath {
visible: boolean;
enabled: boolean;
loop: boolean;
curveMode: ScenePathCurveMode;
sampledResolution: number;
points: RuntimePathPoint[];
segments: RuntimePathSegment[];
totalLength: number;
@@ -1001,6 +1004,8 @@ function buildRuntimePath(path: ScenePath): RuntimePath {
visible: path.visible,
enabled: path.enabled,
loop: path.loop,
curveMode: resolvedPath.curveMode,
sampledResolution: resolvedPath.sampledResolution,
points: resolvedPath.points.map(buildRuntimePathPoint),
segments: resolvedPath.segments.map((segment) => ({
index: segment.index,