-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
68 lines (62 loc) · 2.29 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<title>Hermite demo</title>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<style>
body {
margin: 0;
padding: 0;
}
canvas {
display: block;
margin: 0 auto;
width: 60%;
aspect-ratio: 1;
}
.inputgrp {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin: 0 auto;
width: 60%;
}
</style>
</head>
<body><canvas id="canvas"></canvas>
<script src="index.js"></script>
<span class="inputgrp">
<input type="range" min="0" max="100" value="50" class="slider" id="splineprecision">
<label>Spline Points count</label>
</span>
<span class="en">
Hermite spline demo. Use the slider to change the number of points used to draw the spline.<br>
The canvas is interactive. Click and drag to move the control points.
circles represent the control points, and the squares represent the tangents.
</span>
<span class="uk">
Демонстрація гермітової сплайн-кривої. Використовуйте слайдер, щоб змінити кількість точок, <br>
які використовуються для малювання сплайн-кривої.<br>
Холст інтерактивний. Натисніть і потягніть, щоб перемістити контрольні точки.<br>
Кола відображають контрольні точки, а квадрати - тангенси.
</span>
<script>
var lang = navigator.language || navigator.userLanguage;
if (lang == "uk-UA" || lang == "ru-RU") {
document.querySelector(".en").style.display = "none";
} else {
document.querySelector(".uk").style.display = "none";
}
</script>
<h3>
<a href="index.html">Hermite demo</a>
<br>
<a href="bezier.html">Bezier demo</a>
<br>
<a href="bspline.html">B Spline demo</a>
</h3>
</body>
</html>