Optional
assetOptions for the asset manager.
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
maxHDRIntensityOptional
maxMax render scale when set to 'auto'
Optional
msaaUse MSAA. Renders objects in a multi-sampled buffer.
Optional
onOptional
pluginsAdd initial plugins.
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
screenThe fragment shader snippet to render on screen.
Optional
tonemapTonemapPlugin is added to the viewer if this is true.
Optional
useGBufferuse 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.
todo fix: It should be disabled when there are any transparent/transmissive objects with render to depth buffer enabled, see forceZPrepass
Options for the ThreeViewer creation.