var canvas = $('canvas')[0]; var context = canvas.getContext('2d'); canvas.width = window.innerWidth; canvas.height = window.innerHeight; var Projectile; var State = false; var Explode = false; var Collapse = false; var Particles = []; var colors = ["#1abc9c", "#2ecc71", "#3498db", "#9b59b6", "#9b59b6", "#f1c40f", "#e67e", "#e74c3c"]; function Proj() { this.radius = 5.2; this.x = Math.random() * canvas.width; this.y = canvas.height + this.radius; this.color = "#e74c3c"; this.velocity = {x: 0, y: 0}; this.speed = 12; 22 }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter