Strip trailing whitespace

alternate-visualiser
William Toohey 10 years ago
parent ed78cf6e95
commit 33f492cc7e
  1. 5
      js/HuesCanvas.js
  2. 5
      js/HuesCore.js
  3. 1
      js/ResourcePack.js

@ -273,6 +273,9 @@ HuesCanvas.prototype.syncAnim = function() {
var aLen = this.image.bitmaps.length;
this.animFrame = Math.floor(aLen * (beatLoc / this.image.beatsPerAnim));
if(this.image.syncOffset) {
this.animFrame += this.image.syncOffset;
}
// Because negative mods are different in JS
this.animFrame = ((this.animFrame % aLen) + aLen) % aLen;
};
@ -368,7 +371,7 @@ HuesCanvas.prototype.setBlurDecay = function(decay) {
};
HuesCanvas.prototype.setBlurQuality = function(quality) {
this.blurIterations = {"low" : 3, "medium" : 11, "high" : 19, "extreme" : 35}[quality];
this.blurIterations = {"low" : -1, "medium" : 11, "high" : 19, "extreme" : 35}[quality];
this.blurDelta = 1 / (this.blurIterations/2);
this.blurAlpha = 1 / (this.blurIterations/2);
};

@ -22,7 +22,7 @@
/* We don't want localstorage variables optimised to different identifiers*/
/*jshint -W069 */
HuesCore = function(defaults) {
function HuesCore(defaults) {
// Bunch-o-initialisers
this.version = "0x01";
this.beatIndex = 0;
@ -101,7 +101,7 @@ HuesCore = function(defaults) {
};
this.animationLoop();
};
}
HuesCore.prototype.animationLoop = function() {
var that = this;
@ -381,6 +381,7 @@ HuesCore.prototype.beater = function(beat) {
if(this.isFullAuto) {
this.randomImage();
}
/* falls through */
case '~':
// case: fade in build, not in rhythm. Must max out fade timer.
var maxSearch = this.currentSong.rhythm.length;

@ -350,6 +350,7 @@ Respack.prototype.parseImageFile = function(text) {
// self reference defaults to avoid changing strings twice in future
image.align = el.getTag("align", image.align);
image.beatsPerAnim = parseFloat(el.getTag("beatsPerAnim"));
image.syncOffset = parseFloat(el.getTag("syncOffset"));
var frameDur = el.getTag("frameDuration");
if(frameDur) {
image.frameDurations = [];

Loading…
Cancel
Save