diff --git a/index.js b/index.js index 7a442b2..9a99df9 100644 --- a/index.js +++ b/index.js @@ -124,7 +124,7 @@ function drawBall() { } function updateStats() { - stats.innerText = `x: ${(canvas.width / window.devicePixelRatio - ball.x).toFixed(1)}\n`+ + stats.innerText = `x: ${ball.x.toFixed(1)}\n`+ `y: ${(canvas.height / window.devicePixelRatio - ball.y).toFixed(1)}\n` + `Угол: ${(ball.angle * 180 / Math.PI).toFixed(0)}\n` + `Скорость: ${ball.velocity.toFixed(2)}` @@ -162,8 +162,8 @@ function animateBall() { const height = (parseFloat(heightSlider.value) / 100).toFixed(3); const g = parseFloat(gSlider.value).toFixed(3); - // const urlBase = 'https://physics.zzvt.pw'; - const urlBase = 'http://localhost:3000'; + const urlBase = 'https://physics.zzvt.pw'; + // const urlBase = 'http://localhost:3000'; const urlPoints = `${urlBase}/api/points?h=${height}&l=${length}&g=10&alpha=${angle}`; const pointsTable = document.querySelector('#points');