Class
CompositeValueCurve
An animation curve that groups child FloatCurves which each
animate a different component of a non-unary value.
An animation curve that groups child FloatCurves which each
animate a different component of a non-unary value. The
CurveType property specifies the type of
value to be animated and, depending on this value, differently named children
are used to drive the animation of the components of the value.
As follows are the names of the child curves that drive the animation for each
possible CompositeValueCurveType value for
CurveType:
ColorRGB: {"R","G","B"}ColorHSV: {"H","S","V"}NumberRange: {"Min","Max"}Rect: {"MinX","MaxX","MinY","MaxY"}UDim: {"Scale","Offset"}UDim2: {"ScaleX","OffsetX","ScaleY","OffsetY"}Vector2: {"X","Y"}Vector3: {"X","Y","Z"}
The children that drive the animation can be accessed via the
GetComponentCurves() method
which returns an array of curves in the order specified above. The value of
the curve at a given time in the animation may be sampled by the
GetValueAtTime() method.
Properties 1#
CurveTypeCompositeValueCurveType | The type of value animated by this CompositeValueCurve.ReadSafe |
CurveType: CompositeValueCurveType#
ReadSafe
The type of value animated by this CompositeValueCurve. See
CompositeValueCurveType for options.
Methods 2#
| GetComponentCurves | Returns the child curves with the given names for the
CurveType of this
CompositeValueCurve. |
| GetValueAtTime | Returns the sampled animated value at the passed time argument. |
GetComponentCurves(): List<FloatCurve>#
This method returns the child curves with the given names for the
CurveType of this
CompositeValueCurve, in the order given by the list of child
curves outlined at the top of this page. Any curve that does not exist
prior to calling this method will be created and added as a child with the
appropriate name. That new curve will be an empty FloatCurve.
Returns
List<FloatCurve>— An array of the childFloatCurveinstances that drive the components of the animated value, in the order listed at the top of this page. Any expected child curve that does not yet exist is created as an emptyFloatCurveand included in the result.
GetValueAtTime(time: float): Variant#
This method returns the sampled animated value at the passed time
argument. The type of the returned value will match that specified by the
CurveType property.
If any child curve is missing from the children of the curve, the
corresponding value in the returned property will be 0. For example, if
a curve has a CurveType of
CompositeValueCurveType.ColorRGB but only one FloatCurve
child named "G", then the returned FloatCurve will have values
of 0 for "R" and "B", but the "G" value will be sampled from the
child curve.
| Name | Type | Default | Description |
|---|---|---|---|
time | float | Time at which to get the value. |
Returns
Variant— The value of the curve at the passed time.
Inherited members#
Inherited from Instance 58
Properties (10)
Archivable, archivable, Capabilities, IsInSandbox, Name, Parent, PredictionMode, RobloxLocked, Sandboxed, UniqueId
Methods (39)
AddTag, children, ClearAllChildren, Clone, clone, Destroy, destroy, FindFirstAncestor, FindFirstAncestorOfClass, FindFirstAncestorWhichIsA, FindFirstChild, findFirstChild, FindFirstChildOfClass, FindFirstChildWhichIsA, FindFirstDescendant, GetActor, GetAttribute, GetAttributeChangedSignal, GetAttributes, GetChildren, getChildren, GetDebugId, GetDescendants, GetFullName, GetStyled, GetStyledPropertyChangedSignal, GetTags, HasTag, IsAncestorOf, IsDescendantOf, isDescendantOf, IsPropertyModified, QueryDescendants, Remove, remove, RemoveTag, ResetPropertyToDefault, SetAttribute, WaitForChild