@audiotool/nexus - v0.0.17
    Preparing search index...

    Function createOfflineDocument

    • Create a nexus document that is not synced to the backend; all changes are discarded on reload/shutdown.

      The returned document is ready to be modified immediately and can be thrown away without calling start/stop.

      To create a document that is synced with a state from the backend/DAW, use AudiotoolClient.open.

      Parameters

      • Optionalopts: { validated?: boolean; wasm?: WasmLoader }
        • Optionalvalidated?: boolean

          Whether validation is enabled. Turning that off results in fewer transaction errors, but can lead to invalid states.

        • Optionalwasm?: WasmLoader

          WASM loader to use for loading the validator.

          • Browser: uses fetch-based loader by default (no need to specify)
          • Node.js/Bun/Deno: use createDiskWasmLoader() from @audiotool/nexus/node

      Returns Promise<OfflineDocument>

      // Browser - uses fetch-based WASM loader by default
      const doc = await createOfflineDocument()

      // Node.js/Bun/Deno - use disk-based WASM loader
      import { createDiskWasmLoader } from "@audiotool/nexus/node"
      const doc = await createOfflineDocument({ wasm: createDiskWasmLoader() })