demo/js/index.js

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

/**
 * index.js
 * Paul Krishnamurthy 2016
 *
 * https://paulkr.com
 * paul@paulkr.com
 */

$(document).ready(function () {

  function clearAll () {

    var elems = [
      "squareFlash",
      "vortex",
      "bouncingBalls",
      "shootingLines",
      "simpleGradient",
      "starfield",
      "layeredTriangles",
      "cornerSpikes",
      "floatingBoxes"
    ];

    for (var i = 0; i < elems.length; i++) {
      $("#" + elems[i]).hide();
    }
  }

  clearAll();

  $("#bouncingBalls").show();

  $("body").quietflow({
    theme          : "bouncingBalls",
    specificColors : [
      "rgba(255, 10, 50, .5)", 
      "rgba(10, 255, 50, .5)", 
      "rgba(10, 50, 255, .5)", 
      "rgba(0, 0, 0, .5)"
    ]
  });

  $(".effects").change(function () {

    effect = $(".effects").find(":selected").text();

    if (effect == "starfield") {
      clearAll();

      $("#starfield").show();
      $("body").quietflow({
        theme : "starfield"
      });

    } else if (effect == "squareFlash") {
      clearAll();

      $("#squareFlash").show();
      $("body").quietflow({
后面还有 86 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。