Create a procedural noise shader, for use as a fill or stroke style.
Both kinds take the same four arguments and differ in how the noise is
summed: "fractal-noise" is soft and cloud-like, "turbulence" sharper
and more chaotic. Where the Make methods return null for arguments
Skia rejects, the constructor throws instead.
ctx.fillStyle = new Shader("turbulence", 0.08, 0.08, 4, 0)
which noise function to sum
noise frequency along x (small = larger features)
noise frequency along y
detail levels
pattern seed
Mark shader as deleted. Use-after-delete throws Error.
StaticMakeFractal (Perlin) noise -- film grain, clouds, organic texture.
noise frequency along x (small = larger features)
noise frequency along y
detail levels
pattern seed
StaticMake
A reusable shader, settable as
ctx.fillStyle/strokeStyle. Currently the procedural-noise factories; gradient shaders are reachable viacreateLinear/Radial/ConicGradient. Mirrors CanvasKit'sShader.🧪 Not in the HTML Canvas standard.