Fields
type
Methods
__len
moveTo: 1 pointlineTo: 1 pointquadTo: 2 pointscubicTo: 3 pointsclose: 0 points
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
typelocal path = Path.new()
path:moveTo(Vector.xy(0, 0))
path:lineTo(Vector.xy(10, 0))
for i, command in ipairs(path) do
print(i, command.type)
end
-- 1 moveTo
-- 2 lineTo
__len__len() -> number
moveTo: 1 pointlineTo: 1 pointquadTo: 2 pointscubicTo: 3 pointsclose: 0 pointslocal path = Path.new()
path:moveTo(Vector.xy(0, 0))
path:cubicTo(
Vector.xy(25, -40),
Vector.xy(75, 40),
Vector.xy(100, 0)
)
local command = path[2]
print(command.type) -- cubicTo
print(#command) -- 3
local count = #command
Was this page helpful?