Minor code cleanup

serial
William Toohey 10 years ago
parent 4395a698fa
commit 42056cee40
  1. 20
      js/HuesCanvas.js
  2. 4
      js/HuesCore.js
  3. 2
      js/ResourcePack.js

@ -32,17 +32,17 @@ function HuesCanvas(element, aContext, core) {
this.image = null;
this.smartAlign = true; // avoid string comparisons every frame
this.animTimeout;
this.animFrame;
this.animTimeout = null;
this.animFrame = null;
// set later
this.blurDecay;
this.blurAmount;
this.blurIterations;
this.blurMin;
this.blurMax;
this.blurDelta;
this.blurAlpha;
this.blurDecay = null;
this.blurAmount = null;
this.blurIterations = null;
this.blurMin = null;
this.blurMax = null;
this.blurDelta = null;
this.blurAlpha = null;
// dynamic
this.blurStart = 0;
this.blurDistance = 0;
@ -51,7 +51,7 @@ function HuesCanvas(element, aContext, core) {
this.blackout = false;
this.blackoutColour = "#000"; // for the whiteout case we must store this
this.blackoutTimeout;
this.blackoutTimeout = null;
this.colourFade = false;
this.colourFadeStart=0;

@ -24,8 +24,8 @@ HuesCore = function(defaults) {
this.version = "0x01";
this.beatIndex = 0;
this.beatLength=-1;
this.currentSong;
this.currentImage;
this.currentSong = null;
this.currentImage = null;
this.songIndex=-1;
this.colourIndex=0x3f;
this.imageIndex=-1;

@ -346,7 +346,7 @@ Respack.prototype.parseImageFile = function(text) {
debug(" WARNING!", image.name, "has no full name!");
}
image.source = el.getTag("source");
// self reference strings to avoid changing strings twice in future
// self reference defaults to avoid changing strings twice in future
image.align = el.getTag("align", image.align);
var frameDur = el.getTag("frameDuration");
if(frameDur) {

Loading…
Cancel
Save