Commit dca937d6 by doszhang

dos

parent 053a6de7
......@@ -51,6 +51,8 @@ var canvas, ctx, w, h, particles = [],
probability = 0.04,
xPoint, yPoint;
var fireworkLock = false;
$(document).ready(function () {
if ($('.page').height() < document.documentElement.clientHeight) {
var scale = document.documentElement.clientHeight / $('.page').height();
......@@ -72,8 +74,10 @@ $(document).ready(function () {
});
function toPage2() {
$('.container').css('overflow-x', 'scroll').css('overflow-y', 'hidden');
$('.page1').hide();
$('.page2').show();
fireworkLock = false;
}
function toPage3() {
......@@ -125,7 +129,9 @@ function updateWorld() {
canvas.width = 640;
update();
paint();
window.requestAnimationFrame(updateWorld);
if (!fireworkLock) {
window.requestAnimationFrame(updateWorld);
}
}
function update() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment