Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // require() some stuff from npm (like you were using browserify)
- // and then hit Run Code to run it on the right
- var _ = require('lodash');
- var x = 1000;
- function randomColor(){
- return '#' + ((1<<24) * Math.random()|0).toString(16);
- }
- var generateGrid = function(){
- var elem = document.createElement('div');
- elem.style.background = randomColor();
- document.body.appendChild(elem);
- if (--x > 0)
- requestAnimationFrame(generateGrid);
- };
- generateGrid();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement