<!DOCTYPE html>
<html>
<head>
<title></title>
<script src="js/jquery.min.js"></script>
</head>
<style>
* {
padding: 0;
margin: 0;
}
html,
body {
height: 100%;
padding: 0;
margin: 0;
background: #000;
}
.aa {
position: fixed;
left: 50%;
bottom: 10px;
color: #ccc;
}
.img {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 320px;
height: 460px;
}
.container {
width: 100%;
height: 100%;
}
canvas {
z-index: 99;
position: absolute;
width: 100%;
height: 100%;
}
</style>
<body>
<div id="jsi-cherry-container" class="container">
<div id="div1" style="text-align: center; margin-top:20%;">
<input type="text" id="numberInput" placeholder="请输入最后一个名字拼音解锁" style="height: 30px;width:300px;">
<button onclick="calculateSum()" style="height: 36px;width:80px;background: #2eb9f2">解锁</button>
</div>
<div id="div2">
<audio autoplay="autopaly">
<source src="renx.mp3" type="audio/mp3" />
</audio>
<img class="img" src="http://smart.qiniu.slowcom.cn/cyf3v91t3hdxnumph0.jpg" alt="" />
<!-- 爱心 -->
<canvas id="pinkboard" class="container"> </canvas>
</div>
</div>
<script>
document.getElementById("div1").style.display = "block";
document.getElementById("div2").style.display = "none";
function calculateSum() {
var input = document.getElementById("numberInput").value;
if(input == "yuan"){
document.getElementById("div1").style.display = "none";
document.getElementById("div2").style.display = "block";
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
},
};
(function () {
var b = 0;
var c = ["ms", "moz", "webkit", "o"];
for (var a = 0; a < c.length && !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 = new Date().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);
};
}
})();
var Point = (function () {
function Point(x, y) {
this.x = typeof x !== "undefined" ? x : 0;
this.y = typeof y !== "undefined" ? y : 0;
}
Point.prototype.clone = function () {
return new Point(this.x, this.y);
};
Point.prototype.length = function (length) {
if (typeof length == "undefined")
return Math.sqrt(this.x * this.x + this.y * this.y);
this.normalize();
this.x *= length;
this.y *= length;
return this;
};
Point.prototype.normalize = function () {
var length = this.length();
this.x /= length;
this.y /= length;
return this;
};
return Point;
})();
var Particle = (function () {
function Particle() {
this.position = new Point();
this.velocity = new Point();
this.acceleration = new Point();
this.age = 0;
}
Particle.prototype.initialize = function (x, y, dx, dy) {
this.position.x = x;
this.position.y = y;
this.velocity.x = dx;
this.velocity.y = dy;
this.acceleration.x = dx * settings.particles.effect;
this.acceleration.y = dy * settings.particles.effect;
this.age = 0;
};
Particle.prototype.update = function (deltaTime) {
this.position.x += this.velocity.x * deltaTime;
this.position.y += this.velocity.y * deltaTime;
this.velocity.x += this.acceleration.x * deltaTime;
this.velocity.y += this.acceleration.y * deltaTime;
this.age += deltaTime;
};
Particle.prototype.draw = function (context, image) {
function ease(t) {
return --t * t * t + 1;
}
var size = image.width * ease(this.age / settings.particles.duration);
context.globalAlpha = 1 - this.age / settings.particles.duration;
context.drawImage(
image,
this.position.x - size / 2,
this.position.y - size / 2,
size,
size
);
};
return Particle;
})();
var ParticlePool = (function () {
var particles,
firstActive = 0,
firstFree = 0,
duration = settings.particles.duration;
function ParticlePool(length) {
// create and populate particle pool
particles = new Array(length);
for (var i = 0; i < particles.length; i++)
particles[i] = new Particle();
}
ParticlePool.prototype.add = function (x, y, dx, dy) {
particles[firstFree].initialize(x, y, dx, dy);
// handle circular queue
firstFree++;
if (firstFree == particles.length) firstFree = 0;
if (firstActive == firstFree) firstActive++;
if (firstActive == particles.length) firstActive = 0;
};
ParticlePool.prototype.update = function (deltaTime) {
var i;
// update active particles
if (firstActive < firstFree) {
for (i = firstActive; i < firstFree; i++)
particles[i].update(deltaTime);
}
if (firstFree < firstActive) {
for (i = firstActive; i < particles.length; i++)
particles[i].update(deltaTime);
for (i = 0; i < firstFree; i++) particles[i].update(deltaTime);
}
没有合适的资源?快使用搜索试试~ 我知道了~
star,星星,图片资源
共57个文件
html:23个
jpg:21个
js:9个
需积分: 5 0 下载量 89 浏览量
2024-03-13
14:19:53
上传
评论
收藏 56.46MB RAR 举报
温馨提示
star,星星,图片资源
资源推荐
资源详情
资源评论
收起资源包目录
star.rar (57个子文件)
star
heart_to_叶.html 16KB
star_to_雪.html 16KB
star_to_芮.html 16KB
star_to_梅.html 16KB
start_to_妍.html 16KB
star_to_婷1.html 16KB
happy birthday to Li.html 16KB
star_to_娟.html 16KB
star_to_mei.html 16KB
star_to_橘.html 16KB
star_to_娜.html 16KB
star_to_静.html 16KB
star_to_园.html 19KB
star_to_莹.html 16KB
star_to_娇.html 16KB
star_to_旋.html 16KB
star_to_婷.html 16KB
my_girl
my_girl.html 8KB
index_files
default.css 768B
jscex-builderbase.min.js 2KB
jscex-jit.js 49KB
functions.js 2KB
jscex-parser.js 52KB
jquery.min.js 92KB
jscex-async-powerpack.min.js 4KB
jscex.min.js 880B
jscex-async.min.js 4KB
love.js 17KB
image
2.jpg 6.94MB
1.jpg 5.71MB
5.jpg 9.62MB
3.jpg 6.07MB
4.jpg 6.79MB
star_to_阳.html 16KB
star_to_宝1.html 16KB
star_to_清.html 16KB
heart_to_攀.html 16KB
star_to_倩.html 16KB
star_image
2.jpg 327KB
10.jpg 82KB
婷1.jpg 11.6MB
13.jpg 373KB
14.jpg 708KB
15.jpg 223KB
12.png 826KB
1.jpg 707KB
椒.jpg 706KB
园.jpg 2.14MB
5.jpg 119KB
6.png 777KB
8.jpg 340KB
11.jpg 463KB
蝶.jpg 1.16MB
7.png 689KB
3.jpg 764KB
9.jpg 650KB
4.jpg 395KB
共 57 条
- 1
资源评论
FutureCome
- 粉丝: 41
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功