# basisInitialize

Function · category: Other

Source: https://github.com/playcanvas/engine/blob/f059dc005842f76e052cdf44d8370c8c7ec475ac/src/framework/handlers/basis.js#L268

```ts
basisInitialize(config?: object): void
```

Initialize the Basis transcode worker.

**Parameters**

- `config` (`object`, optional): The Basis configuration.
    - `config.eagerWorkers` (`boolean`, optional): Use eager workers (default is true). When enabled, jobs
      are assigned to workers immediately, independent of their work load. This can result in
      unbalanced workloads, however there is no delay between jobs. If disabled, new jobs are assigned
      to workers only when their previous job has completed. This will result in balanced workloads
      across workers, however workers can be idle for a short time between jobs.
    - `config.fallbackUrl` (`string`, optional): URL of the fallback script to use when wasm modules
      aren't supported.
    - `config.glueUrl` (`string`, optional): URL of glue script.
    - `config.lazyInit` (`boolean`, optional): Wait for first transcode request before initializing Basis
      (default is false). Otherwise initialize Basis immediately.
    - `config.maxRetries` (`number`, optional): Number of http load retry attempts. Defaults to 5.
    - `config.numWorkers` (`number`, optional): Number of workers to use for transcoding (default is 1).
      While it is possible to improve transcode performance using multiple workers, this will likely
      depend on the runtime platform. For example, desktop will likely benefit from more workers
      compared to mobile. Also keep in mind that it takes time to initialize workers and increasing
      this value could impact application startup time. Make sure to test your application performance
      on all target platforms when changing this parameter.
    - `config.rgbaPriority` (`string[]`, optional): Array of texture compression formats in priority order
      for textures with alpha. The supported compressed formats are: 'astc', 'atc', 'dxt', 'etc1',
      'etc2', 'pvr'.
    - `config.rgbPriority` (`string[]`, optional): Array of texture compression formats in priority order
      for textures without alpha. The supported compressed formats are: 'astc', 'atc', 'dxt', 'etc1',
      'etc2', 'pvr'.
    - `config.wasmUrl` (`string`, optional): URL of the wasm module.
