OptionalassetOptions for the asset manager.
OptionalbackgroundDefault Background color of the scene. To set the background texture/map, use ThreeViewerOptions.load.background or setBackgroundMap
OptionalcacheBy default, all imported assets are cached in memory, so that calling import/load would return the same instance of an asset if the same source and options is passed again.
Set this to false to disable this caching.
OptionalcameraOptionalcanvasThe canvas element to use for rendering. Only one of container and canvas must be specified.
OptionalcontainerThe container for the canvas. A new canvas will be created in this container. Only one of container and canvas must be specified.
OptionaldebugOptionaldropzoneAdd 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.
Optionalisuse msaa instead
OptionalloadOptionalbackground?: null | string | ITexture<TextureEventMap> | IAssetLoad background map
Optionalenvironment?: null | string | ITexture<TextureEventMap> | IAssetLoad environment map
Optionalsrc?: ValOrArr<null | string | IAsset>Load one or more source files
OptionalmaxMax HDR intensity for rendering and post-processing. Values above this might be clamped during post-processing.
OptionalmaxMax render scale when set to 'auto'
OptionalmodelModel Root Scale
OptionalmsaaUse MSAA. Renders objects in a multi-sampled buffer.
OptionalonOptionalpluginsAdd initial plugins.
OptionalpowerPower preference for the WebGL context.
OptionalrenderRender scale, 1 = full resolution, 0.5 = half resolution, 2 = double resolution.
Same as pixelRatio in three.js
Can be set to window.devicePixelRatio to render at device resolution in browsers.
An optimal value is Math.min(2, window.devicePixelRatio) to prevent issues on mobile. This is set when 'auto' is passed.
OptionalrgbmUse Uint8 RGBM HDR Render Pipeline. Provides better performance with post-processing. RenderManager Uses Half-float if set to false.
OptionalrootOptionalscreenThe fragment shader snippet to render on screen.
OptionalstencilEnable stencil in renderer and stencilBuffer in composer render targets.
OptionalstopIf true, will stop event propagation on all pointer events on the viewer container (when camera interactions are enabled).
Set this to true when the viewer is inside a carousel or similar component that might interfere with pointer events.
OptionaltonemapTonemapPlugin is added to the viewer if this is true.
Optionaluseuse zPrepass instead
Optionaluseuse rgbm instead
OptionalzUse rendered gbuffer as depth-prepass / z-prepass. (Requires DepthBufferPlugin/GBufferPlugin). Set it to true if you only have opaque objects in the scene to get better performance.
Options for the ThreeViewer creation.