|
2 | 2 |
|
3 | 3 | (function (factory) { |
4 | 4 | if (typeof define === 'function' && define.amd) { |
5 | | - define(['jquery', 'router', 'toastr', 'optional!simplestorage', 'optional!moment-timezone', 'optional!ga', 'optional!octokat', 'optional!esheep', 'optional!clippy'], factory); |
| 5 | + define(['jquery', 'router', 'toastr', 'optional!simplestorage', 'optional!moment-timezone', 'optional!ga', 'optional!octokat', 'optional!esheep', 'optional!clippy', 'optional!fireworks'], factory); |
6 | 6 | } else { // noinspection DuplicatedCode |
7 | 7 | if (typeof module === 'object' && module.exports) { |
8 | 8 | module.exports = function(root, jQuery) { |
|
22 | 22 | factory(jQuery); |
23 | 23 | } |
24 | 24 | } |
25 | | -} (function ($, Router, toastr, simplestorage, moment, ga, Octokat, eSheep, clippy) { |
| 25 | +} (function ($, Router, toastr, simplestorage, moment, ga, Octokat, eSheep, clippy, Fireworks) { |
26 | 26 | var root = location.hostname === 'localhost' ? 'https://emupedia.net' : ''; |
27 | 27 | var hash = location.hash.toString(); |
28 | 28 | var resizeTimeout = null; |
|
874 | 874 | } |
875 | 875 |
|
876 | 876 | if (moment().date() === 31) { |
877 | | - newyear += '<div class="fireworks">' + |
878 | | - '<div class="fireworks-before"></div>' + |
879 | | - '<div class="fireworks-after"></div>' + |
880 | | - '</div>'; |
| 877 | + newyear += '<div class="fireworks-container" style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none;"></div>'; |
881 | 878 | } |
882 | 879 |
|
883 | 880 | self.$desktop.prepend(newyear); |
884 | 881 |
|
| 882 | + if (moment().date() === 31) { |
| 883 | + var fireworks = new Fireworks.default($('.fireworks-container').get(0), { |
| 884 | + opacity: 0.3, |
| 885 | + acceleration: 1.02, |
| 886 | + friction: 0.98, |
| 887 | + particles: 80, |
| 888 | + intensity: 20, |
| 889 | + hue: { |
| 890 | + min: 0, |
| 891 | + max: 360 |
| 892 | + }, |
| 893 | + delay: { |
| 894 | + min: 40, |
| 895 | + max: 60 |
| 896 | + }, |
| 897 | + rocketsPoint: { |
| 898 | + min: 40, |
| 899 | + max: 60 |
| 900 | + }, |
| 901 | + brightness: { |
| 902 | + min: 40, |
| 903 | + max: 80 |
| 904 | + }, |
| 905 | + decay: { |
| 906 | + min: 0.01, |
| 907 | + max: 0.02 |
| 908 | + } |
| 909 | + }); |
| 910 | + |
| 911 | + fireworks.start(); |
| 912 | + } |
| 913 | + |
885 | 914 | if (moment().date() >= 26) { |
886 | 915 | function timeLeft(endtime) { |
887 | 916 | // noinspection JSCheckFunctionSignatures |
|
0 commit comments