Browse Source

3.141592

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

2
index.php

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

6
script.js

@ -19,3 +19,9 @@ function draw_roulette(ctx, w, h, datalist){
lastend += arcsector; 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