{"record":{"id":"2c937771ad62d555","repo":"remotion-dev/remotion","slug":"name-must-be-a-number-number-tuple-2c9377","errorCode":null,"errorMessage":"\"${name}\" must be a [number, number] tuple","messagePattern":"\"(.+?)\" must be a \\[number, number\\] tuple","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/effects/src/radial-progressive-pixelate/index.ts","lineNumber":147,"sourceCode":"\twidth: params.width ?? DEFAULT_WIDTH,\n\theight: params.height ?? DEFAULT_HEIGHT,\n\trotation: params.rotation ?? DEFAULT_ROTATION,\n\tstart: params.start ?? DEFAULT_START,\n\tstartBlockSize: params.startBlockSize ?? DEFAULT_START_BLOCK_SIZE,\n\tendBlockSize: params.endBlockSize ?? DEFAULT_END_BLOCK_SIZE,\n});\n\nconst assertOptionalUvCoordinate = (value: unknown, name: string): void => {\n\tif (value === undefined) {\n\t\treturn;\n\t}\n\n\tif (\n\t\t!Array.isArray(value) ||\n\t\tvalue.length !== 2 ||\n\t\tvalue.some((item) => typeof item !== 'number' || !Number.isFinite(item))\n\t) {\n\t\tthrow new TypeError(`\"${name}\" must be a [number, number] tuple`);\n\t}\n};\n\nconst validateBlockSize = (value: number, name: string): void => {\n\tif (value < 1) {\n\t\tthrow new TypeError(`\"${name}\" must be >= 1`);\n\t}\n};\n\nconst validateParams = (params: RadialProgressivePixelateParams): void => {\n\tassertEffectParamsObject(params, 'Radial progressive pixelate');\n\tassertOptionalUvCoordinate(params.center, 'center');\n\tassertOptionalFiniteNumber(params.width, 'width');\n\tassertOptionalFiniteNumber(params.height, 'height');\n\tassertOptionalFiniteNumber(params.rotation, 'rotation');\n\tvalidateNonNegative(params.width ?? DEFAULT_WIDTH, 'width');\n\tvalidateNonNegative(params.height ?? DEFAULT_HEIGHT, 'height');\n\tassertOptionalFiniteNumber(params.start, 'start');","sourceCodeStart":129,"sourceCodeEnd":165,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/radial-progressive-pixelate/index.ts#L129-L165","documentation":"The radialProgressivePixelate effect validates that optional UV-coordinate parameters (such as 'center') are [number, number] tuples. If a value is provided but is not a 2-element array of finite numbers, the effect throws a TypeError before any GPU work begins. This is a parameter-shape guard, not a runtime/GPU error.","triggerScenarios":"Passing radialProgressivePixelate({ center: [0.5] }) (wrong length), center: 'middle' (wrong type), center: [0.5, NaN] (non-finite), or center: {x: 0.5, y: 0.5} (object instead of array).","commonSituations":"Passing an object {x, y} instead of an array [x, y]; passing a 3-element array from code that shares a coordinate type with a 3D system; accidentally passing NaN from a division-by-zero calculation upstream.","solutions":["Pass center as a 2-element array of finite numbers: [x, y] in the 0–1 UV range","If using an object internally, convert it: center: [obj.x, obj.y] before passing","Run Number.isFinite on each component before constructing the tuple","Omit the parameter entirely to use the default if you do not have a valid value"],"exampleFix":"// before\nradialProgressivePixelate({ center: { x: 0.5, y: 0.5 } })\n// after\nradialProgressivePixelate({ center: [0.5, 0.5] })","handlingStrategy":"type-guard","validationCode":"const center = [0.5, 0.5];\nif (!Array.isArray(center) || center.length !== 2 || !center.every(v => typeof v === 'number' && Number.isFinite(v))) {\n  throw new Error('center must be [number, number]');\n}\nradialProgressivePixelate({ center: center as [number, number] });","typeGuard":"const isUvTuple = (v: unknown): v is [number, number] =>\n  Array.isArray(v) &&\n  v.length === 2 &&\n  v.every((item) => typeof item === 'number' && Number.isFinite(item));","tryCatchPattern":null,"preventionTips":["Use the [number, number] tuple type annotation on variables passed to UV-coordinate parameters","Write a reusable isUvTuple type guard and apply it before calling the effect","Avoid passing object-shaped coordinates ({x, y}); convert to arrays first"],"tags":["validation","typescript","uv-coordinate","radial-progressive-pixelate"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}