Commit c58e710d by doszhang

dos

parent c9477f9a
...@@ -99,6 +99,43 @@ input::-webkit-input-placeholder { ...@@ -99,6 +99,43 @@ input::-webkit-input-placeholder {
-webkit-animation: all 5s ease forwards; -webkit-animation: all 5s ease forwards;
} }
canvas {
opacity: 0;
}
.posterImg {
animation: fadeInUp 0.7s ease-out backwards;
-webkit-animation: fadeInUp 0.7s ease-out backwards;
}
@-webkit-keyframes fadeInUp {
0% {
opacity: 0;
-webkit-transform: translate3d(0, 100%, 0);
transform: translate3d(0, 100%, 0)
}
to {
opacity: 1;
-webkit-transform: none;
transform: none
}
}
@keyframes fadeInUp {
0% {
opacity: 0;
-webkit-transform: translate3d(0, 100%, 0);
transform: translate3d(0, 100%, 0)
}
to {
opacity: 1;
-webkit-transform: none;
transform: none
}
}
@-webkit-keyframes fadeOutLeft { @-webkit-keyframes fadeOutLeft {
0% { 0% {
opacity: 1 opacity: 1
......
...@@ -46,10 +46,12 @@ if ($('div').length > 0) { ...@@ -46,10 +46,12 @@ if ($('div').length > 0) {
$('.loading-page').show(); $('.loading-page').show();
preloadimages(preloadImageList, function () { preloadimages(preloadImageList, function () {
$('.loading-page').hide();
// $('.home-page').show(); createPoster(function () {
$('.poster-page').show(); $('.loading-page').hide();
createPoster(); // $('.home-page').show();
$('.poster-page').show();
});
}, function (progress) { }, function (progress) {
$('.loading-page .progress').css('width', (16.6 / 100) * (progress * 100) + 'rem'); $('.loading-page .progress').css('width', (16.6 / 100) * (progress * 100) + 'rem');
}); });
...@@ -138,7 +140,7 @@ $(document).ready(function () { ...@@ -138,7 +140,7 @@ $(document).ready(function () {
}); });
}); });
function createPoster() { function createPoster(callback) {
$('.poster-bg').hide(); $('.poster-bg').hide();
$('.poster-bg-' + resultType).show(); $('.poster-bg-' + resultType).show();
...@@ -178,6 +180,7 @@ function createPoster() { ...@@ -178,6 +180,7 @@ function createPoster() {
drawRoundRectImg(posterCtx, designPxToRealPx(5) * 2, designPxToRealPx(canvasArr[resultType - 1][5]), designPxToRealPx(canvasArr[resultType - 1][4]), designPxToRealPx(46) * 2, designPxToRealPx(46) * 2, headimg); drawRoundRectImg(posterCtx, designPxToRealPx(5) * 2, designPxToRealPx(canvasArr[resultType - 1][5]), designPxToRealPx(canvasArr[resultType - 1][4]), designPxToRealPx(46) * 2, designPxToRealPx(46) * 2, headimg);
txtDraw(posterCtx, '@' + window.nickname, designPxToRealPx(canvasArr[resultType - 1][5] + 128), designPxToRealPx(canvasArr[resultType - 1][4] + 84), designPxToRealPx(20), 'normal', canvasArr[resultType - 1][6]); txtDraw(posterCtx, '@' + window.nickname, designPxToRealPx(canvasArr[resultType - 1][5] + 128), designPxToRealPx(canvasArr[resultType - 1][4] + 84), designPxToRealPx(20), 'normal', canvasArr[resultType - 1][6]);
$('.posterImg').attr('src', getManBase64(posterCanvas)); $('.posterImg').attr('src', getManBase64(posterCanvas));
callback();
} }
} }
} }
......
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