Skip to content

Commit da671ba

Browse files
committed
Updates
1 parent dcdebbf commit da671ba

1 file changed

Lines changed: 24 additions & 24 deletions

File tree

index.html

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@
2727
fix scale (use pixel unit)
2828
</label>
2929
<br>
30-
<label>
30+
<!-- <label>
3131
<input type="checkbox" id="fixFixture" checked>
3232
fix fixtures in body settings
3333
</label>
3434
<br>
3535
<label>
3636
<input type="checkbox" id="moveUpHalfDepth" checked>
3737
move collider.offset.z up half depth (in fixture fix)
38-
</label>
38+
</label> -->
3939
</div>
4040

4141
<button onclick="handleJson()">remove deprecated properties</button>
@@ -56,22 +56,22 @@
5656
}
5757

5858
// Enforce moveUpHalfDepth can only be checked if fixFixture is checked
59-
function enforceMoveUpHalfDepth() {
60-
const fixFixture = document.getElementById('fixFixture');
61-
const moveUpHalfDepth = document.getElementById('moveUpHalfDepth');
62-
if (!fixFixture.checked) {
63-
moveUpHalfDepth.disabled = true;
64-
} else {
65-
moveUpHalfDepth.disabled = false;
66-
}
67-
}
59+
// function enforceMoveUpHalfDepth() {
60+
// const fixFixture = document.getElementById('fixFixture');
61+
// const moveUpHalfDepth = document.getElementById('moveUpHalfDepth');
62+
// if (!fixFixture.checked) {
63+
// moveUpHalfDepth.disabled = true;
64+
// } else {
65+
// moveUpHalfDepth.disabled = false;
66+
// }
67+
// }
6868

6969
// Attach event listeners after DOM is loaded
7070
window.addEventListener('DOMContentLoaded', function () {
7171
const fixScaleWorld = document.getElementById('fixScaleWorld');
7272
const fixScalePixel = document.getElementById('fixScalePixel');
73-
const fixFixture = document.getElementById('fixFixture');
74-
const moveUpHalfDepth = document.getElementById('moveUpHalfDepth');
73+
// const fixFixture = document.getElementById('fixFixture');
74+
// const moveUpHalfDepth = document.getElementById('moveUpHalfDepth');
7575

7676
fixScaleWorld.addEventListener('change', function () {
7777
enforceScaleCheckboxes('fixScaleWorld');
@@ -80,12 +80,12 @@
8080
enforceScaleCheckboxes('fixScalePixel');
8181
});
8282

83-
fixFixture.addEventListener('change', function () {
84-
enforceMoveUpHalfDepth();
85-
});
83+
// fixFixture.addEventListener('change', function () {
84+
// enforceMoveUpHalfDepth();
85+
// });
8686

8787
// Initial state for moveUpHalfDepth
88-
enforceMoveUpHalfDepth();
88+
// enforceMoveUpHalfDepth();
8989
});
9090

9191
// Function to handle the uploaded JSON file and apply selected fixes
@@ -100,12 +100,12 @@
100100

101101
const fixScaleWorld = document.getElementById('fixScaleWorld').checked;
102102
const fixScalePixel = document.getElementById('fixScalePixel').checked;
103-
const fixFixture = document.getElementById('fixFixture').checked;
104-
const moveUpHalfDepth = document.getElementById('moveUpHalfDepth').checked;
103+
// const fixFixture = document.getElementById('fixFixture').checked;
104+
// const moveUpHalfDepth = document.getElementById('moveUpHalfDepth').checked;
105105
const useRapier2d = document.getElementById('useRapier2d').checked;
106106
const reader = new FileReader();
107107

108-
const { fixScale, removeUnwantedProperties, fixFixture: fixFixtureFn } = window.fixes;
108+
const { fixScale, removeUnwantedProperties } = window.fixes;
109109

110110
reader.onload = function (event) {
111111
try {
@@ -131,10 +131,10 @@
131131
}
132132

133133
// Apply fixture fix if checked
134-
if (fixFixture) {
135-
obj = fixFixtureFn(obj, moveUpHalfDepth);
136-
prefixParts.push('fixed_fixture' + (moveUpHalfDepth ? '(moveUpHalfDepth)' : ''));
137-
}
134+
// if (fixFixture) {
135+
// obj = fixFixtureFn(obj, moveUpHalfDepth);
136+
// prefixParts.push('fixed_fixture' + (moveUpHalfDepth ? '(moveUpHalfDepth)' : ''));
137+
// }
138138

139139
// Always remove unwanted properties
140140
obj = removeUnwantedProperties(obj);

0 commit comments

Comments
 (0)