» Back To Index
Demoniak3D/LUA API: lens flares library
The
HYP_LensFlares mamages the lens flares system.
HYP_LensFlares.Init
HYP_LensFlares.Deinit
HYP_LensFlares.AddFlare
HYP_LensFlares.AddFlaresSource
HYP_LensFlares.SetIntensityFactor
Init
Init allows to init the lens flares system.
Syntax
HYP_LensFlares.Init();
Deinit
Deinit allows to stop lens flares system.
Syntax
HYP_LensFlares.Deinit();
AddFlare
AddFlare allows to add a flare.
Syntax
HYP_LensFlares.AddFlare( texture_name|tid, size, position, r, g, b, a);
- texture_name - [STR127] - name of the flare's texture.
- tid - [INTEGER] - identifier of the flare's texture.
- size - [REAL] - flare size factor.
- position - [REAL] - flare relative position. 0.0 sets the flare at the screen center, -1.0 sets the flare on the light source.
- r, g, b, a - [REAL] - flare's color.
AddFlaresSource
AddFlaresSource allows to add a light source for flares generation.
Syntax
HYP_LensFlares.AddFlaresSource( name|tid);
- name - [STR127] - light source name.
- tid - [INTEGER] - light source identifier.
SetIntensityFactor
SetIntensityFactor allows to set the flares's intensity factor. Usually, this factor is set to screenWidth/2.
Syntax
HYP_LensFlares.SetIntensityFactor( factor );
- factor - [REAL] - intensity factor