diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..fc01c15 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM node:lts-alpine AS build +WORKDIR /build +COPY . . + +FROM nginx:alpine +COPY --from=build /build /usr/share/nginx/html +EXPOSE 80 \ No newline at end of file diff --git a/index.css b/index.css index 3c5a86a..8f2e8c2 100644 --- a/index.css +++ b/index.css @@ -76,6 +76,16 @@ html, body { margin-bottom: 20px; } +.settings-row th, .settings-row td { + border: 1px solid rgb(102, 79, 39); + padding: .5em; +} + +.settings-row.table { + max-width: 40dvh; + overflow-y: auto; +} + .submit { color: inherit; background-color: rgb(38, 39, 47); diff --git a/index.html b/index.html index d679096..3393899 100644 --- a/index.html +++ b/index.html @@ -48,6 +48,19 @@ +
+ + + + + + + + + + +
Номер паденияРасстояние
+
diff --git a/index.js b/index.js index e54c7e0..bbbdbed 100644 --- a/index.js +++ b/index.js @@ -161,6 +161,14 @@ function animateBall() { const length = (parseFloat(lengthSlider.value) / 100).toFixed(3); const height = (parseFloat(heightSlider.value) / 100).toFixed(3); + const urlPoints = `https://physics.zzvt.pw/api/points?h=${height}&l=${length}&g=10&alpha=${angle}`; + const pointsTable = document.querySelector('#points'); + pointsTable.innerHTML = ''; + fetch(urlPoints) + .then(r => r.json().then(data => { + data.slice(0, Math.floor(data.length/3)).forEach((value, i) => pointsTable.innerHTML += `${i}${Number(value.x).toFixed(2)}`) + })); + const url = `https://physics.zzvt.pw/api/interpolation?h=${height}&l=${length}&g=10&alpha=${angle}&count=1000`; xhr.open("GET", url, true);