---
url: https://cri-middleware.github.io/SSPlayerForWeb/api/@spritestudio/ssconverter-core/functions/init.md
---
# Function: init()

> **init**(`source?`): `Promise`<[`InitOutput`](../interfaces/InitOutput.md)>

Defined in: [src/index.ts:23](https://github.com/cri-middleware/SSPlayerForWeb/blob/eb9d544908210befb40d3729ed6fde7adc44f61a/packages/ssconverter-core/src/index.ts#L23)

Initialize the bundled `ssconverter` WebAssembly module. Call once before
[convertProject](convertProject.md).

The host supplies the wasm source: a `URL`/`Response` (browser fetch), a
`BufferSource` of the wasm bytes (Node — read the file yourself), or a
precompiled `WebAssembly.Module`. This core is environment-agnostic — it
touches neither the filesystem nor the DOM.

## Parameters

### source?

[`InitInput`](../type-aliases/InitInput.md) | `Promise`<[`InitInput`](../type-aliases/InitInput.md)>

## Returns

`Promise`<[`InitOutput`](../interfaces/InitOutput.md)>
