SOURCE

console 命令行工具 X clear

                    
>
console
(function() {
  var lastTime = 0;
  var vendors = ['ms', 'moz', 'webkit', 'o'];
  for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
      window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];
      window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] || window[vendors[x] + 'CancelRequestAnimationFrame'];
  }
  if (!window.requestAnimationFrame) window.requestAnimationFrame = function(callback, element) {
      var currTime = new Date().getTime();
      var timeToCall = Math.max(0, 16 - (currTime - lastTime));
      var id = window.setTimeout(function() {
          callback(currTime + timeToCall);
      }, timeToCall);
      lastTime = currTime + timeToCall;
      return id;
  };
  if (!window.cancelAnimationFrame) window.cancelAnimationFrame = function(id) {
      clearTimeout(id);
  };
}());


var fps, fpsInterval, startTime, now, then, elapsed;
// forked from cx20's "FontAwesome を使ってみるテスト" http://jsdo.it/cx20/tsUL
var wh = getWidthHeight();
var X_MAX = wh.width;
var Y_MAX = wh.height;
var letters = Array(614).join(1).split("");
var canvas;
var ctx;

function startAnimating(fps) {
    fpsInterval = 1000 / fps;
    then = Date.now();
    startTime = then;
    draw();
}

function clearScreen() {
  ctx.fillStyle = "rgba(0, 0, 0, 0.05)";
  ctx.fillRect(0, 0, X_MAX, Y_MAX);
}
function drawMatrix(value, index, array) {
  var text = String.fromCharCode(61440 + Math.floor(Math.random() * 465));
  var y_pos = value;
  var x_pos = index * 10;
  ctx.fillStyle = "#00ff00";
  ctx.fillText(text, x_pos, y_pos);
  array[index] = (y_pos > (wh.height - 200) + Math.random() * 200) ? 0 : y_pos + 10;
}
function draw() {
  requestAnimationFrame(draw);
  // calc elapsed time since last loop
  now = Date.now();
  elapsed = now - then;

  // if enough time has elapsed, draw the next frame
  if (elapsed > fpsInterval) {
  	// Get ready for next frame by setting then=now, but also adjust for your
  	// specified fpsInterval not being a multiple of RAF's interval (16.7ms)
  	then = now - (elapsed % fpsInterval);
    // Put your drawing code here
    clearScreen();
    letters.map(drawMatrix);
  }
}

function getWidthHeight() {
  var width = 465, height = 465;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    width = window.innerWidth;
    height = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    width = document.documentElement.clientWidth;
    height = document.documentElement.clientHeight;
  }
  return {
    width: width,
    height: height
  }
}

function init() {
  canvas = document.getElementById("Canvas");
  canvas.setAttribute("width", X_MAX);
  canvas.setAttribute("height", Y_MAX);
  ctx = canvas.getContext("2d");
  ctx.font = "10px 'FontAwesome'";

  startAnimating(24);
}
init();
<canvas id="Canvas"></canvas>
* {
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
}

body {
  background: #000;
  font: 30px sans-serif;
  width: 100%;
  height: 100%;
}

本项目引用的自定义外部资源