Core Concepts

Draw API

Draw shapes, lines, text, and textures in the 3D game world

Register a draw callback that runs every frame. The framework passes a draw object with methods for rendering shapes, text, and textures in the game world.

Basic Usage

local myDraw = synq.Draw(function(draw)
  draw:SetColor(255, 100, 100, 200)
  draw:SetWidth(2)
  draw:SetGlow(true)
  draw:Circle(px, py, pz, 8, 64)
  draw:SetGlow(false)
end)

Enable / Disable / Toggle

Control the draw callback at any time:

myDraw:Disable()  -- Stop rendering
myDraw:Enable()   -- Resume rendering
myDraw:Toggle()   -- Toggle on/off

Style Methods

MethodSignatureDescription
SetColor(r, g, b, a) / ("hex") / ({r,g,b}, a)Set color (0-255). Accepts hex strings
SetColorRaw(r, g, b, a)Set color (0-1 scale)
SetAlpha(a)Set alpha (0-255)
SetWidth(width)Set line thickness
SetGlow(enabled)Toggle glow bloom on lines/circles/arcs. Stateful

3D Primitives

MethodSignatureDescription
Line(x1, y1, z1, x2, y2, z2)3D world-space line
Circle(x, y, z, radius, steps)Circle outline
Arc(x, y, z, size, arcDeg, rotation)Arc segment
FilledCircle(x, y, z, radius)Solid circle
FilledArc(x, y, z, size, arcDeg, rotation)Solid arc
Rectangle(x, y, z, w, l, rot)Rectangle outline
FilledRectangle(x, y, z, w, l, rot)Solid rectangle
Cylinder(x, y, z, radius, height)3D cylinder
Triangle(x, y, z, v1, v2, v3, cull, wireframe)3D triangle
Outline(x, y, z, radius)Circle outline with border texture

2D Primitives

MethodSignatureDescription
Line2D(sx, sy, ex, ey)2D screen-space line

Text, Textures & Models

MethodSignatureDescription
Text(text, font, x, y, z)World-space text
Texture(config, x, y, z, alpha)World-space texture
Object(obj, x, y, z, scale)Wavefront OBJ model

Next: Learn about the Keybinding System for registering hotkeys in your routines.