Skip to content

Commit

Permalink
raw loader fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mayarajan3 committed May 21, 2024
1 parent df243b2 commit a37bfce
Showing 1 changed file with 9 additions and 16 deletions.
25 changes: 9 additions & 16 deletions src/lib/default-project/index.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
import projectData from './project-data';

/* eslint-disable import/no-unresolved */
import popWav from '!arraybuffer-loader!./83a9787d4cb6f3b7632b4ddfebf74367.wav';
import meowWav from '!arraybuffer-loader!./83c36d806dc92327b9e7049a565c6bff.wav';
import motorWav from '!arraybuffer-loader!./tinybit_motor.wav';
import backdrop from '!raw-loader!./cd21514d0531fdffb22204e0ec5ed84a.svg';
import costume1 from '!raw-loader!./tinybit_top.svg';
import costume2 from '!raw-loader!./tinybit_heart.svg';
import svgVar from './tinybit_top';
import backdropVar from './backdrop'
import popWavVar from './popWav';
import meowWavVar from './meowWav';
import tinybit_motorWavVar from './tinybit_motorWav';
import popWav from '!!arraybuffer-loader!./83a9787d4cb6f3b7632b4ddfebf74367.wav';
import meowWav from '!!arraybuffer-loader!./83c36d806dc92327b9e7049a565c6bff.wav';
import motorWav from '!!arraybuffer-loader!./tinybit_motor.wav';
import backdrop from '!!raw-loader!./cd21514d0531fdffb22204e0ec5ed84a.svg';
import costume1 from '!!raw-loader!./tinybit_top.svg';
import costume2 from '!!raw-loader!./tinybit_heart.svg';
/* eslint-enable import/no-unresolved */

function base64ToArrayBuffer(base64) {
Expand All @@ -24,8 +19,6 @@ function base64ToArrayBuffer(base64) {
}

const defaultProject = translator => {
costume1 = svgVar;
backdrop = backdropVar;

let _TextEncoder;
if (typeof TextEncoder === 'undefined') {
Expand All @@ -46,17 +39,17 @@ const defaultProject = translator => {
id: '83a9787d4cb6f3b7632b4ddfebf74367',
assetType: 'Sound',
dataFormat: 'WAV',
data: new Uint8Array(base64ToArrayBuffer(popWavVar)),
data: new Uint8Array(popWav),
}, {
id: '83c36d806dc92327b9e7049a565c6bff',
assetType: 'Sound',
dataFormat: 'WAV',
data: new Uint8Array(base64ToArrayBuffer(meowWavVar))
data: new Uint8Array(meowWav)
}, {
id: '93c36d806dc92327b9e7049a565c6bff',
assetType: 'Sound',
dataFormat: 'WAV',
data: new Uint8Array(base64ToArrayBuffer(tinybit_motorWavVar)),
data: new Uint8Array(motorWav),
}, {
id: 'cd21514d0531fdffb22204e0ec5ed84a',
assetType: 'ImageVector',
Expand Down

0 comments on commit a37bfce

Please sign in to comment.