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.
file://
fetch()
import { downloadReplayFile, exportReplayFile } from '@datamoc/mwg/core';const json = exportReplayFile([], { framework: '0.26.1', game: 'my-game' });downloadReplayFile(json, 'run-1.mwgreplay.json'); Copy
import { downloadReplayFile, exportReplayFile } from '@datamoc/mwg/core';const json = exportReplayFile([], { framework: '0.26.1', game: 'my-game' });downloadReplayFile(json, 'run-1.mwgreplay.json');
Saves a replay file locally: a Blob download, which works from a
file://page with no server and nofetch(). Nothing is read back; the file is the export.