RD.Renderer Class
Renderer in charge of rendering a Scene Valid options: all LiteGL context creation options (canvas, WebGL Flags, etc), plus: assets_folder, autoload_assets, shaders_file
Constructor
RD.Renderer
()
Item Index
Methods
clear
-
color
clear color and depth buffer
Parameters:
-
color
Vec4clear color
loadMesh
-
name
-
on_complete
Loads one mesh and stores inside the meshes object to be reused in the future, if it is already loaded it skips the loading
Parameters:
-
name
Stringname (and url) of the mesh
-
on_complete
Functioncallback
loadShaders
-
url
-
on_complete
Loads a shaders file in the Atlas file format (check GL.loadFileAtlas in litegl)
Parameters:
-
url
Stringurl to text file containing all the shader files
-
on_complete
Functioncallback
loadTexture
-
name
-
options
-
on_complete
Loads one texture and stores inside the textures object to be reused in the future, if it is already loaded it skips the loading
Parameters:
-
name
Stringname (and url) of the texture
-
options
Objecttexture options as in litegl (option.name is used to store it with a different name)
-
on_complete
Functioncallback
render
-
scene
-
camera
-
nodes
renders once scene from one camera
setDataFolder
-
path
whats the data folder where all data should be fetch
Parameters:
-
path
String
Properties
meshes
Object
container with all the registered meshes (same as gl.meshes)
shaders
Object
container with all the registered shaders (same as gl.shaders)
textures
Object
container with all the registered textures (same as gl.textures)