Renderer

Reference

renderer.getWidth()

Get width of the output in pixels

Returns:

width

Return type:

number

renderer.getHeight()

Get height of the output in pixels

Returns:

height

Return type:

number

renderer.setBackgroundShaderUniform(name, value, type)

Sets a uniform value inside a background shader

Parameters:
  • name (str)

  • value (str)

  • type (str)

renderer.raycast(camera, x, y, findAll)

Tests which objects are at the specified pixel position on screen

Parameters:
  • camera (Camera) – the camera to use. If nil, the default active camera will be used

  • x (number) – x position

  • y (number) – y position

  • findAll (boolean) – set to true, to get all objects at the position, otherwise only the first is returned

Returns:

list of intersections with the ray if findAll is true or a single result or nil if nothing was found.

Return type:

table

Examples