Drastically improve Xmas UI performance

master
William Toohey 10 years ago
parent 42384d86d3
commit 7034df2a5e
  1. 6
      css/hues-x.css
  2. BIN
      img/lightoff.png
  3. BIN
      img/lighton.png
  4. 6
      js/HuesUI.js

@ -39,8 +39,10 @@
.hues-x-lighton, .hues-x-lightoff {
position: absolute;
width: 68px;
height: 113px;
width: 56px;
height: 81px;
left: 5px;
top: 9px;
background-repeat: no-repeat;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 26 KiB

@ -882,9 +882,9 @@ XmasUI.prototype.lightFadeOut = function(light) {
};
XmasUI.prototype.lightRecolour = function(light) {
var hue = Math.random() * 360;
light.bulb.style.filter = "hue-rotate(" + hue + "deg)";
light.bulb.style.webkitFilter = "hue-rotate(" + hue + "deg)";
var hue = Math.floor(Math.random() * 7) * -56;
light.on.style.backgroundPosition = hue + "px, 0, center";
light.off.style.backgroundPosition = hue + "px, 0, center";
};
XmasUI.prototype.randomLight = function(light) {

Loading…
Cancel
Save