Creates a WebGLRenderer.
Configs
OptionaltextureTranscoder?: TextureTranscoderInjects an optional transcoder that will be used internally
to convert transcoded texture data. The transcoder is only required when we'll be providing transcoded texture
data. We assume that all transcoded texture data added to a rendererModel
will then be in a format supported by this transcoder.
InternalrenderInternalrendererInterfaces through which each !ViewObject | ViewObject shows/hides/highlights/selects/xrays/colorizes its SceneObject within the WebGLRenderer that's configured on its !Viewer | Viewer.
InternalrenderInternaltileInternalGets the TextureTranscoder this WebGLRenderer was configured with, if any.
The Viewer this WebGLRenderer is currently attached to, if any.
InternalAttaches a SceneModel to this WebGLRenderer.
This method attaches various hooks to the elements within the SceneModel, through which they can upload state updates to the Renderer.
Then, when we make any state updates to those components, they will upload the updates into the Renderer.
You must first attach a View with Renderer.attachView before you can attach a SceneModel.
void
InternalAttaches a !View to this WebGLRenderer.
The WebGLRenderer will then begin rendering each SceneModel previously or subsequently created with Scene.createModel, for the new View.
You can only attach as many Views as indicated in Capabilities.maxViews, as returned by WebGLRenderer.getCapabilities.
The View to attach.
void
InternalInitializes this WebGLRenderer by attaching a !Viewer | Viewer.
Viewer to attach.
void
InternalBegins snapshot mode for the given View.
The View index. This matches !View.viewIndex | View.viewIndex on a View that is currently attached to this Renderer.
Optionalparams: { height: number; width: number }Snapshot configuration.
InternalClears this WebGLRenderer for the given view.
Handle to the View, returned earlier by Renderer.attachView.
void
InternalDetaches a SceneModel from this WebGLRenderer.
Detaches and destroys the scene!RendererModel, scene!RendererObject and scene!RendererMesh, scene!RendererTexture instances that were attached in webglrenderer!WebGLRenderer.attachSceneModel.
void
InternalDetaches the !Viewer | Viewer that is currently attached, if any.
void
Exits snapshot mode.
Switches rendering back to the main canvas.
InternalGets the capabilities of this WebGLRenderer.
Returns the capabilities of this WebGLRenderer.
InternalGets if a new frame needs to be rendered for the given View.
OptionalviewIndex: numberHandle to the View, returned earlier by Renderer.attachView.
boolean
InternalChecks if Screen Space Ambient Occlusion (SAO) is supported by this Renderer.
boolean indicating SAO support.
InternalTODO
InternalRetrieves an image of the snapshot canvas as a data URI.
The image data URI.
Returns an HTMLCanvasElement containing a snapshot image.
The snapshot canvas.
InternalRenders a frame for a View.
Handle to the View.
Optionalparams: { force?: boolean; opaqueOnly?: boolean }Optionalforce?: booleanTrue to force a render, else only render if needed.
OptionalopaqueOnly?: booleanInternalRenders a snapshot frame of the current scene state.
InternalSets whether the WebGLRenderer draws edges. Triggers a new frame render.
InternalIndicates that the WebGLRenderer needs to draw a new frame.
OptionalviewIndex: numberInternalTriggers a rebuild of the shaders within this WebGLRenderer for the given View.
OptionalviewIndex: numberHandle to the View, returned earlier by Renderer.attachView.
void
InternalSets whether the WebGLRenderer draws with physically-based rendering. Triggers a new frame render.
InternalSets whether the WebGLRenderer draws with SAO. Triggers a new frame render.
InternalEnable/disable rendering of transparent objects for the given View.
Handle to the View, returned earlier by Renderer.attachView.
Whether to enable or disable transparent objects for the View.
void
WebGL rendering strategy for a Viewer.
See @xeokit/webglrenderer for usage.