format document
This commit is contained in:
@@ -40,8 +40,10 @@ function createPathCircle() {
|
||||
// центр расположен в центре svg-элемента, а радиус равен трети высоты/ширины
|
||||
for (let t = 0; t <= Math.PI * 2; t += 0.1) {
|
||||
data.push(
|
||||
{x: width / 2 + width / 3 * Math.sin(t),
|
||||
y: height / 2 + height / 3* Math.cos(t)}
|
||||
{
|
||||
x: width / 2 + width / 3 * Math.sin(t),
|
||||
y: height / 2 + height / 3 * Math.cos(t)
|
||||
}
|
||||
);
|
||||
}
|
||||
return data
|
||||
@@ -55,8 +57,10 @@ function createPathSpiral() {
|
||||
// центр расположен в центре svg-элемента, а радиус равен трети высоты/ширины
|
||||
for (let t = 0; t <= Math.PI * 6; t += 0.1) {
|
||||
data.push(
|
||||
{x: width / 2 + width / 3 *(1-(t/(Math.PI * 6))) * -Math.sin(t),
|
||||
y: height / 2 + height / 3*(1-(t/(Math.PI * 6))) * Math.cos(t)}
|
||||
{
|
||||
x: width / 2 + width / 3 * (1 - (t / (Math.PI * 6))) * -Math.sin(t),
|
||||
y: height / 2 + height / 3 * (1 - (t / (Math.PI * 6))) * Math.cos(t)
|
||||
}
|
||||
);
|
||||
}
|
||||
return data
|
||||
|
||||
Reference in New Issue
Block a user