Dev - Lua Libraries

Lua Command: s3sprite.setBrightness

Parameters

Return Values

void

- no return values

Signature

s3sprite.setBrightness(float brightness, bool recursive = false)

Description

Changes the brightness of a sprite. brightness ranges from 0.0 (dark) to 1.0 (bright). Internally this is equal to s3sprite.setColor with red, green and blue parameters all set to brightness*255.

You can also change the brightness of all children of the sprite by setting recursive to true. By default no children will be changed.

Warning:

Using this command may actually change the color and not just the brightness in case it is used with a sprite which does not use a shade of gray as color!