Skip to content

format

typescript
KeyFrameColorRGB.EqualsTo(lhs, rhs)

class: KeyFrameColorRGB

description

Determines whether two color keyframes are equal.

parameter

param_nametypedescription
lhsKeyFrameColorRGBKeyframe 1
rhsKeyFrameColorRGBKeyframe 2

return

typedescription
booleanTrue if the two color keyframes are equal; otherwise, false.

code example

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;
}

let colorFrame1 = CreateColorFrame(1,0,0,0);
let colorFrame2 = CreateColorFrame(1,255,0,0);

// Determines whether two color keyframes are equal
let result = KeyFrameColorRGB.EqualsTo(colorFrame1, colorFrame2);
if (result) {
    Debug.Log("colorFrame1 is equal to colorFrame2")
}else{
    Debug.Log("colorFrame1 is not equal to colorFrame2")
}