概要
方法
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():()
返回
()