Skip to content

createRadialGradientTexture

createRadialGradientTexture(radius, colorStops): undefined | Texture<Resource>

Creates a radial gradient texture.

Parameters

radius: number

The radius of the texture.

colorStops: object[]

An array of objects, each with an offset and a color.

Returns

undefined | Texture<Resource>

  • A PIXI texture of the radial gradient.

Source

src/utils/TextureUtils.ts:47