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

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

@ -346,7 +346,7 @@ Respack.prototype.parseImageFile = function(text) {
debug(" WARNING!", image.name, "has no full name!"); debug(" WARNING!", image.name, "has no full name!");
} }
image.source = el.getTag("source"); 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); image.align = el.getTag("align", image.align);
var frameDur = el.getTag("frameDuration"); var frameDur = el.getTag("frameDuration");
if(frameDur) { if(frameDur) {

Loading…
Cancel
Save