API reference

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

C

classLinearGradient

@codexo/exojs / rendering / stable

Linear gradient in UV space projected from `start` to `end`.

4
props
10
methods
0
events
Import
import { LinearGradient } from '@codexo/exojs'

Linear gradient in UV space projected from `start` to `end`.

Constructors1
new(stops: readonly GradientStop[], start: readonly [number, number], end: readonly [number, number]): LinearGradient
Methods10
_copyGeometry(source: LinearGradient): void
Copy the concrete subclass geometry from a same-type source.
Compare the concrete subclass geometry against other. Only invoked once Gradient.equals has confirmed both sides share the same GradientType, so implementations may narrow other accordingly.
clone(): this
Deep-clone into a new instance of the same concrete gradient type.
copy(source: this): this
Copy every value (stops and geometry) from a same-type source into this instance, replacing its current state. Returns this for chaining.
destroy(): void
Structural value equality: same GradientType, same ordered stops (offset and Color), and same subclass geometry.
resolveT(u: number, v: number): number
sampleAt(t: number, out: Float32Array): void
Shared stop sampling logic ported from the legacy GLSL implementation.
Properties4
Concrete gradient kind, e.g. 'linear' or 'radial'.
end: readonly [number, number]
Projection axis end point in UV space.
start: readonly [number, number]
Projection axis start point in UV space.
stops: readonly GradientStop[]
Source