Skip to content

format

typescript
Gradient.SetAlphaFrame(index, val)

class: Gradient

description

Set the value of the transparency keyframe at the specified index.

parameter

param_nametypedescription
indexnumberThe index of the keyframe.
valKeyFrameThe transparency 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 transparency keyframe
gradient.AddAlphaFrame(frame);
// Set the value of the transparency keyframe at the specified index
gradient.SetAlphaFrame(0, frame);