ThorVG WebCanvas API - v1.1.4
    Preparing search index...

    Interface InitOptions

    interface InitOptions {
        locateFile?: (path: string) => string;
        renderer?: constants.RendererType;
        onError?: ErrorHandler;
        threads?: number;
    }
    Index
    locateFile?: (path: string) => string

    Optional function to locate WASM files. If not provided, assumes WASM files are in the same directory as the JavaScript bundle.

    Renderer type: 'sw' (Software), 'gl' (WebGL), or 'wg' (WebGPU). Default: 'gl'. WebGPU provides best performance but requires Chrome 113+ or Edge 113+.

    onError?: ErrorHandler

    Global error handler for all ThorVG operations. If provided, errors will be passed to this handler instead of being thrown.

    threads?: number

    Number of worker threads count. Ignored in default preset. Default: 0.