Interface ThreeViewerOptions

Options for the ThreeViewer creation.


  • ThreeViewerOptions


assetManager?: AssetManagerOptions

Options for the asset manager.

canvas?: HTMLCanvasElement

The canvas element to use for rendering. Only one of container and canvas must be specified.

container?: HTMLElement

The container for the canvas. A new canvas will be created in this container. Only one of container and canvas must be specified.

debug?: boolean
dropzone?: boolean | DropzonePluginOptions

Add the dropzone plugin to the viewer, allowing to drag and drop files into the viewer over the canvas/container. Set to true/false to enable/disable the plugin, or pass options to configure the plugin. Assuming true if options are passed.


- false
isAntialiased?: boolean


use msaa instead

load?: {
    background?: null | string | ITexture | IAsset;
    environment?: null | string | ITexture | IAsset;
    src?: ValOrArr<null | string | IAsset>;

Type declaration

  • Optional background?: null | string | ITexture | IAsset

    Load background map

  • Optional environment?: null | string | ITexture | IAsset

    Load environment map

  • Optional src?: ValOrArr<null | string | IAsset>

    Load one or more source files

msaa?: boolean


onLoad?: ((results) => void)

Type declaration

    • (results): void
    • Parameters

      • results: any

      Returns void

Add initial plugins.

renderScale?: number
rgbm?: boolean

Use Uint8 RGBM HDR Render Pipeline. Provides better performance with post-processing. RenderManager Uses Half-float if set to false.

screenShader?: TViewerScreenShader

The fragment shader snippet to render on screen.

tonemap?: boolean

TonemapPlugin is added to the viewer if this is true.


useGBufferDepth?: boolean


use zPrepass instead

useRgbm?: boolean


use rgbm instead

zPrepass?: boolean

Use rendered gbuffer as depth-prepass / z-prepass.

Generated using TypeDoc