API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

I

interfaceTextGradient

@codexo/exojs / rendering / stable

A multi-stop fill gradient for text. The ramp is a shader-side function of the node's ink box, not a rasterized texture, so it costs no atlas work and follows the text as it re-flows.

2
props
0
methods
0
events
Import
import { TextGradient } from '@codexo/exojs'

A multi-stop fill gradient for text.

The ramp is a shader-side function of the node's ink box, not a rasterized texture, so it costs no atlas work and follows the text as it re-flows.

Properties2
angle?: number
Direction of the ramp in degrees, following the CSS linear-gradient convention: 0 runs towards the top, 90 towards the right, and the angle increases clockwise. Defaults to 180 - top to bottom. The ramp spans the ink box corner to corner along that direction, so the first stop lands on the box's leading edge and the last on its trailing one whatever the angle.
stops: readonly GradientStop[]
Colour stops, at most textGradientMaxStops of them. Offsets are clamped to 0..1 and sorted on the way in, so the order they are written in does not matter. At least two are required.
Source