EVR.Level.Register.Preview = function(register, index)
{
   EVR.Graphic.call(this, register, null, null, ALIGN_BOTTOM_LEFT);
   this.index = index;
   this.level = register.level;
   this.clusters = this.level.clusters;
   this.beams = this.level.beams;
   this.margin = register.margin;
   this.item = index;
   this.set_border();
   this.set_color();
   this.set_proportions();
   this.append();
}
EVR.Level.Register.Preview.prototype = new EVR.Graphic;
EVR.Level.Register.Preview.prototype.set_border = function()
{
   this.css.border = PREVIEW_BORDER_WIDTH + " " + PREVIEW_BORDER_STYLE;
}
EVR.Level.Register.Preview.prototype.set_color = function()
{
   var passage = this.clusters[this.item].passage;
   var color = this.beams[passage];
   EVR.Graphic.prototype.set_color.call(this, color);
}
EVR.Level.Register.Preview.prototype.set_proportions = function()
{
   var width = PREVIEW_FIRST_WIDTH;
   if (this.index > 0)
   {
      width *= PREVIEW_SIZE_VARIANCE / this.index;
   }
   var height = 1 - this.margin[1];
   EVR.Graphic.prototype.set_proportions.call(this, width, height);
}
EVR.Level.Register.Preview.prototype.calculate_width = function(ii)
{
   if (typeof(ii) == "undefined")
   {
      ii = this.index;
   }
   var width = PREVIEW_FIRST_WIDTH;
   if (ii > 0)
   {
      width *= PREVIEW_SIZE_VARIANCE / ii;
   }
   return width;
}
EVR.Level.Register.Preview.prototype.place = function()
{
   var x = this.margin[0];
   for (var ii = 0; ii < this.index; ii++)
   {
      x += this.calculate_width(ii) + PREVIEW_MARGIN;
   }
   EVR.Graphic.prototype.place.call(this, x);
}
EVR.Level.Register.Preview.prototype.advance = function(ii)
{
   this.item = ii + this.index + 1;
   if (this.item < this.clusters.length)
   {
      this.set_color();
   }
}
EVR.Level.Register.Preview.prototype.shape = function()
{
   EVR.Graphic.prototype.shape.call(this);
   if (!!window.ActiveXObject)
   {
      var dimensions = this.get_dimensions();
      var adjustment = PREVIEW_BORDER_WIDTH * 2;
      this.set_dimensions(
	 dimensions[0] + adjustment, dimensions[1] + adjustment);
   }
}
EVR.Level.Register.Preview.prototype.toString = function()
{
   return "[object EVR.Level.Register.Preview]";
}
EVR.include("level/register/Preview.js");
EVR.Level.Register = function(level)
{
   EVR.Graphic.call(this, level.road, null, null, null, level.road.container);
   this.level = level;
   this.road = level.road;
   this.height = REGISTER_HEIGHT;
   this.margin = REGISTER_MARGIN;
   this.count = REGISTER_COUNT;
   this.previews = [];
   this.build();
   this.append();
   this.add_previews();
}
EVR.Level.Register.prototype = new EVR.Graphic;
EVR.Level.Register.prototype.build = function()
{
   this.set_proportions(REGISTER_WIDTH, this.height);
   this.set_color(this.level.background);
   this.set_opacity(REGISTER_OPACITY);
   this.css.borderTop = ROAD_DIVIDER_STYLE;
}
EVR.Level.Register.prototype.add_previews = function()
{
   var previews = [];
   for (var ii = 0; ii < REGISTER_COUNT; ii++)
   {
      previews.push(new EVR.Level.Register.Preview(this, ii));
   }
   this.previews = previews;
}
EVR.Level.Register.prototype.place = function()
{
   EVR.Graphic.prototype.place.call(this);
   var y = this.road.borders.get_dimensions()[1];
   y += this.get_dimensions()[1];
   this.set_coordinates([null, -y]);
}
EVR.Level.Register.prototype.draw = function()
{
   EVR.Graphic.prototype.draw.call(this);
   var previews = this.previews;
   for (var ii = 0; ii < previews.length; ii++)
   {
      previews[ii].draw();
   }
}
EVR.Level.Register.prototype.advance = function(item_index)
{
   var previews = this.previews;
   for (var ii = 0; ii < previews.length; ii++)
   {
      previews[ii].advance(item_index);
   }
}
EVR.Level.Register.prototype.toString = function()
{
   return "[object EVR.Level.Register]";
}
EVR.include("level/road/Borders.js");
EVR.include("level/road/racer/Racer.js");
EVR.include("level/road/path/Path.js");
EVR.Level.Road = function(level)
{
   EVR.Graphic.call(this, level.container, null, null, ALIGN_CENTER);
   this.level = level;
   this.dimensions = [0, 0];
   this.set_constants();
   this.orient();
   this.set_color(this.level.background);
   this.append();
   this.add_children();
}
EVR.Level.Road.prototype = new EVR.Graphic;
EVR.Level.Road.prototype.set_constants = function()
{
   this.margin = MENU_OPTION_MARGIN;
   this.beam_height = ROAD_BEAM_HEIGHT;
}
EVR.Level.Road.prototype.orient = function()
{
   this.set_proportions();
   this.place(0, ROAD_OFFSET);
}
EVR.Level.Road.prototype.set_proportions = function()
{
   var count = this.level.count_lanes();
   var height = count * this.beam_height + this.margin * (count - 1);
   EVR.Graphic.prototype.set_proportions.call(this, 1, height);
}
EVR.Level.Road.prototype.add_children = function()
{
   this.borders = new EVR.Level.Road.Borders(this, this.level);
   this.racer = new EVR.Level.Road.Racer.Player(this, this.level);
   if (!this.level.practice)
   {
      this.ghost = new EVR.Level.Road.Racer.Ghost(this, this.level);
   }
   this.path = new EVR.Level.Road.Path(this, this.level);
}
EVR.Level.Road.prototype.draw = function()
{
   EVR.Graphic.prototype.draw.call(this);
   !!this.borders && this.borders.draw();
   !!this.racer && this.racer.draw();
   !!this.ghost && this.ghost.draw();
   if (!this.level.states[LEVEL_STATE_FINISHED])
   {
      !!this.path && this.path.draw();
   }
}
EVR.Level.Road.prototype.shape = function()
{
   EVR.Graphic.prototype.shape.call(this);
   this.update_dimensions();
}
EVR.Level.Road.prototype.get_dimensions = function(ratio)
{
   if (ratio == true)
   {
      return EVR.Graphic.prototype.get_dimensions.call(this, true);
   }
   else
   {
      return this.dimensions;
   }
}
EVR.Level.Road.prototype.update_dimensions = function()
{
   this.dimensions = EVR.Graphic.prototype.get_dimensions.call(this);
}
EVR.Level.Road.prototype.remove = function()
{
   EVR.Graphic.prototype.remove.call(this);
   this.racer.avatar.attached && this.racer.remove();
}
EVR.Level.Road.prototype.toString = function()
{
   return "[object EVR.Level.Road]";
}
3.145.109.244
3.145.109.244
3.145.109.244
 
