pixi.js
    Preparing search index...

    Interface RadialGradientOptions

    Options specific to radial gradients. A radial gradient creates a smooth transition between colors that radiates outward in a circular pattern. The gradient is defined by inner and outer circles, each with their own radius.

    interface RadialGradientOptions {
        center?: PointData;
        colorStops?: { color: ColorSource; offset: number }[];
        innerRadius?: number;
        outerCenter?: PointData;
        outerRadius?: number;
        rotation?: number;
        scale?: number;
        textureSize?: number;
        textureSpace?: TextureSpace;
        type?: "radial";
        wrapMode?: WRAP_MODE;
    }

    Hierarchy (View Summary)

    Index

    Properties

    center?: PointData

    The center point of the inner circle where the gradient begins. In local coordinates by default (0-1).

    colorStops?: { color: ColorSource; offset: number }[]

    Array of colors stops to use in the gradient

    innerRadius?: number

    The radius of the inner circle where the gradient begins.

    outerCenter?: PointData

    The center point of the outer circle where the gradient ends. In local coordinates by default (0-1).

    outerRadius?: number

    The radius of the outer circle where the gradient ends.

    rotation?: number

    The rotation of the gradient in radians, useful for making the gradient elliptical. NOTE: Only applied to radial gradients used with Graphics.

    scale?: number

    The y scale of the gradient, use this to make the gradient elliptical. NOTE: Only applied to radial gradients used with Graphics.

    textureSize?: number

    The size of the texture to use for the gradient - this is for advanced usage. The texture size does not need to match the size of the object being drawn. Due to GPU interpolation, gradient textures can be relatively small! Consider using a larger texture size if your gradient has a lot of very tight color steps

    textureSpace?: TextureSpace

    Whether coordinates are 'global' or 'local'

    type?: "radial"

    The type of gradient. Must be 'radial' for radial gradients.

    wrapMode?: WRAP_MODE

    The wrap mode of the gradient. This can be 'clamp-to-edge' or 'repeat'.

    'clamp-to-edge'