From bfbbf579231e8937be45c8f52b13234be0e49d12 Mon Sep 17 00:00:00 2001 From: SheepTester Date: Mon, 1 Jun 2020 17:09:04 -0700 Subject: [PATCH] Remove progress bar oof --- hacky-file-getter.js | 2 +- index.html | 3 --- template.html | 21 +++++++++++++++++---- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/hacky-file-getter.js b/hacky-file-getter.js index 2cb7922..f508f23 100644 --- a/hacky-file-getter.js +++ b/hacky-file-getter.js @@ -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, diff --git a/index.html b/index.html index 3de1b6f..b37ae1c 100644 --- a/index.html +++ b/index.html @@ -69,7 +69,6 @@

Convert a Scratch project to HTML

-

2

@@ -176,7 +175,6 @@

2019-02-09

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'); @@ -215,7 +213,6 @@

2019-02-09

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' diff --git a/template.html b/template.html index eddd71b..4f0fc92 100644 --- a/template.html +++ b/template.html @@ -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() { @@ -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 %