From 0002d782eef6362f5b29906a7482d97c4d61a92b Mon Sep 17 00:00:00 2001 From: Thomas Yuill Date: Tue, 19 May 2026 21:40:14 -0400 Subject: [PATCH] fix(shadcn): replace invalid postfix ++ on type assertion in iFrame uniform The expression `(value as number)++` is not valid TypeScript because the increment operator requires a variable or property access, not a type assertion expression. Split into a read, uniform write, and explicit re-assignment to preserve postfix-increment semantics. Co-Authored-By: Claude Opus 4.7 --- packages/shadcn/components/agents-ui/react-shader-toy.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/shadcn/components/agents-ui/react-shader-toy.tsx b/packages/shadcn/components/agents-ui/react-shader-toy.tsx index 3ff09127b..8d05a2e9a 100644 --- a/packages/shadcn/components/agents-ui/react-shader-toy.tsx +++ b/packages/shadcn/components/agents-ui/react-shader-toy.tsx @@ -821,7 +821,9 @@ export function ReactShaderToy({ } if (uniformsRef.current.iFrame?.isNeeded) { const timeDeltaUniform = gl.getUniformLocation(shaderProgramRef.current, UNIFORM_FRAME); - gl.uniform1i(timeDeltaUniform, (uniformsRef.current.iFrame.value as number)++); + const frame = uniformsRef.current.iFrame.value as number; + gl.uniform1i(timeDeltaUniform, frame); + uniformsRef.current.iFrame.value = frame + 1; } if (texturesArrRef.current.length > 0) { for (let index = 0; index < texturesArrRef.current.length; index++) {