Skip to content

Commit 5b4a225

Browse files
committed
Changelog update, fix positioning of loading image (and hide stage while it loads)
1 parent dd507eb commit 5b4a225

File tree

2 files changed

+36
-12
lines changed

2 files changed

+36
-12
lines changed

index.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,16 @@ <h3><em>Convert a Scratch project to HTML</em></h3>
9898
<p id="note-4"><a href="#ref-4"><sup>4</sup></a>If a cloud variable with the name "☁ eval" is set, it'll run the variable value as JavaScript and store it in a cloud variable named "☁ eval output"; if there is an error, it'll be stored in "☁ eval error." If you're using a custom cloud server, then cloud variables whose names start with "☁ local storage" will store their values in localStorage instead of in the server.</p>
9999
<h2>Update history</h2>
100100
<p>See the code and previous versions on <a href="https://github.com/SheepTester/htmlifier/">Github</a>.</p>
101+
<h3>2020-06-01</h3>
102+
<ul>
103+
<li>Option to remove clone/list length limits</li>
104+
<li>Option to hide the cursor</li>
105+
<li>Ability to distinguish between cloud variables for localStorage and the server (and run JavaScript using cloud variables)</li>
106+
<li>Option for rudimentary pointer lock</li>
107+
<li>Fixed mouse position and unresized lists not showing</li>
108+
<li>Default project changed to one of <a href="https://scratch.mit.edu/users/ScratchCat/">ScratchCat</a>'s</li>
109+
<li>Unfortunately, as part of these changes, I removed the option for a progress bar. If there's demand, I'll try to add it back.</li>
110+
</ul>
101111
<h3>2020-05-01</h3>
102112
<ul>
103113
<li>Support for custom extensions from a URL</li>

template.html

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
position: relative;
2424
% no-cursor % cursor: none; % /no-cursor %
2525
}
26+
.loading #wrapper {
27+
visibility: hidden;
28+
}
2629
#monitors {
2730
position: absolute;
2831
top: 0;
@@ -64,6 +67,11 @@
6467
position: fixed;
6568
max-width: 100%;
6669
max-height: 100%;
70+
left: 0;
71+
right: 0;
72+
top: 0;
73+
bottom: 0;
74+
margin: auto;
6775
}
6876
% /loading-image %
6977
% fullscreen %
@@ -204,7 +212,12 @@
204212
}
205213
</style>
206214
</head>
207-
<body>
215+
<body class="loading">
216+
<script type="text/javascript">
217+
if (true % loading-image % && false % /loading-image %) {
218+
document.body.classList.remove('loading');
219+
}
220+
</script>
208221
<div id="wrapper">
209222
<canvas id="stage"></canvas>
210223
<div id="monitors"></div>
@@ -921,17 +934,6 @@
921934
.then(r => r.arrayBuffer())
922935
.then(b => vm.loadProject(b))
923936

924-
% loading-progress %
925-
if (progress.parentNode) {
926-
progress.parentNode.removeChild(progress);
927-
}
928-
% /loading-progress %
929-
% loading-image %
930-
if (loadingImage.parentNode) {
931-
loadingImage.parentNode.removeChild(loadingImage);
932-
}
933-
% /loading-image %
934-
935937
vm.setCloudProvider(cloudProvider);
936938
% cloud-localstorage %
937939
const stageVariables = vm.runtime.getTargetForStage().variables;
@@ -968,6 +970,18 @@
968970
openConnection();
969971
% /cloud-ws %
970972

973+
% loading-progress %
974+
if (progress.parentNode) {
975+
progress.parentNode.removeChild(progress);
976+
}
977+
% /loading-progress %
978+
% loading-image %
979+
if (loadingImage.parentNode) {
980+
loadingImage.parentNode.removeChild(loadingImage);
981+
}
982+
document.body.classList.remove('loading');
983+
% /loading-image %
984+
971985
vm.greenFlag();
972986
};
973987

0 commit comments

Comments
 (0)