async saveProjectSb3 () {
        const soundDescs = serializeSounds(this.runtime);
        const costumeDescs = serializeCostumes(this.runtime);
        const projectJson = this.toJSON();

        // TODO want to eventually move zip creation out of here, and perhaps
        // into scratch-storage
        const zip = new JSZip();

        // Put everything in a zip file
        zip.file('project.json', projectJson);

        this._addFileDescsToZip(await timeline.exportSnapshots(this.runtime), zip);
        const timelineJson = timeline.export();
        zip.file(timeline.fileName, timelineJson);

        this._addFileDescsToZip(soundDescs.concat(costumeDescs), zip);

        return zip.generateAsync({
            type: 'blob',
            mimeType: 'application/x.scratch.sb3',
            compression: 'DEFLATE',
            compressionOptions: {
                level: 6 // Tradeoff between best speed (1) and best compression (9)
            }
        });
    }
/**
     * @returns {string} Project in a Scratch 3.0 JSON representation.
     */
@returns {string} Project in a Scratch 3.0 JSON representation.
@returns { string } Project in a Scratch 3 . 0 JSON representation .
async saveProjectSb3 () {
        const soundDescs = serializeSounds(this.runtime);
        const costumeDescs = serializeCostumes(this.runtime);
        const projectJson = this.toJSON();
        const zip = new JSZip();
        zip.file('project.json', projectJson);
        this._addFileDescsToZip(await timeline.exportSnapshots(this.runtime), zip);
        const timelineJson = timeline.export();
        zip.file(timeline.fileName, timelineJson);
        this._addFileDescsToZip(soundDescs.concat(costumeDescs), zip);
        return zip.generateAsync({
            type: 'blob',
            mimeType: 'application/x.scratch.sb3',
            compression: 'DEFLATE',
            compressionOptions: {
                level: 6 
            }
        });
    }
async saveProjectSb3 ( ) { const soundDescs = serializeSounds ( this . runtime ) ; const costumeDescs = serializeCostumes ( this . runtime ) ; const projectJson = this . toJSON ( ) ; const zip = new JSZip ( ) ; zip . file ( 'project.json' , projectJson ) ; this . _addFileDescsToZip ( await timeline . exportSnapshots ( this . runtime ) , zip ) ; const timelineJson = timeline . export ( ) ; zip . file ( timeline . fileName , timelineJson ) ; this . _addFileDescsToZip ( soundDescs . concat ( costumeDescs ) , zip ) ; return zip . generateAsync ( { type : 'blob' , mimeType : 'application/x.scratch.sb3' , compression : 'DEFLATE' , compressionOptions : { level : 6 } } ) ; }
@returns {string} Project in a Scratch 3.0 JSON representation.
@returns { string } Project in a Scratch 3 . 0 JSON representation .
// TODO want to eventually move zip creation out of here, and perhaps // into scratch-storage // Put everything in a zip file // Tradeoff between best speed (1) and best compression (9)