Skip to content

Commit 98f7f13

Browse files
committed
updated controls position
1 parent 6f331ca commit 98f7f13

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

index.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ window.onload = function () {
1212
return await fetch('project.json').then(_ => _.json());
1313
}
1414

15-
function optionsToDict(options){
15+
function optionsToDict(options) {
1616
return options.reduce((acc, option) => {
1717
acc[option.label] = option.value;
1818
return acc;
19-
}, {});
19+
}, {});
2020
}
2121

2222
var gui;
@@ -106,12 +106,6 @@ window.onload = function () {
106106

107107
gui.addFolder("Audio (not available in web version)");
108108

109-
const otherFolder = gui.addFolder("Other");
110-
otherFolder.add(options, 'ui_other_codesCommaSeparated').name('Codes (Comma separated)').onChange(() => {
111-
options.codes = makeCodes(options.ui_other_codesCommaSeparated);
112-
fallAnimation();
113-
});
114-
115109
const logoFolder = gui.addFolder("Logo");
116110
logoFolder.add(options, "ui_logo_logo", optionsToDict(config.general.properties.ui_logo_logo.options)).name("Logo").onChange(updateMask);
117111
logoFolder.add(options, "ui_logo_customLogo").name("Custom Logo URL (SVG)").onChange(updateMask);
@@ -120,13 +114,19 @@ window.onload = function () {
120114
logoPositionFolder.add(options, "ui_logo_positionX").min(-5000).max(5000).step(1).name("X").onChange(updateMask);
121115
logoPositionFolder.add(options, "ui_logo_positionY").min(-5000).max(5000).step(1).name("Y").onChange(updateMask);
122116

117+
const otherFolder = gui.addFolder("Other");
118+
otherFolder.add(options, 'ui_other_codesCommaSeparated').name('Codes (Comma separated)').onChange(() => {
119+
options.codes = makeCodes(options.ui_other_codesCommaSeparated);
120+
fallAnimation();
121+
});
122+
123123
gui.add(options, "Save");
124124
gui.add(options, "Load");
125125
gui.add(options, "Reset");
126126

127127
customContainer = document.getElementById('gui');
128128
customContainer.appendChild(gui.domElement);
129-
129+
130130
options.Load();
131131
});
132132
}
@@ -242,8 +242,8 @@ window.onload = function () {
242242
img.onload = function () {
243243
drawBlackMask();
244244

245-
let img_width = (c.height/2) * (img.width/img.height) * options.ui_logo_scale;
246-
let img_height = (c.height/2) * options.ui_logo_scale;
245+
let img_width = (c.height / 2) * (img.width / img.height) * options.ui_logo_scale;
246+
let img_height = (c.height / 2) * options.ui_logo_scale;
247247

248248
mask.globalCompositeOperation = 'destination-out';
249249
mask.drawImage(img, c.width / 2 - img_width / 2 + options.ui_logo_positionX, c.height / 2 - img_height / 2 + options.ui_logo_positionY, img_width, img_height);

0 commit comments

Comments
 (0)