Difference between revisions of "Team:BIT/Interlab/test"

Line 1: Line 1:
  
<html>
+
<html class="nojs html css_verticalspacer" lang="en-US">
<head>
+
<head>
<meta charset="utf-8">
+
<title>Canvas连接粒子分解动画特效 - 站长素材</title>
+
  
<style>
+
  <meta http-equiv="Content-type" content="text/html;charset=UTF-8"/>
html,body {
+
  <meta name="generator" content="2017.0.0.363"/>
margin:0;
+
  <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
padding:0;
+
 
width:100%;
+
  <script type="text/javascript">
height:100%;
+
  // Update the 'nojs'/'js' class on the html node
overflow:hidden;
+
document.documentElement.className = document.documentElement.className.replace(/\bnojs\b/g, 'js');
background:#171819;
+
}
+
</style>
+
  
</head>
+
// Check that all required assets are uploaded and up-to-date
<body>
+
if(typeof Muse == "undefined") window.Muse = {}; window.Muse.assets = {"required":["museutils.js", "museconfig.js", "jquery.watch.js", "require.js", "index.css"], "outOfDate":[]};
 +
</script>
 +
 
 +
  <title>Home</title>
 +
  <!-- CSS -->
 +
  <link rel="stylesheet" type="text/css" href="css/site_global.css?crc=443350757"/>
 +
  <link rel="stylesheet" type="text/css" href="css/index.css?crc=338807265" id="pagesheet"/>
 +
  </head>
 +
<body>
  
