Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@mplacona
Created March 30, 2014 19:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mplacona/9878429 to your computer and use it in GitHub Desktop.
Save mplacona/9878429 to your computer and use it in GitHub Desktop.
// Holds all my flakes
var flakes = [];
// Maximum number of flakes at a time, and speed in which they fall
const int maxFlakes= 100; //max number of flakes
const int speed = 5; // snowfall speed
// Duration of the animation
const thirtyMills = const Duration(milliseconds:30);
// Set the screen initial properties
CanvasRenderingContext2D ctx;
var W = window.innerWidth;
var H = window.innerHeight;
// Randomizer instance variable to be used later on with positions and sizes
var rng = new math.Random();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment