Interface ThreeViewerOptions

Options for the ThreeViewer creation.

Hierarchy

  • ThreeViewerOptions

Properties

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.

Default

- false
isAntialiased?: boolean

Deprecated

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

Use MSAA.

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.

Default

true
useGBufferDepth?: boolean

Deprecated

use zPrepass instead

useRgbm?: boolean

Deprecated

use rgbm instead

zPrepass?: boolean

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

Generated using TypeDoc