概要
方法
Clear():() |
代码示例
基本路径线框
local wireframe = script.Parent
-- 声明四个点在正方形的排列中
local pathArray = {
Vector3.new(-10, 10, 0),
Vector3.new(10, 10, 0),
Vector3.new(10, -10, 0),
Vector3.new(-10, -10, 0)
}
-- 将路径应用于装饰并闭合它(连接起始点和结束点)
wireframe:AddPath(pathArray, true)多彩线框
local wireframe = script.Parent
wireframe.Color3 = Color3.fromRGB(255, 0, 0) -- 将下一行设置为红色
wireframe:AddLine(Vector3.new(-10, 0, 0), Vector3.new(10, 0, 0))
wireframe.Color3 = Color3.fromRGB(0, 255, 0) -- 将下一行设置为绿色
wireframe:AddLine(Vector3.new(0, -10, 0), Vector3.new(0, 10, 0))
wireframe.Color3 = Color3.fromRGB(0, 0, 255) -- 将下一行设置为蓝色
wireframe:AddLine(Vector3.new(0, 0, -10), Vector3.new(0, 0, 10))API 参考
属性
方法
AddLine
返回
()
代码示例
多彩线框
local wireframe = script.Parent
wireframe.Color3 = Color3.fromRGB(255, 0, 0) -- 将下一行设置为红色
wireframe:AddLine(Vector3.new(-10, 0, 0), Vector3.new(10, 0, 0))
wireframe.Color3 = Color3.fromRGB(0, 255, 0) -- 将下一行设置为绿色
wireframe:AddLine(Vector3.new(0, -10, 0), Vector3.new(0, 10, 0))
wireframe.Color3 = Color3.fromRGB(0, 0, 255) -- 将下一行设置为蓝色
wireframe:AddLine(Vector3.new(0, 0, -10), Vector3.new(0, 0, 10))AddLines
参数
返回
()
代码示例
来自数组的轮廓线
local wireframe = script.Parent
local linesArray = {
Vector3.new(-10, 0, 0), -- 第一条线的起点
Vector3.new(10, 0, 0), -- 第一条线的终点
Vector3.new(0, -10, 0), -- 第二条线的起点
Vector3.new(0, 10, 0), -- 第二条线的终点
Vector3.new(0, 0, -10), -- 第三条线的起点
Vector3.new(0, 0, 10) -- 第三条线的终点
}
-- 将路径应用于装饰
wireframe:AddLines(linesArray)AddPath
返回
()
代码示例
基本路径线框
local wireframe = script.Parent
-- 声明四个点在正方形的排列中
local pathArray = {
Vector3.new(-10, 10, 0),
Vector3.new(10, 10, 0),
Vector3.new(10, -10, 0),
Vector3.new(-10, -10, 0)
}
-- 将路径应用于装饰并闭合它(连接起始点和结束点)
wireframe:AddPath(pathArray, true)AddText
Clear
WireframeHandleAdornment:Clear():()
返回
()