# 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

The current index being referenced for calculating a stop's default offset value.

# Properties

A list of properties that are on every Two.Stop.

# offset

The offset percentage of the stop represented as a zero-to-one value.

# opacity

The alpha percentage of the stop represented as a zero-to-one value.

# color

The color of the stop.

# clone

Returns: Two.Stop

Argument Description
parent The parent group or scene to add the clone to.

Create a new instance of Two.Stop with the same properties of the current path.

# toObject

Returns: Object

Return a JSON compatible plain object that represents the path.