Yuari
Documentation
Docs/DrawingImmediate/DrawingImmediate.Triangle

DrawingImmediate.Triangle

Draws triangles.

Syntax

DrawingImmediate.Triangle(a: any, b: any, c: any, color: Color3, filled?: any, thickness?: number) -> nil

Parameters

ParameterTypeDescription
aanyThe a value used by the call.
banyThe b value used by the call.
canyThe c value used by the call.
colorColor3The color value used by the call.
filled?anyThe filled value used by the call.
thickness?numberThe thickness value used by the call.

Returns

TypeDescription
nilThis function does not return a value.

Description

DrawingImmediate.Triangle is part of the DrawingImmediate library. Immediate drawing runs inside a paint callback registered with DrawingImmediate.GetPaint(); primitives are emitted for the current frame only.

The operation is performed immediately using the arguments supplied at the call site.

The aliases FilledTriangle(a, b, c, color) resolve to the same implementation.

Example

-- inside a DrawingImmediate.GetPaint():Connect callback
DrawingImmediate.Triangle(Vector2.new(100, 100), Vector2.new(160, 100), Vector2.new(130, 150), Color3.new(1, 1, 1), false, 2)
DrawingImmediate.FilledTriangle(Vector2.new(200, 100), Vector2.new(260, 100), Vector2.new(230, 150), Color3.new(1, 0, 0))

Notes

  • Aliases: FilledTriangle(a, b, c, color).
  • Draw calls must run inside a callback registered with DrawingImmediate.GetPaint().