Sketch to RenderPRO
Line art draws first, then values wash in, then colour and detail: the image is worked up from a sketch.
Code
3 files · 311 lines of TypeScriptPRO
Sketch to Render is part of Pro
Get its source, the one-paste agent prompt and all 113 components, for a one-time $99.
Motion notes
- Edges come from a two-scale Sobel pass on the image itself, so the line art always matches the final picture: broad gesture lines first, fine detail after.
- Lines are uncovered along their own direction, so strokes grow instead of fading in, and hatching settles into the shadows before any colour appears.
- Three phases in the pill (Sketching, Shading, Rendering) mirror what the shader is doing, so the wait reads as progress rather than a spinner.
- Draw it on warm paper or dark slate with `ground`. With reduced motion the drawing follows progress without the pencil jitter.
Usage
Example
<ImageSketch progress={job.progress} src={job.url} alt={prompt} />Props
| Prop | Type | Default | Description |
|---|---|---|---|
| progress | number | — | 0–100. |
| src | string | — | Final image URL. Same-origin or CORS-enabled. |
| alt | string | — | Alt text. |
| ground | "paper" | "dark" | "paper" | What the sketch is drawn on. |
| className | string | — | Size it here; the default is w-64 at 3:4. |