<head> <title>I love youtitle> head> <body> <divid="child"> <h4>💗我永远为你着迷h4> div>
<canvasid="pinkboard">canvas>
<script> /* * Settings */ var settings = { particles: { length: 500, // maximum amount of particles duration: 2, // particle duration in sec velocity: 100, // particle velocity in pixels/sec effect: -0.75, // play with this for a nice effect size: 30, // particle size in pixels }, };
/* * RequestAnimationFrame polyfill by Erik Möller */ (function () { var b = 0; var c = ["ms", "moz", "webkit", "o"]; for (var a = 0; a window.requestAnimationFrame; ++a) { window.requestAnimationFrame = window[c[a] + "RequestAnimationFrame"]; window.cancelAnimationFrame = window[c[a] + "CancelAnimationFrame"] || window[c[a] + "CancelRequestAnimationFrame"] } if (!window.requestAnimationFrame) { window.requestAnimationFrame = function (h, e) { var d = newDate().getTime(); var f = Math.max(0, 16 - (d - b)); var g = window.setTimeout(function () { h(d + f) }, f); b = d + f; return g } } if (!window.cancelAnimationFrame) { window.cancelAnimationFrame = function (d) { clearTimeout(d) } } }());
/* * Point class */ varPoint = (function () { functionPoint(x, y) { this.x = (typeof x !== 'undefined') ? x : 0; this.y = (typeof y !== 'undefined') ? y : 0; } Point.prototype.clone = function () { returnnewPoint(this.x, this.y); }; Point.prototype.length = function (length) { if (typeof length == 'undefined') returnMath.sqrt(this.x * this.x + this.y * this.y); this.normalize(); this.x *= length; this.y *= length; returnthis; }; Point.prototype.normalize = function () { var length = this.length(); this.x /= length; this.y /= length; returnthis; }; returnPoint; })(); script> body>