Everything in shodo’s paint lands on paper, and the paper has a say. Its grain catches a dry stick on the crests and leaves the valleys bare. It drinks a wash or lets it sit. It runs in lines or has no direction at all.
import { feelPaper, PAPERS, WetGpu } from "shodo/paint";
const paper = feelPaper(PAPERS.coldPress, { tooth: 0.8, thirst: 0.3 });
const sheet = new WetGpu(canvas, 600, 400, { paper });
That is cold-press paper with a coarser grain that holds washes on top a little longer. Every sheet, wet or dry, takes a paper the same way.
Start from a paper
| Paper | What it is |
|---|---|
laid | Pastel paper with a medium grain that runs one way, warm cream. The pastel default. |
sanded | Fine, deep grit with no direction that holds many layers. |
coldPress | Watercolour paper: coarse, rounded grain, white and thirsty. The wet default. |
toned | A soft grain on a mid grey-blue that takes few layers. |
Feel
Five dials, each from 0 to 1. At 0.5 a dial leaves the paper you started from exactly as it was, so feelPaper(PAPERS.laid, {}) is laid paper.
toothfinecoarseHow big the grain of the paper is.
roughnesssmoothroughHow deep the grain goes, and so how much paint skips its crests or pools in its valleys.
linesno directionlaid linesHow strongly the grain runs one way.
2 more dials
thirstsizedblottingHow fast the paper drinks water: washes sit on top or soak straight in.
layersa fewmanyHow many coats of pastel the grain holds before it fills and stops taking more.
PAPER_FEEL holds the same words for building a panel. Thirst only matters to wet media and layers only to dry media; the others matter to both.
Underneath
feelPaper returns a plain Paper, so you can always set its fields directly: scale (grain size in px), depth, stretch (1 has no direction), angle (the direction of the lines, radians), capacity, absorbency (0 to 1), release and colour. angle and colour have no dial: set them on the paper.
const blue = { ...PAPERS.toned, colour: [0.3, 0.4, 0.6], angle: 1.2 };