Skip to content

KeyFrameColorRGB

The KeyFrameColorRGB class represents a color keyframe for gradient colors.

typescript
function CreateColorFrame(time:number,r:number,g:number,b:number):KeyFrameColorRGB
{
    let colorFrame=new KeyFrameColorRGB();
    colorFrame.time=time;
    colorFrame.r=r;
    colorFrame.g=g;
    colorFrame.b=b;
    return colorFrame;
}

成员变量

KeyFrameColorRGB.r : number
The red channel of the color.
KeyFrameColorRGB.b : number
The blue channel of the color.
KeyFrameColorRGB.g : number
The green channel of the color.
KeyFrameColorRGB.time : number
The relative position at which the color keyframe appears.

成员方法

KeyFrameColorRGB.toString ( ) : string
The type alias of the component.
KeyFrameColorRGB.EqualsTo ( other : KeyFrameColorRGB ) : boolean
Check if the current color keyframe is equal to the target color keyframe.

静态方法

KeyFrameColorRGB.Lerp ( lhs : KeyFrameColorRGB , rhs : KeyFrameColorRGB , weight : number ) : Color
Get the interpolated color between two colors.
KeyFrameColorRGB.EqualsTo ( lhs : KeyFrameColorRGB , rhs : KeyFrameColorRGB ) : boolean
Determines whether two color keyframes are equal.