<canvas id="canvas" width="1280" height="346"></canvas>
+
  <div class="clearfix borderbox" id="page"><!-- column -->
 +
  <div class="clearfix colelem" id="u106-4"><!-- content -->
 +
    <p>hellow world</p>
 +
  </div>
 +
  <div class="clearfix colelem" id="pu120-4"><!-- group -->
 +
    <div class="clearfix grpelem" id="u120-4"><!-- content -->
 +
    <p>sdada</p>
 +
    </div>
 +
    <div class="clearfix grpelem" id="u112"><!-- group -->
 +
    <div class="clearfix grpelem" id="u123-4"><!-- content -->
 +
      <p>asdasdas</p>
 +
    </div>
 +
    </div>
 +
  </div>
 +
  <div class="colelem" id="u115"><!-- simple frame --></div>
 +
  <div class="verticalspacer" data-offset-top="354" data-content-above-spacer="353" data-content-below-spacer="147"></div>
 +
  </div>
 +
  <!-- Other scripts -->
 +
  <script type="text/javascript">
 +
  window.Muse.assets.check=function(d){if(!window.Muse.assets.checked){window.Muse.assets.checked=!0;var b={},c=function(a,b){if(window.getComputedStyle){var c=window.getComputedStyle(a,null);return c&&c.getPropertyValue(b)||c&&c[b]||""}if(document.documentElement.currentStyle)return(c=a.currentStyle)&&c[b]||a.style&&a.style[b]||"";return""},a=function(a){if(a.match(/^rgb/))return a=a.replace(/\s+/g,"").match(/([\d\,]+)/gi)[0].split(","),(parseInt(a[0])<<16)+(parseInt(a[1])<<8)+parseInt(a[2]);if(a.match(/^\#/))return parseInt(a.substr(1),
 +
16);return 0},g=function(g){for(var f=document.getElementsByTagName("link"),h=0;h<f.length;h++)if("text/css"==f[h].type){var i=(f[h].href||"").match(/\/?css\/([\w\-]+\.css)\?crc=(\d+)/);if(!i||!i[1]||!i[2])break;b[i[1]]=i[2]}f=document.createElement("div");f.className="version";f.style.cssText="display:none; width:1px; height:1px;";document.getElementsByTagName("body")[0].appendChild(f);for(h=0;h<Muse.assets.required.length;){var i=Muse.assets.required[h],l=i.match(/([\w\-\.]+)\.(\w+)$/),k=l&&l[1]?
 +
l[1]:null,l=l&&l[2]?l[2]:null;switch(l.toLowerCase()){case "css":k=k.replace(/\W/gi,"_").replace(/^([^a-z])/gi,"_$1");f.className+=" "+k;k=a(c(f,"color"));l=a(c(f,"backgroundColor"));k!=0||l!=0?(Muse.assets.required.splice(h,1),"undefined"!=typeof b[i]&&(k!=b[i]>>>24||l!=(b[i]&16777215))&&Muse.assets.outOfDate.push(i)):h++;f.className="version";break;case "js":h++;break;default:throw Error("Unsupported file type: "+l);}}d?d().jquery!="1.8.3"&&Muse.assets.outOfDate.push("jquery-1.8.3.min.js"):Muse.assets.required.push("jquery-1.8.3.min.js");
 +
f.parentNode.removeChild(f);if(Muse.assets.outOfDate.length||Muse.assets.required.length)f="Some files on the server may be missing or incorrect. Clear browser cache and try again. If the problem persists please contact website author.",g&&Muse.assets.outOfDate.length&&(f+="\nOut of date: "+Muse.assets.outOfDate.join(",")),g&&Muse.assets.required.length&&(f+="\nMissing: "+Muse.assets.required.join(",")),alert(f)};location&&location.search&&location.search.match&&location.search.match(/muse_debug/gi)?setTimeout(function(){g(!0)},5E3):g()}};
 +
var muse_init=function(){require.config({baseUrl:""});require(["jquery","museutils","whatinput","jquery.watch"],function(d){var $ = d;$(document).ready(function(){try{
 +
window.Muse.assets.check($);/* body */
 +
Muse.Utils.transformMarkupToFixBrowserProblemsPreInit();/* body */
 +
Muse.Utils.prepHyperlinks(true);/* body */
 +
Muse.Utils.fullPage('#page');/* 100% height page */
 +
Muse.Utils.showWidgetsWhenReady();/* body */
 +
Muse.Utils.transformMarkupToFixBrowserProblems();/* body */
 +
}catch(b){if(b&&"function"==typeof b.notify?b.notify():Muse.Assert.fail("Error calling selector function: "+b),false)throw b;}})})};
  
<script>
 
window.requestAnimationFrame ||
 
  (window.requestAnimationFrame = window.requestAnimationFrame
 
    || window.webkitRequestAnimationFrame
 
    || window.mozRequestAnimationFrame
 
    || window.oRequestAnimationFrame
 
    || window.msRequestAnimationFrame
 
    || function(a) {
 
      window.setTimeout(a, 1E3 / 60)
 
    });
 
 
function h(a, b) {
 
  this.set(a, b)
 
}
 
h.prototype = {
 
  set: function(a, b) {
 
    this.x = a || 0;
 
    this.y = b || 0
 
  },
 
  l: function(a) {
 
    this.x += a.x;
 
    this.y += a.y
 
  },
 
  r: function(a) {
 
    this.x -= a.x;
 
    this.y -= a.y
 
  },
 
  scale: function(a) {
 
    this.x *= a;
 
    this.y *= a
 
  },
 
  t: function() {
 
    return this.x * this.x + this.y * this.y
 
  },
 
  w: function() {
 
    return Math.atan2(this.y, this.x)
 
  }
 
};
 
 
function i(a, b, c, d) {
 
  this.a = new h(a, b);
 
  this.d = new h;
 
  this.b = new h;
 
  this.u = c || 1;
 
  this.v = 1 / this.u;
 
  this.j = d || 20;
 
  this.fixed = !1;
 
  this.color = j[Math.floor(Math.random() * j.length)]
 
}
 
var j = ["#FD1811", "#F54B45", "#F68D0C", "#ECF00F", "#91C878", "#00B9D2"];
 
i.prototype = {
 
  update: function() {
 
    this.fixed || (this.d.scale(this.v), this.b.l(this.d), this.a.l(this.b), this.b.scale(0.9), this.d.set(0, 0))
 
  },
 
  i: function(a) {
 
    a.save();
 
    a.translate(this.a.x, this.a.y);
 
    a.rotate(this.b.w());
 
    var b = this.b.t();
 
    a.strokeStyle = "rgba(255,255,255," + (0.02 + Math.min(0.5, b * 8.0E-4)) + ")";
 
    a.lineWidth = 10 + Math.min(60, b);
 
    a.beginPath();
 
    a.arc(0, 0, this.j, 0, Math.PI * 2, !1);
 
    a.closePath();
 
    a.stroke();
 
    a.fillStyle = this.color;
 
    a.fill();
 
    a.restore()
 
  }
 
};
 
 
function k(a, b, c, d, f) {
 
  this.f = a;
 
  this.g = b;
 
  this.A = d || 0.1;
 
  this.z = c || 200;
 
  this.n = f || 0.01;
 
  this.e = new h
 
}
 
k.prototype = {
 
  update: function() {
 
    var a = this.f.a.x - this.g.a.x,
 
      b = this.f.a.y - this.g.a.y,
 
      c = a * a + b * b;
 
    if(c > 0.001) {
 
      var c = Math.sqrt(c),
 
        d = (c - this.z) * this.A;
 
      this.e.set(d, d);
 
      a /= c;
 
      b /= c;
 
      this.e.x += this.n * (this.f.b.x - this.g.b.x) * a;
 
      this.e.y += this.n * (this.f.b.y - this.g.b.y) * b;
 
      this.e.x *= -a;
 
      this.e.y *= -b;
 
      this.f.d.l(this.e);
 
      this.g.d.r(this.e)
 
    }
 
  },
 
  i: function(a) {
 
    a.strokeStyle = "rgba(255,255,255,0.05)";
 
    a.beginPath();
 
    a.moveTo(this.f.a.x, this.f.a.y);
 
    a.lineTo(this.g.a.x, this.g.a.y);
 
    a.closePath();
 
    a.stroke()
 
  }
 
};
 
 
function l(a, b, c, d) {
 
  this.k = Math.random() * Math.PI;
 
  this.q = 0.25 + Math.random() * 2.5;
 
  this.p = 0.25 + Math.random() * 1;
 
  i.call(this, a, b, c, d)
 
}
 
l.prototype = new i;
 
l.prototype.B = i.prototype;
 
l.prototype.update = function() {
 
  this.k += -this.q + Math.random() * this.q * 2;
 
  this.d.x += Math.cos(this.k) * this.p;
 
  this.d.y += Math.sin(this.k) * this.p;
 
  this.B.update.call(this)
 
};
 
 
function m() {
 
  this.c = [];
 
  this.h = [];
 
  this.o = !1;
 
  this.x = Math.random() * window.innerWidth;
 
  this.y = Math.random() * window.innerHeight;
 
  this.color = j[Math.floor(Math.random() * j.length)];
 
  this.m()
 
}
 
m.prototype = {
 
  m: function() {
 
    var a, b, c = 4 + Math.floor(Math.random() * 6);
 
    for(a = 0; a < c; ++a) b = 2 + Math.random() * 8, a === 0 && (b += Math.random() * 15), b = new l(this.x, this.y, 0.4 + Math.random() * 1.2, b), b.color = this.color, a > 0 && (this.h.push(new k(b, this.c[Math.floor(Math.random() * a)], Math.random() * 20, 0.01 + Math.random() * 0.1, 0.01 + Math.random() * 0.1)), Math.random() < 0.5 && this.h.push(new k(b, this.c[Math.floor(Math.random() * a)], Math.random() * 180))), this.c.push(b)
 
  },
 
  update: function() {
 
    var a, b, c, d = Number.MAX_VALUE,
 
      f = Number.MAX_VALUE,
 
      e = Number.MIN_VALUE,
 
      g = Number.MIN_VALUE;
 
    a = 0;
 
    for(b = this.c.length; a < b; ++a) c = this.c[a], d = Math.min(d, c.a.x + c.j), e = Math.max(d, c.a.x - c.j), f = Math.min(f, c.a.y + c.j), g = Math.max(f, c.a.y - c.j), c.update();
 
    a = 0;
 
    for(b = this.h.length; a < b; ++a) this.h[a].update();
 
    if(e < 0 || d > window.innerWidth || g < 0 || f > window.innerHeight) this.o = !0
 
  },
 
  i: function(a) {
 
    var b, c;
 
    b = 0;
 
    for(c = this.h.length; b < c; ++b) this.h[b].i(a);
 
    b = 0;
 
    for(c = this.c.length; b < c; ++b) this.c[b].i(a)
 
  },
 
  s: function() {
 
    this.h = this.c = null
 
  }
 
};
 
(new function() {
 
  function a() {
 
    var e, g, n = d.length;
 
    if(f) for(e = 0; e < n; ++e) g = d[e], g.o ? (g.s(), d[e] = new m) : g.update();
 
    else {
 
      b.width = b.width;
 
      c.globalAlpha = 0.8;
 
      c.globalCompositeOperation = "lighter";
 
      for(e = 0; e < n; ++e) d[e].i(c)
 
    }
 
    f = !f;
 
    requestAnimationFrame(a)
 
  }
 
  var b = document.getElementById("canvas"),
 
    c = b.getContext("2d"),
 
    d = [],
 
    f = !0;
 
  this.m = function() {
 
    b.width = window.innerWidth;
 
    b.height = window.innerHeight;
 
    for(var c = 0; c < 15; ++c) d.push(new m);
 
    window.addEventListener("resize", function() {
 
      b.width = window.innerWidth;
 
      b.height = window.innerHeight
 
    }, !1);
 
    a()
 
  }
 
}).m();
 
 
</script>
 
</script>
 
+
  <!-- RequireJS script -->
</body>
+
  <script src="scripts/require.js?crc=244322403" type="text/javascript" async data-main="scripts/museconfig.js?crc=36584860" onload="if (requirejs) requirejs.onError = function(requireType, requireModule) { if (requireType && requireType.toString && requireType.toString().indexOf && 0 <= requireType.toString().indexOf('#scripterror')) window.Muse.assets.check(); }" onerror="window.Muse.assets.check();"></script>
 +
  </body>
 
</html>
 
</html>

Revision as of 03:31, 24 July 2018

Home

hellow world

sdada

asdasdas