Production-ready animations, transitions, backgrounds, and scenes for Remotion
TypeScript ai-agentsclaude-codedemo-videomcpmcp-servermodel-context-protocolmotion-designproduct-demoreactremotionshadcnvideo
{
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
"name": "shader-dithering",
"title": "Shader Dithering",
"description": "Ordered-dither shading over an animated gradient field.",
"dependencies": ["@paper-design/shaders-react"],
"files": [
{
"path": "registry/remocn/shader-dithering/index.tsx",
"content": "\"use client\";\n\nimport { Dithering, type DitheringProps } from \"@paper-design/shaders-react\";\nimport { useCallback, useState } from \"react\";\nimport {\n continueRender,\n delayRender,\n useCurrentFrame,\n useVideoConfig,\n} from \"remotion\";\n\nexport interface ShaderDitheringProps\n extends Omit<DitheringProps, \"frame\" | \"ref\"> {}\n\nexport function ShaderDithering({\n speed = 1,\n colorBack = \"#12121a\",\n colorFront = \"#6a6a85\",\n shape = \"wave\",\n type = \"4x4\",\n size = 2,\n className,\n ...rest\n}: ShaderDitheringProps) {\n const frame = useCurrentFrame();\n const { fps, width, height } = useVideoConfig();\n\n const [handle] = useState(() => delayRender(\"shader-dithering\"));\n const gate = useCallback(\n (element: HTMLDivElement | null) => {\n if (!element) return;\n requestAnimationFrame(() =>\n requestAnimationFrame(() => continueRender(handle)),\n );\n },\n [handle],\n );\n\n return (\n <div\n ref={gate}\n className={className}\n style={{ position: \"absolute\", inset: 0 }}\n >\n <Dithering\n speed={0}\n frame={(frame / fps) * speed * 1000}\n colorBack={colorBack}\n colorFront={colorFront}\n shape={shape}\n type={type}\n size={size}\n fit=\"cover\"\n width={width}\n height={height}\n {...rest}\n />\n </div>\n );\n}\n",
"type": "registry:component",
"target": "components/remocn/shader-dithering.tsx"
}
],
"type": "registry:component"
}