feat(web): harden continuous implementation handoff
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 07:17:09 +08:00
parent 43d0c437bb
commit 01d535b362
43 changed files with 2061 additions and 54 deletions

View File

@@ -447,6 +447,16 @@ function assertFutureCapability(payload: Extract<WebEngineRequest["command"], {
}
return;
}
case "setTextureProperties": {
const texture = currentSnapshot?.textures?.find((candidate) => candidate.id === payload.dataId);
if (!texture) throw report("NON_MESH_DATA_UNSUPPORTED", `Texture data block is unavailable: ${payload.dataId}`);
if (!validPropertyKeys(payload.properties, ["noiseScale", "noiseDepth", "intensity", "contrast", "saturation"])) throw report("NON_MESH_PROPERTY_INVALID", "Texture properties are empty or contain unsupported fields");
for (const [key, value] of Object.entries(payload.properties)) {
if (typeof value !== "number" || !Number.isFinite(value) || value < 0 || value > 1_000_000) throw report("NON_MESH_PROPERTY_INVALID", `Texture setting ${key} is outside the bounded range`);
if (key === "noiseDepth" && (!Number.isSafeInteger(value) || value > 30)) throw report("NON_MESH_PROPERTY_INVALID", "Texture noise depth must be an integer between 0 and 30");
}
return;
}
case "setVolumeProperties": {
const data = currentSnapshot?.nonMeshData?.find((candidate) => candidate.id === payload.dataId);
if (!data || data.type !== "VOLUME") throw report("NON_MESH_DATA_UNSUPPORTED", `N-015 Volume data block is unavailable: ${payload.dataId}`);