VectorComposite.GradientKind
EnumThe kind of a built VectorGradient.
- Snapchat: not supported
- SPECS: fully supported
- Camera Kit Web: not supported
- Camera Kit Mobile: not supported
- SnapchatNot supported — Available on SPECS only
- SPECSFully supported
- Camera Kit WebNot supported — Available on SPECS only
- Camera Kit MobileNot supported — Available on SPECS only
Since Lens Scripting v370
The kind of a built VectorGradient. Reported by VectorGradient#kind.
Index
Example
var gb = VectorGradientBuilder.radial(new vec2(64, 64), 64);
gb.addColorStop(0.0, new vec4(1, 1, 1, 1));
gb.addColorStop(1.0, new vec4(0, 0, 0, 1));
var gradient = gb.build();
if (gradient.kind === VectorComposite.GradientKind.Radial) {
print("built a radial gradient");
}
Enumeration Members
Linear
Linear:
number
SPECS
A linear gradient — color interpolated along the line from a start point to an end point. Created with VectorGradientBuilder.linear.
Since
Lens Scripting Version 370
Radial
Radial:
number
SPECS
A radial gradient — color interpolated outward from a center to a radius, with an optional focal point. Created with VectorGradientBuilder.radial.
Since
Lens Scripting Version 370