SoFunction
Updated on 2025-03-02

jQuery love tree confession animation produced by HTML5


<!DOCTYPE html>
<html xmlns="http:///1999/xhtml"> charset="UTF-8" >
<title>Programmers use HTML5 to express love tree animation - Ke Leyi</title><base target="_blank" href="/keleyi/phtml/html5/" />
<link type="text/css" rel="stylesheet" href="/keleyi/phtml/html5/31/renxi/">
<script type="text/javascript" src="/keleyi/pmedia/jquery/jquery-1.11.">>
<script type="text/javascript" src="/keleyi/phtml/html5/31/renxi/">>
<script type="text/javascript" src="/keleyi/phtml/html5/31/renxi/">>
<script type="text/javascript" src="/keleyi/phtml/html5/31/renxi/">>
<script type="text/javascript" src="/keleyi/phtml/html5/31/renxi/">>
<script type="text/javascript" src="/keleyi/phtml/html5/31/renxi/">>
<script type="text/javascript" src="/keleyi/phtml/html5/31/renxi/">>
<script type="text/javascript" src="/keleyi/phtml/html5/31/renxi/" charset="utf-8"></script>
<script type="text/javascript" src="/keleyi/phtml/html5/31/renxi/" charset="utf-8"></script>
<style type="text/css">
<!--
.STYLE1 {color: #666666}
-->
</style>
</head>
<body>
<div >
<div > This page uses HTML5 technology. At present, your browser cannot display it. Please use a browser that supports HTML5 to view this page. </div>
<div >
<div >
<div >
<p> <font color="#FF0000"> <span class="say">Dear He Wenqi:</span><br>
<span class="say"></span><br />
<span class="say">Once upon a time,</span><br>
<span class="say">There is a sincere love in front of me,</span><br />
<span class="say">I don't cherish it,</span><br />
<span class="say">I regret it until I lost it,</span><br>
<span class="say">This is the most painful thing in the world...</span><br>
<span class="say">If God can give me a chance to do it again,</span><br>
<span class="say">I will say six words to that girl:</span><br>
<span class="say">He Wenqi, I love you! </span><br />
<span class="say">If you have to add a deadline to this love,</span><br>
<span class="say">I hope it is... </span><br>
<span class="say">Ten thousand years! </span><br />
<span class="say"><span class="space"></span> -- Ke Leyi, who loves you-</span>
</font></p>
</div>
</div>
<div >
<script type="text/javascript" src="/kineryi/js/"></script>
</div>
<canvas width="1100" height="680"></canvas>
</div>
</div>
<script>
(function(){
var canvas = $('#ke'+'leyi');
if (!canvas[0].getContext) {
$("#error").show();
return false; }
var width = ();
var height = ();
("width", width);
("height", height);
var opts = {
seed: {
x: width / 2 - 20,
color: "rgb(190, 26, 37)",
scale: 2
},
branch: [
[535, 680, 570, 250, 500, 200, 30, 100, [
[540, 500, 455, 417, 340, 400, 13, 100, [
[450, 435, 434, 430, 394, 395, 2, 40]
]],
[550, 445, 600, 356, 680, 345, 12, 100, [
[578, 400, 648, 409, 661, 426, 3, 80]
]],
[539, 281, 537, 248, 534, 217, 3, 40],
[546, 397, 413, 247, 328, 244, 9, 80, [
[427, 286, 383, 253, 371, 205, 2, 40],
[498, 345, 435, 315, 395, 330, 4, 60]
]],
[546, 357, 608, 252, 678, 221, 6, 100, [
[590, 293, 646, 277, 648, 271, 2, 80]
]]
]]
],
bloom: {
num: 700,
width: 1080,
height: 650,
},
footer: {
width: 1200,
height: 5,
speed: 10,
}
}
var tree = new Tree(canvas[0], width, height, opts);
var seed = ;
var foot = ;
var hold = 1;
(function(e) {
var offset = (), x, y;
x = - ;
y = - ;
if ((x, y)) {
hold = 0;
("click");
("mousemove");
('hand');
}
}).mousemove(function(e){
var offset = (), x, y;
x = - ;
y = - ;
('hand', (x, y));
});
var seedAnimate = eval(("async", function () {
();
while (hold) {
$await((10));
}
while (()) {
(0.95);
$await((10));
}
while (()) {
(0, 2);
();
$await((10));
}
}));
var growAnimate = eval(("async", function () {
do {
();
$await((10));
} while (());
}));
var flowAnimate = eval(("async", function () {
do {
(2);
$await((10));
} while (());
}));
var moveAnimate = eval(("async", function () {
("p1", 240, 0, 610, 680);
while (("p1", 500, 0)) {
();
$await((10));
}
();
("p2", 500, 0, 610, 680);
// There will be flashing and unsatisfactory doing this, (>﹏<)
().css("background", "url(" + ('image/png') + ")");
("background", "#ffe");
$await((300));
("background", "none");
}));
var jumpAnimate = eval(("async", function () {
var ctx = ;
while (true) {
(0, 0, width, height);
();
();
$await((25));
}
}));
var textAnimate = eval(("async", function () {
$("#code").show().typewriter();
}));
var runAsync = eval(("async", function () {
$await(seedAnimate());
$await(growAnimate());
$await(flowAnimate());
$await(moveAnimate());
textAnimate().start();
$await(jumpAnimate());
}));
runAsync().start();
})();
</script>
<div style="text-align:center;margin:50px 0; font:normal 14px/24px 'MicroSoft YaHei';">
<p>Applicable browsers: 360, FireFox, Chrome, Safari, Opera, Aoyou, Sogou, Window of the World. It does not support IE8 and below browsers. </p>
</div>
</body>
</html>