# Two.Stop
Extends: Two.Element
# Constructor
Argument | Description |
---|---|
offset | The offset percentage of the stop represented as a zero-to-one value. Default value flip flops from zero-to-one as new stops are created. |
color | The color of the stop. Default value flip flops from white to black as new stops are created. |
opacity | The opacity value. Default value is 1, cannot be lower than 0. |
# Index
Two.Stop.Index
The current index being referenced for calculating a stop's default offset value.
# clone
Two.Stop.clone
Returns: Two.Stop
Argument | Description |
---|---|
parent | The parent gradient to add the clone to. |
Create a new instance of Two.Stop with the same properties of the current path.
# toObject
Two.Stop.toObject
Returns: Object
Return a JSON compatible plain object that represents the path.