feat(web): add freestyle line authoring
This commit is contained in:
@@ -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([
|
||||
|
||||
Reference in New Issue
Block a user