Skip to content

format

typescript
Gradient.RemoveAlphaFrame(index)

class: Gradient

description

Remove the opacity keyframe at the specified index.

parameter

param_nametypedescription
indexnumberThe index of the keyframe.

reture

typedescription
void

code example

typescript
let frame = new KeyFrame();
frame.time = 900;
frame.value = 900;
frame.inTangent = 900;
frame.outTangent = 900;

// Create a new gradient object
let gradient = new Gradient();
// Add the opacity keyframe
gradient.AddAlphaFrame(frame);
// Set the value of the opacity keyframe at the specified index
gradient.SetAlphaFrame(0, frame);
// Remove the opacity keyframe at the specified index
gradient.RemoveAlphaFrame(1);