July 18, 2022


A new era ‼

Our infrastructure has recently upgraded ‼

Nugget Communications Bureau 👍

You've never emailed like this before ‼

Roundcube

Webmail software for reading and sending email from @nugget.fun and @shampoo.ooo addresses.

Mailman3

Email discussion lists, modernized with likes and emojis. It can be used for announcements and newsletters in addition to discussions. See lists for Picture Processing or Scrapeboard. Nowadays, people use Discord, but you really don't have to!

FreshRSS

With this hidden in plain sight, old technology, even regular people like you and me can start our own newspaper or social media feed.

Nugget Streaming Media 👍

The content you crave ‼

HLS

A live streaming, video format based on M3U playlists that can be played with HTML5.

RTMP

A plugin for Nginx can receive streaming video from ffmpeg or OBS and forward it as an RTMP stream to sites like Youtube and Twitch or directly to VLC.


Professional ‼

Nugget Productivity Suite 👍

Unleash your potential ‼

Kanboard

Virtual index cards you can use to gamify your daily grind.

Gitea

Grab whatever game code you want, share your edits, and report bugs.

Nugget Security 👍

The real Turing test ‼

Fail2ban

Banning is even more fun when it's automated.

Spamassassin

The documentation explains, "an email which mentions rolex watches, Viagra, porn, and debt all in one" will probably be considered spam.

GoAccess

Display HTTP requests in real time, so you can watch bots try to break into WordPress.

Nugget Entertainment Software 👍

The best in gaming entertainment ‼

Emoticon vs. Rainbow

With everything upgraded to the bleeding edge, this HTML4 game is running better than ever.


Zoom ‼

The game engine I've been working on, SPACE BOX, is now able to export to web, so I'm planning on turning nugget.fun into a games portal by releasing my games on it and adding an accounts system. The upgraded server and software will make it easier to create and maintain. I'm also thinking of using advertising and subscriptions to support the portal, so some of these services, like webmail or the RSS reader, may be offered to accounts that upgrade to a paid subscription.