Renderer
The Renderer module manages graphical output in the engine, allowing developers to control visual effects, update shader parameters, and detect interactions between user input or events and in-game objects.and interaction detection within the engine.
Usage
To use this module, add the following require at the top of your script:
Reference
__setData
Parameters
data
getWidth
Get width of the output in pixels
Returns
number
getHeight
Get height of the output in pixels
Returns
number
setBackgroundShaderUniform
Sets a uniform value inside a background shader
Parameters
name(string)value(string)
raycast
Tests which objects are at the specified pixel position on screen
Parameters
camera(Camera): the camera to use. If nil, the main camera of the scene will be used. if that does not exist, the first found camera will be used. If no camera exists at all, the function will throw an errorx(number): x positiony(number): y positionfindAll(boolean): set to true, to get all objects at the position, otherwise only the first is returned
Returns
table: of intersections with the ray if findAll is true or a single result or nil if nothing was found.