Creates a WebGLRenderer.
Configs
Optional
textureInjects an optional transcoder that will be used internally by rendererModel.createTexture
to convert transcoded texture data. The transcoder is only required when we'll be providing transcoded data
to rendererModel.createTexture. We assume that all transcoded texture data added to a rendererModel
will then be in a format supported by this transcoder.
Internal
renderInternal
rendererInterfaces through which each ViewObject shows/hides/highlights/selects/xrays/colorizes its SceneObject within the WebGLRenderer that's configured on its Viewer.
Internal
tileInternal
Gets the TextureTranscoder this WebGLRenderer was configured with, if any.
The Viewer this WebGLRenderer is currently attached to, if any.
Internal
Attaches 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
Internal
Attaches a @xeokit/viewer!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 Renderer.getCapabilities.
You must attach a View before you can attach a SceneModel.
The View to attach.
void
Internal
Initializes this WebGLRenderer by attaching a Viewer.
Viewer to attach.
void
Internal
Clears this WebGLRenderer for the given view.
Handle to the View, returned earlier by Renderer.attachView.
void
Internal
Detaches a SceneModel from this WebGLRenderer.
Detaches and destroys the @xeokit/scene!RendererModel, @xeokit/scene!RendererObject and @xeokit/scene!RendererMesh, @xeokit/scene!RendererTexture instances that were attached in @xeokit/webglrenderer!WebGLRenderer.attachSceneModel.
void
Internal
Detaches the given @xeokit/viewer!View from this Renderer.
The Renderer will then cease rendering for that View.
The View to detach.
void
Internal
Detaches the Viewer that is currently attached, if any.
void
Internal
Gets if a new frame needs to be rendered for the given View.
Optional
viewIndex: numberHandle to the View, returned earlier by Renderer.attachView.
boolean
Internal
Renders a frame for a View.
Handle to the View, returned earlier by {@param params Rendering params. @param [params.force=false] True to force a render, else only render if needed. @link @xeokit/webglrenderer!WebGLRenderer.attachView | Renderer.attachView}.
Optional
params: { Internal
Triggers a rebuild of the shaders within this WebGLRenderer for the given View.
Optional
viewIndex: numberHandle to the View, returned earlier by Renderer.attachView.
void
Internal
Enable/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
Readonly
Internal
onReadonly
Internal
on
A WebGL-based rendering strategy for a Viewer.
See @xeokit/webglrenderer for usage.