Functions for controlling the mirror symmetry mode
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 |
Moves the Symmetry Widget close to user
Returns: nil
Symmetry:SummonWidget()
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) |
for i = 0, 90 do
radius = Symmetry:Ellipse(i * 4, 0.5)
pointer = Transform:New(Symmetry.brushOffset:ScaleBy(radius, 1, radius))
pointers:Insert(pointer)
end
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 |
for i = 0, 90 do
radius = Symmetry:Square(i * 4)
pointer = Transform:New(Symmetry.brushOffset:ScaleBy(radius, 1, radius))
pointers:Insert(pointer)
end
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 |
for i = 0, 90 do
radius = Symmetry:Superellipse(i * 4, 2, 0.5, 0.5)
pointer = Transform:New(Symmetry.brushOffset:ScaleBy(radius, 1, radius))
pointers:Insert(pointer)
end
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 |
for i = 0, 90 do
radius = Symmetry:Rsquare(i * 4, 0.5, 0.1)
pointer = Transform:New(Symmetry.brushOffset:ScaleBy(radius, 1, radius))
pointers:Insert(pointer)
end
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 |
for i = 0, 90 do
radius = Symmetry:Polygon(i * 4, 5, 0.5)
pointer = Transform:New(Symmetry.brushOffset:ScaleBy(radius, 1, radius))
pointers:Insert(pointer)
end
Clears the list of symmetry pointer colors
Returns: nil
Symmetry:ClearColors()
Adds a color to the list of symmetry pointer colors
Returns: nil
Parameters:
Name | Type | Default | Description |
---|---|---|---|
color | Color | The color to add |
Symmetry:AddColor(Color.red)
Sets the list of symmetry pointer colors
Returns: nil
Parameters:
Name | Type | Default | Description |
---|---|---|---|
colors | Color[] | The list of colors to set |
Symmetry:SetColors({Color.red, Color.green, Color.blue})
Gets the list of symmetry pointer colors
Returns: Color[]
myColors = Symmetry:GetColors()
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 |
Symmetry:AddBrush("Ink")
Clears the list of symmetry pointer brushes
Returns: nil
Symmetry:ClearBrushes()
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 |
Symmetry:SetBrushes({"Ink", "Marker"})
Gets the list of symmetry pointer brushes as brush names
Returns: string[]
brushNames = Symmetry:GetBrushNames()
Gets the list of symmetry pointer brushes as brush GUIDs
Returns: string[]
brushGuids = Symmetry:GetBrushGuids()
Converts a path to a format suitable for using as a symmetry path
Returns: Path
Parameters:
Name | Type | Default | Description |
---|---|---|---|
path | Path | The path to convert |
pointers = Symmetry:PathToPolar(myPath):OnY()