Draw calls only work inside an
on("render") listener. Anywhere else (a tick, a timer, after
an await) they throw. Queries (measureText, worldToScreen, screenTransform, boundsOf,
screenSize) work anywhere.Overview
Shapes
line, rect, circle, triangle, polyline and their filled versions.Text and images
text, measureText, image, fonts.Screen and projection
screenSize, worldToScreen, screenTransform, boundsOf.[x, y], { x, y } or a Vector2. Colors are
ColorLike and always required: "#ff4040", [255, 64, 64, 200], a Color
or a packed 0xAABBGGRR. The last argument is an optional options object.
Shapes
polyline needs at least 2 points, polygonFilled at least 3.
Text and images
text
text with its top-left corner at position. Non-strings go through String().
measureText
render.text covers with the same size and font.
image
min–max. Draws nothing until the texture is
ready. tint is multiplied with the texture.
Fonts
ESP text elements accept only the fonts marked in the second column.
Screen and projection
screenSize
render.screenSize.
worldToScreen
null when the point is behind the camera. Points off
to the side still project, to coordinates outside the screen.

screenTransform
worldToScreen, but in normalized device coordinates: -1..1 across the screen, y up.
null behind the camera.
boundsOf
null
when the entity is gone or has no bounds, or when any corner is behind the camera.
Example
Boxes and health bars for enemies. Logic on the tick, drawing inrender.