Symmetry
Summary
Functions for controlling the mirror symmetry mode
Class Properties
Name | Return Type | Description |
---|---|---|
current | SymmetrySettings Read/Write | The current symmetry settings |
brushOffset | Vector3 Read-only | Gets the offset between the current brush position and the symmetry widget |
wandOffset | Vector3 Read-only | Gets the offset between the current wand position and the symmetry widget |
Class Methods
Symmetry:SummonWidget()
Moves the Symmetry Widget close to user
Returns: nil
Example
Symmetry:Ellipse(angle, minorRadius)
Returns the radius of an ellipse at a given angle
Returns: number
Parameters:
Name | Type | Default | Description |
---|---|---|---|
angle | number | The angle in degrees to sample the radius at | |
minorRadius | number | The minor radius of the ellipse (The major radius is always 1) |
Example
Symmetry:Square(angle)
Returns the radius of an square at a given angle
Returns: number
Parameters:
Name | Type | Default | Description |
---|---|---|---|
angle | number | The angle in degrees to sample the radius at |
Example
Symmetry:Superellipse(angle, n, a, b)
Returns the radius of a superellipse at a given angle
Returns: number
Parameters:
Name | Type | Default | Description |
---|---|---|---|
angle | number | The angle in degrees to sample the radius at | |
n | number | The exponent of the superellipse. This determines the roundness vs sharpness of the corners of the superellipse. For n = 2, you get an ellipse. As n increases, the shape becomes more rectangular with sharper corners. As n approaches infinity, the superellipse becomes a rectangle. If n is less than 1, the shape becomes a star with pointed tips. | |
a | number | 1 | The horizontal radius of the superellipse |
b | number | 1 | The vertical radius of the superellipse |
Example
Symmetry:Rsquare(angle, size, cornerRadius)
Returns the radius of a rounded square at a given angle
Returns: number
Parameters:
Name | Type | Default | Description |
---|---|---|---|
angle | number | The angle in degrees to sample the radius at | |
size | number | Half the length of a side or the distance from the center to any edge midpoint | |
cornerRadius | number | The radius of the rounded corners |
Example
Symmetry:Polygon(angle, numSides, radius)
Returns the radius of a polygon at a given angle
Returns: number
Parameters:
Name | Type | Default | Description |
---|---|---|---|
angle | number | The angle in degrees to sample the radius at | |
numSides | number | The number of sides of the polygon | |
radius | number | 1 | The distance from the center to any vertex |
Example
Symmetry:ClearColors()
Clears the list of symmetry pointer colors
Returns: nil
Example
Symmetry:AddColor(color)
Adds a color to the list of symmetry pointer colors
Returns: nil
Parameters:
Name | Type | Default | Description |
---|---|---|---|
color | The color to add |
Example
Symmetry:SetColors(colors)
Sets the list of symmetry pointer colors
Returns: nil
Parameters:
Name | Type | Default | Description |
---|---|---|---|
colors | Color[] | The list of colors to set |
Example
Symmetry:GetColors()
Gets the list of symmetry pointer colors
Returns: Color[]
Example
Symmetry:AddBrush(brush)
Adds a brush to the list of symmetry pointer brushes
Returns: nil
Parameters:
Name | Type | Default | Description |
---|---|---|---|
brush | string | The brush to add. Either the name or the GUID of the brush |
Example
Symmetry:ClearBrushes()
Clears the list of symmetry pointer brushes
Returns: nil
Example
Symmetry:SetBrushes(brushes)
Sets the list of symmetry pointer brushes
Returns: nil
Parameters:
Name | Type | Default | Description |
---|---|---|---|
brushes | string[] | The list of brushes to set. Either the names or the GUIDs of the brushes |
Example
Symmetry:GetBrushNames()
Gets the list of symmetry pointer brushes as brush names
Returns: string[]
Example
Symmetry:GetBrushGuids()
Gets the list of symmetry pointer brushes as brush GUIDs
Returns: string[]
Example
Symmetry:PathToPolar(path)
Converts a path to a format suitable for using as a symmetry path
Returns: Path
Parameters:
Name | Type | Default | Description |
---|---|---|---|
path | The path to convert |
Example
Last updated