mwg API
    Preparing search index...

    Function downloadReplayFile

    • Saves a replay file locally: a Blob download, which works from a file:// page with no server and no fetch(). Nothing is read back; the file is the export.

      Parameters

      • json: string
      • filename: string

      Returns void

      import { downloadReplayFile, exportReplayFile } from '@datamoc/mwg/core';

      const json = exportReplayFile([], { framework: '0.26.1', game: 'my-game' });
      downloadReplayFile(json, 'run-1.mwgreplay.json');