()
| 8 | |
| 9 | //initial function |
| 10 | function init() { |
| 11 | //setting things up |
| 12 | canvas = document.getElementById("canvas"); |
| 13 | ctx = canvas.getContext("2d"); |
| 14 | w = canvas.width = window.innerWidth; |
| 15 | h = canvas.height = window.innerHeight; |
| 16 | ctx.translate(w / 2, h / 2); |
| 17 | |
| 18 | n = 0; c = 6; |
| 19 | |
| 20 | //drawing or animating the stars |
| 21 | animate(); |
| 22 | } |
| 23 | |
| 24 | function animate() { |
| 25 |