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; var aLen = this.image.bitmaps.length;
this.animFrame = Math.floor(aLen * (beatLoc / this.image.beatsPerAnim)); 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 // Because negative mods are different in JS
this.animFrame = ((this.animFrame % aLen) + aLen) % aLen; this.animFrame = ((this.animFrame % aLen) + aLen) % aLen;
}; };
@ -368,7 +371,7 @@ HuesCanvas.prototype.setBlurDecay = function(decay) {
}; };
HuesCanvas.prototype.setBlurQuality = function(quality) { 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.blurDelta = 1 / (this.blurIterations/2);
this.blurAlpha = 1 / (this.blurIterations/2); this.blurAlpha = 1 / (this.blurIterations/2);
}; };

@ -22,7 +22,7 @@
/* We don't want localstorage variables optimised to different identifiers*/ /* We don't want localstorage variables optimised to different identifiers*/
/*jshint -W069 */ /*jshint -W069 */
HuesCore = function(defaults) { function HuesCore(defaults) {
// Bunch-o-initialisers // Bunch-o-initialisers
this.version = "0x01"; this.version = "0x01";
this.beatIndex = 0; this.beatIndex = 0;
@ -101,7 +101,7 @@ HuesCore = function(defaults) {
}; };
this.animationLoop(); this.animationLoop();
}; }
HuesCore.prototype.animationLoop = function() { HuesCore.prototype.animationLoop = function() {
var that = this; var that = this;
@ -381,6 +381,7 @@ HuesCore.prototype.beater = function(beat) {
if(this.isFullAuto) { if(this.isFullAuto) {
this.randomImage(); this.randomImage();
} }
/* falls through */
case '~': case '~':
// case: fade in build, not in rhythm. Must max out fade timer. // case: fade in build, not in rhythm. Must max out fade timer.
var maxSearch = this.currentSong.rhythm.length; 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 // self reference defaults to avoid changing strings twice in future
image.align = el.getTag("align", image.align); image.align = el.getTag("align", image.align);
image.beatsPerAnim = parseFloat(el.getTag("beatsPerAnim")); image.beatsPerAnim = parseFloat(el.getTag("beatsPerAnim"));
image.syncOffset = parseFloat(el.getTag("syncOffset"));
var frameDur = el.getTag("frameDuration"); var frameDur = el.getTag("frameDuration");
if(frameDur) { if(frameDur) {
image.frameDurations = []; image.frameDurations = [];

Loading…
Cancel
Save