-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
81 lines (63 loc) · 1.76 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
69
70
71
72
73
74
75
76
77
78
79
80
81
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<h1>Vue</h1>
</head>
<body>
<div id="app">
v13
<div id="div1"></div>
Canvas1:
<!--rect vert : https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API-->
<canvas id="canvas"></canvas>
<br> Canvas2:
<canvas id="myCanvas" width="200" height="100" style="border:1px solid #000000;">
</canvas>
<br>
<br>
<br>
<br>
<br>
Canvas3 line externalisee:
<canvas id="myCanvas3" width="200" height="100" style="border:1px solid #000000;">
</canvas>
</div>
<div id="stopscreen2">
</div>
<div id="loopstopid2">
<button>Stop loop 2</button>
</div>
<script src="https://cdn.jsdelivr.net/npm/vue@2.6.12/dist/vue.js"></script>
<script type="text/javascript" src="index.js"></script>
<script>
const app = new Vue({
el: "#app",
data: {
message: "Bonjour Openclassrooms clap", //String
answerToLife: 42, //number
groceries: ["pommes", "bananes", "noix de coco"], //Arrays
timeForFlunch: false, //Boolean
info: {
//object
topic: "VueJS",
length: 5,
},
//TODO compute here
//costOfApples:2.5/20,
costOfApples: 2.5 / 20,
costOfBananas: 2,
costOfCoconuts: 1.5,
},
});
</script>
<!-- https://www.w3schools.com/html/html5_canvas.asp-->
<script>
var c = document.getElementById("myCanvas");
var ctx = c.getContext("2d");
ctx.moveTo(0, 0);
ctx.lineTo(200, 100);
ctx.stroke();
</script>
</body>
</html>