API ReferenceSandbox
Gradientclass
Describes a gradient between multiple colors
object→Gradient
Constructors2
Showing 2 constructors
No results match this filter.
Methods8
Showing 8 methods
public Color Evaluate(float time)
Evaluate the blend using the time, which is generally between 0 and 1
| Parameter | Type | Description |
|---|---|---|
| time | float | — |
public void FixOrder()
If the lists aren't in time order for some reason, this will fix them. This should really just be called when serializing, and in every other situation we should assume they're okay.
Returns:
void—public static Sandbox.Gradient FromColors(Color[] colors)
Create a gradient from colors spaced out evenly
| Parameter | Type | Description |
|---|---|---|
| colors | Color[] | — |
public Sandbox.Gradient WithFrames(System.Collections.Immutable.ImmutableList`1<Sandbox.Gradient.ColorFrame> frames)
| Parameter | Type | Description |
|---|---|---|
| frames | ImmutableList<ColorFrame> | — |
No results match this filter.
Properties4
Showing 4 properties
public System.Collections.Immutable.ImmutableList`1<Sandbox.Gradient.AlphaFrame> Sandbox.Gradient.Alphas { get; set; }
A list of color stops, which should be ordered by time
public System.Collections.Immutable.ImmutableList`1<Sandbox.Gradient.ColorFrame> Sandbox.Gradient.Colors { get; set; }
A list of color stops, which should be ordered by time
public Sandbox.Gradient.ColorFrame Sandbox.Gradient.Item { get; set; }
No results match this filter.