Free GPU resources. Without an argument, everything the renderer created is freed and the renderer is unusable afterwards. With a geometry, material or texture, only that object's resources are freed; they are recreated on the next render if still in use.
Optionalobject: BufferGeometry | Texture | MaterialColor the frame is cleared to before drawing (default black)
Optionalalpha: numberDevice pixel ratio applied by setSize (default 1)
Resize the drawing surface in CSS pixels; pixelRatio is applied
A renderer draws a scene. The interface sits above the GPU API: it deals in scenes, cameras, meshes, materials and textures, not in buffers or programs, so a WebGPU implementation can live next to the WebGL2 one.
Scene objects are plain data. The renderer creates, caches and frees the GPU resources for them, and injects the built-in uniforms when a shader declares them: the matrices
modelMatrix,viewMatrix,projectionMatrix,modelViewMatrixandnormalMatrix, and the lights of the frame (ambientLightColor,directionalLight*,pointLight*).