Pipeline
- Docsusage, props, keywords
- Demosrc/demo.tsx
- Buildshadcn add → vite
- Capturelight, dark, motion
- IndexBM25 + vectors
Public log. Prompts, raw model errors and costs stay on the admin side.
Log
Demo source
src/demo.tsx · from an earlier run
import { useEffect, useRef } from "react"import { createCloth } from "@/components/canvasui/ClothVanilla"import { Button } from "@/components/ui/button"import { Input } from "@/components/ui/input"import { Label } from "@/components/ui/label"function ClothCard() { const sourceRef = useRef<HTMLCanvasElement>(null) const contentRef = useRef<HTMLDivElement>(null) const outputRef = useRef<HTMLCanvasElement>(null) useEffect(() => { const source = sourceRef.current const content = contentRef.current const output = outputRef.current if (!source || !content || !output) return const instance = createCloth({ source, content, output }, { pin: "top" }) return () => { instance?.destroy() } }, []) return ( <div style={{ position: "relative", width: 360, height: 240 }}> <canvas ref={outputRef} style={{ position: "absolute", pointerEvents: "none" }} /> <canvas ref={sourceRef} style={{ display: "block", width: 360, height: 240 }}> <div ref={contentRef} className="flex h-full w-full flex-col justify-center gap-4 rounded-xl bg-card p-6 text-card-foreground shadow-sm" > <div className="grid gap-2"> <Label htmlFor="email">Email</Label> <Input id="email" type="email" placeholder="m@example.com" /> </div> <Button className="w-full">Login</Button> </div> </canvas> </div> )}export default function ClothDemo() { return <ClothCard />}