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

@@ -797,6 +797,14 @@ function assertFutureCapability(payload: Extract<WebEngineRequest["command"], {
for (const field of ["foreground", "background"] as const) if (properties[field] !== undefined && (!Array.isArray(properties[field]) || properties[field].length !== 4 || properties[field].some((value) => !boundedNumber(value, 0, 1)))) throw report("RENDER_PROPERTY_INVALID", `Scene ${field} must contain four normalized channels`);
return;
}
case "setSceneLineSettings": {
const scene = currentSnapshot?.scenes.find((candidate) => candidate.id === payload.dataId);
const properties = payload.properties;
if (!scene || !validPropertyKeys(properties, ["mode", "thickness"])) throw report("RENDER_PROPERTY_INVALID", "Scene line target or properties are invalid");
if (properties.mode !== undefined && ![1, 2].includes(properties.mode)) throw report("RENDER_PROPERTY_INVALID", "Scene line mode is unsupported");
if (properties.thickness !== undefined && !boundedNumber(properties.thickness, 0, 1000)) throw report("RENDER_PROPERTY_INVALID", "Scene line thickness is outside the bounded range");
return;
}
case "setGeometryNodeGraph": {
const snapshot = currentSnapshot;
const availableResourceIds = new Set([