Skip to content

Commit

Permalink
Remove progress bar oof
Browse files Browse the repository at this point in the history
  • Loading branch information
SheepTester committed Jun 2, 2020
1 parent 2e96952 commit bfbbf57
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion hacky-file-getter.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ function downloadAsHTML(projectSrc, {
title = 'Project',
username = 'griffpatch',
customRatio = false,
progressBar = true,
progressBar = false, // No longer useful
fullscreen = true,
log = console.log,
monitorColour = null,
Expand Down
3 changes: 0 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ <h3><em>Convert a Scratch project to HTML</em></h3>
<p><label><input type="checkbox" id="fullscreen" checked> Show fullscreen button?</label></p>
<p><label><input type="checkbox" id="turbo"> Enable <a href="https://en.scratch-wiki.info/wiki/Turbo_Mode">turbo mode</a>?</label></p>
<p><label><input type="checkbox" id="use-colour"> Use custom variable/list monitor colour: <input type="color" id="monitor-colour" value="#ff8c1a">? (If unchecked, a translucent black will be used.)</label></p>
<p><label><input type="checkbox" id="progress" checked> Load progress indicator?</label></p>
<p><label><input type="checkbox" id="loading-image"> Loading image: <input type="file" id="loading-image-file" accept="image/*"></label></p>
<p><label><input type="checkbox" id="compatibility" checked> Enable compatibility mode?</label><a id="ref-2" href="#note-2"><sup>2</sup></a></p>
<p><label><input type="checkbox" id="stretch"> Stretch the canvas to fit (as opposed to maintaining the aspect ratio)?</label></p>
Expand Down Expand Up @@ -176,7 +175,6 @@ <h3>2019-02-09</h3>
const compatibility = document.getElementById('compatibility');
const turbo = document.getElementById('turbo');
const wider = document.getElementById('wider');
const progressBar = document.getElementById('progress');
const fullscreen = document.getElementById('fullscreen');
const useColour = document.getElementById('use-colour');
const monitorColour = document.getElementById('monitor-colour');
Expand Down Expand Up @@ -215,7 +213,6 @@ <h3>2019-02-09</h3>
title: title.value,
username: username.value,
log,
progressBar: progressBar.checked,
fullscreen: fullscreen.checked,
monitorColour: useColour.checked ? monitorColour.value : null,
cloudServer: document.querySelector('input[name="cloud-provider"]:checked').value === 'ws'
Expand Down
21 changes: 17 additions & 4 deletions template.html
Original file line number Diff line number Diff line change
Expand Up @@ -455,9 +455,12 @@
Scratch.vm = vm;

const storage = new ScratchStorage();
Scratch.storage = storage;
% loading-progess %
const AssetType = storage.AssetType;
storage.addWebStore([AssetType.Project], () => PROJECT_JSON);
storage.addWebStore([AssetType.ImageVector, AssetType.ImageBitmap, AssetType.Sound], asset => ASSETS[asset.assetId]);
% /loading-progess %
vm.attachStorage(storage);

function resize() {
Expand All @@ -476,14 +479,24 @@
resize();
Scratch.renderer = renderer;
vm.attachRenderer(renderer);

const audioEngine = new window.AudioEngine();
Scratch.audioEngine = audioEngine;
vm.attachAudioEngine(audioEngine);
vm.attachV2SVGAdapter(new ScratchSVGRenderer.SVGRenderer());
vm.attachV2BitmapAdapter(new ScratchSVGRenderer.BitmapAdapter(% custom-ratio % WIDTH, HEIGHT % /custom-ratio %));

const noop = () => null;
vm.setVideoProvider(new VideoProvider());
const svgRenderer = new ScratchSVGRenderer.SVGRenderer();
Scratch.svgRenderer = svgRenderer;
vm.attachV2SVGAdapter(svgRenderer);

const bitmapAdapter = new ScratchSVGRenderer.BitmapAdapter(% custom-ratio % WIDTH, HEIGHT % /custom-ratio %);
Scratch.bitmapAdapter = bitmapAdapter;
vm.attachV2BitmapAdapter(bitmapAdapter);

const videoProvider = new VideoProvider();
Scratch.videoProvider = videoProvider;
vm.setVideoProvider(videoProvider);

const noop = () => null;
let cloudProvider;

% cloud-localstorage %
Expand Down

0 comments on commit bfbbf57

Please sign in to comment.