format
typescript
Gradient.RemoveAlphaFrame(index)class: Gradient
description
Remove the opacity keyframe at the specified index.
parameter
| param_name | type | description |
|---|---|---|
| index | number | The index of the keyframe. |
reture
| type | description |
|---|---|
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);