feat(web): add freestyle line authoring
Some checks failed
M6 deployable RC / quick (push) Has been cancelled
M6 deployable RC / chromium (push) Has been cancelled
M6 deployable RC / release (push) Has been cancelled

This commit is contained in:
mes123456
2026-08-29 21:05:08 +08:00
parent 46ed36ba1b
commit 29622d02cd
45 changed files with 1907 additions and 36 deletions

View File

@@ -582,6 +582,7 @@ export interface SceneIR {
samplingSettings?: { pixelAspectX: number; pixelAspectY: number; filterSize: number; dither: number };
multiviewSettings?: { enabled: boolean; viewsFormat: number; imageViewsFormat: number; stereoDisplayMode: number; interlaceSwap: boolean; sideBySideCrossed: boolean; squeezedFrame: boolean };
stampSettings?: { stampMask: number; fontId: number; userText: string; foreground: number[]; background: number[] };
lineSettings?: { mode: number; thickness: number };
compositorGraph?: CompositorGraphIR;
compositorStatus?: "AVAILABLE" | "BLOCKED";
sequencerTimeline?: SequencerTimelineIR;
@@ -1656,6 +1657,11 @@ export function parseSceneSnapshotIR(value: unknown): SceneSnapshotIR {
requireString(scene.stampSettings.userText, `scenes[${index}].stampSettings.userText`);
for (const field of ["foreground", "background"] as const) requireTuple(scene.stampSettings[field], 4, `scenes[${index}].stampSettings.${field}`);
}
if (scene.lineSettings !== undefined) {
if (!isRecord(scene.lineSettings)) throw new Error(`SceneIR.scenes[${index}].lineSettings must be an object`);
requireNumber(scene.lineSettings.mode, `scenes[${index}].lineSettings.mode`);
requireNumber(scene.lineSettings.thickness, `scenes[${index}].lineSettings.thickness`);
}
if (scene.compositorStatus !== undefined && !["AVAILABLE", "BLOCKED"].includes(scene.compositorStatus as string)) {
throw new Error(`scenes[${index}].compositorStatus is invalid`);
}