Browse Source

3.141592

master
quegzacov 2 years ago
parent
commit
0cd03d536b
  1. 2
      index.php
  2. 8
      script.js

2
index.php

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Roulette à eau</title>
<script type="text/javascript" src="script.js"></script>
<script type="text/javascript" src="script.js" defer></script>
</head>
<body>
<code>

8
script.js

@ -18,4 +18,10 @@ function draw_roulette(ctx, w, h, datalist){
ctx.closePath();
lastend += arcsector;
}
}
}
var datalist= new Array(35, 25, 20, 12, 7, 1);
var colist = new Array('blue', 'red', 'green', 'orange', 'gray', 'yellow');
var canvas = document.getElementById("roulette");
var rendu = canvas.getContext('2d');
draw_roulette(rendu, canvas.width, canvas.height, datalist);

Loading…
Cancel
Save