clear color and depth at the start of every render (default true)
Free GPU resources. Without an argument, everything the renderer created is deleted and the context is lost; the renderer is unusable afterwards. With a geometry, material, texture or render target, only that object's resources are freed. It is recreated on the next render if still in use.
Optionalobject: BufferGeometry | Texture | RenderTarget | MaterialRender a scene: update the world matrices, then draw every visible mesh in depth-first order. Resources for geometries, materials and textures are created on first use and reused afterwards.
the scene graph
the camera providing view and projection matrices
Optionaltarget: RenderTarget
draw into this render target instead of the canvas
this instance
Set the color the frame is cleared to (black by default).
a Color or a hex string like '#202020'
Optionalalpha: number
overrides the color's alpha if given
Device pixel ratio applied by setSize (default 1)
Resize the drawing surface in CSS pixels; pixelRatio is applied
WebGL2 renderer. Owns every GPU resource: programs (one per distinct pair of shader sources, shared by the materials using them), vertex array objects and buffers (one set per geometry) and textures. Scene objects stay plain data and can be shared between meshes freely. Materials need a
glslshader source pair.Shaders can declare the built-in uniforms
modelMatrix,viewMatrix,projectionMatrix,modelViewMatrix(mat4) andnormalMatrix(mat3); they are set per mesh from the scene graph and the camera, unless the material defines a uniform of the same name. The same goes for the lights of the frame, in view space with colours premultiplied by intensity:ambientLightColor(vec3),directionalLightDirections[]anddirectionalLightColors[](vec3 arrays) withdirectionalLightCount(int), andpointLightPositions[],pointLightColors[](vec3 arrays),pointLightRanges[](float array) withpointLightCount. The array lengths are the shader's choice; lights beyond them are dropped. See LightUniforms.