回答編集履歴
3
ちょうせい
test
CHANGED
@@ -20,17 +20,17 @@
|
|
20
20
|
|
21
21
|
["30" ,"160"],
|
22
22
|
|
23
|
+
["160","130"],
|
24
|
+
|
25
|
+
["160", "80"],
|
26
|
+
|
27
|
+
["160", "30"],
|
28
|
+
|
23
29
|
["190","160"],
|
24
30
|
|
25
31
|
["240","160"],
|
26
32
|
|
27
33
|
["290","160"],
|
28
|
-
|
29
|
-
["160","130"],
|
30
|
-
|
31
|
-
["160", "80"],
|
32
|
-
|
33
|
-
["160", "30"],
|
34
34
|
|
35
35
|
["160","190"],
|
36
36
|
|
2
chousei
test
CHANGED
@@ -14,29 +14,29 @@
|
|
14
14
|
|
15
15
|
var list=[
|
16
16
|
|
17
|
-
["130","1
|
17
|
+
["130","160"],
|
18
18
|
|
19
|
-
["80" ,"1
|
19
|
+
["80" ,"160"],
|
20
20
|
|
21
|
-
["30" ,"1
|
21
|
+
["30" ,"160"],
|
22
22
|
|
23
|
-
["
|
23
|
+
["190","160"],
|
24
24
|
|
25
|
-
["2
|
25
|
+
["240","160"],
|
26
26
|
|
27
|
-
["
|
27
|
+
["290","160"],
|
28
28
|
|
29
|
-
["1
|
29
|
+
["160","130"],
|
30
30
|
|
31
|
-
["1
|
31
|
+
["160", "80"],
|
32
32
|
|
33
|
-
["1
|
33
|
+
["160", "30"],
|
34
34
|
|
35
|
-
["1
|
35
|
+
["160","190"],
|
36
36
|
|
37
|
-
["1
|
37
|
+
["160","240"],
|
38
38
|
|
39
|
-
["1
|
39
|
+
["160","290"],
|
40
40
|
|
41
41
|
];
|
42
42
|
|
@@ -62,6 +62,8 @@
|
|
62
62
|
|
63
63
|
</script>
|
64
64
|
|
65
|
+
|
66
|
+
|
65
67
|
<svg width="360" height="360" id="svg">
|
66
68
|
|
67
69
|
<marker id="arrow" viewBox="-5 -5 10 10" orient="auto">
|
@@ -70,8 +72,38 @@
|
|
70
72
|
|
71
73
|
</marker>
|
72
74
|
|
73
|
-
<line id="line" x1="1
|
75
|
+
<line id="line" x1="160" y1="160" x2="130" y2="160" stroke="skyblue" stroke-width="15" marker-end="url(#arrow)" />
|
76
|
+
|
77
|
+
<circle cx="10" cy="160" r="3" fill="black" />
|
78
|
+
|
79
|
+
<circle cx="60" cy="160" r="3" fill="black" />
|
80
|
+
|
81
|
+
<circle cx="110" cy="160" r="3" fill="black" />
|
82
|
+
|
83
|
+
<circle cx="160" cy="160" r="3" fill="black" />
|
84
|
+
|
85
|
+
<circle cx="210" cy="160" r="3" fill="black" />
|
86
|
+
|
87
|
+
<circle cx="260" cy="160" r="3" fill="black" />
|
88
|
+
|
89
|
+
<circle cx="310" cy="160" r="3" fill="black" />
|
90
|
+
|
91
|
+
<circle cx="160" cy="10" r="3" fill="black" />
|
92
|
+
|
93
|
+
<circle cx="160" cy="60" r="3" fill="black" />
|
94
|
+
|
95
|
+
<circle cx="160" cy="110" r="3" fill="black" />
|
96
|
+
|
97
|
+
<circle cx="160" cy="210" r="3" fill="black" />
|
98
|
+
|
99
|
+
<circle cx="160" cy="260" r="3" fill="black" />
|
100
|
+
|
101
|
+
<circle cx="160" cy="310" r="3" fill="black" />
|
74
102
|
|
75
103
|
</svg>
|
76
104
|
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
77
109
|
```
|
1
sample
test
CHANGED
@@ -1 +1,77 @@
|
|
1
1
|
canvasやsvgで実現可能です
|
2
|
+
|
3
|
+
|
4
|
+
|
5
|
+
# sample
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
```javascript
|
10
|
+
|
11
|
+
<script>
|
12
|
+
|
13
|
+
window.addEventListener('DOMContentLoaded', function(e){
|
14
|
+
|
15
|
+
var list=[
|
16
|
+
|
17
|
+
["130","180"],
|
18
|
+
|
19
|
+
["80" ,"180"],
|
20
|
+
|
21
|
+
["30" ,"180"],
|
22
|
+
|
23
|
+
["230","180"],
|
24
|
+
|
25
|
+
["280","180"],
|
26
|
+
|
27
|
+
["330","180"],
|
28
|
+
|
29
|
+
["180","130"],
|
30
|
+
|
31
|
+
["180", "80"],
|
32
|
+
|
33
|
+
["180", "30"],
|
34
|
+
|
35
|
+
["180","230"],
|
36
|
+
|
37
|
+
["180","280"],
|
38
|
+
|
39
|
+
["180","330"],
|
40
|
+
|
41
|
+
];
|
42
|
+
|
43
|
+
var count=0;
|
44
|
+
|
45
|
+
var timerId=setInterval(()=>{
|
46
|
+
|
47
|
+
var l=document.querySelector('#line');
|
48
|
+
|
49
|
+
l.setAttribute("x2",list[count][0]);
|
50
|
+
|
51
|
+
l.setAttribute("y2",list[count][1]);
|
52
|
+
|
53
|
+
count++;
|
54
|
+
|
55
|
+
if(count>=list.length) count=0;
|
56
|
+
|
57
|
+
console.log(count);
|
58
|
+
|
59
|
+
},500);
|
60
|
+
|
61
|
+
});
|
62
|
+
|
63
|
+
</script>
|
64
|
+
|
65
|
+
<svg width="360" height="360" id="svg">
|
66
|
+
|
67
|
+
<marker id="arrow" viewBox="-5 -5 10 10" orient="auto">
|
68
|
+
|
69
|
+
<polygon points="-5,-5 5,0 -5,5" fill="skyblue" stroke="none" />
|
70
|
+
|
71
|
+
</marker>
|
72
|
+
|
73
|
+
<line id="line" x1="180" y1="180" x2="130" y2="180" stroke="skyblue" stroke-width="20" marker-end="url(#arrow)" />
|
74
|
+
|
75
|
+
</svg>
|
76
|
+
|
77
|
+
```
|