Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- document.body.onkeyup = function(e){
- if(e.keyCode == 32){
- }
- }
- function getRandomNumbers(){
- var array = new Uint16Array(1000);
- var scale = d3.scale.linear().range([360, 1440]).domain([0, 100000]);
- if(window.hasOwnProperty("crypto") && typeof
- window.crypto.getRandomValues === "function"){
- window.crypto.getRandomValues(array);
- console.log("works");
- } else {
- //no support for crypto, get crappy random numbers
- for(var i=0; i < 1000; i++){
- array[i] = Math.floor(Math.random() * 100000) + 1;
- }
- }
- return array;
- }
- function rotTween(to) {
- var i = d3.interpolate(oldrotation % 360, rotation);
- return function(t) {
- return "rotate(" + i(t) + ")";
- };
- }
Add Comment
Please, Sign In to add comment