Merge branch 'main' of https://github.com/tenolly/mech
This commit is contained in:
commit
bd788c281b
6
index.js
6
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');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user