Class
WireframeHandleAdornment
Renders a wireframe adornment consisting of one or more lines onto a
BasePart (including Terrain) or into the Workspace.
WireframeHandleAdornment renders a wireframe adornment consisting of one or
more lines onto a BasePart (including Terrain) or into the
Workspace. If parented to a player's PlayerGui or the
CoreGui, this adornment can listen to input events for purposes such
as making dragger tools.
Note that a WireframeHandleAdornment instance begins empty and you must
add lines or paths to it through methods like
AddLines() or
AddPath().
The rendered wireframe can be customized visually through its
Thickness,
Color3, and
Transparency properties,
although these properties only affect subsequent draws and do not update lines
already drawn into the adornment.
Properties 2#
ScaleVector3 | The XYZ scale of the wireframe adornment.ReadSafe |
Thicknessfloat | Thickness of the wireframe adornment's lines in pixels.ReadSafe |
Scale: Vector3#
ReadSafe
This property specifies the XYZ scale of the wireframe adornment as a
Vector3. For example, a scale of
Datatype.Vector3.new(1, 2, 1) will scale the adornment twice its normal
size on the Y axis while keeping the X and Z axes unchanged.
Thickness: float#
ReadSafe
This property determines the thickness of the wireframe adornment's lines in pixels. Note that this visual thickness does not change relative to the adornment's distance from the viewer's camera.
Methods 5#
| AddLine | Adds a line to the wireframe adornment from a starting point to an ending
point relative to the center of the
Adornee. |
| AddLines | Adds one or more lines to the wireframe adornment using an array. |
| AddPath | Adds multiple line segments to the wireframe adornment in a sequence from point to point. |
| AddText | Adds a text label to the wireframe adornment. |
| Clear | Instantly clears all lines and text in the wireframe adornment. |
AddLine(from: Vector3, to: Vector3): ()#
This method adds a line to the wireframe adornment from a starting point
to an ending point, both defined as a Vector3 relative to the
center of the Adornee.
Note that you can make a multicolor wireframe by changing the adornment's
Color3 property before new lines
are drawn via AddLine(), as
demonstrated in the following code sample.
Returns
()
AddLines(points: Array): ()#
This method adds one or more lines of the current
Color3 color to the wireframe
adornment using an array. Each pair of Vector3 points in the
array acts as a starting point and ending point for a line, relative to
the center of the Adornee.
Note that lines are rendered independently and their ending points are not
connected to the starting point of any other line. To connect multiple
line segments in a sequence from point to point, see
AddPath().
| Name | Type | Default | Description |
|---|---|---|---|
points | Array | Array of Vector3 points in which each pair acts as a
starting point and ending point for a line. |
Returns
()
AddPath(points: Array, loop: boolean): ()#
This method adds multiple line segments of the current
Color3 color to the wireframe
adornment in a sequence from point to point. The path can be closed
(ending point connected to starting point) by setting the loop parameter
to true.
| Name | Type | Default | Description |
|---|---|---|---|
points | Array | Array of Vector3 points to connect in sequence with line
segments. | |
loop | boolean | Whether the path is closed by connecting its ending point to its starting point with an additional line. |
Returns
()
AddText(point: Vector3, text: string, size: int = 12): ()#
Adds a text label to the wireframe adornment at a Vector3 point
relative to the center of the
Adornee. You can adjust the size
of the text through the size parameter, and the label renders in the
current Color3 color.
| Name | Type | Default | Description |
|---|---|---|---|
point | Vector3 | Position of the text in the adornment. | |
text | string | String to display. | |
size | int | 12 | Size of the text. |
Returns
()
Clear(): ()#
Instantly clears all lines and text in the wireframe adornment.
Returns
()
Inherited members#
Inherited from HandleAdornment 9
Properties (5)
AdornCullingMode, AlwaysOnTop, CFrame, SizeRelativeOffset, ZIndex
Events (4)
Inherited from PVAdornment 1
Properties (1)
Inherited from GuiBase3d 4
Properties (4)
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