A WebGL-based rendering strategy for a Viewer.

See @xeokit/webglrenderer for usage.

Implements

Constructors

  • Creates a WebGLRenderer.

    Parameters

    • params: { textureTranscoder?: TextureTranscoder }

      Configs

      • OptionaltextureTranscoder?: TextureTranscoder

        Injects 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.

    Returns WebGLRenderer

Properties

renderContext: RenderContext
rendererObjects: { [key: string]: RendererObject }

Interfaces through which each !ViewObject | ViewObject shows/hides/highlights/selects/xrays/colorizes its SceneObject within the WebGLRenderer that's configured on its !Viewer | Viewer.

renderStats: RenderStats
tileManager: WebGLTileManager

Accessors

Methods

  • Internal

    Renders a frame for a View.

    Parameters

    • viewIndex: number

      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 webglrenderer!WebGLRenderer.attachView | Renderer.attachView}.

    • Optionalparams: { force: boolean; opaqueOnly: boolean }

    Returns void | SDKError

    SDKError

    • No View is currently attached to this Renderer.
    • Can't find a View attached to this Renderer with the given handle.

Events

onCompiled: EventEmitter<WebGLRenderer, boolean>
onDestroyed: EventEmitter<WebGLRenderer, boolean>