Shape-narrow a Renderer to THREE.WebGLRenderer. Used in
createRendererCapabilities to gate raw-GL probes. The check
is structural rather than instanceof so we don't have to
runtime-import WebGPURenderer just to type-test against it
(the import would force eager loading of three/webgpu even
when WebGL is the active backend).
Uses the positive isWebGLRenderer flag that
THREE.WebGLRenderer's constructor sets on this. A negative
check (!isWebGPURenderer) would mis-identify any future
renderer type that doesn't carry the WebGPU flag. Probing for
.getContext would mis-identify a WebGPURenderer running on
its internal WebGL2 fallback because that path's getContext()
also delegates to a WebGL2 context.
Shape-narrow a
RenderertoTHREE.WebGLRenderer. Used increateRendererCapabilitiesto gate raw-GL probes. The check is structural rather thaninstanceofso we don't have to runtime-importWebGPURendererjust to type-test against it (the import would force eager loading ofthree/webgpueven when WebGL is the active backend).Uses the positive
isWebGLRendererflag thatTHREE.WebGLRenderer's constructor sets onthis. A negative check (!isWebGPURenderer) would mis-identify any future renderer type that doesn't carry the WebGPU flag. Probing for.getContextwould mis-identify aWebGPURendererrunning on its internal WebGL2 fallback because that path'sgetContext()also delegates to a WebGL2 context.