Skip to content

PSGradient

The PSGradient class represents a particle gradient color, which is used to describe a process of color change over time or space.

typescript
let obj = new GameObject();
let com = obj.AddComponent<ParticleSystem>(ParticleSystem);
let psGradient = com.initialModuleColor;

成员变量

PSGradient.gradientMode : PSGradientMode
Gradient mode PSGradientMode.
PSGradient.minColor : Color
(Read Only) The minimum color point of the gradient.
PSGradient.maxColor : Color
(Read Only) The maximum color point of the gradient.
PSGradient.maxGradient : Gradient|null
(Read Only) The maximum value of the particle color properties.
PSGradient.minGradient : Gradient|null
(Read Only) The minimum value of the particle color properties.
PSGradient.isOptimized : boolean
(Read-only) Whether it is being used

成员方法

PSGradient.Evaluate ( time : number , random_value : number 1.0 ) : Color
Performs color sampling.
PSGradient.BuildGradients ( ) : boolean
Builds a gradient color.
PSGradient.CopyTo ( target : PSGradient ) : void
Copy to object.
PSGradient.Reset ( mode : PSGradientMode PSGradientMode.Color, begin_color : Color Color.white, end_color : Color Color.white ) : Reset(PSGradientMode
Reset the gradient.