EVR.include("level/cheers/marquee/Spectrum.js");
EVR.Level.Cheers.Marquee = function(
   cheers, color_offset, placement_offset, z_index, opacity)
{
   EVR.Graphic.call(this, cheers);
   this.cheers = cheers;
   this.spectrum = new EVR.Level.Cheers.Marquee.Spectrum(color_offset);
   this.placement_offset = placement_offset || [0, 0];
   this.z_index = z_index || 0;
   this.spectrum_index = CHEERS_SPECTRUM_STARTING_INDEX;
   this.font_size = CHEERS_FONT_SIZE;
   this.opacity = opacity;
   this.glyphs = [];
   this.setAttributes();
   this.append();
}
EVR.Level.Cheers.Marquee.prototype = new EVR.Graphic;
EVR.Level.Cheers.Marquee.prototype.setAttributes = function()
{
   this.set_z(this.z_index);
   this.set_opacity(this.opacity);
   var css = this.css;
   css.fontWeight = "bold";
   css.textAlign = "left";
   css.whiteSpace = "nowrap";
   this.setFontSize();
}
EVR.Level.Cheers.Marquee.prototype.setFontSize = function()
{
   var dimensions = this.cheers.level.container.get_dimensions();
   var modifier = dimensions[1] / dimensions[0];
   var basis = dimensions[0] * modifier;
   var size = parseInt(basis * this.font_size);
   this.css.fontSize = size + "px";
   this.whitespace_length = basis * CHEERS_GLYPH_PADDING;
}
EVR.Level.Cheers.Marquee.prototype.place = function()
{
   EVR.Graphic.prototype.place.call(this, 0, CHEERS_MARQUEE_OFFSET);
   var x = this.get_coordinates()[0] + this.placement_offset[0];
   var y = this.get_coordinates()[1] + this.placement_offset[1];
   this.set_coordinates([x, y]);
}
EVR.Level.Cheers.Marquee.prototype.addCheer = function(cheer)
{
   var parent = this.element;
   for (var ii = cheer.length - 1; ii >= 0; ii--)
   {
      var color = this.spectrum.get(this.spectrum_index);
      this.addGlyph(cheer.charAt(ii), color, ii == cheer.length - 1);
   }
}
EVR.Level.Cheers.Marquee.prototype.addGlyph = function(character, color, pad)
{
   var parent = this.element;
   var element = document.createElement("span");
   element.innerHTML = character;
   element.style.color = color;
   parent.insertBefore(element, parent.firstChild);
   if (pad)
   {
      element.style.paddingRight = this.whitespace_length + "px";
   }
   this.glyphs.push(element);
   this.spectrum_index++;
}
EVR.Level.Cheers.Marquee.prototype.addJeer = function()
{
   var color = CHEERS_JEER_COLOR;
   var jeer = CHEERS_JEER_TEXT;
   for (var ii = jeer.length - 1; ii >= 0; ii--)
   {
      this.addGlyph(jeer.charAt(ii), color, ii == jeer.length - 1);
   }
}
EVR.Level.Cheers.Marquee.prototype.draw = function()
{
   EVR.Graphic.prototype.draw.call(this);
   this.setFontSize();
   var glyph, glyphs = this.glyphs;
   for (var ii = 0; ii < glyphs.length; ii++)
   {
      glyph = glyphs[ii];
      if (parseInt(glyph.style.paddingRight) > 0)
      {
	 glyph.style.paddingRight = this.whitespace_length;
      }
   }
}
EVR.Level.Cheers.Marquee.prototype.toString = function()
{
   return "[EVR.Level.Cheers.Marquee]";
}
EVR.Level.Cheers.Marquee.Spectrum = function(offset)
{
   this.offset = offset;
   this.build();
}
EVR.Level.Cheers.Marquee.Spectrum.prototype.build = function()
{
   var max = 255 - this.offset;
   var count = CHEERS_SPECTRUM_LENGTH;
   var interval = Math.round(count / 6);
   var step = Math.round(max / (interval - 1));
   var component, color, spectrum = [];
   for (var ii = 0; ii < interval; ii++)
   {
      component = step * ii;
      spectrum.push(new EVR.Color([max, component, 0]));
   }
   for (var ii = interval - 1; ii >= 0; ii--)
   {
      component = step * ii;
      spectrum.push(new EVR.Color([component, max, 0]));
   }
   for (var ii = 0; ii < interval; ii++)
   {
      component = step * ii;
      spectrum.push(new EVR.Color([0, max, component]));
   }
   for (var ii = interval - 1; ii >= 0; ii--)
   {
      component = step * ii;
      spectrum.push(new EVR.Color([0, component, max]));
   }
   for (var ii = 0; ii < interval; ii++)
   {
      component = step * ii;
      spectrum.push(new EVR.Color([component, 0, max]));
   }
   for (var ii = interval - 1; ii >= 0; ii--)
   {
      component = step * ii;
      spectrum.push(new EVR.Color([max, 0, component]));
   }
   this.spectrum = spectrum;
}
EVR.Level.Cheers.Marquee.Spectrum.prototype.get = function(index)
{
   var spectrum = this.spectrum;
   return spectrum[index % spectrum.length].get_string();
}
EVR.Level.Cheers.Marquee.Spectrum.toString = function()
{
   return "[object EVR.Level.Cheers.Marquee.Spectrum]";
}
EVR.include("level/loader/Parser.js");
EVR.Level.Loader = function(level)
{
   this.level = level;
}
EVR.Level.Loader.prototype.load = function()
{
   this.build_requester();
   var document = this.requester.execute();
   this.parser = new EVR.Level.Loader.Parser(this.level, document);
}
EVR.Level.Loader.prototype.build_requester = function()
{
   var path = SOURCE_PATH + "level/loader/fetch.php";
   var query = "id=" + this.level.id;
   this.requester = new EVR.Requester(path, query);
}
EVR.Level.Loader.prototype.toString = function()
{
   return "[object EVR.Level.Loader]";
}
EVR.Level.Loader.Parser = function(level, document)
{
   this.level = level;
   this.root = document.getElementsByTagName("level")[0];
   this.parse();
}
EVR.Level.Loader.Parser.prototype.parse = function()
{
   this.parse_attributes();
   this.parse_sky();
   this.parse_beams();
   this.parse_path();
}
EVR.Level.Loader.Parser.prototype.parse_attributes = function()
{
   var level = this.level;
   var root = this.root;
   level.background = root.getAttribute("background");
   level.goal = new EVR.Time(root.getAttribute("goal"));
   level.advanced = new EVR.Time(root.getAttribute("advanced"));
   level.threshold = parseFloat(root.getAttribute("threshold"));
   level.sound.set_song(root.getAttribute("song"));
}
EVR.Level.Loader.Parser.prototype.parse_sky = function()
{
   var node = this.root.getElementsByTagName("sky")[0];
   var tags = node.getElementsByTagName("background");
   var sky = this.level.sky = [];
   for (var ii = 0; ii < tags.length; ii++)
   {
      sky.push(tags[ii].getAttribute("color"));
   }
}
EVR.Level.Loader.Parser.prototype.parse_beams = function()
{
   var node = this.root.getElementsByTagName("beams")[0];
   var tags = node.getElementsByTagName("beam");
   this.level.beams = [];
   for (var ii = 0; ii < tags.length; ii++)
   {
      this.level.beams.push(tags[ii].getAttribute("color"));
   }
}
EVR.Level.Loader.Parser.prototype.parse_path = function()
{
   var node = this.root.getElementsByTagName("path")[0];
   var tags = node.getElementsByTagName("cluster");
   this.level.clusters = [];
   for (var ii = 0; ii < tags.length; ii++)
   {
      this.add_cluster(tags[ii]);
   }
}
EVR.Level.Loader.Parser.prototype.add_cluster = function(tag)
{
   var level = this.level;
   var passage = tag.getAttribute("passage");
   var width = tag.getAttribute("width");
   var gap = tag.getAttribute("gap");
   var cluster = new EVR.Level.Cluster(passage, width, gap, level.practice);
   level.clusters.push(cluster);
}
EVR.Level.Loader.Parser.prototype.toString = function()
{
   return "[object EVR.Level.Loader.Parser]";
}
216.73.216.131
216.73.216.131
216.73.216.131
 
March 22, 2020

The chicken nugget business starter kit is now available online! Send me any amount of money through Venmo or PayPal, and I will mail you a package which will enable you to start a chicken nugget business of your own, play a video game any time you want, introduce a new character into your Animal Crossing village, and start collecting the chicken nugget trading cards.

The kit includes:

  • jellybean
  • instruction manual
  • limited edition trading card

By following the instructions you'll learn how to cook your own chicken or tofu nugget and be well on your way to financial success. I'm also throwing in one randomly selected card from the limited edition trading card set. Collect them, trade them, and if you get all eighteen and show me your set, I will give you an exclusive video game product.

All orders are processed within a day, so you can have your kit on your doorstep as quickly as possible. Don't sleep on this offer! Click the PayPal button or send a Venmo payment of any amount to @ohsqueezy, and in a matter of days you'll be counting money and playing video games.

PayPal me