Optional
assetOptions for the asset manager.
Optional
cacheBy 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.
Optional
cameraOptional
canvasThe canvas element to use for rendering. Only one of container and canvas must be specified.
Optional
containerThe container for the canvas. A new canvas will be created in this container. Only one of container and canvas must be specified.
Optional
debugOptional
dropzoneAdd 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.
Optional
isuse msaa instead
Optional
loadOptional
background?: null | string | ITexture<TextureEventMap> | IAssetLoad background map
Optional
environment?: null | string | ITexture<TextureEventMap> | IAssetLoad environment map
Optional
src?: ValOrArr<null | string | IAsset>Load one or more source files
Optional
maxMax HDR intensity for rendering and post-processing. Values above this might be clamped during post-processing.
Optional
maxMax render scale when set to 'auto'
Optional
modelModel Root Scale
Optional
msaaUse MSAA. Renders objects in a multi-sampled buffer.
Optional
onOptional
pluginsAdd initial plugins.
Optional
powerPower preference for the WebGL context.
Optional
renderRender 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.
Optional
rgbmUse Uint8 RGBM HDR Render Pipeline. Provides better performance with post-processing. RenderManager Uses Half-float if set to false.
Optional
rootOptional
screenThe fragment shader snippet to render on screen.
Optional
stencilEnable stencil in renderer and stencilBuffer in composer render targets.
Optional
stopIf 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.
Optional
tonemapTonemapPlugin is added to the viewer if this is true.
Optional
useuse zPrepass instead
Optional
useuse rgbm instead
Optional
zUse 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.