Skip to content

linearGradient

linearGradient(options): FillGradient

Defined in: renderer/src/gradient.ts:79

Create a linear gradient fill usable with GraphicsComponent draws (g.rect(...).fill(myGradient)).

Uses yage-style numeric colors with optional alpha per stop, and a simple axis shorthand for the common vertical/horizontal cases.

Returns a GradientFill (pixi FillGradient under the hood). Call .destroy() when you’re done with it to release the backing texture — components typically do this in onRemove().

LinearGradientOptions

FillGradient