W-CF Documentation - v11.0.0
    Preparing search index...

    Interface AppInitOptions

    interface AppInitOptions {
        adaptToDeviceRatio: boolean;
        audioEngine: boolean;
        autoResizeViewer: boolean;
        disableWebGL2Support: boolean;
        hardwareAntialiasing: boolean;
        maximumDeviceRatio: number;
        powerPreference: WebGLPowerPreference;
        preserveDrawingBuffer: boolean;
        stencilBuffer: boolean;
    }
    Index
    adaptToDeviceRatio: boolean

    If enabled, the viewer will be adjust the rendering resolution to match the device pixel ratio.

    true
    
    audioEngine: boolean

    If enabled, the BabylonJs audio engine will be initialized.

    false
    
    autoResizeViewer: boolean

    If enabled, the viewer will be automatically resized. Viewer.resize() has to be called manually if disabled.

    true
    
    disableWebGL2Support: boolean

    Can be used to disable WebGL 2 and force the use of WebGL 1. Because the support for WebGL 2 is still buggy on some devices/browsers (e.g. IOS 15.0 or some low-end Android devices), it is recommended to enable WebGL 2 only on well known devices/browsers or to offer an option to the user where he can disable it in case of problems.

    true
    
    hardwareAntialiasing: boolean

    Enables hardware antialiasing if supported from the hardware. Note: Hardware antialiasing does not work in combination with post processing. If you want to use it you have to disable SSAO and FXAA.

    false
    
    maximumDeviceRatio: number

    Maximum device pixel ration used for rendering.

    2.0
    
    powerPreference: WebGLPowerPreference

    Defines the power preferences for WebGL

    high-performance

    preserveDrawingBuffer: boolean

    If enabled, allows direct capturing of the current frame from the rendering canvas. Has to be enabled if Viewer.createScreenshot() is used.

    true
    
    stencilBuffer: boolean

    Enables stencil buffer access.

    true