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:
-
colorVec4clear 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:
-
nameStringname (and url) of the mesh
-
on_completeFunctioncallback
loadShaders
-
url -
on_complete
Loads a shaders file in the Atlas file format (check GL.loadFileAtlas in litegl)
Parameters:
-
urlStringurl to text file containing all the shader files
-
on_completeFunctioncallback
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:
-
nameStringname (and url) of the texture
-
optionsObjecttexture options as in litegl (option.name is used to store it with a different name)
-
on_completeFunctioncallback
render
-
scene -
camera -
nodes
renders once scene from one camera
setDataFolder
-
path
whats the data folder where all data should be fetch
Parameters:
-
pathString
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)
