World renderer
renderFilled(object)
renderFilled(object)
Draws a 3D filled block.
Parameters:
object
(table (x, y, z, red, green, blue, alpha, through_walls))
Returns:
(boolean) Return true if successfully
Example Usage:
-- Example code showing how to use the function
registerWorldRenderer(function(context)
local filled = {
x = 0, y = 0, z = 0,
red = 255, green = 0, blue = 0, alpha = 140,
through_walls = false
}
context.renderFilled(filled)
end)

renderOutline(object)
renderOutline(object)
Draws a 3D outlined block.
Parameters:
object
(table (x, y, z, red, green, blue, alpha, through_walls))
Returns:
(boolean) Return true if successfully
Example Usage:
-- Example code showing how to use the function
registerWorldRenderer(function(context)
local outlined = {
x = 0, y = 0, z = 0,
red = 255, green = 0, blue = 0, alpha = 140,
through_walls = false
}
context.renderOutline(outlined)
end)

renderText(object)
renderText(object)
Draws a 3D text.
Parameters:
object
(table (x, y, z, red, green, blue, text, scale, through_walls))
Returns:
(boolean) Return true if successfully
Example Usage:
-- Example code showing how to use the function
registerWorldRenderer(function(context)
local text = {
x = 0.5, y = 0.5, z = 0.5,
red = 255, green = 0, blue = 0,
scale = 1,
text = "Text", through_walls = false
}
context.renderText(text)
end)

renderLinesFromPoints(object)
renderLinesFromPoints(object)
Draws a 3D line.
Parameters:
object
(table (red, green, blue, points))
Returns:
(boolean) Return true if successfully
Example Usage:
-- Example code showing how to use the function
registerWorldRenderer(function(context)
local line = {
points = {
[0] = { x = 0, y = 0, z = 0 },
[1] = { x = 0, y = 1, z = 0 }
},
red = 255, green = 0, blue = 0, alpha = 140,
line_width = 1, through_walls = true
}
context.renderLinesFromPoints(line)
end)

renderLineFromCursor(object)
renderLineFromCursor(object)
Draws a 3D line from cursor.
Parameters:
object
(table (x, y, z, line_width, red, green, blue))
Returns:
(boolean) Return true if successfully
Example Usage:
-- Example code showing how to use the function
registerWorldRenderer(function(context)
local line = {
x = 0.5, y = 0.5, z = 0.5,
red = 255, green = 0, blue = 0, alpha = 140,
line_width = 1
}
context.renderLineFromCursor(line)
end)

Last updated