Advance M8-M11 parity workflows
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-17 04:37:07 -04:00
parent 7c16b279ae
commit 0fe8d2bb56
324 changed files with 31920 additions and 863 deletions

View File

@@ -40,7 +40,10 @@ export interface WeightPatchIR {
indices: number[];
values: number[];
normalize?: boolean;
limit?: number;
mirror?: boolean;
mirrorAxis?: 0 | 1 | 2;
mirrorTolerance?: number;
}
export interface PaintBrushVertexIR {
@@ -278,10 +281,26 @@ export function parseWeightPatch(value: unknown): WeightPatchIR {
if (typeof patch.normalize !== "boolean") fail("weightPatch.normalize", "must be boolean");
result.normalize = patch.normalize;
}
if (patch.limit !== undefined) {
const limit = integer(patch.limit, "weightPatch.limit");
if (limit < 1 || limit > 32) fail("weightPatch.limit", "must be in [1,32]");
result.limit = limit;
}
if (patch.mirror !== undefined) {
if (typeof patch.mirror !== "boolean") fail("weightPatch.mirror", "must be boolean");
result.mirror = patch.mirror;
}
if (patch.mirrorAxis !== undefined) {
const axis = integer(patch.mirrorAxis, "weightPatch.mirrorAxis");
if (axis > 2) fail("weightPatch.mirrorAxis", "must be 0, 1 or 2");
result.mirrorAxis = axis as 0 | 1 | 2;
}
if (patch.mirrorTolerance !== undefined) {
const tolerance = finite(patch.mirrorTolerance, "weightPatch.mirrorTolerance");
if (tolerance <= 0 || tolerance > 1) fail("weightPatch.mirrorTolerance", "must be in (0,1]");
result.mirrorTolerance = tolerance;
}
if (!result.mirror && (result.mirrorAxis !== undefined || result.mirrorTolerance !== undefined)) fail("weightPatch.mirrorAxis/mirrorTolerance", "require mirror=true");
return result;
}