This commit is contained in:
Ivan Zinchenko 2024-12-12 20:54:40 +03:00
commit bd788c281b
Signed by: zinch
GPG Key ID: 6D45AA2C8FD6A37E

View File

@ -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');