|
27 | 27 | fix scale (use pixel unit) |
28 | 28 | </label> |
29 | 29 | <br> |
30 | | - <label> |
| 30 | + <!-- <label> |
31 | 31 | <input type="checkbox" id="fixFixture" checked> |
32 | 32 | fix fixtures in body settings |
33 | 33 | </label> |
34 | 34 | <br> |
35 | 35 | <label> |
36 | 36 | <input type="checkbox" id="moveUpHalfDepth" checked> |
37 | 37 | move collider.offset.z up half depth (in fixture fix) |
38 | | - </label> |
| 38 | + </label> --> |
39 | 39 | </div> |
40 | 40 |
|
41 | 41 | <button onclick="handleJson()">remove deprecated properties</button> |
|
56 | 56 | } |
57 | 57 |
|
58 | 58 | // 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 | + // } |
68 | 68 |
|
69 | 69 | // Attach event listeners after DOM is loaded |
70 | 70 | window.addEventListener('DOMContentLoaded', function () { |
71 | 71 | const fixScaleWorld = document.getElementById('fixScaleWorld'); |
72 | 72 | 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'); |
75 | 75 |
|
76 | 76 | fixScaleWorld.addEventListener('change', function () { |
77 | 77 | enforceScaleCheckboxes('fixScaleWorld'); |
|
80 | 80 | enforceScaleCheckboxes('fixScalePixel'); |
81 | 81 | }); |
82 | 82 |
|
83 | | - fixFixture.addEventListener('change', function () { |
84 | | - enforceMoveUpHalfDepth(); |
85 | | - }); |
| 83 | + // fixFixture.addEventListener('change', function () { |
| 84 | + // enforceMoveUpHalfDepth(); |
| 85 | + // }); |
86 | 86 |
|
87 | 87 | // Initial state for moveUpHalfDepth |
88 | | - enforceMoveUpHalfDepth(); |
| 88 | + // enforceMoveUpHalfDepth(); |
89 | 89 | }); |
90 | 90 |
|
91 | 91 | // Function to handle the uploaded JSON file and apply selected fixes |
|
100 | 100 |
|
101 | 101 | const fixScaleWorld = document.getElementById('fixScaleWorld').checked; |
102 | 102 | 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; |
105 | 105 | const useRapier2d = document.getElementById('useRapier2d').checked; |
106 | 106 | const reader = new FileReader(); |
107 | 107 |
|
108 | | - const { fixScale, removeUnwantedProperties, fixFixture: fixFixtureFn } = window.fixes; |
| 108 | + const { fixScale, removeUnwantedProperties } = window.fixes; |
109 | 109 |
|
110 | 110 | reader.onload = function (event) { |
111 | 111 | try { |
|
131 | 131 | } |
132 | 132 |
|
133 | 133 | // 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 | + // } |
138 | 138 |
|
139 | 139 | // Always remove unwanted properties |
140 | 140 | obj = removeUnwantedProperties(obj); |
|
0 commit comments