scratch3.0二次开发之初始项目加载

1、代码文件位置:scratch-gui\src\lib\default-project\index.js

/* eslint-disable import/no-unresolved */
import popWav from '!arraybuffer-loader!./83a9787d4cb6f3b7632b4ddfebf74367.wav';
import meowWav from '!arraybuffer-loader!./83c36d806dc92327b9e7049a565c6bff.wav';// 小猫声音文件
import backdrop from '!raw-loader!./cd21514d0531fdffb22204e0ec5ed84a.svg';//舞台背景图片
import costume1 from '!raw-loader!./b7853f557e4426412e64bb3da6531a99.svg';//小猫造型1 图片
import costume2 from '!raw-loader!./e6ddc55a6ddd9cc9d84fe0b4c21e016f.svg';//小猫造型2 图片
/* eslint-enable import/no-unresolved */

const defaultProject = translator => {
    let _TextEncoder;
    if (typeof TextEncoder === 'undefined') {
        _TextEncoder = require('text-encoding').TextEncoder;
    } else {
        /* global TextEncoder */
        _TextEncoder = TextEncoder;
    }
    const encoder = new _TextEncoder();

    const projectJson = projectData(translator);
    return [{
        id: 0,
        assetType: 'Project',
        dat

你可能感兴趣的:(scratch3.0二次开发)