убрал старые функции и сделал автообновление версий js и css
This commit is contained in:
@@ -290,7 +290,6 @@ function restoreMatchState() {
|
||||
matchEvents = Array.isArray(state.matchEvents) ? state.matchEvents : [];
|
||||
scoreState = state.scoreState || { home: 0, away: 0 };
|
||||
extraTimeMinutes = state.extraTimeMinutes || { first: 0, second: 0 };
|
||||
// originalLineupState = state.originalLineupState || originalLineupState;
|
||||
|
||||
pausedAccumulatedSeconds = Number(state.pausedAccumulatedSeconds ?? 0);
|
||||
periodStartedAt = state.periodStartedAt ?? null;
|
||||
@@ -510,7 +509,6 @@ function addPeriodMarker(type, title, forcedSeconds = null) {
|
||||
};
|
||||
|
||||
matchEvents.push(item);
|
||||
// matchEvents = sortEventsForStorage(matchEvents);
|
||||
|
||||
renderEvents();
|
||||
saveMatchState();
|
||||
@@ -841,10 +839,6 @@ function updateEditModeUI() {
|
||||
btn.classList.toggle("active", editModeEnabled);
|
||||
}
|
||||
|
||||
// document.querySelectorAll("[data-edit-only]").forEach((el) => {
|
||||
// el.style.display = editModeEnabled ? "" : "none";
|
||||
// });
|
||||
|
||||
document.querySelectorAll("[data-edit-lock]").forEach((el) => {
|
||||
if ("disabled" in el) {
|
||||
el.disabled = !editModeEnabled;
|
||||
@@ -1138,7 +1132,6 @@ async function triggerVmixEventCommand(eventPayload) {
|
||||
console.log("VMIX DIRECT EVENT:", eventPayload);
|
||||
console.log("VMIX DIRECT COMMANDS:", commands);
|
||||
|
||||
// await executeVmixCommands(commands.join("\n"));
|
||||
await sendDirectVmixCommands(commands);
|
||||
}
|
||||
|
||||
@@ -2259,51 +2252,6 @@ function convertPitchYToPan(y) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
// function buildVmixCommandsFromFormation(side) {
|
||||
// const players = Array.isArray(formationState[side]) ? formationState[side] : [];
|
||||
// const commands = [];
|
||||
// const playerPrefix = side === "home" ? "HOME" : "AWAY";
|
||||
// const inputName = side === "home" ? "РАССТАНОВКА - ХОЗЯЕВА" : "РАССТАНОВКА - ГОСТИ";
|
||||
|
||||
|
||||
// if (players.length < 2) {
|
||||
// return [];
|
||||
// }
|
||||
|
||||
// // Вратарь players[0], полевые players[1..10]
|
||||
// players.slice(1, 11).forEach((player, index) => {
|
||||
// const playerNumber = index + 1;
|
||||
// const playerInputName = `${playerPrefix} - Игрок${playerNumber}`;
|
||||
|
||||
// const x = convertPitchXToPan(player.x).toFixed(3);
|
||||
// const y = convertPitchYToPan(player.y).toFixed(3);
|
||||
|
||||
|
||||
// for (let i = 1; i <= 10; i++) {
|
||||
// commands.push(
|
||||
// vmixCmd(`Function=ResetInput&Input=${encodeURIComponent(`${playerPrefix} - Игрок${i}`)}`)
|
||||
// );
|
||||
// };
|
||||
|
||||
// commands.push(
|
||||
// vmixCmd(`Function=ResetInput&Input=${encodeURIComponent(inputName)}`)
|
||||
// );
|
||||
|
||||
|
||||
|
||||
// commands.push(
|
||||
// vmixCmd(`Function=SetPanX&Input=${encodeURIComponent(playerInputName)}&Value=${x}`)
|
||||
// );
|
||||
|
||||
// commands.push(
|
||||
// vmixCmd(`Function=SetPanY&Input=${encodeURIComponent(playerInputName)}&Value=${y}`)
|
||||
// );
|
||||
// });
|
||||
|
||||
// return commands;
|
||||
// }
|
||||
|
||||
function buildVmixCommandsFromFormation(side) {
|
||||
const players = Array.isArray(formationState[side]) ? formationState[side] : [];
|
||||
const commands = [];
|
||||
@@ -2440,43 +2388,6 @@ const FORMATION_TEMPLATE_442 = {
|
||||
]
|
||||
};
|
||||
|
||||
// function getDistributedXSlots(count) {
|
||||
// if (count <= 0) return [];
|
||||
// if (count === 1) return [50];
|
||||
// if (count === 2) return [25, 75];
|
||||
// if (count === 3) return [8, 50, 92];
|
||||
// if (count === 4) return [0, 30, 70, 100];
|
||||
// if (count === 5) return [0, 18, 50, 82, 100];
|
||||
// if (count === 6) return [0, 16, 36, 64, 84, 100];
|
||||
|
||||
// return Array.from({ length: count }, (_, i) => (i / (count - 1)) * 100);
|
||||
// }
|
||||
|
||||
// function getArcYOffsetSlots(count, strength = 10) {
|
||||
// if (count < 4) {
|
||||
// return Array(count).fill(0);
|
||||
// }
|
||||
|
||||
// if (count === 5) {
|
||||
// return [
|
||||
// strength * 0.11, // левый фланг ниже
|
||||
// -strength * 0.5, // левый полуфланг чуть выше базы
|
||||
// -strength, // центр выше всех
|
||||
// -strength * 0.5, // правый полуфланг чуть выше базы
|
||||
// strength * 0.11 // правый фланг ниже
|
||||
// ];
|
||||
// }
|
||||
|
||||
// const center = (count - 1) / 2;
|
||||
|
||||
// return Array.from({ length: count }, (_, i) => {
|
||||
// const dist = Math.abs(i - center);
|
||||
// const maxDist = center || 1;
|
||||
// const normalized = dist / maxDist;
|
||||
|
||||
// return -strength * Math.pow(1 - normalized, 1.5);
|
||||
// });
|
||||
// }
|
||||
|
||||
function clamp(value, min, max) {
|
||||
return Math.max(min, Math.min(max, value));
|
||||
|
||||
Reference in New Issue
Block a user